Merge branch 'patch-676' of git://github.com/Flow86/BuildCraft into Flow86-patch-676
This commit is contained in:
commit
ada2bad7b0
3 changed files with 31 additions and 1 deletions
7
common/buildcraft/api/transport/ISolidSideTile.java
Normal file
7
common/buildcraft/api/transport/ISolidSideTile.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public interface ISolidSideTile {
|
||||
public boolean isSolidOnSide(ForgeDirection side);
|
||||
}
|
|
@ -35,6 +35,7 @@ import buildcraft.BuildCraftCore;
|
|||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import buildcraft.api.transport.IPipe;
|
||||
import buildcraft.api.transport.ISolidSideTile;
|
||||
import buildcraft.core.BlockIndex;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
|
@ -93,6 +94,15 @@ public class BlockGenericPipe extends BlockContainer {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) {
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
if (tile instanceof ISolidSideTile) {
|
||||
return ((ISolidSideTile) tile).isSolidOnSide(side);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isACube() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ import buildcraft.api.transport.IPipeConnection;
|
|||
import buildcraft.api.transport.IPipeEntry;
|
||||
import buildcraft.api.transport.IPipeTile;
|
||||
import buildcraft.api.transport.IPipedItem;
|
||||
import buildcraft.api.transport.ISolidSideTile;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.EntityPassiveItem;
|
||||
import buildcraft.core.IDropControlInventory;
|
||||
|
@ -53,7 +54,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITankContainer, IPipeEntry, IPipeTile, IOverrideDefaultTriggers, ITileBufferHolder,
|
||||
IPipeConnection, IDropControlInventory, IPipeRenderState, ISyncedTile {
|
||||
IPipeConnection, IDropControlInventory, IPipeRenderState, ISyncedTile, ISolidSideTile {
|
||||
|
||||
private class CoreState implements IClientState {
|
||||
|
||||
|
@ -665,4 +666,16 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank
|
|||
public boolean shouldRefresh(int oldID, int newID, int oldMeta, int newMeta, World world, int x, int y, int z) {
|
||||
return oldID != newID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSolidOnSide(ForgeDirection side) {
|
||||
if (hasFacade(side))
|
||||
return true;
|
||||
|
||||
if (BlockGenericPipe.isValid(pipe) && pipe instanceof ISolidSideTile) {
|
||||
if (((ISolidSideTile) pipe).isSolidOnSide(side))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue