Skip to content

Commit

Permalink
add Deprecated annotation to methods overriding a deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
thiakil committed Mar 12, 2019
1 parent c1aaf24 commit b2f8a3a
Show file tree
Hide file tree
Showing 19 changed files with 99 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/main/java/mekanism/client/jei/GasStackHelper.java
Expand Up @@ -70,6 +70,7 @@ public String getResourceId(GasStack ingredient)
return ingredient.getGas().getUnlocalizedName();
}

@Deprecated
@Override
public ItemStack cheatIngredient(GasStack ingredient, boolean fullStack)
{
Expand Down
Expand Up @@ -499,6 +499,7 @@ public TextureAtlasSprite getParticleTexture()
return baseModel.getParticleTexture();
}

@Deprecated
@Override
public ItemCameraTransforms getItemCameraTransforms()
{
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/mekanism/common/block/BlockBasic.java
Expand Up @@ -135,6 +135,7 @@ public BlockStateContainer createBlockState()
return new BlockStateBasic(this, getTypeProperty());
}

@Deprecated
@Override
public IBlockState getStateFromMeta(int meta)
{
Expand All @@ -150,6 +151,7 @@ public int getMetaFromState(IBlockState state)
return type.meta;
}

@Deprecated
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
Expand Down Expand Up @@ -201,6 +203,7 @@ public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, Block
return state;
}

@Deprecated
@Override
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos fromPos)
{
Expand Down Expand Up @@ -524,6 +527,7 @@ else if(tile instanceof IStructuralMultiblock)
return false;
}

@Deprecated
@Override
public boolean isSideSolid(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
{
Expand Down Expand Up @@ -656,18 +660,21 @@ else if(itemStack.getCount() > 1 && player.inventory.addItemStackToInventory(cop
return false;
}

@Deprecated
@Override
public boolean isOpaqueCube(IBlockState state)
{
return false;
}

@Deprecated
@Override
public boolean isFullCube(IBlockState state)
{
return false;
}

@Deprecated
@Override
public EnumBlockRenderType getRenderType(IBlockState state)
{
Expand Down Expand Up @@ -903,6 +910,7 @@ public ItemStack dismantleBlock(IBlockState state, World world, BlockPos pos, bo
return itemStack;
}

@Deprecated
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/mekanism/common/block/BlockBounding.java
Expand Up @@ -35,6 +35,7 @@ public BlockStateContainer createBlockState()
return new BlockStateBounding(this);
}

@Deprecated
@Override
public IBlockState getStateFromMeta(int meta)
{
Expand Down Expand Up @@ -92,6 +93,7 @@ public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, Ent
}
}

@Deprecated
@Override
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos neighborPos)
{
Expand All @@ -103,6 +105,7 @@ public void neighborChanged(IBlockState state, World world, BlockPos pos, Block
} catch(Exception e) {}
}

@Deprecated
@Override
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World world, BlockPos pos)
{
Expand All @@ -127,18 +130,21 @@ public Item getItemDropped(IBlockState state, Random random, int fortune)
return null;
}

@Deprecated
@Override
public EnumBlockRenderType getRenderType(IBlockState state)
{
return EnumBlockRenderType.INVISIBLE;
}

@Deprecated
@Override
public boolean isOpaqueCube(IBlockState state)
{
return false;
}

@Deprecated
@Override
public boolean isFullCube(IBlockState state)
{
Expand Down
1 change: 1 addition & 0 deletions src/main/java/mekanism/common/block/BlockCardboardBox.java
Expand Up @@ -52,6 +52,7 @@ protected BlockStateContainer createBlockState()
return new BlockStateCardboardBox(this);
}

@Deprecated
@Override
public IBlockState getStateFromMeta(int meta)
{
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/mekanism/common/block/BlockEnergyCube.java
Expand Up @@ -78,12 +78,14 @@ public int getMetaFromState(IBlockState state)
return 0;
}

@Deprecated
@Override
public IBlockState getStateFromMeta(int meta)
{
return getDefaultState();
}

@Deprecated
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
Expand All @@ -107,6 +109,7 @@ public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, Block
return state;
}

@Deprecated
@Override
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos neighborPos)
{
Expand Down Expand Up @@ -178,6 +181,7 @@ public void getSubBlocks(CreativeTabs creativetabs, NonNullList<ItemStack> list)
}
}

@Deprecated
@Override
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World world, BlockPos pos)
{
Expand Down Expand Up @@ -272,6 +276,7 @@ public TileEntity createNewTileEntity(World world, int meta)
return new TileEntityEnergyCube();
}

@Deprecated
@Override
public boolean isOpaqueCube(IBlockState state)
{
Expand Down Expand Up @@ -347,19 +352,22 @@ public ItemStack dismantleBlock(IBlockState state, World world, BlockPos pos, bo
return itemStack;
}

@Deprecated
@Override
public boolean hasComparatorInputOverride(IBlockState state)
{
return true;
}

@Deprecated
@Override
public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos)
{
TileEntityEnergyCube tileEntity = (TileEntityEnergyCube)world.getTileEntity(pos);
return tileEntity.getRedstoneLevel();
}

@Deprecated
@Override
public boolean isSideSolid(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
{
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/mekanism/common/block/BlockGasTank.java
Expand Up @@ -61,6 +61,7 @@ protected BlockStateContainer createBlockState()
return new BlockStateGasTank(this);
}

@Deprecated
@Override
public IBlockState getStateFromMeta(int meta)
{
Expand All @@ -73,6 +74,7 @@ public int getMetaFromState(IBlockState state)
return 0;
}

@Deprecated
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
Expand Down Expand Up @@ -116,6 +118,7 @@ public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, Entity
tileEntity.redstone = world.isBlockIndirectlyGettingPowered(pos) > 0;
}

@Deprecated
@Override
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos neighborPos)
{
Expand All @@ -130,6 +133,7 @@ public void neighborChanged(IBlockState state, World world, BlockPos pos, Block
}
}

@Deprecated
@Override
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World world, BlockPos pos)
{
Expand Down Expand Up @@ -255,6 +259,7 @@ public Item getItemDropped(IBlockState state, Random random, int fortune)
return null;
}

@Deprecated
@Override
public boolean isOpaqueCube(IBlockState state)
{
Expand All @@ -267,6 +272,7 @@ public EnumBlockRenderType getRenderType(IBlockState state)
return EnumBlockRenderType.MODEL;
}

@Deprecated
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{
Expand Down Expand Up @@ -321,12 +327,14 @@ public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World wo
return itemStack;
}

@Deprecated
@Override
public boolean hasComparatorInputOverride(IBlockState state)
{
return true;
}

@Deprecated
@Override
public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos)
{
Expand Down Expand Up @@ -375,12 +383,14 @@ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
return false;
}

@Deprecated
@Override
public boolean isFullBlock(IBlockState state)
{
return false;
}

@Deprecated
@Override
public boolean isFullCube(IBlockState state)
{
Expand Down
16 changes: 12 additions & 4 deletions src/main/java/mekanism/common/block/BlockGlowPanel.java
Expand Up @@ -70,6 +70,7 @@ public BlockStateContainer createBlockState()
return new BlockStateGlowPanel(this);
}

@Deprecated
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
{
Expand All @@ -96,6 +97,7 @@ public IBlockState getExtendedState(IBlockState state, IBlockAccess world, Block
return state;
}

@Deprecated
@Override
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos neighbor)
{
Expand Down Expand Up @@ -136,6 +138,7 @@ public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor
}
}

@Deprecated
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{
Expand Down Expand Up @@ -227,31 +230,36 @@ public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer)
return true;
}

@Deprecated
@Override
public EnumBlockRenderType getRenderType(IBlockState state)
{
return EnumBlockRenderType.MODEL;
}

@Override
@Deprecated
@Override
public boolean isBlockNormalCube(IBlockState state)
{
return false;
}

@Override
@Deprecated
@Override
public boolean isOpaqueCube(IBlockState state)
{
return false;
}

@Override
@Deprecated
@Override
public boolean isFullCube(IBlockState state)
{
return false;
}

@Override
@Deprecated
@Override
public boolean isFullBlock(IBlockState state)
{
return false;
Expand Down

0 comments on commit b2f8a3a

Please sign in to comment.