diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IBookletGui.java b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IBookletGui.java index 1081d84da..8c4f20ff7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IBookletGui.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IBookletGui.java @@ -29,7 +29,6 @@ public interface IBookletGui{ * * @param renderTransferButton if the "show more info"-text and clickable part should exist- */ - @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) void renderTooltipAndTransferButton(BookletPage from, ItemStack stack, int x, int y, boolean renderTransferButton, boolean mousePressed); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index b005fa7d4..3f3aa0c95 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -56,7 +56,6 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java index 3275c8d13..c389764aa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java @@ -43,7 +43,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -@SuppressWarnings("deprecation") public class BlockBookletStand extends BlockContainerBase implements IHudDisplay{ private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); @@ -61,8 +60,6 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay this.setSoundType(SoundType.WOOD); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ int meta = this.getMetaFromState(state); @@ -79,13 +76,11 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay return super.getBoundingBox(state, source, pos); } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index e56f93f2c..a5ea017b6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -46,20 +46,16 @@ public class BlockCoffeeMachine extends BlockContainerBase{ this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return AABB; } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index 09f076885..78911d8b4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -103,7 +103,7 @@ public class BlockColoredLamp extends BlockBase{ return new ItemStack(InitBlocks.blockColoredLamp, 1, this.getMetaFromState(state)); } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allLampTypes.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index 9779841e2..8be3e66eb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -56,14 +56,11 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ this.setSoundType(SoundType.WOOD); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return AABB; } - @SuppressWarnings("deprecation") @Override public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, Entity entityIn){ addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_LEGS); @@ -73,13 +70,11 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_SOUTH); } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java index ec7f704f8..c1da939bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java @@ -45,7 +45,7 @@ public class BlockCrystal extends BlockBase{ return this.getMetaFromState(state); } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allCrystals.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java index ca0fa8957..85d95d5c7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java @@ -70,7 +70,6 @@ public class BlockDisplayStand extends BlockContainerBase{ } } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java index 552528da6..25640345d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java @@ -35,8 +35,6 @@ public class BlockFishingNet extends BlockContainerBase{ this.setSoundType(SoundType.WOOD); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return AABB; @@ -48,13 +46,11 @@ public class BlockFishingNet extends BlockContainerBase{ return new TileEntityFishingNet(); } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java index be1d10359..587a52f97 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java @@ -35,8 +35,6 @@ public class BlockFurnaceSolar extends BlockContainerBase{ this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return AABB; @@ -48,13 +46,11 @@ public class BlockFurnaceSolar extends BlockContainerBase{ return new TileEntityFurnaceSolar(); } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java index 9e4adbfa4..4070549d4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java @@ -37,13 +37,11 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){ @@ -54,7 +52,6 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java index afc3b10aa..7b28c56be 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java @@ -38,7 +38,6 @@ public class BlockLampPowerer extends BlockBase{ this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") @Override public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){ this.updateLamp(worldIn, pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index f35fd68df..63703a849 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -46,13 +46,11 @@ public class BlockLaserRelay extends BlockContainerBase{ this.type = type; } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java index ddc3b1d55..cfed5206d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java @@ -44,7 +44,6 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{ this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java index b7e7e7d87..b535656bb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java @@ -45,7 +45,7 @@ public class BlockMisc extends BlockBase{ return this.getMetaFromState(state); } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ for(int j = 0; j < ALL_MISC_BLOCKS.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java index 5beafafa6..f38c76e9f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java @@ -52,13 +52,11 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{ this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") @Override public boolean canProvidePower(IBlockState state){ return this.type == Type.REDSTONEFACE; } - @SuppressWarnings("deprecation") @Override public int getWeakPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){ if(this.type == Type.REDSTONEFACE){ @@ -70,7 +68,6 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{ return super.getWeakPower(state, world, pos, side); } - @SuppressWarnings("deprecation") @Override public int getStrongPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){ if(this.type == Type.REDSTONEFACE){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java index 0b1f6ab03..e78749fae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java @@ -35,20 +35,16 @@ public class BlockPhantomBooster extends BlockContainerBase{ this.setSoundType(SoundType.STONE); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return AABB; } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java index f0d1a244c..95d1ae4a1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java @@ -44,7 +44,6 @@ public class BlockSlabs extends BlockBase{ this(name, fullBlock, 0); } - @SuppressWarnings("deprecation") public BlockSlabs(String name, Block fullBlock, int meta){ super(fullBlock.getMaterial(fullBlock.getDefaultState()), name); this.setHardness(1.5F); @@ -72,7 +71,6 @@ public class BlockSlabs extends BlockBase{ this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); }*/ - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; @@ -90,8 +88,6 @@ public class BlockSlabs extends BlockBase{ return this.getStateFromMeta(meta); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return state.getValue(META) == 1 ? AABB_TOP_HALF : AABB_BOTTOM_HALF; @@ -120,8 +116,6 @@ public class BlockSlabs extends BlockBase{ this.setMaxDamage(0); } - @SuppressWarnings("deprecation") - @Override public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ if(stack.stackSize != 0 && playerIn.canPlayerEdit(pos.offset(facing), facing, stack)){ @@ -164,7 +158,6 @@ public class BlockSlabs extends BlockBase{ return worldIn.getBlockState(pos.offset(side)).getBlock() == this.block || super.canPlaceBlockOnSide(worldIn, pos, side, player, stack); } - @SuppressWarnings("deprecation") private boolean tryPlace(EntityPlayer player, ItemStack stack, World worldIn, BlockPos pos){ IBlockState iblockstate = worldIn.getBlockState(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 5feafb6aa..9bcb1410e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -50,13 +50,11 @@ public class BlockSmileyCloud extends BlockContainerBase{ this.setTickRandomly(true); } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java index 9f7ebac68..a00533333 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java @@ -44,7 +44,6 @@ public class BlockWallAA extends BlockBase{ } - @SuppressWarnings("deprecation") public BlockWallAA(String name, Block base, int meta){ super(base.getMaterial(base.getDefaultState()), name); this.meta = meta; @@ -78,8 +77,6 @@ public class BlockWallAA extends BlockBase{ return i; } - @SuppressWarnings("deprecation") - @Override public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos){ boolean flag = this.canConnectTo(worldIn, pos.north()); @@ -90,7 +87,6 @@ public class BlockWallAA extends BlockBase{ return state.withProperty(BlockWall.UP, !flag4 || !worldIn.isAirBlock(pos.up())).withProperty(BlockWall.NORTH, flag).withProperty(BlockWall.EAST, flag1).withProperty(BlockWall.SOUTH, flag2).withProperty(BlockWall.WEST, flag3); } - @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state){ return false; @@ -101,29 +97,24 @@ public class BlockWallAA extends BlockBase{ return false; } - @SuppressWarnings("deprecation") @Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side){ return side != EnumFacing.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side); } - @SuppressWarnings("deprecation") - @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ state = this.getActualState(state, source, pos); return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)]; } - @SuppressWarnings("deprecation") @Override public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos){ blockState = this.getActualState(blockState, worldIn, pos); return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)]; } - @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state){ return false; @@ -134,14 +125,12 @@ public class BlockWallAA extends BlockBase{ return this.meta; } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ list.add(new ItemStack(item, 1, 0)); } - @SuppressWarnings("deprecation") public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){ Block block = PosUtil.getBlock(pos, worldIn); IBlockState state = worldIn.getBlockState(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index 66a17ce80..8985d9a97 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -62,7 +62,7 @@ public class BlockWildPlant extends BlockBushBase{ return metadata >= allWildPlants.length ? null : new ItemStack(((BlockPlant)allWildPlants[metadata].wildVersionOf).seedItem); } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allWildPlants.length; j++){ @@ -70,8 +70,6 @@ public class BlockWildPlant extends BlockBushBase{ } } - @SuppressWarnings("deprecation") - @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ int metadata = PosUtil.getMetadata(state); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index 5972d1455..450cb05db 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -57,8 +57,6 @@ public class BlockBase extends Block{ return EnumRarity.COMMON; } - @SuppressWarnings("deprecation") - @Override public IBlockState getStateFromMeta(int meta){ return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index f5098f9c1..fbdc95ce8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -57,8 +57,6 @@ public class BlockBushBase extends BlockBush{ return EnumRarity.COMMON; } - @SuppressWarnings("deprecation") - @Override public IBlockState getStateFromMeta(int meta){ return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 7d1e6c5b0..641941389 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -126,8 +126,6 @@ public abstract class BlockContainerBase extends BlockContainer{ return false; } - @SuppressWarnings("deprecation") - @Override public IBlockState getStateFromMeta(int meta){ return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); @@ -148,7 +146,6 @@ public abstract class BlockContainerBase extends BlockContainer{ } } - @SuppressWarnings("deprecation") @Override public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){ this.updateRedstoneState(worldIn, pos); @@ -222,13 +219,11 @@ public abstract class BlockContainerBase extends BlockContainer{ } } - @SuppressWarnings("deprecation") @Override public boolean hasComparatorInputOverride(IBlockState state){ return true; } - @SuppressWarnings("deprecation") @Override public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos){ TileEntity tile = world.getTileEntity(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java index 57416e9ba..d2c60f4e0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java @@ -26,7 +26,6 @@ public class BlockStair extends BlockStairs{ this(block, name, 0); } - @SuppressWarnings("deprecation") public BlockStair(Block block, String name, int meta){ super(block.getStateFromMeta(meta)); this.name = name; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java index ac2ff24be..06f117d39 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java @@ -188,7 +188,6 @@ public class BookletUtils{ /** * Draws all of the hovering texts for the buttons that need explanation in the booklet */ - @SuppressWarnings("unchecked") public static void doHoverTexts(GuiBooklet booklet, int mouseX, int mouseY){ //Update all of the buttons' hovering texts for(Object button : booklet.getButtonList()){ @@ -206,7 +205,6 @@ public class BookletUtils{ /** * Updates the search bar, should be called when it is getting typed into */ - @SuppressWarnings("unchecked") public static void updateSearchBar(GuiBooklet booklet){ if(booklet.currentEntrySet.getCurrentEntry() instanceof BookletEntryAllSearch){ BookletEntryAllSearch currentEntry = (BookletEntryAllSearch)booklet.currentEntrySet.getCurrentEntry(); @@ -241,7 +239,6 @@ public class BookletUtils{ return false; } - @SuppressWarnings("unchecked") public static void openIndexEntry(GuiBooklet booklet, IBookletEntry entry, int page, boolean resetTextField){ booklet.searchField.setVisible(entry instanceof BookletEntryAllSearch); booklet.searchField.setFocused(entry instanceof BookletEntryAllSearch); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index 0b43234ab..3b9e272ff 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -285,7 +285,6 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ } } - @SuppressWarnings("unchecked") @Override public void initGui(){ this.guiLeft = (this.width-this.xSize)/2; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java index b7fc142c4..a6720ffde 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java @@ -40,7 +40,6 @@ public class GuiBookletStand extends GuiBooklet{ super.actionPerformed(button); } - @SuppressWarnings("unchecked") @Override public void initGui(){ super.initGui(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java index da0891eb5..9f45b0b36 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java @@ -80,7 +80,6 @@ public class BookmarkButton extends GuiButton{ } } - @SuppressWarnings("unchecked") public void drawHover(int mouseX, int mouseY){ ArrayList list = new ArrayList(); if(this.assignedEntry.entry != null){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java index 85ec24e59..eea52d598 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java @@ -31,7 +31,6 @@ public class TexturedButton extends GuiButton{ this(id, x, y, texturePosX, texturePosY, width, height, new ArrayList()); } - @SuppressWarnings("unchecked") public TexturedButton(int id, int x, int y, int texturePosX, int texturePosY, int width, int height, List hoverTextList){ super(id, x, y, width, height, ""); this.texturePosX = texturePosX; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java index 1a381fd22..a48b5464e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java @@ -28,7 +28,6 @@ public class BookletChapterCoffee extends BookletChapter{ super(unlocalizedName, entry, displayStack, getPages(pages)); } - @SuppressWarnings("unchecked") private static BookletPage[] getPages(BookletPage... pages){ ArrayList allPages = new ArrayList(); allPages.addAll(Arrays.asList(pages)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java index 3cd608e5e..f3999a35b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java @@ -26,7 +26,6 @@ public class BookletChapterCrusher extends BookletChapter{ super(unlocalizedName, entry, displayStack, getPages(pages)); } - @SuppressWarnings("unchecked") private static BookletPage[] getPages(BookletPage... pages){ ArrayList allPages = new ArrayList(); allPages.addAll(Arrays.asList(pages)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java index e82c7e744..cfcd4a0e1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java @@ -29,7 +29,6 @@ public class BookletEntryAllSearch extends BookletEntry{ this.chapters = (ArrayList)this.allChapters.clone(); } - @SuppressWarnings("unchecked") @Override public void addChapter(IBookletChapter chapter){ this.allChapters.add(chapter); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java index 67f7005c8..f80b9b786 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java @@ -41,7 +41,6 @@ public class PageCoffeeRecipe extends BookletPageAA{ gui.drawRect(gui.getGuiLeft()+19, gui.getGuiTop()+20, 146, 94, 99, 60); } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java index 39f675063..b0e6bcdeb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java @@ -57,7 +57,6 @@ public class PageCrafting extends BookletPageAA{ } } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java index f54d35e46..c841f8596 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java @@ -48,7 +48,6 @@ public class PageCrusherRecipe extends BookletPageAA{ } } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java index 4e3ba0f8c..93018eaa6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java @@ -51,7 +51,6 @@ public class PageFurnace extends BookletPageAA{ } } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java index d32249837..8e78062a9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java @@ -52,7 +52,6 @@ public class PageReconstructor extends BookletPageAA{ } } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java index 5b5da4615..d9730cb23 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java @@ -16,7 +16,6 @@ import net.minecraftforge.fml.client.IModGuiFactory; import java.util.Set; -@SuppressWarnings("unused") public class GuiFactory implements IModGuiFactory{ @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java index da16ff8ea..9400c2a24 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java @@ -29,7 +29,6 @@ public class TooltipEvent{ private static final String ADVANCED_INFO_TEXT_PRE = TextFormatting.DARK_GRAY+" "; private static final String ADVANCED_INFO_HEADER_PRE = TextFormatting.GRAY+" -"; - @SuppressWarnings("unchecked") @SubscribeEvent public void onTooltipEvent(ItemTooltipEvent event){ //Advanced Item Info diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java index 7cf052655..a02677ed7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java @@ -49,7 +49,6 @@ public class JamVillagerTradeHandler{ } //@Override - @SuppressWarnings("all") public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random rand){ for(int trade = 0; trade < trades.size(); trade++){ for(int want = 0; want < trades.get(trade).wants.size(); want++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java index 803957b7d..f7aa7b7b6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java @@ -65,7 +65,6 @@ public class OreGen implements IWorldGenerator{ } } - @SuppressWarnings("deprecation") public void addOreSpawn(Block block, int meta, Block blockIn, World world, Random random, int blockXPos, int blockZPos, int maxVeinSize, int chancesToSpawn, int minY, int maxY){ if(maxY > minY){ int yDiff = maxY-minY; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java index 2e7cb0de7..19ce4ab0a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java @@ -32,7 +32,6 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous private int averageGroundLevel = -1; - @SuppressWarnings("unused") public VillageComponentCustomCropField(){ } @@ -99,7 +98,6 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous } } - @SuppressWarnings("deprecation") private IBlockState getRandomCropType(Random rand){ int randomMeta = MathHelper.getRandomIntegerInRange(rand, 1, 7); switch(rand.nextInt(4)){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java index f716cc712..d73824d21 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java @@ -30,7 +30,6 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{ private int averageGroundLevel = -1; - @SuppressWarnings("unused") public VillageComponentJamHouse(){ } @@ -74,7 +73,6 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{ this.fillWithBlocks(world, sbb, minX, minY, minZ, maxX, maxY, maxZ, block.getDefaultState(), block.getDefaultState(), false); } - @SuppressWarnings("deprecation") public void spawnActualHouse(World world, Random rand, StructureBoundingBox sbb){ //Base this.fillWithBlocks(world, sbb, 1, 0, 8, 9, 0, 10, Blocks.GRASS); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java index 557e35275..20153a607 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java @@ -51,7 +51,6 @@ public class GuiCoffeeMachine extends GuiContainer{ this.world = world; } - @SuppressWarnings("unchecked") @Override public void initGui(){ super.initGui(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java index e48a212a4..fd103985b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java @@ -75,7 +75,6 @@ public class GuiInputter extends GuiContainer{ this.isAdvanced = isAdvanced; } - @SuppressWarnings("unchecked") @Override public void initGui(){ super.initGui(); @@ -116,7 +115,6 @@ public class GuiInputter extends GuiContainer{ } @Override - @SuppressWarnings("unchecked") public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java index 331939d08..82c5af4f8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java @@ -39,7 +39,6 @@ public class GuiMiner extends GuiContainer{ this.ySize = 93+86; } - @SuppressWarnings("unchecked") @Override public void initGui(){ super.initGui(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java index a8e1a4fd3..26306bdb1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java @@ -52,7 +52,6 @@ public class GuiRangedCollector extends GuiContainer{ this.world = world; } - @SuppressWarnings("unchecked") @Override public void initGui(){ super.initGui(); @@ -62,7 +61,6 @@ public class GuiRangedCollector extends GuiContainer{ } @Override - @SuppressWarnings("unchecked") public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java index 6d3abb1da..c4a599b92 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java @@ -54,7 +54,6 @@ public class GuiSmileyCloud extends GuiContainer{ this.ySize = 20; } - @SuppressWarnings("unchecked") @Override public void initGui(){ super.initGui(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java index 2b7738d3f..3ed558ff7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java @@ -48,7 +48,6 @@ public class GuiXPSolidifier extends GuiContainer{ this.world = world; } - @SuppressWarnings("unchecked") @Override public void initGui(){ super.initGui(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAllToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAllToolAA.java index a02b2e3e5..a18f918e8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAllToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAllToolAA.java @@ -36,7 +36,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; import java.util.HashSet; import java.util.Set; -@SuppressWarnings("unchecked") public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{ public final int color; @@ -67,7 +66,6 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{ return Items.IRON_HOE.onItemUse(stack, playerIn, worldIn, pos, hand, side, hitX, hitY, hitZ); } - @SuppressWarnings("deprecation") @Override public boolean canHarvestBlock(IBlockState state, ItemStack stack){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index 5b2727031..1b832dff9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -84,7 +84,6 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{ return new ActionResult(EnumActionResult.SUCCESS, stack); } - @SuppressWarnings("unchecked") @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".desc")); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java index ce9cb978f..5cb1db173 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java @@ -111,7 +111,6 @@ public class ItemCoffee extends ItemFoodBase{ return true; } - @SuppressWarnings("unchecked") @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java index ce0fbcb33..b8153d1e2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java @@ -49,7 +49,7 @@ public class ItemCrystal extends ItemBase{ return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? EnumRarity.COMMON : BlockCrystal.allCrystals[stack.getItemDamage()].rarity; } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list){ for(int j = 0; j < BlockCrystal.allCrystals.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index b417aa025..3fbed02c5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -53,7 +53,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -@SuppressWarnings("unchecked") public class ItemDrill extends ItemEnergy{ private static final int ENERGY_USE = 100; @@ -257,7 +256,6 @@ public class ItemDrill extends ItemEnergy{ return toReturn; } - @SuppressWarnings("deprecation") @Override public boolean canHarvestBlock(IBlockState state, ItemStack stack){ int harvestLevel = this.getHarvestLevel(stack, ""); @@ -343,7 +341,6 @@ public class ItemDrill extends ItemEnergy{ } @Override - @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tabs, List list){ for(int i = 0; i < 16; i++){ @@ -415,7 +412,6 @@ public class ItemDrill extends ItemEnergy{ * @param world The World * @param player The Player who breaks the Blocks */ - @SuppressWarnings("deprecation") public boolean breakBlocks(ItemStack stack, int radius, World world, BlockPos aPos, EntityPlayer player){ int xRange = radius; int yRange = radius; @@ -487,7 +483,6 @@ public class ItemDrill extends ItemEnergy{ * @param player The Player breaking the Blocks * @param use The Energy that should be extracted per Block */ - @SuppressWarnings("deprecation") private boolean tryHarvestBlock(World world, BlockPos pos, boolean isExtra, ItemStack stack, EntityPlayer player, int use){ Block block = PosUtil.getBlock(pos, world); IBlockState state = world.getBlockState(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java index 9fe7f1afc..c8942b086 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java @@ -51,7 +51,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{ return stack.getItemDamage() >= allDusts.length ? EnumRarity.COMMON : allDusts[stack.getItemDamage()].rarity; } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allDusts.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java index e0f596d7a..9af9a471b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java @@ -94,7 +94,7 @@ public class ItemFoods extends ItemFoodBase{ return stack.getItemDamage() >= allFoods.length ? EnumRarity.COMMON : allFoods[stack.getItemDamage()].rarity; } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allFoods.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java index 4ede0af8c..36a0374bb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java @@ -60,7 +60,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{ return stack.getItemDamage() >= allJams.length ? EnumRarity.COMMON : allJams[stack.getItemDamage()].rarity; } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allJams.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java index 25b2b71a5..2becdff1a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java @@ -40,7 +40,6 @@ public class ItemKnife extends ItemBase{ } - @SuppressWarnings("unchecked") @Override public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){ Multimap map = super.getAttributeModifiers(slot, stack); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index 7d691110f..ee1412518 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -86,7 +86,6 @@ public class ItemLaserWrench extends ItemBase{ } @Override - @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ BlockPos coords = ItemPhantomConnector.getStoredPosition(stack); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java index 894623e61..777b035d8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java @@ -28,7 +28,6 @@ public class ItemMagnetRing extends ItemEnergy{ super(3000000, 5000, name); } - @SuppressWarnings("unchecked") @Override public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){ int energyUse = 10; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java index 79b42963f..7b3f358d0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java @@ -50,7 +50,7 @@ public class ItemMisc extends ItemBase{ return stack.getItemDamage() >= allMiscItems.length ? EnumRarity.COMMON : allMiscItems[stack.getItemDamage()].rarity; } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allMiscItems.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index 0a0ebc8b2..89d423448 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -134,7 +134,6 @@ public class ItemPhantomConnector extends ItemBase{ } @Override - @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ BlockPos coords = getStoredPosition(stack); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java index 4391b2ec7..805ee857a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java @@ -61,7 +61,6 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi } @Override - @SuppressWarnings("unchecked") public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5){ super.onUpdate(stack, world, player, par4, par5); @@ -90,7 +89,7 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi return stack.getItemDamage() >= allRings.length ? EnumRarity.COMMON : allRings[stack.getItemDamage()].rarity; } - @SuppressWarnings("all") + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list){ for(int j = 0; j < allRings.length; j++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java index 3446a8fbc..35f0d50c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java @@ -65,7 +65,6 @@ public abstract class ItemEnergy extends ItemEnergyContainer{ this.setEnergy(stack, 0); } - @SuppressWarnings("unchecked") @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ list.add(this.getEnergyStored(stack)+"/"+this.getMaxEnergyStored(stack)+" RF"); @@ -78,7 +77,6 @@ public abstract class ItemEnergy extends ItemEnergyContainer{ } @Override - @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tabs, List list){ ItemStack stackFull = new ItemStack(this); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java index e95d53aa1..dfc83933d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java @@ -34,7 +34,6 @@ public class PacketBookletStandButton implements IMessage{ private NBTTagCompound entrySet; private BlockPos tilePos; - @SuppressWarnings("unused") public PacketBookletStandButton(){ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java index 411cfafff..90a6b6071 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java @@ -33,7 +33,6 @@ public class PacketParticle implements IMessage{ private int particleAmount; private float particleSize; - @SuppressWarnings("unused") public PacketParticle(){ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java index 7c09d3fc8..be911bfe0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java @@ -30,7 +30,6 @@ public class PacketUpdateTileEntity implements IMessage{ private NBTTagCompound compound; private BlockPos pos; - @SuppressWarnings("unused") public PacketUpdateTileEntity(){ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java index 1458e0ae8..b07e506be 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java @@ -30,7 +30,6 @@ public class PacketGuiButton implements IMessage{ private int buttonID; private int playerID; - @SuppressWarnings("unused") public PacketGuiButton(){ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java index d2f760c75..9e876648e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java @@ -31,7 +31,6 @@ public class PacketGuiNumber implements IMessage{ private int textID; private int playerID; - @SuppressWarnings("unused") public PacketGuiNumber(){ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java index eebd62ffb..dee29f3b7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java @@ -31,7 +31,6 @@ public class PacketGuiString implements IMessage{ private int textID; private int playerID; - @SuppressWarnings("unused") public PacketGuiString(){ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 01ce41f0f..256860260 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -154,7 +154,6 @@ public class ClientProxy implements IProxy{ ModelLoader.setCustomStateMapper(block, mapper); } - @SuppressWarnings("unchecked") @Override public void init(FMLInitializationEvent event){ ModUtil.LOGGER.info("Initializing ClientProxy..."); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java index c838979da..4cdd5ed05 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java @@ -18,7 +18,6 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -@SuppressWarnings("unused") public class ServerProxy implements IProxy{ @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java index b33f75ece..ed15811e5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java @@ -24,7 +24,6 @@ import org.apache.commons.lang3.tuple.Pair; import java.util.HashMap; -@SuppressWarnings("unused") public class FuelHandler implements IFuelHandler{ private static HashMap, Integer> fuelList = new HashMap, Integer>(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index f503a0bcf..79ebdc76f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -74,7 +74,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java index abdc7e10b..188bd8c3b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java @@ -54,7 +54,6 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ @@ -77,7 +76,6 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst return this.isPlacer; } - @SuppressWarnings("deprecation") private void doWork(){ EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java index a75a1aa88..89f456803 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java @@ -20,12 +20,13 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.*; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class TileEntityCanolaPress extends TileEntityInventoryBase implements IEnergyReceiver, IEnergySaver, IFluidSaver{ +public class TileEntityCanolaPress extends TileEntityInventoryBase implements IEnergyReceiver, IEnergySaver, IFluidSaver, net.minecraftforge.fluids.IFluidHandler{ public static final int PRODUCE = 80; public static final int ENERGY_USE = 35; @@ -78,7 +79,6 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ @@ -184,4 +184,59 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE public FluidTank getFluidHandler(EnumFacing facing){ return facing != EnumFacing.UP ? this.tank : null; } + + @Override + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? 0 : handler.fill(resource, doFill); + } + + @Override + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(resource, doDrain); + } + + @Override + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canFillFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public boolean canDrain(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canDrainFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public FluidTankInfo[] getTankInfo(EnumFacing from){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler instanceof IFluidTank){ + return new FluidTankInfo[]{((IFluidTank)handler).getInfo()}; + } + else{ + return null; + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index 89feafc00..6c90ef3ed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -62,7 +62,6 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java index 4ef87812d..0ecf07b9d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java @@ -25,13 +25,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.SoundCategory; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.*; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements IButtonReactor, IEnergyReceiver, IFluidSaver, IEnergySaver{ +public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements IButtonReactor, IEnergyReceiver, IFluidSaver, IEnergySaver, net.minecraftforge.fluids.IFluidHandler{ public static final int SLOT_COFFEE_BEANS = 0; public static final int SLOT_INPUT = 1; @@ -242,4 +242,59 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements public FluidTank getFluidHandler(EnumFacing facing){ return facing != EnumFacing.DOWN ? this.tank : null; } + + @Override + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? 0 : handler.fill(resource, doFill); + } + + @Override + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(resource, doDrain); + } + + @Override + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canFillFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public boolean canDrain(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canDrainFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public FluidTankInfo[] getTankInfo(EnumFacing from){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler instanceof IFluidTank){ + return new FluidTankInfo[]{((IFluidTank)handler).getInfo()}; + } + else{ + return null; + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java index 85cbcc121..7e04cd372 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java @@ -56,7 +56,6 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ @@ -78,7 +77,6 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem } } - @SuppressWarnings("deprecation") private void doWork(){ if(this.storage.getEnergyStored() >= ENERGY_USE*RANGE){ EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java index 7d7758543..f0af92a6c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java @@ -38,7 +38,6 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java index 5b14bebf4..b8cf54224 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java @@ -59,7 +59,6 @@ public class TileEntityFeeder extends TileEntityInventoryBase{ } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java index 9d9f3939e..e602c0288 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -15,14 +15,14 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.*; import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; import net.minecraftforge.fluids.capability.templates.FluidHandlerFluidMap; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class TileEntityFermentingBarrel extends TileEntityBase implements IFluidSaver{ +public class TileEntityFermentingBarrel extends TileEntityBase implements IFluidSaver, net.minecraftforge.fluids.IFluidHandler{ private static final int PROCESS_TIME = 100; public final FluidTank canolaTank = new FluidTank(2*Util.BUCKET){ @@ -70,7 +70,6 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IFluid } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ @@ -144,4 +143,60 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IFluid this.oilTank.setFluid(fluids[0]); this.canolaTank.setFluid(fluids[1]); } + + + @Override + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? 0 : handler.fill(resource, doFill); + } + + @Override + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(resource, doDrain); + } + + @Override + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canFillFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public boolean canDrain(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canDrainFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public FluidTankInfo[] getTankInfo(EnumFacing from){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler instanceof IFluidTank){ + return new FluidTankInfo[]{((IFluidTank)handler).getInfo()}; + } + else{ + return null; + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java index 61a3f51e6..d8550c945 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java @@ -20,15 +20,13 @@ import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fluids.*; import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class TileEntityFluidCollector extends TileEntityBase implements IFluidSaver, IRedstoneToggle{ +public class TileEntityFluidCollector extends TileEntityBase implements IFluidSaver, IRedstoneToggle, net.minecraftforge.fluids.IFluidHandler{ public final FluidTank tank = new FluidTank(8*Util.BUCKET); public boolean isPlacer; @@ -121,7 +119,6 @@ public class TileEntityFluidCollector extends TileEntityBase implements IFluidSa } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ @@ -168,4 +165,58 @@ public class TileEntityFluidCollector extends TileEntityBase implements IFluidSa this.tank.setFluid(fluids[0]); } + @Override + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? 0 : handler.fill(resource, doFill); + } + + @Override + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(resource, doDrain); + } + + @Override + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canFillFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public boolean canDrain(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canDrainFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public FluidTankInfo[] getTankInfo(EnumFacing from){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler instanceof IFluidTank){ + return new FluidTankInfo[]{((IFluidTank)handler).getInfo()}; + } + else{ + return null; + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java index 77454997f..2c413edd4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java @@ -56,7 +56,6 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java index 91a1ad106..2ac70128e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java @@ -90,7 +90,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index 98adccfd4..d707a0488 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -48,7 +48,6 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr this.storage.readFromNBT(compound); } - @SuppressWarnings("deprecation") @Override public void updateEntity(){ super.updateEntity(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java index afa86f22d..eb626dfe6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java @@ -70,7 +70,6 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java index 95ef03e82..3654c5778 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java @@ -52,7 +52,6 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index c6e40e3f3..2ba10173c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -54,7 +54,6 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java index 5d6dc8121..2ae0c4cb6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java @@ -18,13 +18,13 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.*; import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class TileEntityOilGenerator extends TileEntityBase implements IEnergyProvider, IEnergySaver, IFluidSaver{ +public class TileEntityOilGenerator extends TileEntityBase implements IEnergyProvider, IEnergySaver, IFluidSaver, net.minecraftforge.fluids.IFluidHandler{ public static final int ENERGY_PRODUCED = 76; private static final int BURN_TIME = 100; @@ -81,7 +81,6 @@ public class TileEntityOilGenerator extends TileEntityBase implements IEnergyPro } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ @@ -169,4 +168,59 @@ public class TileEntityOilGenerator extends TileEntityBase implements IEnergyPro public void setFluids(FluidStack[] fluids){ this.tank.setFluid(fluids[0]); } + + @Override + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? 0 : handler.fill(resource, doFill); + } + + @Override + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(resource, doDrain); + } + + @Override + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ + IFluidHandler handler = this.getFluidHandler(from); + return handler == null ? null : handler.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canFillFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public boolean canDrain(EnumFacing from, Fluid fluid){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler != null){ + for(IFluidTankProperties prop : handler.getTankProperties()){ + if(prop != null && prop.canDrainFluidType(new FluidStack(fluid, Integer.MAX_VALUE))){ + return true; + } + } + } + return false; + } + + @Override + public FluidTankInfo[] getTankInfo(EnumFacing from){ + IFluidHandler handler = this.getFluidHandler(from); + if(handler instanceof IFluidTank){ + return new FluidTankInfo[]{((IFluidTank)handler).getInfo()}; + } + else{ + return null; + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index b64ea0be2..3eb58bf0a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -121,7 +121,6 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements return false; } - @SuppressWarnings("deprecation") private void doWork(){ if(this.isBreaker){ Block blockToBreak = PosUtil.getBlock(this.boundPosition, this.worldObj); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java index 25731d554..1bc3f50cb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java @@ -28,7 +28,6 @@ public class TileEntityPhantomRedstoneface extends TileEntityPhantomface{ super("redstoneface"); } - @SuppressWarnings("deprecation") @Override public void updateEntity(){ if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java index 8a67053b4..34eb9fff8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java @@ -45,7 +45,6 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement } @Override - @SuppressWarnings("unchecked") public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java index dc6c28a31..be19a509b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java @@ -22,7 +22,6 @@ import net.minecraft.world.World; public class PosUtil{ - @SuppressWarnings("deprecation") public static Material getMaterial(BlockPos pos, IBlockAccess world){ return getBlock(pos, world).getMaterial(world.getBlockState(pos)); } @@ -51,7 +50,6 @@ public class PosUtil{ return new BlockPos(pos.getX()+x, pos.getY()+y, pos.getZ()+z); } - @SuppressWarnings("deprecation") public static boolean setBlock(BlockPos pos, World world, Block block, int meta, int flag){ return world.setBlockState(pos, block.getStateFromMeta(meta), flag); } @@ -72,7 +70,6 @@ public class PosUtil{ return null; } - @SuppressWarnings("deprecation") public static void setMetadata(BlockPos pos, World world, int meta, int flag){ world.setBlockState(pos, getBlock(pos, world).getStateFromMeta(meta), flag); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java index 99e5733ab..e36e07e0c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java @@ -26,7 +26,6 @@ public class StringUtil{ /** * Localizes a given String via StatCollector */ - @SuppressWarnings("deprecation") public static String localize(String text){ return I18n.translateToLocal(text); } @@ -34,7 +33,6 @@ public class StringUtil{ /** * Localizes a given formatted String with the given Replacements */ - @SuppressWarnings("deprecation") public static String localizeFormatted(String text, Object... replace){ return I18n.translateToLocalFormatted(text, replace); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java index 34698494b..437b61bb8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java @@ -14,19 +14,17 @@ import net.minecraft.item.EnumRarity; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.Fluid; import net.minecraftforge.oredict.OreDictionary; import java.util.Locale; import java.util.Random; -@SuppressWarnings("unused") public class Util{ public static final Random RANDOM = new Random(); public static final int WILDCARD = OreDictionary.WILDCARD_VALUE; - @SuppressWarnings("deprecation") - public static final int BUCKET = FluidContainerRegistry.BUCKET_VOLUME; + public static final int BUCKET = Fluid.BUCKET_VOLUME; public static final EnumRarity CRYSTAL_RED_RARITY = addRarity("crystalRed", TextFormatting.DARK_RED, ModUtil.NAME+" Red Crystal"); public static final EnumRarity CRYSTAL_BLUE_RARITY = addRarity("crystalBlue", TextFormatting.DARK_BLUE, ModUtil.NAME+" Blue Crystal"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 81839ad75..63653a285 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -120,7 +120,6 @@ public class WorldUtil{ } } - @SuppressWarnings("deprecation") public static ItemStack useItemAtSide(EnumFacing side, World world, BlockPos pos, ItemStack stack){ if(world instanceof WorldServer && stack != null && stack.getItem() != null){ BlockPos offsetPos = pos.offset(side);