Fix #1282 NullPointerException from Cocoon with invalid caterpillar

This commit is contained in:
mezz committed 2016-06-04 01:03:13 -07:00
1 parent 6ef91590cf
commit dcf0fc83ad
2 files changed
+6 -1

No files matched your search

@@ -191,6 +191,11 @@ public class TileCocoon extends TileEntity implements IStreamable, IOwnable, IBu
}
public void onBlockTick() {
if (caterpillar == null) {
worldObj.setBlockToAir(getPos());
return;
}
maturationTime++;
IButterflyGenome caterpillarGenome = caterpillar.getGenome();