本文整理汇总了Java中net.minecraft.entity.boss.EntityWither.ignite方法的典型用法代码示例。如果您正苦于以下问题:Java EntityWither.ignite方法的具体用法?Java EntityWither.ignite怎么用?Java EntityWither.ignite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.boss.EntityWither
的用法示例。
在下文中一共展示了EntityWither.ignite方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onFinish
import net.minecraft.entity.boss.EntityWither; //导入方法依赖的package包/类
@Override
public void onFinish(EntityPlayer player, IRitualHandler tile, World world, BlockPos pos, NBTTagCompound data) {
if (!world.isRemote) {
EntityWither entitywither = new EntityWither(world);
BlockPos blockpos1 = pos.add(0, 0, 0);
entitywither.setLocationAndAngles(blockpos1.getX() + 0.5D, blockpos1.getY() + 0.55D, blockpos1.getZ() + 0.5D, 0F, 0F);
for (EntityPlayerMP entityplayermp : world.getEntitiesWithinAABB(EntityPlayerMP.class, entitywither.getEntityBoundingBox().grow(50.0D))) {
CriteriaTriggers.SUMMONED_ENTITY.trigger(entityplayermp, entitywither);
}
world.spawnEntity(entitywither);
entitywither.ignite();
}
}
示例2: checkWitherSpawn
import net.minecraft.entity.boss.EntityWither; //导入方法依赖的package包/类
public void checkWitherSpawn(World worldIn, BlockPos pos, TileEntitySkull te)
{
if (te.getSkullType() == 1 && pos.getY() >= 2 && worldIn.getDifficulty() != EnumDifficulty.PEACEFUL && !worldIn.isRemote)
{
BlockPattern blockpattern = this.getWitherPattern();
BlockPattern.PatternHelper blockpattern$patternhelper = blockpattern.match(worldIn, pos);
if (blockpattern$patternhelper != null)
{
for (int i = 0; i < 3; ++i)
{
BlockWorldState blockworldstate = blockpattern$patternhelper.translateOffset(i, 0, 0);
worldIn.setBlockState(blockworldstate.getPos(), blockworldstate.getBlockState().withProperty(NODROP, Boolean.valueOf(true)), 2);
}
for (int j = 0; j < blockpattern.getPalmLength(); ++j)
{
for (int k = 0; k < blockpattern.getThumbLength(); ++k)
{
BlockWorldState blockworldstate1 = blockpattern$patternhelper.translateOffset(j, k, 0);
worldIn.setBlockState(blockworldstate1.getPos(), Blocks.AIR.getDefaultState(), 2);
}
}
BlockPos blockpos = blockpattern$patternhelper.translateOffset(1, 0, 0).getPos();
EntityWither entitywither = new EntityWither(worldIn);
BlockPos blockpos1 = blockpattern$patternhelper.translateOffset(1, 2, 0).getPos();
entitywither.setLocationAndAngles((double)blockpos1.getX() + 0.5D, (double)blockpos1.getY() + 0.55D, (double)blockpos1.getZ() + 0.5D, blockpattern$patternhelper.getForwards().getAxis() == EnumFacing.Axis.X ? 0.0F : 90.0F, 0.0F);
entitywither.renderYawOffset = blockpattern$patternhelper.getForwards().getAxis() == EnumFacing.Axis.X ? 0.0F : 90.0F;
entitywither.ignite();
for (EntityPlayer entityplayer : worldIn.getEntitiesWithinAABB(EntityPlayer.class, entitywither.getEntityBoundingBox().expandXyz(50.0D)))
{
entityplayer.addStat(AchievementList.SPAWN_WITHER);
}
worldIn.spawnEntityInWorld(entitywither);
for (int l = 0; l < 120; ++l)
{
worldIn.spawnParticle(EnumParticleTypes.SNOWBALL, (double)blockpos.getX() + worldIn.rand.nextDouble(), (double)(blockpos.getY() - 2) + worldIn.rand.nextDouble() * 3.9D, (double)blockpos.getZ() + worldIn.rand.nextDouble(), 0.0D, 0.0D, 0.0D, new int[0]);
}
for (int i1 = 0; i1 < blockpattern.getPalmLength(); ++i1)
{
for (int j1 = 0; j1 < blockpattern.getThumbLength(); ++j1)
{
BlockWorldState blockworldstate2 = blockpattern$patternhelper.translateOffset(i1, j1, 0);
worldIn.notifyNeighborsRespectDebug(blockworldstate2.getPos(), Blocks.AIR, false);
}
}
}
}
}
示例3: checkWitherSpawn
import net.minecraft.entity.boss.EntityWither; //导入方法依赖的package包/类
public void checkWitherSpawn(World worldIn, BlockPos pos, TileEntitySkull te)
{
if (te.getSkullType() == 1 && pos.getY() >= 2 && worldIn.getDifficulty() != EnumDifficulty.PEACEFUL && !worldIn.isRemote)
{
BlockPattern blockpattern = this.getWitherPattern();
BlockPattern.PatternHelper blockpattern$patternhelper = blockpattern.match(worldIn, pos);
if (blockpattern$patternhelper != null)
{
for (int i = 0; i < 3; ++i)
{
BlockWorldState blockworldstate = blockpattern$patternhelper.translateOffset(i, 0, 0);
worldIn.setBlockState(blockworldstate.getPos(), blockworldstate.getBlockState().withProperty(NODROP, Boolean.valueOf(true)), 2);
}
for (int j = 0; j < blockpattern.getPalmLength(); ++j)
{
for (int k = 0; k < blockpattern.getThumbLength(); ++k)
{
BlockWorldState blockworldstate1 = blockpattern$patternhelper.translateOffset(j, k, 0);
worldIn.setBlockState(blockworldstate1.getPos(), Blocks.AIR.getDefaultState(), 2);
}
}
BlockPos blockpos = blockpattern$patternhelper.translateOffset(1, 0, 0).getPos();
EntityWither entitywither = new EntityWither(worldIn);
BlockPos blockpos1 = blockpattern$patternhelper.translateOffset(1, 2, 0).getPos();
entitywither.setLocationAndAngles((double)blockpos1.getX() + 0.5D, (double)blockpos1.getY() + 0.55D, (double)blockpos1.getZ() + 0.5D, blockpattern$patternhelper.getForwards().getAxis() == EnumFacing.Axis.X ? 0.0F : 90.0F, 0.0F);
entitywither.renderYawOffset = blockpattern$patternhelper.getForwards().getAxis() == EnumFacing.Axis.X ? 0.0F : 90.0F;
entitywither.ignite();
for (EntityPlayer entityplayer : worldIn.getEntitiesWithinAABB(EntityPlayer.class, entitywither.getEntityBoundingBox().expandXyz(50.0D)))
{
entityplayer.addStat(AchievementList.SPAWN_WITHER);
}
worldIn.spawnEntityInWorld(entitywither);
for (int l = 0; l < 120; ++l)
{
worldIn.spawnParticle(EnumParticleTypes.SNOWBALL, (double)blockpos.getX() + worldIn.rand.nextDouble(), (double)(blockpos.getY() - 2) + worldIn.rand.nextDouble() * 3.9D, (double)blockpos.getZ() + worldIn.rand.nextDouble(), 0.0D, 0.0D, 0.0D, new int[0]);
}
for (int i1 = 0; i1 < blockpattern.getPalmLength(); ++i1)
{
for (int j1 = 0; j1 < blockpattern.getThumbLength(); ++j1)
{
BlockWorldState blockworldstate2 = blockpattern$patternhelper.translateOffset(i1, j1, 0);
worldIn.notifyNeighborsRespectDebug(blockworldstate2.getPos(), Blocks.AIR);
}
}
}
}
}