Re-added Controllers exploding when two of them are connected to the same network
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
- Fixed wireless signal starting from Controller instead of per Wireless Transmitter individually
|
- Fixed wireless signal starting from Controller instead of per Wireless Transmitter individually
|
||||||
- Huge performance improvements to large networks
|
- Huge performance improvements to large networks
|
||||||
|
|
||||||
|
**Features**
|
||||||
|
- Re-added Controllers exploding when two of them are connected to the same network
|
||||||
|
|
||||||
### 0.8.5
|
### 0.8.5
|
||||||
**Bugfixes**
|
**Bugfixes**
|
||||||
- Fixed crash when Tesla API is not installed
|
- Fixed crash when Tesla API is not installed
|
||||||
|
@@ -59,7 +59,11 @@ public abstract class BlockNode extends BlockBase {
|
|||||||
@Override
|
@Override
|
||||||
public void breakBlock(World world, BlockPos pos, IBlockState state) {
|
public void breakBlock(World world, BlockPos pos, IBlockState state) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
(((TileNode) world.getTileEntity(pos)).getNetwork()).rebuildNodes();
|
TileEntity tile = world.getTileEntity(pos);
|
||||||
|
|
||||||
|
if (tile instanceof TileNode && ((TileNode) tile).isConnected()) {
|
||||||
|
(((TileNode) tile).getNetwork()).rebuildNodes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.breakBlock(world, pos, state);
|
super.breakBlock(world, pos, state);
|
||||||
|
@@ -398,6 +398,10 @@ public class TileController extends TileBase implements INetworkMaster, IEnergyR
|
|||||||
while ((currentPos = toCheck.poll()) != null) {
|
while ((currentPos = toCheck.poll()) != null) {
|
||||||
TileEntity tile = worldObj.getTileEntity(currentPos);
|
TileEntity tile = worldObj.getTileEntity(currentPos);
|
||||||
|
|
||||||
|
if (tile instanceof TileController && !pos.equals(tile.getPos())) {
|
||||||
|
worldObj.createExplosion(null, tile.getPos().getX(), tile.getPos().getY(), tile.getPos().getZ(), 4.5f, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (!(tile instanceof INetworkNode)) {
|
if (!(tile instanceof INetworkNode)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user