From 90a515c8372ad3f5a985a46d58e1b02d260e6fe2 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 9 Nov 2014 12:49:38 +0100 Subject: [PATCH] kill TileDummyGenericPipe, cleanup --- common/buildcraft/energy/TileEngineIron.java | 5 ++++- .../transport/PipeTransportStructure.java | 4 +++- .../buildcraft/transport/TileDummyGenericPipe.java | 13 ------------- .../buildcraft/transport/TileDummyGenericPipe2.java | 13 ------------- common/buildcraft/transport/TransportProxy.java | 5 ++--- .../buildcraft/transport/TransportProxyClient.java | 2 -- 6 files changed, 9 insertions(+), 33 deletions(-) delete mode 100644 common/buildcraft/transport/TileDummyGenericPipe.java delete mode 100644 common/buildcraft/transport/TileDummyGenericPipe2.java diff --git a/common/buildcraft/energy/TileEngineIron.java b/common/buildcraft/energy/TileEngineIron.java index 1195592a..d5e83033 100644 --- a/common/buildcraft/energy/TileEngineIron.java +++ b/common/buildcraft/energy/TileEngineIron.java @@ -378,7 +378,10 @@ public class TileEngineIron extends TileEngineWithInventory implements IFluidHan @Override public FluidTankInfo[] getTankInfo(ForgeDirection direction) { - return tankManager.getTankInfo(direction); + if (direction == orientation) { + return null; + } + return tankManager.getTankInfo(direction); } @Override diff --git a/common/buildcraft/transport/PipeTransportStructure.java b/common/buildcraft/transport/PipeTransportStructure.java index 94a9c5c8..023cee8f 100644 --- a/common/buildcraft/transport/PipeTransportStructure.java +++ b/common/buildcraft/transport/PipeTransportStructure.java @@ -29,8 +29,10 @@ public class PipeTransportStructure extends PipeTransport { if (BlockGenericPipe.isValid(pipe2) && !(pipe2.transport instanceof PipeTransportStructure)) { return false; } + + return true; } - return tile instanceof TileGenericPipe; + return false; } } diff --git a/common/buildcraft/transport/TileDummyGenericPipe.java b/common/buildcraft/transport/TileDummyGenericPipe.java deleted file mode 100644 index 0aa4ea2e..00000000 --- a/common/buildcraft/transport/TileDummyGenericPipe.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ -package buildcraft.transport; - -public class TileDummyGenericPipe extends TileGenericPipe { - -} diff --git a/common/buildcraft/transport/TileDummyGenericPipe2.java b/common/buildcraft/transport/TileDummyGenericPipe2.java deleted file mode 100644 index 718c6854..00000000 --- a/common/buildcraft/transport/TileDummyGenericPipe2.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ -package buildcraft.transport; - -public class TileDummyGenericPipe2 extends TileGenericPipe { - -} diff --git a/common/buildcraft/transport/TransportProxy.java b/common/buildcraft/transport/TransportProxy.java index ac0df30b..566a660c 100644 --- a/common/buildcraft/transport/TransportProxy.java +++ b/common/buildcraft/transport/TransportProxy.java @@ -20,9 +20,8 @@ public class TransportProxy { public static int pipeModel = -1; public void registerTileEntities() { - GameRegistry.registerTileEntity(TileDummyGenericPipe.class, "net.minecraft.src.buildcraft.GenericPipe"); - GameRegistry.registerTileEntity(TileDummyGenericPipe2.class, "net.minecraft.src.buildcraft.transport.TileGenericPipe"); - GameRegistry.registerTileEntity(TileGenericPipe.class, "net.minecraft.src.buildcraft.transport.GenericPipe"); + // The first name here is the current TE name; the remaining names are old names used for backwards compatibility + GameRegistry.registerTileEntityWithAlternatives(TileGenericPipe.class, "net.minecraft.src.buildcraft.transport.GenericPipe", "net.minecraft.src.buildcraft.GenericPipe", "net.minecraft.src.buildcraft.transport.TileGenericPipe"); GameRegistry.registerTileEntity(TileFilteredBuffer.class, "net.minecraft.src.buildcraft.transport.TileFilteredBuffer"); } diff --git a/common/buildcraft/transport/TransportProxyClient.java b/common/buildcraft/transport/TransportProxyClient.java index 79f35155..ed3d1a83 100644 --- a/common/buildcraft/transport/TransportProxyClient.java +++ b/common/buildcraft/transport/TransportProxyClient.java @@ -35,8 +35,6 @@ public class TransportProxyClient extends TransportProxy { public void registerTileEntities() { super.registerTileEntities(); PipeRendererTESR rp = new PipeRendererTESR(); - ClientRegistry.bindTileEntitySpecialRenderer(TileDummyGenericPipe.class, rp); - ClientRegistry.bindTileEntitySpecialRenderer(TileDummyGenericPipe2.class, rp); ClientRegistry.bindTileEntitySpecialRenderer(TileGenericPipe.class, rp); }