Fixed unused and override warnings.

This commit is contained in:
drcrazy 2018-06-12 12:55:57 +03:00
parent bc8cdbfeff
commit baacc67a64
2 changed files with 12 additions and 0 deletions

View file

@ -75,14 +75,17 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
return true; return true;
} }
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) { public Item getItemDropped(IBlockState state, Random rand, int fortune) {
return Item.getItemFromBlock(halfslab); return Item.getItemFromBlock(halfslab);
} }
@Override
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) { public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) {
return new ItemStack(halfslab); return new ItemStack(halfslab);
} }
@Override
public IBlockState getStateFromMeta(int meta) { public IBlockState getStateFromMeta(int meta) {
IBlockState iblockstate = this.getDefaultState().withProperty(VARIANT, BlockRubberPlankSlab.Variant.DEFAULT); IBlockState iblockstate = this.getDefaultState().withProperty(VARIANT, BlockRubberPlankSlab.Variant.DEFAULT);
@ -93,6 +96,7 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
return iblockstate; return iblockstate;
} }
@Override
public int getMetaFromState(IBlockState state) { public int getMetaFromState(IBlockState state) {
int i = 0; int i = 0;
@ -103,18 +107,22 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
return i; return i;
} }
@Override
protected BlockStateContainer createBlockState() { protected BlockStateContainer createBlockState() {
return this.isDouble() ? new BlockStateContainer(this, new IProperty[] { VARIANT }) : new BlockStateContainer(this, new IProperty[] { HALF, VARIANT }); return this.isDouble() ? new BlockStateContainer(this, new IProperty[] { VARIANT }) : new BlockStateContainer(this, new IProperty[] { HALF, VARIANT });
} }
@Override
public String getUnlocalizedName(int meta) { public String getUnlocalizedName(int meta) {
return super.getUnlocalizedName(); return super.getUnlocalizedName();
} }
@Override
public IProperty<?> getVariantProperty() { public IProperty<?> getVariantProperty() {
return VARIANT; return VARIANT;
} }
@Override
public Comparable<?> getTypeForItem(ItemStack stack) { public Comparable<?> getTypeForItem(ItemStack stack) {
return BlockRubberPlankSlab.Variant.DEFAULT; return BlockRubberPlankSlab.Variant.DEFAULT;
} }
@ -122,6 +130,7 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
public static enum Variant implements IStringSerializable { public static enum Variant implements IStringSerializable {
DEFAULT; DEFAULT;
@Override
public String getName() { public String getName() {
return "default"; return "default";
} }
@ -133,6 +142,7 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
this.halfslab = half; this.halfslab = half;
} }
@Override
public boolean isDouble() { public boolean isDouble() {
return true; return true;
} }
@ -143,6 +153,7 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
super(name); super(name);
} }
@Override
public boolean isDouble() { public boolean isDouble() {
return false; return false;
} }

View file

@ -25,6 +25,7 @@
package techreborn.client.gui.slot.elements; package techreborn.client.gui.slot.elements;
public class ButtonElement extends ElementBase { public class ButtonElement extends ElementBase {
@SuppressWarnings("unused")
private Sprite.Button buttonSprite; private Sprite.Button buttonSprite;
public ButtonElement(int x, int y, Sprite.Button buttonSprite) { public ButtonElement(int x, int y, Sprite.Button buttonSprite) {