Fixed client crash when placing network blocks, fixes #707
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
### 1.3.2
|
||||
- Fixed being able to exceed max stack size while shift clicking (raoulvdberge)
|
||||
- Fixed Wrench clearing NBT data when reset causing problems with Morph O Tool (raoulvdberge)
|
||||
- Fixed client crash when placing network blocks (raoulvdberge)
|
||||
|
||||
### 1.3.1
|
||||
- Updated Forge to 2180 (raoulvdberge)
|
||||
|
||||
@@ -30,16 +30,18 @@ public abstract class BlockNode extends BlockBase {
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, pos, state, placer, stack);
|
||||
|
||||
for (EnumFacing facing : EnumFacing.VALUES) {
|
||||
TileEntity tile = world.getTileEntity(pos.offset(facing));
|
||||
if (!world.isRemote) {
|
||||
for (EnumFacing facing : EnumFacing.VALUES) {
|
||||
TileEntity tile = world.getTileEntity(pos.offset(facing));
|
||||
|
||||
if (tile != null && tile.hasCapability(CapabilityNetworkNode.NETWORK_NODE_CAPABILITY, facing.getOpposite())) {
|
||||
INetworkNode node = tile.getCapability(CapabilityNetworkNode.NETWORK_NODE_CAPABILITY, facing.getOpposite());
|
||||
if (tile != null && tile.hasCapability(CapabilityNetworkNode.NETWORK_NODE_CAPABILITY, facing.getOpposite())) {
|
||||
INetworkNode node = tile.getCapability(CapabilityNetworkNode.NETWORK_NODE_CAPABILITY, facing.getOpposite());
|
||||
|
||||
if (node.getNetwork() != null) {
|
||||
node.getNetwork().getNodeGraph().rebuild();
|
||||
if (node.getNetwork() != null) {
|
||||
node.getNetwork().getNodeGraph().rebuild();
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user