mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
Unitalized comments
This commit is contained in:
parent
08d12bceb3
commit
af34fb730f
@ -91,28 +91,20 @@ public class ReactorZirnox extends BlockDummyable {
|
|||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
||||||
if (world.isRemote) return;
|
if (world.isRemote) return;
|
||||||
|
|
||||||
// 1. Trova il controller
|
|
||||||
int[] core = this.findCore(world, x, y, z);
|
int[] core = this.findCore(world, x, y, z);
|
||||||
if (core == null) return;
|
if (core == null) return;
|
||||||
|
|
||||||
int cx = core[0];
|
int cx = core[0];
|
||||||
int cy = core[1];
|
int cy = core[1];
|
||||||
int cz = core[2];
|
int cz = core[2];
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(cx, cy, cz);
|
TileEntity te = world.getTileEntity(cx, cy, cz);
|
||||||
if (!(te instanceof TileEntityReactorZirnox)) return;
|
if (!(te instanceof TileEntityReactorZirnox)) return;
|
||||||
|
|
||||||
TileEntityReactorZirnox reactor = (TileEntityReactorZirnox) te;
|
TileEntityReactorZirnox reactor = (TileEntityReactorZirnox) te;
|
||||||
|
|
||||||
boolean powered = false;
|
boolean powered = false;
|
||||||
|
// 2. Scan multiblock
|
||||||
// 2. Scansiona la superficie del multiblock 5x5x5
|
|
||||||
for (int dx = -2; dx <= 2 && !powered; dx++) {
|
for (int dx = -2; dx <= 2 && !powered; dx++) {
|
||||||
for (int dy = 0; dy <= 4 && !powered; dy++) {
|
for (int dy = 0; dy <= 4 && !powered; dy++) {
|
||||||
for (int dz = -2; dz <= 2 && !powered; dz++) {
|
for (int dz = -2; dz <= 2 && !powered; dz++) {
|
||||||
|
// Get only surface blocks
|
||||||
// Solo superficie
|
|
||||||
if (dx == -2 || dx == 2 ||
|
if (dx == -2 || dx == 2 ||
|
||||||
dy == 0 || dy == 4 ||
|
dy == 0 || dy == 4 ||
|
||||||
dz == -2 || dz == 2) {
|
dz == -2 || dz == 2) {
|
||||||
@ -131,8 +123,6 @@ public class ReactorZirnox extends BlockDummyable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Aggiorna la TileEntity
|
|
||||||
reactor.setRedstonePowered(powered);
|
reactor.setRedstonePowered(powered);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user