Exemplo n.º 1
0
 private boolean isConnected(ForgeDirection dir) {
   int x = xCoord + dir.offsetX;
   int y = yCoord + dir.offsetY;
   int z = zCoord + dir.offsetZ;
   ElectriTiles m = this.getMachine();
   ElectriTiles m2 = ElectriTiles.getTE(worldObj, x, y, z);
   if (m == m2) return true;
   // certain TEs
   return false;
 }
Exemplo n.º 2
0
 public void addToAdjacentConnections(World world, int x, int y, int z) {
   for (int i = 0; i < 6; i++) {
     ForgeDirection dir = dirs[i];
     int dx = x + dir.offsetX;
     int dy = x + dir.offsetY;
     int dz = x + dir.offsetZ;
     ElectriTiles m = ElectriTiles.getTE(world, dx, dy, dz);
     if (m == this.getMachine()) {
       TileEntityWire te = (TileEntityWire) world.getTileEntity(dx, dy, dz);
       te.connections[dir.getOpposite().ordinal()] = true;
       world.func_147479_m(dx, dy, dz);
     }
   }
 }