A exception that was already being caught.

This commit is contained in:
psxlover 2012-05-27 01:56:33 +03:00 committed by SirSengir
parent 37cac720e6
commit 50a4fa1ea0

View file

@ -85,7 +85,11 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor,
if(nbttagcompound.hasKey("owner"))
owner = nbttagcompound.getString("owner");
pipe = BlockGenericPipe.createPipe(nbttagcompound.getInteger("pipeId"));
int key = nbttagcompound.getInteger("pipeId");
if (key > 0) {
pipe = BlockGenericPipe.createPipe(key);
}
if (pipe != null) {
pipe.setTile(this);
pipe.readFromNBT(nbttagcompound);