make more clear
This commit is contained in:
@@ -33,7 +33,7 @@ public class TileCable extends TileBase {
|
|||||||
return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 1;
|
return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isActive() {
|
public boolean isEnabled() {
|
||||||
if (isSensitiveCable()) {
|
if (isSensitiveCable()) {
|
||||||
return !isPowered();
|
return !isPowered();
|
||||||
}
|
}
|
||||||
@@ -73,12 +73,8 @@ public class TileCable extends TileBase {
|
|||||||
machines.add((TileMachine) tile);
|
machines.add((TileMachine) tile);
|
||||||
|
|
||||||
visited.add(Vec3.createVectorHelper(x, y, z));
|
visited.add(Vec3.createVectorHelper(x, y, z));
|
||||||
} else if (tile instanceof TileCable) {
|
} else if (tile instanceof TileCable && ((TileCable) tile).isEnabled()) {
|
||||||
TileCable cable = (TileCable) tile;
|
|
||||||
|
|
||||||
if (cable.isActive()) {
|
|
||||||
((TileCable) tile).addMachines(visited, machines, controller);
|
((TileCable) tile).addMachines(visited, machines, controller);
|
||||||
}
|
|
||||||
} else if (tile instanceof TileController && (x != controller.xCoord || y != controller.yCoord || z != controller.zCoord)) {
|
} else if (tile instanceof TileController && (x != controller.xCoord || y != controller.yCoord || z != controller.zCoord)) {
|
||||||
worldObj.createExplosion(null, x, y, z, 4.5f, true);
|
worldObj.createExplosion(null, x, y, z, 4.5f, true);
|
||||||
}
|
}
|
||||||
|
@@ -53,7 +53,7 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
|||||||
if (tile instanceof TileCable) {
|
if (tile instanceof TileCable) {
|
||||||
TileCable cable = (TileCable) tile;
|
TileCable cable = (TileCable) tile;
|
||||||
|
|
||||||
if (cable.isActive()) {
|
if (cable.isEnabled()) {
|
||||||
cable.addMachines(visitedCables, newMachines, this);
|
cable.addMachines(visitedCables, newMachines, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user