@Override
 public void breakBlock(World world, int x, int y, int z, Block block, int metadata) {
   TileEntityBase tileentity =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentity != null) {
     tileentity.breakBlock(block, metadata);
   }
   super.breakBlock(world, x, y, z, block, metadata);
 }
 @Override
 public void onBlockPlacedBy(
     World world, int x, int y, int z, EntityLivingBase entityplayer, ItemStack itemstack) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     tileentitybase.onBlockPlacedBy(itemstack, entityplayer);
   }
 }
 @Override
 public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     return tileentitybase.getPickBlock(target, this);
   } else {
     return super.getPickBlock(target, world, x, y, z);
   }
 }
 @Override
 public float getBlockHardness(World world, int x, int y, int z) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     return tileentitybase.getBlockHardness(this);
   } else {
     return super.getBlockHardness(world, x, y, z);
   }
 }
 @Override
 public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     return tileentitybase.isSideSolid(this, side);
   } else {
     return super.isSideSolid(world, x, y, z, side);
   }
 }
 @Override
 public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     tileentitybase.onBlockNeighborChange(block);
   } else {
     world.setBlockToAir(x, y, z);
   }
 }
 @Override
 public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     return tileentitybase.removeBlockByPlayer(player, this);
   } else {
     return super.removedByPlayer(world, player, x, y, z);
   }
 }
 @Override
 public void addCollisionBoxesToList(
     World world, int x, int y, int z, AxisAlignedBB axisAlignedBB, List aList, Entity anEntity) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     tileentitybase.addCollisionBoxesToList(this, axisAlignedBB, aList, anEntity);
   } else {
     super.addCollisionBoxesToList(world, x, y, z, axisAlignedBB, aList, anEntity);
   }
 }
 @Override
 public MovingObjectPosition collisionRayTrace(
     World world, int x, int y, int z, Vec3 startVec, Vec3 endVec) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     return tileentitybase.collisionRayTrace(this, startVec, endVec);
   } else {
     return super.collisionRayTrace(world, x, y, z, startVec, endVec);
   }
 }
示例#10
0
 @Override
 public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int x, int y, int z) {
   int metadata = iblockaccess.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase)
           BlockHelper.getTileEntity(iblockaccess, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     tileentitybase.setBlockBoundsBasedOnState(this);
   } else {
     super.setBlockBoundsBasedOnState(iblockaccess, x, y, z);
   }
 }
示例#11
0
 @Override
 public int colorMultiplier(IBlockAccess iblockaccess, int x, int y, int z) {
   int metadata = iblockaccess.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase)
           BlockHelper.getTileEntity(iblockaccess, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     return tileentitybase.colorMultiplier(this);
   } else {
     return super.colorMultiplier(iblockaccess, x, y, z);
   }
 }
示例#12
0
 @Override
 public boolean addDestroyEffects(
     World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentity =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentity != null) {
     return tileentity.addBlockDestroyEffects(this, meta, effectRenderer);
   } else {
     return super.addDestroyEffects(world, x, y, z, meta, effectRenderer);
   }
 }
示例#13
0
 @Override
 public int getLightValue(IBlockAccess iblockaccess, int x, int y, int z) {
   int metadata = iblockaccess.getBlockMetadata(x, y, z);
   TileEntityBase tileentity =
       (TileEntityBase)
           BlockHelper.getTileEntity(iblockaccess, x, y, z, this.getTileMapData(metadata));
   if (tileentity != null) {
     return tileentity.getLightValue();
   } else {
     return super.getLightValue(iblockaccess, x, y, z);
   }
 }
示例#14
0
 @Override
 public IIcon getIcon(IBlockAccess iblockaccess, int x, int y, int z, int side) {
   int metadata = iblockaccess.getBlockMetadata(x, y, z);
   TileEntityBase tileentity =
       (TileEntityBase)
           BlockHelper.getTileEntity(iblockaccess, x, y, z, this.getTileMapData(metadata));
   if (tileentity != null) {
     return tileentity.getBlockTexture(x, y, z, metadata, side);
   } else {
     return this.getIcon(side, metadata);
   }
 }
示例#15
0
 @Override
 public boolean addHitEffects(
     World world, MovingObjectPosition target, EffectRenderer effectRenderer) {
   int x = target.blockX, y = target.blockY, z = target.blockZ;
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentity =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentity != null) {
     return tileentity.addBlockHitEffects(this, target, effectRenderer);
   } else {
     return super.addHitEffects(world, target, effectRenderer);
   }
 }
示例#16
0
 @Override
 public boolean onBlockActivated(
     World world,
     int x,
     int y,
     int z,
     EntityPlayer entityplayer,
     int side,
     float xHit,
     float yHit,
     float zHit) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentity =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentity != null) {
     return tileentity.onBlockActivated(entityplayer);
   } else {
     return false;
   }
 }
示例#17
0
 @Override
 public float getExplosionResistance(
     Entity entity,
     World world,
     int x,
     int y,
     int z,
     double explosionX,
     double explosionY,
     double explosionZ) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     return tileentitybase.getExplosionResistance(
         entity, explosionX, explosionY, explosionZ, this);
   } else {
     return super.getExplosionResistance(
         entity, world, x, y, z, explosionX, explosionY, explosionZ);
   }
 }
示例#18
0
 public void setBlockBoundsForItemRender(int metadata) {
   TileEntityBase tileentitybase = (TileEntityBase) this.createTileEntity(null, metadata);
   if (tileentitybase != null) {
     tileentitybase.setBlockBoundsForItemRender(this);
   }
 }