예제 #1
0
 @Override
 public boolean onBlockActivated(
     World world, int x, int y, int z, EntityPlayer player, int i, float f, float f1, float f2) {
   TileEntityBFurnace tile = (TileEntityBFurnace) world.getBlockTileEntity(x, y, z);
   if (tile == null || tile.getBlockMetadata() == 0) return false;
   if ((tile.getBlockMetadata() == 1 || tile.getBlockMetadata() == 2) && tile.direction != i)
     return false;
   return tile.interact(player);
 }
예제 #2
0
 public int getBlockTextureInt(IBlockAccess world, int x, int y, int z, int side) {
   TileEntityBFurnace tile = (TileEntityBFurnace) world.getBlockTileEntity(x, y, z);
   if (tile != null) {
     byte facing = tile.direction;
     int meta = tile.getBlockMetadata();
     if (meta == 2) // output
     {
       if (side == 0) return 0;
     }
     if (meta == 1 || meta == 2) // Input/fuel
     {
       if (side != facing) return 0;
       else return 2;
     }
   }
   if (side == 0 || side == 1) return 1;
   return 0;
 }