This commit is contained in:
Bob 2023-04-28 00:17:07 +02:00
parent aadd7c548d
commit 750500a8e1
3 changed files with 10 additions and 4 deletions

View File

@ -185,7 +185,7 @@ public class BlockTaint extends Block/*Container*/ {
}
}
if(entity instanceof EntityCreeper) {
if(entity != null && entity.getClass().equals(EntityCreeper.class)) {
EntityCreeperTainted creep = new EntityCreeperTainted(world);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);

View File

@ -574,7 +574,7 @@ public class ModEventHandler {
float eRad = HbmLivingProps.getRadiation(entity);
if(entity instanceof EntityCreeper && eRad >= 200 && entity.getHealth() > 0) {
if(entity.getClass().equals(EntityCreeper.class) && eRad >= 200 && entity.getHealth() > 0) {
if(event.world.rand.nextInt(3) == 0 ) {
EntityCreeperNuclear creep = new EntityCreeperNuclear(event.world);

View File

@ -222,14 +222,20 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
if(slots[12].stackSize <= 0)
slots[12] = null;
slots[13] = output;
slots[13].stackTagCompound.setBoolean("ntmContagion", false);
slots[13].stackTagCompound.removeTag("ntmContagion");
if(slots[13].stackTagCompound.hasNoTags()) {
slots[13].stackTagCompound = null;
}
} else if(slots[13].isItemEqual(output) && slots[13].stackSize + output.stackSize <= slots[13].getMaxStackSize()) {
slots[12].stackSize -= output.stackSize;
if(slots[12].stackSize <= 0)
slots[12] = null;
slots[13].stackSize += output.stackSize;
slots[13].stackTagCompound.setBoolean("ntmContagion", false);
slots[13].stackTagCompound.removeTag("ntmContagion");
if(slots[13].stackTagCompound.hasNoTags()) {
slots[13].stackTagCompound = null;
}
}
}
}