Ejemplo n.º 1
0
  @Override
  public AxisAlignedBB[] getBoundingBox(
      IBlockAccess world, int x, int y, int z, BoundingBoxType type) {
    RustyHatchTileEntity te =
        TileEntityUtils.getTileEntity(RustyHatchTileEntity.class, world, x, y, z);
    if (te == null || te.isMoving() || te.getMovement() == null || te.getMultiBlock() == null)
      return AABBUtils.identities();

    AxisAlignedBB aabb = te.getMovement().getBoundingBox(te, te.isTopBlock(x, y, z), type);
    if (aabb != null) aabb.offset(-x, -y, -z);
    return new AxisAlignedBB[] {aabb};
  }