Ejemplo n.º 1
0
 @Override
 public void onNeighborBlockChange(World world, int i, int j, int k, int l) {
   TileEntity tile = world.getBlockTileEntity(i, j, k);
   if (!(tile instanceof TileExtender)) return;
   TileExtender tileE = (TileExtender) tile;
   tileE.checkRedstonePower();
 }
Ejemplo n.º 2
0
  /** Is this block indirectly powering the block on the specified side */
  public boolean isIndirectlyPoweringTo(IBlockAccess iblock, int x, int y, int z, int dir) {
    boolean res;
    TileEntity tile = iblock.getBlockTileEntity(x, y, z);
    if (tile instanceof TileExtender) {
      TileExtender tilee = (TileExtender) tile;
      res = tilee.isSidePowered(ForgeDirection.getOrientation(dir).getOpposite());
    } else res = false;

    return res;
  }
Ejemplo n.º 3
0
 @Override
 public TileEntity createNewTileEntity(World var1) {
   if (!var1.isRemote || (var1.isRemote && !(var1 instanceof WorldServer)))
     return TileExtender.createInstance();
   else return null;
 }