Merge pull request #560 from agaricusb/pipelog

Log coordinates of invalid pipes
This commit is contained in:
SirSengir 2013-01-10 03:00:04 -08:00
commit d5420f8796
2 changed files with 10 additions and 1 deletions

View file

@ -17,6 +17,7 @@ import net.minecraft.world.World;
import buildcraft.BuildCraftTransport;
import buildcraft.core.IItemPipe;
import buildcraft.core.ItemBuildCraft;
import buildcraft.BuildCraftCore;
public class ItemPipe extends ItemBuildCraft implements IItemPipe {
@ -67,6 +68,10 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
if (entityplayer.canCurrentToolHarvestBlock(i, j, k) && world.canPlaceEntityOnSide(blockID, i, j, k, false, side, entityplayer)) {
Pipe pipe = BlockGenericPipe.createPipe(itemID);
if (pipe == null) {
BuildCraftCore.bcLog.warning("Pipe failed to create during placement at "+i+","+j+","+k);
return true;
}
if (BlockGenericPipe.placePipe(pipe, world, i, j, k, blockID, 0)) {
Block.blocksList[blockID].onBlockPlacedBy(world, i, j, k, entityplayer);

View file

@ -122,7 +122,9 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank
if (pipe != null) {
pipe.readFromNBT(nbttagcompound);
}
} else {
BuildCraftCore.bcLog.warning("Pipe failed to load from NBT at "+xCoord+","+yCoord+","+zCoord);
}
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
facadeBlocks[i] = nbttagcompound.getInteger("facadeBlocks[" + i + "]");
@ -292,6 +294,8 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank
if (pipe != null) {
pipe.initialize();
} else {
BuildCraftCore.bcLog.warning("Pipe failed to initialize pipe at "+xCoord+","+yCoord+","+zCoord);
}
initialized = true;