Fixed server-crashing bug (nuclear creeper transformation)

This commit is contained in:
HbmMods 2016-01-15 19:11:04 +01:00
parent 68973b9913
commit 05674846dd
5 changed files with 8 additions and 8 deletions

View File

@ -105,7 +105,7 @@ public class BlockOre extends Block {
} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
@ -126,7 +126,7 @@ public class BlockOre extends Block {
} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
if(!entity.isDead)
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
@ -149,7 +149,7 @@ public class BlockOre extends Block {
} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
if(!entity.isDead)
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);

View File

@ -266,8 +266,8 @@ public class ModBlocks {
steel_scaffold = new DecoBlock(Material.rock).setBlockName("steel_scaffold").setCreativeTab(MainRegistry.tabBlock).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_scaffold");
mush = new BlockMush(Material.plants).setBlockName("mush").setCreativeTab(MainRegistry.tabBlock).setLightLevel(0.5F).setStepSound(Block.soundTypeGrass).setBlockTextureName(RefStrings.MODID + ":mush");
mush_block = new BlockMushHuge(Material.plants).setBlockName("mush_block").setCreativeTab(MainRegistry.tabBlock).setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_skin");
mush_block_stem = new BlockMushHuge(Material.plants).setBlockName("mush_block_stem").setCreativeTab(MainRegistry.tabBlock).setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_stem");
mush_block = new BlockMushHuge(Material.plants).setBlockName("mush_block").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_skin");
mush_block_stem = new BlockMushHuge(Material.plants).setBlockName("mush_block_stem").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_stem");
waste_earth = new WasteEarth(Material.ground).setBlockName("waste_earth").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.tabBlock).setHardness(0.5F).setResistance(1.0F).setBlockTextureName(RefStrings.MODID + ":waste_earth");
waste_mycelium = new WasteEarth(Material.ground).setBlockName("waste_mycelium").setStepSound(Block.soundTypeGrass).setLightLevel(1F).setCreativeTab(MainRegistry.tabBlock).setHardness(0.5F).setResistance(1.0F).setBlockTextureName(RefStrings.MODID + ":waste_mycelium_side");

View File

@ -67,7 +67,7 @@ public class TileEntityYellowBarrel extends TileEntity {
} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(this.worldObj);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
if(!entity.isDead)
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(creep);

View File

@ -86,7 +86,7 @@ public class WasteEarth extends Block {
} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
if(!entity.isDead)
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);

View File

@ -239,7 +239,7 @@ public class EntityNuclearCreeper extends EntityMob {
} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(this.worldObj);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
if(!entity.isDead)
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(creep);