SUPPRESS ALL THE THINGS!!

This commit is contained in:
Ellpeck 2016-05-20 19:05:10 +02:00
parent b71af53d13
commit 4b425a36ab
38 changed files with 70 additions and 6 deletions

View file

@ -25,7 +25,6 @@ import net.minecraft.util.math.BlockPos;
*/
public class LensConversion extends Lens{
@SuppressWarnings("unchecked")
@Override
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
return ActuallyAdditionsAPI.methodHandler.invokeConversionLens(hitState, hitBlock, tile);

View file

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

View file

@ -48,17 +48,20 @@ public class BlockCoffeeMachine extends BlockContainerBase{
this.setSoundType(SoundType.STONE);
}
@SuppressWarnings("deprecation")
@Nonnull
@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;

View file

@ -57,12 +57,14 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{
this.setSoundType(SoundType.WOOD);
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return AABB;
}
@SuppressWarnings("deprecation")
@Override
public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox, @Nonnull List<AxisAlignedBB> collidingBoxes, Entity entityIn){
addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_LEGS);
@ -72,11 +74,13 @@ 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;

View file

@ -37,6 +37,7 @@ public class BlockFishingNet extends BlockContainerBase{
this.setSoundType(SoundType.WOOD);
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
@ -49,11 +50,13 @@ 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;

View file

@ -37,6 +37,7 @@ public class BlockFurnaceSolar extends BlockContainerBase{
this.setSoundType(SoundType.STONE);
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
@ -49,11 +50,13 @@ 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;

View file

@ -39,11 +39,13 @@ 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, @Nonnull IBlockAccess worldIn, @Nonnull BlockPos pos, EnumFacing side){
@ -52,6 +54,7 @@ public class BlockGreenhouseGlass extends BlockContainerBase{
}
@SuppressWarnings("deprecation")
@Override
public boolean isOpaqueCube(IBlockState state){
return false;

View file

@ -38,6 +38,7 @@ 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);

View file

@ -48,11 +48,13 @@ 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;

View file

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

View file

@ -54,11 +54,13 @@ 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,6 +72,7 @@ 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){

View file

@ -37,17 +37,20 @@ public class BlockPhantomBooster extends BlockContainerBase{
this.setSoundType(SoundType.STONE);
}
@SuppressWarnings("deprecation")
@Nonnull
@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;

View file

@ -46,6 +46,7 @@ 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);
@ -73,6 +74,7 @@ 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,6 +92,7 @@ public class BlockSlabs extends BlockBase{
return this.getStateFromMeta(meta);
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
@ -119,6 +122,7 @@ public class BlockSlabs extends BlockBase{
this.setMaxDamage(0);
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public EnumActionResult onItemUse(ItemStack stack, @Nonnull EntityPlayer playerIn, World worldIn, @Nonnull BlockPos pos, EnumHand hand, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ){
@ -162,6 +166,7 @@ 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);

View file

@ -51,11 +51,13 @@ 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;

View file

@ -45,6 +45,7 @@ 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,6 +79,7 @@ public class BlockWallAA extends BlockBase{
return i;
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public IBlockState getActualState(@Nonnull IBlockState state, IBlockAccess worldIn, BlockPos pos){
@ -89,6 +91,7 @@ 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;
@ -99,12 +102,14 @@ public class BlockWallAA extends BlockBase{
return false;
}
@SuppressWarnings("deprecation")
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, @Nonnull IBlockAccess blockAccess, @Nonnull BlockPos pos, EnumFacing side){
return side != EnumFacing.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side);
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
@ -112,12 +117,14 @@ public class BlockWallAA extends BlockBase{
return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)];
}
@SuppressWarnings("deprecation")
@Override
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, @Nonnull World worldIn, @Nonnull 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;
@ -135,6 +142,7 @@ public class BlockWallAA extends BlockBase{
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);

View file

@ -72,6 +72,7 @@ public class BlockWildPlant extends BlockBushBase{
}
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, @Nonnull IBlockState state, int fortune){

View file

@ -60,6 +60,7 @@ public class BlockBase extends Block{
return EnumRarity.COMMON;
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public IBlockState getStateFromMeta(int meta){

View file

@ -60,6 +60,7 @@ public class BlockBushBase extends BlockBush{
return EnumRarity.COMMON;
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public IBlockState getStateFromMeta(int meta){

View file

@ -129,6 +129,7 @@ public abstract class BlockContainerBase extends BlockContainer{
return false;
}
@SuppressWarnings("deprecation")
@Nonnull
@Override
public IBlockState getStateFromMeta(int meta){
@ -150,6 +151,7 @@ public abstract class BlockContainerBase extends BlockContainer{
}
}
@SuppressWarnings("deprecation")
@Override
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){
this.updateRedstoneState(worldIn, pos);
@ -223,11 +225,13 @@ 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);

View file

@ -27,6 +27,7 @@ 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;

View file

@ -65,6 +65,7 @@ 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;

View file

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

View file

@ -75,6 +75,7 @@ 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);

View file

@ -41,6 +41,7 @@ public class WorldGenCaveSpawn extends WorldGenerator{
return true;
}
@SuppressWarnings("deprecation")
private void generateCave(World world, BlockPos center){
this.makeSphere(world, center, 8);
this.makeSphere(world, center.add(-3, 4, 3), 4);

View file

@ -65,6 +65,7 @@ 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(@Nonnull IBlockState state, ItemStack stack){

View file

@ -263,6 +263,7 @@ public class ItemDrill extends ItemEnergy{
return toReturn;
}
@SuppressWarnings("deprecation")
@Override
public boolean canHarvestBlock(@Nonnull IBlockState state, ItemStack stack){
int harvestLevel = this.getHarvestLevel(stack, "");
@ -414,6 +415,7 @@ 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;
@ -485,6 +487,7 @@ 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);

View file

@ -49,7 +49,6 @@ public class LensColor extends Lens{
{86F, 51F, 28F}, //Brown
};
@SuppressWarnings("unchecked")
@Override
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
if(hitBlock != null){

View file

@ -23,7 +23,6 @@ import java.util.ArrayList;
public class LensDeath extends Lens{
@SuppressWarnings("unchecked")
@Override
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
int use = 150; //Per Block (because it doesn't only activate when something is hit like the other lenses!)

View file

@ -78,6 +78,7 @@ 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));

View file

@ -12,9 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
import de.ellpeck.actuallyadditions.mod.items.ItemFertilizer;
import de.ellpeck.actuallyadditions.mod.items.ItemMisc;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;

View file

@ -79,6 +79,7 @@ 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));

View file

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

View file

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

View file

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

View file

@ -22,6 +22,7 @@ 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));
}
@ -50,6 +51,7 @@ 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);
}
@ -70,6 +72,7 @@ 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);
}

View file

@ -26,6 +26,7 @@ public class StringUtil{
/**
* Localizes a given String via StatCollector
*/
@SuppressWarnings("deprecation")
public static String localize(String text){
return I18n.translateToLocal(text);
}
@ -33,6 +34,7 @@ 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);
}

View file

@ -25,6 +25,7 @@ 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 EnumRarity CRYSTAL_RED_RARITY = addRarity(ModUtil.MOD_ID+"crystalRed", TextFormatting.DARK_RED, ModUtil.NAME+" Red Crystal");

View file

@ -110,6 +110,7 @@ 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);