当前位置: 首页>>代码示例>>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;未经允许,请勿转载。