public void onBlockAdded(World world, int i, int j, int k) {
   super.onBlockAdded(world, i, j, k);
   if (world.multiplayerWorld) {
     return;
   }
   updateAndPropagateCurrentStrength(world, i, j, k);
   world.notifyBlocksOfNeighborChange(i, j + 1, k, blockID);
   world.notifyBlocksOfNeighborChange(i, j - 1, k, blockID);
   notifyWireNeighborsOfNeighborChange(world, i - 1, j, k);
   notifyWireNeighborsOfNeighborChange(world, i + 1, j, k);
   notifyWireNeighborsOfNeighborChange(world, i, j, k - 1);
   notifyWireNeighborsOfNeighborChange(world, i, j, k + 1);
   if (world.isBlockOpaqueCube(i - 1, j, k)) {
     notifyWireNeighborsOfNeighborChange(world, i - 1, j + 1, k);
   } else {
     notifyWireNeighborsOfNeighborChange(world, i - 1, j - 1, k);
   }
   if (world.isBlockOpaqueCube(i + 1, j, k)) {
     notifyWireNeighborsOfNeighborChange(world, i + 1, j + 1, k);
   } else {
     notifyWireNeighborsOfNeighborChange(world, i + 1, j - 1, k);
   }
   if (world.isBlockOpaqueCube(i, j, k - 1)) {
     notifyWireNeighborsOfNeighborChange(world, i, j + 1, k - 1);
   } else {
     notifyWireNeighborsOfNeighborChange(world, i, j - 1, k - 1);
   }
   if (world.isBlockOpaqueCube(i, j, k + 1)) {
     notifyWireNeighborsOfNeighborChange(world, i, j + 1, k + 1);
   } else {
     notifyWireNeighborsOfNeighborChange(world, i, j - 1, k + 1);
   }
 }
Ejemplo n.º 2
0
 public void onBlockAdded(World world, int i, int j, int k) {
   super.onBlockAdded(world, i, j, k);
 }