Fix Zombie Generator NPE (#180)

Co-authored-by: boubou19 <miisterunknown@gmail.com>
This commit is contained in:
Kogepan229andboubou19 authored and GitHub committed 2024-11-14 19:22:20 +00:00
1 parent 1d4f6831dd
commit e6ebb5dfec
1 file changed
+11 -1
@@ -40,6 +40,11 @@ public class TileZombieGenerator extends AbstractGeneratorEntity
public String getMachineName() {
return ModObject.blockFrankenzombieGenerator.unlocalisedName;
}
@Override
public GeneratorType getGeneratorType() {
return GeneratorType.FRANKENZOMBIE;
}
}
public static class TileEnderGenerator extends TileZombieGenerator {
@@ -58,6 +63,11 @@ public class TileZombieGenerator extends AbstractGeneratorEntity
protected Fluid getFluidType() {
return EnderIO.fluidEnderDistillation;
}
@Override
public GeneratorType getGeneratorType() {
return GeneratorType.ENDER;
}
}
private static int IO_MB_TICK = 250;
@@ -326,7 +336,7 @@ public class TileZombieGenerator extends AbstractGeneratorEntity
}
public GeneratorType getGeneratorType() {
return ((BlockZombieGenerator) worldObj.getBlock(xCoord, yCoord, zCoord)).getGeneratorType();
return GeneratorType.ZOMBIE;
}
public int getOutputPerTick() {