Skip to content

Commit

Permalink
Fix torches on pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
afdw committed Jan 14, 2018
1 parent 40c6f05 commit 8aa06a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions common/buildcraft/transport/block/BlockPipeHolder.java
Expand Up @@ -16,6 +16,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
Expand Down Expand Up @@ -637,6 +638,16 @@ public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos
return pluggable != null && pluggable.isSideSolid();
}

@Override
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) {
TilePipeHolder tile = getPipe(world, pos, false);
if (tile == null) {
return BlockFaceShape.UNDEFINED;
}
PipePluggable pluggable = tile.getPluggable(face);
return pluggable != null && pluggable.isSideSolid() ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED;
}

private static void removePluggable(EnumFacing side, TilePipeHolder tile, NonNullList<ItemStack> toDrop) {
PipePluggable removed = tile.replacePluggable(side, null);
if (removed != null) {
Expand Down
2 changes: 2 additions & 0 deletions common/buildcraft/transport/tile/TilePipeHolder.java
Expand Up @@ -53,6 +53,7 @@
import buildcraft.lib.net.PacketBufferBC;
import buildcraft.lib.tile.TileBC_Neptune;

import buildcraft.transport.BCTransportBlocks;
import buildcraft.transport.pipe.Pipe;
import buildcraft.transport.pipe.PipeEventBus;
import buildcraft.transport.pipe.PluggableHolder;
Expand Down Expand Up @@ -440,6 +441,7 @@ public PipePluggable replacePluggable(EnumFacing side, PipePluggable with) {
}
scheduleNetworkUpdate(PipeMessageReceiver.PLUGGABLES[side.getIndex()]);
scheduleRenderUpdate();
world.neighborChanged(pos.offset(side), BCTransportBlocks.pipeHolder, pos);
return old;
}

Expand Down

0 comments on commit 8aa06a8

Please sign in to comment.