Re-add IFluidHandler since apparently everyone's moaning about EnderIO not getting their shit together

This commit is contained in:
Ellpeck 2016-06-10 21:52:37 +02:00
parent 1b40bd3568
commit 19d764688f
98 changed files with 304 additions and 186 deletions

View file

@ -29,7 +29,6 @@ public interface IBookletGui{
* *
* @param renderTransferButton if the "show more info"-text and clickable part should exist- * @param renderTransferButton if the "show more info"-text and clickable part should exist-
*/ */
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
void renderTooltipAndTransferButton(BookletPage from, ItemStack stack, int x, int y, boolean renderTransferButton, boolean mousePressed); void renderTooltipAndTransferButton(BookletPage from, ItemStack stack, int x, int y, boolean renderTransferButton, boolean mousePressed);

View file

@ -56,7 +56,6 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -43,7 +43,6 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SuppressWarnings("deprecation")
public class BlockBookletStand extends BlockContainerBase implements IHudDisplay{ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay{
private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); 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); this.setSoundType(SoundType.WOOD);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
int meta = this.getMetaFromState(state); int meta = this.getMetaFromState(state);
@ -79,13 +76,11 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay
return super.getBoundingBox(state, source, pos); return super.getBoundingBox(state, source, pos);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -46,20 +46,16 @@ public class BlockCoffeeMachine extends BlockContainerBase{
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return AABB; return AABB;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -103,7 +103,7 @@ public class BlockColoredLamp extends BlockBase{
return new ItemStack(InitBlocks.blockColoredLamp, 1, this.getMetaFromState(state)); return new ItemStack(InitBlocks.blockColoredLamp, 1, this.getMetaFromState(state));
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allLampTypes.length; j++){ for(int j = 0; j < allLampTypes.length; j++){

View file

@ -56,14 +56,11 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{
this.setSoundType(SoundType.WOOD); this.setSoundType(SoundType.WOOD);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return AABB; return AABB;
} }
@SuppressWarnings("deprecation")
@Override @Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn){ public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn){
addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_LEGS); addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_LEGS);
@ -73,13 +70,11 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{
addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_SOUTH); addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_SOUTH);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;

View file

@ -45,7 +45,7 @@ public class BlockCrystal extends BlockBase{
return this.getMetaFromState(state); return this.getMetaFromState(state);
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allCrystals.length; j++){ for(int j = 0; j < allCrystals.length; j++){

View file

@ -70,7 +70,6 @@ public class BlockDisplayStand extends BlockContainerBase{
} }
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -35,8 +35,6 @@ public class BlockFishingNet extends BlockContainerBase{
this.setSoundType(SoundType.WOOD); this.setSoundType(SoundType.WOOD);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return AABB; return AABB;
@ -48,13 +46,11 @@ public class BlockFishingNet extends BlockContainerBase{
return new TileEntityFishingNet(); return new TileEntityFishingNet();
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -35,8 +35,6 @@ public class BlockFurnaceSolar extends BlockContainerBase{
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return AABB; return AABB;
@ -48,13 +46,11 @@ public class BlockFurnaceSolar extends BlockContainerBase{
return new TileEntityFurnaceSolar(); return new TileEntityFurnaceSolar();
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -37,13 +37,11 @@ public class BlockGreenhouseGlass extends BlockContainerBase{
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){ public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){
@ -54,7 +52,6 @@ public class BlockGreenhouseGlass extends BlockContainerBase{
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -38,7 +38,6 @@ public class BlockLampPowerer extends BlockBase{
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){ public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){
this.updateLamp(worldIn, pos); this.updateLamp(worldIn, pos);

View file

@ -46,13 +46,11 @@ public class BlockLaserRelay extends BlockContainerBase{
this.type = type; this.type = type;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -44,7 +44,6 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -45,7 +45,7 @@ public class BlockMisc extends BlockBase{
return this.getMetaFromState(state); return this.getMetaFromState(state);
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
for(int j = 0; j < ALL_MISC_BLOCKS.length; j++){ for(int j = 0; j < ALL_MISC_BLOCKS.length; j++){

View file

@ -52,13 +52,11 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean canProvidePower(IBlockState state){ public boolean canProvidePower(IBlockState state){
return this.type == Type.REDSTONEFACE; return this.type == Type.REDSTONEFACE;
} }
@SuppressWarnings("deprecation")
@Override @Override
public int getWeakPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){ public int getWeakPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){
if(this.type == Type.REDSTONEFACE){ if(this.type == Type.REDSTONEFACE){
@ -70,7 +68,6 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{
return super.getWeakPower(state, world, pos, side); return super.getWeakPower(state, world, pos, side);
} }
@SuppressWarnings("deprecation")
@Override @Override
public int getStrongPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){ public int getStrongPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){
if(this.type == Type.REDSTONEFACE){ if(this.type == Type.REDSTONEFACE){

View file

@ -35,20 +35,16 @@ public class BlockPhantomBooster extends BlockContainerBase{
this.setSoundType(SoundType.STONE); this.setSoundType(SoundType.STONE);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return AABB; return AABB;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -44,7 +44,6 @@ public class BlockSlabs extends BlockBase{
this(name, fullBlock, 0); this(name, fullBlock, 0);
} }
@SuppressWarnings("deprecation")
public BlockSlabs(String name, Block fullBlock, int meta){ public BlockSlabs(String name, Block fullBlock, int meta){
super(fullBlock.getMaterial(fullBlock.getDefaultState()), name); super(fullBlock.getMaterial(fullBlock.getDefaultState()), name);
this.setHardness(1.5F); 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); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
}*/ }*/
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;
@ -90,8 +88,6 @@ public class BlockSlabs extends BlockBase{
return this.getStateFromMeta(meta); return this.getStateFromMeta(meta);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return state.getValue(META) == 1 ? AABB_TOP_HALF : AABB_BOTTOM_HALF; return state.getValue(META) == 1 ? AABB_TOP_HALF : AABB_BOTTOM_HALF;
@ -120,8 +116,6 @@ public class BlockSlabs extends BlockBase{
this.setMaxDamage(0); this.setMaxDamage(0);
} }
@SuppressWarnings("deprecation")
@Override @Override
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ 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)){ 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); 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){ private boolean tryPlace(EntityPlayer player, ItemStack stack, World worldIn, BlockPos pos){
IBlockState iblockstate = worldIn.getBlockState(pos); IBlockState iblockstate = worldIn.getBlockState(pos);

View file

@ -50,13 +50,11 @@ public class BlockSmileyCloud extends BlockContainerBase{
this.setTickRandomly(true); this.setTickRandomly(true);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;

View file

@ -44,7 +44,6 @@ public class BlockWallAA extends BlockBase{
} }
@SuppressWarnings("deprecation")
public BlockWallAA(String name, Block base, int meta){ public BlockWallAA(String name, Block base, int meta){
super(base.getMaterial(base.getDefaultState()), name); super(base.getMaterial(base.getDefaultState()), name);
this.meta = meta; this.meta = meta;
@ -78,8 +77,6 @@ public class BlockWallAA extends BlockBase{
return i; return i;
} }
@SuppressWarnings("deprecation")
@Override @Override
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos){ public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos){
boolean flag = this.canConnectTo(worldIn, pos.north()); 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); 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 @Override
public boolean isFullCube(IBlockState state){ public boolean isFullCube(IBlockState state){
return false; return false;
@ -101,29 +97,24 @@ public class BlockWallAA extends BlockBase{
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side){ public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side){
return side != EnumFacing.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side); return side != EnumFacing.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side);
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
state = this.getActualState(state, source, pos); state = this.getActualState(state, source, pos);
return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)]; return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)];
} }
@SuppressWarnings("deprecation")
@Override @Override
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos){ public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos){
blockState = this.getActualState(blockState, worldIn, pos); blockState = this.getActualState(blockState, worldIn, pos);
return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)]; return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)];
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean isOpaqueCube(IBlockState state){ public boolean isOpaqueCube(IBlockState state){
return false; return false;
@ -134,14 +125,12 @@ public class BlockWallAA extends BlockBase{
return this.meta; return this.meta;
} }
@SuppressWarnings("unchecked")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
list.add(new ItemStack(item, 1, 0)); list.add(new ItemStack(item, 1, 0));
} }
@SuppressWarnings("deprecation")
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){ public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){
Block block = PosUtil.getBlock(pos, worldIn); Block block = PosUtil.getBlock(pos, worldIn);
IBlockState state = worldIn.getBlockState(pos); IBlockState state = worldIn.getBlockState(pos);

View file

@ -62,7 +62,7 @@ public class BlockWildPlant extends BlockBushBase{
return metadata >= allWildPlants.length ? null : new ItemStack(((BlockPlant)allWildPlants[metadata].wildVersionOf).seedItem); return metadata >= allWildPlants.length ? null : new ItemStack(((BlockPlant)allWildPlants[metadata].wildVersionOf).seedItem);
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allWildPlants.length; j++){ for(int j = 0; j < allWildPlants.length; j++){
@ -70,8 +70,6 @@ public class BlockWildPlant extends BlockBushBase{
} }
} }
@SuppressWarnings("deprecation")
@Override @Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){
int metadata = PosUtil.getMetadata(state); int metadata = PosUtil.getMetadata(state);

View file

@ -57,8 +57,6 @@ public class BlockBase extends Block{
return EnumRarity.COMMON; return EnumRarity.COMMON;
} }
@SuppressWarnings("deprecation")
@Override @Override
public IBlockState getStateFromMeta(int meta){ public IBlockState getStateFromMeta(int meta){
return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta);

View file

@ -57,8 +57,6 @@ public class BlockBushBase extends BlockBush{
return EnumRarity.COMMON; return EnumRarity.COMMON;
} }
@SuppressWarnings("deprecation")
@Override @Override
public IBlockState getStateFromMeta(int meta){ public IBlockState getStateFromMeta(int meta){
return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta);

View file

@ -126,8 +126,6 @@ public abstract class BlockContainerBase extends BlockContainer{
return false; return false;
} }
@SuppressWarnings("deprecation")
@Override @Override
public IBlockState getStateFromMeta(int meta){ public IBlockState getStateFromMeta(int meta){
return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), 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 @Override
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){ public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){
this.updateRedstoneState(worldIn, pos); this.updateRedstoneState(worldIn, pos);
@ -222,13 +219,11 @@ public abstract class BlockContainerBase extends BlockContainer{
} }
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean hasComparatorInputOverride(IBlockState state){ public boolean hasComparatorInputOverride(IBlockState state){
return true; return true;
} }
@SuppressWarnings("deprecation")
@Override @Override
public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos){ public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos){
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getTileEntity(pos);

View file

@ -26,7 +26,6 @@ public class BlockStair extends BlockStairs{
this(block, name, 0); this(block, name, 0);
} }
@SuppressWarnings("deprecation")
public BlockStair(Block block, String name, int meta){ public BlockStair(Block block, String name, int meta){
super(block.getStateFromMeta(meta)); super(block.getStateFromMeta(meta));
this.name = name; this.name = name;

View file

@ -188,7 +188,6 @@ public class BookletUtils{
/** /**
* Draws all of the hovering texts for the buttons that need explanation in the booklet * 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){ public static void doHoverTexts(GuiBooklet booklet, int mouseX, int mouseY){
//Update all of the buttons' hovering texts //Update all of the buttons' hovering texts
for(Object button : booklet.getButtonList()){ 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 * Updates the search bar, should be called when it is getting typed into
*/ */
@SuppressWarnings("unchecked")
public static void updateSearchBar(GuiBooklet booklet){ public static void updateSearchBar(GuiBooklet booklet){
if(booklet.currentEntrySet.getCurrentEntry() instanceof BookletEntryAllSearch){ if(booklet.currentEntrySet.getCurrentEntry() instanceof BookletEntryAllSearch){
BookletEntryAllSearch currentEntry = (BookletEntryAllSearch)booklet.currentEntrySet.getCurrentEntry(); BookletEntryAllSearch currentEntry = (BookletEntryAllSearch)booklet.currentEntrySet.getCurrentEntry();
@ -241,7 +239,6 @@ public class BookletUtils{
return false; return false;
} }
@SuppressWarnings("unchecked")
public static void openIndexEntry(GuiBooklet booklet, IBookletEntry entry, int page, boolean resetTextField){ public static void openIndexEntry(GuiBooklet booklet, IBookletEntry entry, int page, boolean resetTextField){
booklet.searchField.setVisible(entry instanceof BookletEntryAllSearch); booklet.searchField.setVisible(entry instanceof BookletEntryAllSearch);
booklet.searchField.setFocused(entry instanceof BookletEntryAllSearch); booklet.searchField.setFocused(entry instanceof BookletEntryAllSearch);

View file

@ -285,7 +285,6 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
this.guiLeft = (this.width-this.xSize)/2; this.guiLeft = (this.width-this.xSize)/2;

View file

@ -40,7 +40,6 @@ public class GuiBookletStand extends GuiBooklet{
super.actionPerformed(button); super.actionPerformed(button);
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();

View file

@ -80,7 +80,6 @@ public class BookmarkButton extends GuiButton{
} }
} }
@SuppressWarnings("unchecked")
public void drawHover(int mouseX, int mouseY){ public void drawHover(int mouseX, int mouseY){
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();
if(this.assignedEntry.entry != null){ if(this.assignedEntry.entry != null){

View file

@ -31,7 +31,6 @@ public class TexturedButton extends GuiButton{
this(id, x, y, texturePosX, texturePosY, width, height, new ArrayList()); 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){ public TexturedButton(int id, int x, int y, int texturePosX, int texturePosY, int width, int height, List hoverTextList){
super(id, x, y, width, height, ""); super(id, x, y, width, height, "");
this.texturePosX = texturePosX; this.texturePosX = texturePosX;

View file

@ -28,7 +28,6 @@ public class BookletChapterCoffee extends BookletChapter{
super(unlocalizedName, entry, displayStack, getPages(pages)); super(unlocalizedName, entry, displayStack, getPages(pages));
} }
@SuppressWarnings("unchecked")
private static BookletPage[] getPages(BookletPage... pages){ private static BookletPage[] getPages(BookletPage... pages){
ArrayList<BookletPage> allPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> allPages = new ArrayList<BookletPage>();
allPages.addAll(Arrays.asList(pages)); allPages.addAll(Arrays.asList(pages));

View file

@ -26,7 +26,6 @@ public class BookletChapterCrusher extends BookletChapter{
super(unlocalizedName, entry, displayStack, getPages(pages)); super(unlocalizedName, entry, displayStack, getPages(pages));
} }
@SuppressWarnings("unchecked")
private static BookletPage[] getPages(BookletPage... pages){ private static BookletPage[] getPages(BookletPage... pages){
ArrayList<BookletPage> allPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> allPages = new ArrayList<BookletPage>();
allPages.addAll(Arrays.asList(pages)); allPages.addAll(Arrays.asList(pages));

View file

@ -29,7 +29,6 @@ public class BookletEntryAllSearch extends BookletEntry{
this.chapters = (ArrayList<IBookletChapter>)this.allChapters.clone(); this.chapters = (ArrayList<IBookletChapter>)this.allChapters.clone();
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addChapter(IBookletChapter chapter){ public void addChapter(IBookletChapter chapter){
this.allChapters.add(chapter); this.allChapters.add(chapter);

View file

@ -41,7 +41,6 @@ public class PageCoffeeRecipe extends BookletPageAA{
gui.drawRect(gui.getGuiLeft()+19, gui.getGuiTop()+20, 146, 94, 99, 60); gui.drawRect(gui.getGuiLeft()+19, gui.getGuiTop()+20, 146, 94, 99, 60);
} }
@SuppressWarnings("unchecked")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){

View file

@ -57,7 +57,6 @@ public class PageCrafting extends BookletPageAA{
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){

View file

@ -48,7 +48,6 @@ public class PageCrusherRecipe extends BookletPageAA{
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){

View file

@ -51,7 +51,6 @@ public class PageFurnace extends BookletPageAA{
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){

View file

@ -52,7 +52,6 @@ public class PageReconstructor extends BookletPageAA{
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){

View file

@ -16,7 +16,6 @@ import net.minecraftforge.fml.client.IModGuiFactory;
import java.util.Set; import java.util.Set;
@SuppressWarnings("unused")
public class GuiFactory implements IModGuiFactory{ public class GuiFactory implements IModGuiFactory{
@Override @Override

View file

@ -29,7 +29,6 @@ public class TooltipEvent{
private static final String ADVANCED_INFO_TEXT_PRE = TextFormatting.DARK_GRAY+" "; private static final String ADVANCED_INFO_TEXT_PRE = TextFormatting.DARK_GRAY+" ";
private static final String ADVANCED_INFO_HEADER_PRE = TextFormatting.GRAY+" -"; private static final String ADVANCED_INFO_HEADER_PRE = TextFormatting.GRAY+" -";
@SuppressWarnings("unchecked")
@SubscribeEvent @SubscribeEvent
public void onTooltipEvent(ItemTooltipEvent event){ public void onTooltipEvent(ItemTooltipEvent event){
//Advanced Item Info //Advanced Item Info

View file

@ -49,7 +49,6 @@ public class JamVillagerTradeHandler{
} }
//@Override //@Override
@SuppressWarnings("all")
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random rand){ public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random rand){
for(int trade = 0; trade < trades.size(); trade++){ for(int trade = 0; trade < trades.size(); trade++){
for(int want = 0; want < trades.get(trade).wants.size(); want++){ for(int want = 0; want < trades.get(trade).wants.size(); want++){

View file

@ -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){ 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){ if(maxY > minY){
int yDiff = maxY-minY; int yDiff = maxY-minY;

View file

@ -32,7 +32,6 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
private int averageGroundLevel = -1; private int averageGroundLevel = -1;
@SuppressWarnings("unused")
public VillageComponentCustomCropField(){ public VillageComponentCustomCropField(){
} }
@ -99,7 +98,6 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
} }
} }
@SuppressWarnings("deprecation")
private IBlockState getRandomCropType(Random rand){ private IBlockState getRandomCropType(Random rand){
int randomMeta = MathHelper.getRandomIntegerInRange(rand, 1, 7); int randomMeta = MathHelper.getRandomIntegerInRange(rand, 1, 7);
switch(rand.nextInt(4)){ switch(rand.nextInt(4)){

View file

@ -30,7 +30,6 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
private int averageGroundLevel = -1; private int averageGroundLevel = -1;
@SuppressWarnings("unused")
public VillageComponentJamHouse(){ 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); 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){ public void spawnActualHouse(World world, Random rand, StructureBoundingBox sbb){
//Base //Base
this.fillWithBlocks(world, sbb, 1, 0, 8, 9, 0, 10, Blocks.GRASS); this.fillWithBlocks(world, sbb, 1, 0, 8, 9, 0, 10, Blocks.GRASS);

View file

@ -51,7 +51,6 @@ public class GuiCoffeeMachine extends GuiContainer{
this.world = world; this.world = world;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();

View file

@ -75,7 +75,6 @@ public class GuiInputter extends GuiContainer{
this.isAdvanced = isAdvanced; this.isAdvanced = isAdvanced;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();
@ -116,7 +115,6 @@ public class GuiInputter extends GuiContainer{
} }
@Override @Override
@SuppressWarnings("unchecked")
public void drawScreen(int x, int y, float f){ public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f); super.drawScreen(x, y, f);

View file

@ -39,7 +39,6 @@ public class GuiMiner extends GuiContainer{
this.ySize = 93+86; this.ySize = 93+86;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();

View file

@ -52,7 +52,6 @@ public class GuiRangedCollector extends GuiContainer{
this.world = world; this.world = world;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();
@ -62,7 +61,6 @@ public class GuiRangedCollector extends GuiContainer{
} }
@Override @Override
@SuppressWarnings("unchecked")
public void drawScreen(int x, int y, float f){ public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f); super.drawScreen(x, y, f);

View file

@ -54,7 +54,6 @@ public class GuiSmileyCloud extends GuiContainer{
this.ySize = 20; this.ySize = 20;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();

View file

@ -48,7 +48,6 @@ public class GuiXPSolidifier extends GuiContainer{
this.world = world; this.world = world;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();

View file

@ -36,7 +36,6 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
@SuppressWarnings("unchecked")
public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
public final int color; 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); return Items.IRON_HOE.onItemUse(stack, playerIn, worldIn, pos, hand, side, hitX, hitY, hitZ);
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean canHarvestBlock(IBlockState state, ItemStack stack){ public boolean canHarvestBlock(IBlockState state, ItemStack stack){

View file

@ -84,7 +84,6 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".desc")); list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".desc"));

View file

@ -111,7 +111,6 @@ public class ItemCoffee extends ItemFoodBase{
return true; return true;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){
PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack); PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack);

View file

@ -49,7 +49,7 @@ public class ItemCrystal extends ItemBase{
return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? EnumRarity.COMMON : BlockCrystal.allCrystals[stack.getItemDamage()].rarity; return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? EnumRarity.COMMON : BlockCrystal.allCrystals[stack.getItemDamage()].rarity;
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < BlockCrystal.allCrystals.length; j++){ for(int j = 0; j < BlockCrystal.allCrystals.length; j++){

View file

@ -53,7 +53,6 @@ import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@SuppressWarnings("unchecked")
public class ItemDrill extends ItemEnergy{ public class ItemDrill extends ItemEnergy{
private static final int ENERGY_USE = 100; private static final int ENERGY_USE = 100;
@ -257,7 +256,6 @@ public class ItemDrill extends ItemEnergy{
return toReturn; return toReturn;
} }
@SuppressWarnings("deprecation")
@Override @Override
public boolean canHarvestBlock(IBlockState state, ItemStack stack){ public boolean canHarvestBlock(IBlockState state, ItemStack stack){
int harvestLevel = this.getHarvestLevel(stack, ""); int harvestLevel = this.getHarvestLevel(stack, "");
@ -343,7 +341,6 @@ public class ItemDrill extends ItemEnergy{
} }
@Override @Override
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, List list){ public void getSubItems(Item item, CreativeTabs tabs, List list){
for(int i = 0; i < 16; i++){ for(int i = 0; i < 16; i++){
@ -415,7 +412,6 @@ public class ItemDrill extends ItemEnergy{
* @param world The World * @param world The World
* @param player The Player who breaks the Blocks * @param player The Player who breaks the Blocks
*/ */
@SuppressWarnings("deprecation")
public boolean breakBlocks(ItemStack stack, int radius, World world, BlockPos aPos, EntityPlayer player){ public boolean breakBlocks(ItemStack stack, int radius, World world, BlockPos aPos, EntityPlayer player){
int xRange = radius; int xRange = radius;
int yRange = radius; int yRange = radius;
@ -487,7 +483,6 @@ public class ItemDrill extends ItemEnergy{
* @param player The Player breaking the Blocks * @param player The Player breaking the Blocks
* @param use The Energy that should be extracted per Block * @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){ private boolean tryHarvestBlock(World world, BlockPos pos, boolean isExtra, ItemStack stack, EntityPlayer player, int use){
Block block = PosUtil.getBlock(pos, world); Block block = PosUtil.getBlock(pos, world);
IBlockState state = world.getBlockState(pos); IBlockState state = world.getBlockState(pos);

View file

@ -51,7 +51,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
return stack.getItemDamage() >= allDusts.length ? EnumRarity.COMMON : allDusts[stack.getItemDamage()].rarity; return stack.getItemDamage() >= allDusts.length ? EnumRarity.COMMON : allDusts[stack.getItemDamage()].rarity;
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allDusts.length; j++){ for(int j = 0; j < allDusts.length; j++){

View file

@ -94,7 +94,7 @@ public class ItemFoods extends ItemFoodBase{
return stack.getItemDamage() >= allFoods.length ? EnumRarity.COMMON : allFoods[stack.getItemDamage()].rarity; return stack.getItemDamage() >= allFoods.length ? EnumRarity.COMMON : allFoods[stack.getItemDamage()].rarity;
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allFoods.length; j++){ for(int j = 0; j < allFoods.length; j++){

View file

@ -60,7 +60,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
return stack.getItemDamage() >= allJams.length ? EnumRarity.COMMON : allJams[stack.getItemDamage()].rarity; return stack.getItemDamage() >= allJams.length ? EnumRarity.COMMON : allJams[stack.getItemDamage()].rarity;
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allJams.length; j++){ for(int j = 0; j < allJams.length; j++){

View file

@ -40,7 +40,6 @@ public class ItemKnife extends ItemBase{
} }
@SuppressWarnings("unchecked")
@Override @Override
public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){ public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){
Multimap map = super.getAttributeModifiers(slot, stack); Multimap map = super.getAttributeModifiers(slot, stack);

View file

@ -86,7 +86,6 @@ public class ItemLaserWrench extends ItemBase{
} }
@Override @Override
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
BlockPos coords = ItemPhantomConnector.getStoredPosition(stack); BlockPos coords = ItemPhantomConnector.getStoredPosition(stack);

View file

@ -28,7 +28,6 @@ public class ItemMagnetRing extends ItemEnergy{
super(3000000, 5000, name); super(3000000, 5000, name);
} }
@SuppressWarnings("unchecked")
@Override @Override
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){ public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){
int energyUse = 10; int energyUse = 10;

View file

@ -50,7 +50,7 @@ public class ItemMisc extends ItemBase{
return stack.getItemDamage() >= allMiscItems.length ? EnumRarity.COMMON : allMiscItems[stack.getItemDamage()].rarity; return stack.getItemDamage() >= allMiscItems.length ? EnumRarity.COMMON : allMiscItems[stack.getItemDamage()].rarity;
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allMiscItems.length; j++){ for(int j = 0; j < allMiscItems.length; j++){

View file

@ -134,7 +134,6 @@ public class ItemPhantomConnector extends ItemBase{
} }
@Override @Override
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
BlockPos coords = getStoredPosition(stack); BlockPos coords = getStoredPosition(stack);

View file

@ -61,7 +61,6 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
} }
@Override @Override
@SuppressWarnings("unchecked")
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5){ public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5){
super.onUpdate(stack, world, player, par4, 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; return stack.getItemDamage() >= allRings.length ? EnumRarity.COMMON : allRings[stack.getItemDamage()].rarity;
} }
@SuppressWarnings("all") @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allRings.length; j++){ for(int j = 0; j < allRings.length; j++){

View file

@ -65,7 +65,6 @@ public abstract class ItemEnergy extends ItemEnergyContainer{
this.setEnergy(stack, 0); this.setEnergy(stack, 0);
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){
list.add(this.getEnergyStored(stack)+"/"+this.getMaxEnergyStored(stack)+" RF"); list.add(this.getEnergyStored(stack)+"/"+this.getMaxEnergyStored(stack)+" RF");
@ -78,7 +77,6 @@ public abstract class ItemEnergy extends ItemEnergyContainer{
} }
@Override @Override
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, List list){ public void getSubItems(Item item, CreativeTabs tabs, List list){
ItemStack stackFull = new ItemStack(this); ItemStack stackFull = new ItemStack(this);

View file

@ -34,7 +34,6 @@ public class PacketBookletStandButton implements IMessage{
private NBTTagCompound entrySet; private NBTTagCompound entrySet;
private BlockPos tilePos; private BlockPos tilePos;
@SuppressWarnings("unused")
public PacketBookletStandButton(){ public PacketBookletStandButton(){
} }

View file

@ -33,7 +33,6 @@ public class PacketParticle implements IMessage{
private int particleAmount; private int particleAmount;
private float particleSize; private float particleSize;
@SuppressWarnings("unused")
public PacketParticle(){ public PacketParticle(){
} }

View file

@ -30,7 +30,6 @@ public class PacketUpdateTileEntity implements IMessage{
private NBTTagCompound compound; private NBTTagCompound compound;
private BlockPos pos; private BlockPos pos;
@SuppressWarnings("unused")
public PacketUpdateTileEntity(){ public PacketUpdateTileEntity(){
} }

View file

@ -30,7 +30,6 @@ public class PacketGuiButton implements IMessage{
private int buttonID; private int buttonID;
private int playerID; private int playerID;
@SuppressWarnings("unused")
public PacketGuiButton(){ public PacketGuiButton(){
} }

View file

@ -31,7 +31,6 @@ public class PacketGuiNumber implements IMessage{
private int textID; private int textID;
private int playerID; private int playerID;
@SuppressWarnings("unused")
public PacketGuiNumber(){ public PacketGuiNumber(){
} }

View file

@ -31,7 +31,6 @@ public class PacketGuiString implements IMessage{
private int textID; private int textID;
private int playerID; private int playerID;
@SuppressWarnings("unused")
public PacketGuiString(){ public PacketGuiString(){
} }

View file

@ -154,7 +154,6 @@ public class ClientProxy implements IProxy{
ModelLoader.setCustomStateMapper(block, mapper); ModelLoader.setCustomStateMapper(block, mapper);
} }
@SuppressWarnings("unchecked")
@Override @Override
public void init(FMLInitializationEvent event){ public void init(FMLInitializationEvent event){
ModUtil.LOGGER.info("Initializing ClientProxy..."); ModUtil.LOGGER.info("Initializing ClientProxy...");

View file

@ -18,7 +18,6 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@SuppressWarnings("unused")
public class ServerProxy implements IProxy{ public class ServerProxy implements IProxy{
@Override @Override

View file

@ -24,7 +24,6 @@ import org.apache.commons.lang3.tuple.Pair;
import java.util.HashMap; import java.util.HashMap;
@SuppressWarnings("unused")
public class FuelHandler implements IFuelHandler{ public class FuelHandler implements IFuelHandler{
private static HashMap<Pair<Item, Integer>, Integer> fuelList = new HashMap<Pair<Item, Integer>, Integer>(); private static HashMap<Pair<Item, Integer>, Integer> fuelList = new HashMap<Pair<Item, Integer>, Integer>();

View file

@ -74,7 +74,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -54,7 +54,6 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
@ -77,7 +76,6 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst
return this.isPlacer; return this.isPlacer;
} }
@SuppressWarnings("deprecation")
private void doWork(){ private void doWork(){
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj)); EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj));

View file

@ -20,12 +20,13 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidTankProperties;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; 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 PRODUCE = 80;
public static final int ENERGY_USE = 35; public static final int ENERGY_USE = 35;
@ -78,7 +79,6 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
@ -184,4 +184,59 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
public FluidTank getFluidHandler(EnumFacing facing){ public FluidTank getFluidHandler(EnumFacing facing){
return facing != EnumFacing.UP ? this.tank : null; 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;
}
}
} }

View file

@ -62,7 +62,6 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -25,13 +25,13 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundCategory;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.capability.IFluidTankProperties;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; 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_COFFEE_BEANS = 0;
public static final int SLOT_INPUT = 1; public static final int SLOT_INPUT = 1;
@ -242,4 +242,59 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
public FluidTank getFluidHandler(EnumFacing facing){ public FluidTank getFluidHandler(EnumFacing facing){
return facing != EnumFacing.DOWN ? this.tank : null; 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;
}
}
} }

View file

@ -56,7 +56,6 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
@ -78,7 +77,6 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
} }
} }
@SuppressWarnings("deprecation")
private void doWork(){ private void doWork(){
if(this.storage.getEnergyStored() >= ENERGY_USE*RANGE){ if(this.storage.getEnergyStored() >= ENERGY_USE*RANGE){
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj)); EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj));

View file

@ -38,7 +38,6 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -59,7 +59,6 @@ public class TileEntityFeeder extends TileEntityInventoryBase{
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -15,14 +15,14 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidTankProperties;
import net.minecraftforge.fluids.capability.templates.FluidHandlerFluidMap; import net.minecraftforge.fluids.capability.templates.FluidHandlerFluidMap;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; 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; private static final int PROCESS_TIME = 100;
public final FluidTank canolaTank = new FluidTank(2*Util.BUCKET){ public final FluidTank canolaTank = new FluidTank(2*Util.BUCKET){
@ -70,7 +70,6 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IFluid
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
@ -144,4 +143,60 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IFluid
this.oilTank.setFluid(fluids[0]); this.oilTank.setFluid(fluids[0]);
this.canolaTank.setFluid(fluids[1]); 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;
}
}
} }

View file

@ -20,15 +20,13 @@ import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidTankProperties;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; 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 final FluidTank tank = new FluidTank(8*Util.BUCKET);
public boolean isPlacer; public boolean isPlacer;
@ -121,7 +119,6 @@ public class TileEntityFluidCollector extends TileEntityBase implements IFluidSa
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
@ -168,4 +165,58 @@ public class TileEntityFluidCollector extends TileEntityBase implements IFluidSa
this.tank.setFluid(fluids[0]); 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;
}
}
} }

View file

@ -56,7 +56,6 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -90,7 +90,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -48,7 +48,6 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr
this.storage.readFromNBT(compound); this.storage.readFromNBT(compound);
} }
@SuppressWarnings("deprecation")
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();

View file

@ -70,7 +70,6 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -52,7 +52,6 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -54,7 +54,6 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -18,13 +18,13 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidTankProperties;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; 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; public static final int ENERGY_PRODUCED = 76;
private static final int BURN_TIME = 100; private static final int BURN_TIME = 100;
@ -81,7 +81,6 @@ public class TileEntityOilGenerator extends TileEntityBase implements IEnergyPro
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
@ -169,4 +168,59 @@ public class TileEntityOilGenerator extends TileEntityBase implements IEnergyPro
public void setFluids(FluidStack[] fluids){ public void setFluids(FluidStack[] fluids){
this.tank.setFluid(fluids[0]); 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;
}
}
} }

View file

@ -121,7 +121,6 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
return false; return false;
} }
@SuppressWarnings("deprecation")
private void doWork(){ private void doWork(){
if(this.isBreaker){ if(this.isBreaker){
Block blockToBreak = PosUtil.getBlock(this.boundPosition, this.worldObj); Block blockToBreak = PosUtil.getBlock(this.boundPosition, this.worldObj);

View file

@ -28,7 +28,6 @@ public class TileEntityPhantomRedstoneface extends TileEntityPhantomface{
super("redstoneface"); super("redstoneface");
} }
@SuppressWarnings("deprecation")
@Override @Override
public void updateEntity(){ public void updateEntity(){
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -45,7 +45,6 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement
} }
@Override @Override
@SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity(); super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){

View file

@ -22,7 +22,6 @@ import net.minecraft.world.World;
public class PosUtil{ public class PosUtil{
@SuppressWarnings("deprecation")
public static Material getMaterial(BlockPos pos, IBlockAccess world){ public static Material getMaterial(BlockPos pos, IBlockAccess world){
return getBlock(pos, world).getMaterial(world.getBlockState(pos)); 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); 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){ public static boolean setBlock(BlockPos pos, World world, Block block, int meta, int flag){
return world.setBlockState(pos, block.getStateFromMeta(meta), flag); return world.setBlockState(pos, block.getStateFromMeta(meta), flag);
} }
@ -72,7 +70,6 @@ public class PosUtil{
return null; return null;
} }
@SuppressWarnings("deprecation")
public static void setMetadata(BlockPos pos, World world, int meta, int flag){ public static void setMetadata(BlockPos pos, World world, int meta, int flag){
world.setBlockState(pos, getBlock(pos, world).getStateFromMeta(meta), flag); world.setBlockState(pos, getBlock(pos, world).getStateFromMeta(meta), flag);
} }

View file

@ -26,7 +26,6 @@ public class StringUtil{
/** /**
* Localizes a given String via StatCollector * Localizes a given String via StatCollector
*/ */
@SuppressWarnings("deprecation")
public static String localize(String text){ public static String localize(String text){
return I18n.translateToLocal(text); return I18n.translateToLocal(text);
} }
@ -34,7 +33,6 @@ public class StringUtil{
/** /**
* Localizes a given formatted String with the given Replacements * Localizes a given formatted String with the given Replacements
*/ */
@SuppressWarnings("deprecation")
public static String localizeFormatted(String text, Object... replace){ public static String localizeFormatted(String text, Object... replace){
return I18n.translateToLocalFormatted(text, replace); return I18n.translateToLocalFormatted(text, replace);
} }

View file

@ -14,19 +14,17 @@ import net.minecraft.item.EnumRarity;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import java.util.Locale; import java.util.Locale;
import java.util.Random; import java.util.Random;
@SuppressWarnings("unused")
public class Util{ public class Util{
public static final Random RANDOM = new Random(); public static final Random RANDOM = new Random();
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE; public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
@SuppressWarnings("deprecation") public static final int BUCKET = Fluid.BUCKET_VOLUME;
public static final int BUCKET = FluidContainerRegistry.BUCKET_VOLUME;
public static final EnumRarity CRYSTAL_RED_RARITY = addRarity("crystalRed", TextFormatting.DARK_RED, ModUtil.NAME+" Red Crystal"); 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"); public static final EnumRarity CRYSTAL_BLUE_RARITY = addRarity("crystalBlue", TextFormatting.DARK_BLUE, ModUtil.NAME+" Blue Crystal");

View file

@ -120,7 +120,6 @@ public class WorldUtil{
} }
} }
@SuppressWarnings("deprecation")
public static ItemStack useItemAtSide(EnumFacing side, World world, BlockPos pos, ItemStack stack){ public static ItemStack useItemAtSide(EnumFacing side, World world, BlockPos pos, ItemStack stack){
if(world instanceof WorldServer && stack != null && stack.getItem() != null){ if(world instanceof WorldServer && stack != null && stack.getItem() != null){
BlockPos offsetPos = pos.offset(side); BlockPos offsetPos = pos.offset(side);