Removed unused code, added Override annotation

This commit is contained in:
drcrazy 2017-11-12 12:15:32 +03:00
parent 14f715ff7b
commit bf5b649fc4
39 changed files with 94 additions and 102 deletions

View file

@ -70,6 +70,7 @@ public class BlockFlare extends BlockContainer {
return null;
}
@Override
public int damageDropped(IBlockState state) {
return (state.getValue(COLOR)).getMetadata();
}
@ -81,14 +82,17 @@ public class BlockFlare extends BlockContainer {
}
}
@Override
public IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(COLOR, EnumDyeColor.byMetadata(meta));
}
@Override
public int getMetaFromState(IBlockState state) {
return (state.getValue(COLOR)).getMetadata();
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, COLOR);
}
@ -98,6 +102,7 @@ public class BlockFlare extends BlockContainer {
return false;
}
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.CUTOUT;

View file

@ -111,6 +111,7 @@ public class BlockMachineFrames extends BaseBlock {
return typesList.indexOf(state.getValue(TYPE));
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, TYPE);
}

View file

@ -113,6 +113,7 @@ public class BlockOre extends Block implements IOreNameProvider {
return getStateFromMeta(index);
}
@Override
@Deprecated
public ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
String variant = state.getValue(VARIANTS);
@ -230,6 +231,7 @@ public class BlockOre extends Block implements IOreNameProvider {
return oreNamesList.indexOf(state.getValue(VARIANTS));
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, VARIANTS);
}

View file

@ -151,6 +151,7 @@ public class BlockOre2 extends Block implements IOreNameProvider {
return oreNamesList.indexOf(state.getValue(VARIANTS));
}
@Override
protected BlockStateContainer createBlockState() {
VARIANTS = new PropertyString("type", oreNamesList);
return new BlockStateContainer(this, VARIANTS);

View file

@ -163,6 +163,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
return true;
}
@Override
protected BlockStateContainer createBlockState() {
TYPE = new PropertyString("type", types);
return new BlockStateContainer(this, TYPE);

View file

@ -49,6 +49,7 @@ public class BlockReinforcedGlass extends BlockGlass {
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this));
}
@Override
public int quantityDropped(Random random) {
return 1;
}
@ -58,6 +59,7 @@ public class BlockReinforcedGlass extends BlockGlass {
return false;
}
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.CUTOUT;

View file

@ -77,6 +77,7 @@ public class BlockRubberLog extends Block {
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this));
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, SAP_SIDE, HAS_SAP);
}
@ -127,6 +128,7 @@ public class BlockRubberLog extends Block {
return true;
}
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
int i = 4;
int j = i + 1;

View file

@ -109,6 +109,7 @@ public class BlockStorage extends BaseBlock {
return typesList.indexOf(state.getValue(TYPE));
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, TYPE);
}

View file

@ -133,6 +133,7 @@ public class BlockStorage2 extends BaseBlock {
return 30F;
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, TYPE);
}

View file

@ -193,6 +193,7 @@ public class BlockCable extends BlockContainer {
return false;
}
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
state = state.getActualState(source, pos);
float minX = state.getValue(WEST) ? 0.0F : 0.3125F;

View file

@ -78,6 +78,7 @@ public class BlockLamp extends BaseTileBlock {
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/lighting"));
}
@Override
protected BlockStateContainer createBlockState() {
FACING = PropertyDirection.create("facing");
ACTIVE = PropertyBool.create("active");

View file

@ -113,6 +113,7 @@ public abstract class BlockEnergyStorage extends BaseTileBlock {
return super.onBlockActivated(world, pos, state, player, hand, side, hitX, hitY, hitZ);
}
@Override
protected BlockStateContainer createBlockState() {
FACING = PropertyDirection.create("facing", Facings.ALL);
return new BlockStateContainer(this, FACING);
@ -220,10 +221,12 @@ public abstract class BlockEnergyStorage extends BaseTileBlock {
return aenumfacing[rand.nextInt(aenumfacing.length)];
}
@Override
public boolean apply(EnumFacing p_apply_1_) {
return p_apply_1_ != null;
}
@Override
public Iterator<EnumFacing> iterator() {
return Iterators.forArray(this.facings());
}

View file

@ -76,6 +76,7 @@ public abstract class BlockTransformer extends BaseTileBlock {
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/energy"));
}
@Override
protected BlockStateContainer createBlockState() {
FACING = PropertyDirection.create("facing", Facings.ALL);
return new BlockStateContainer(this, FACING);
@ -267,10 +268,12 @@ public abstract class BlockTransformer extends BaseTileBlock {
return aenumfacing[rand.nextInt(aenumfacing.length)];
}
@Override
public boolean apply(EnumFacing p_apply_1_) {
return p_apply_1_ != null;
}
@Override
public Iterator<EnumFacing> iterator() {
return Iterators.forArray(this.facings());
}