當前位置: 首頁>>代碼示例>>Java>>正文


Java EntitySkeleton.setLocationAndAngles方法代碼示例

本文整理匯總了Java中net.minecraft.entity.monster.EntitySkeleton.setLocationAndAngles方法的典型用法代碼示例。如果您正苦於以下問題:Java EntitySkeleton.setLocationAndAngles方法的具體用法?Java EntitySkeleton.setLocationAndAngles怎麽用?Java EntitySkeleton.setLocationAndAngles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.entity.monster.EntitySkeleton的用法示例。


在下文中一共展示了EntitySkeleton.setLocationAndAngles方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getRandomSkeletonClasse

import net.minecraft.entity.monster.EntitySkeleton; //導入方法依賴的package包/類
public static EntitySkeleton getRandomSkeletonClasse(World w, double x, double y, double z, Random r)
{
  EntitySkeleton skeleton = new EntitySkeleton(w);
  skeleton.setLocationAndAngles(x, y + 1.0D, z, 0.0F, 0.0F);
  skeleton.setSkeletonType(1);

  int alea = r.nextInt(4);

  if (alea == 0)
  {
  }
  else if (alea == 1)
  {}
  else
  {}

  return skeleton;
}
 
開發者ID:GhostMonk3408,項目名稱:MidgarCrusade,代碼行數:19,代碼來源:APIGen.java

示例2: onInitialSpawn

import net.minecraft.entity.monster.EntitySkeleton; //導入方法依賴的package包/類
@Nullable
@Override
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata) {

    if(!worldObj.isRemote){
        for(int i = 0; i < 4; i++){
            EntitySkeleton mob = new EntitySkeleton(worldObj);
            mob.setSkeletonType(SkeletonType.WITHER);
            mob.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.DIAMOND_SWORD));
            mob.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(4.0D);

            BlockPos pos = pickSpawnPoint();
            mob.setLocationAndAngles(0.5 + pos.getX(), pos.getY(), 0.5 + pos.getZ(), CMath.random.nextFloat() * 360,0);

            worldObj.spawnEntityInWorld(mob);
        }
    }

    return super.onInitialSpawn(difficulty, livingdata);
}
 
開發者ID:KodyJKing,項目名稱:RandomToolKit,代碼行數:21,代碼來源:EntitySkeletonPriest.java

示例3: onSpawnWithEgg

import net.minecraft.entity.monster.EntitySkeleton; //導入方法依賴的package包/類
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData par1EntityLivingData)
   {
       Object par1EntityLivingData1 = super.onSpawnWithEgg(par1EntityLivingData);

       if (this.worldObj.rand.nextInt(100) == 0)
       {
           EntitySkeleton entityskeleton = new EntitySkeleton(this.worldObj);
           entityskeleton.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
           entityskeleton.onSpawnWithEgg((IEntityLivingData)null);
           this.worldObj.spawnEntityInWorld(entityskeleton);
           entityskeleton.mountEntity(this);
       }
      

       return (IEntityLivingData)par1EntityLivingData1;
   }
 
開發者ID:mookie1097,項目名稱:NausicaaMod,代碼行數:18,代碼來源:Ohmu.java

示例4: onSpawnWithEgg

import net.minecraft.entity.monster.EntitySkeleton; //導入方法依賴的package包/類
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData par1EntityLivingData)
   {
       Object par1EntityLivingData1 = super.onSpawnWithEgg(par1EntityLivingData);

       if (this.worldObj.rand.nextInt(100) == 0)
       {
           EntitySkeleton entityskeleton = new EntitySkeleton(this.worldObj);
           entityskeleton.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
           entityskeleton.onSpawnWithEgg((IEntityLivingData)null);
           this.worldObj.spawnEntityInWorld(entityskeleton);
           entityskeleton.mountEntity(this);
       }

       

       return (IEntityLivingData)par1EntityLivingData1;
   }
 
開發者ID:mookie1097,項目名稱:NausicaaMod,代碼行數:19,代碼來源:JungleJelly.java


注:本文中的net.minecraft.entity.monster.EntitySkeleton.setLocationAndAngles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。