Fixed warnings

This commit is contained in:
drcrazy 2017-09-30 03:58:01 +03:00
parent b10459a288
commit 1b4fee595d
5 changed files with 5 additions and 9 deletions

View file

@ -108,6 +108,7 @@ public class ItemAdvancedDrill extends ItemDrill {
return super.onBlockDestroyed(stack, worldIn, blockIn, pos, entityLiving);
}
@SuppressWarnings("deprecation")
public void breakBlock(BlockPos pos, ItemStack stack, World world, EntityLivingBase entityLiving, BlockPos oldPos) {
if (oldPos == pos) {
return;
@ -117,7 +118,7 @@ public class ItemAdvancedDrill extends ItemDrill {
}
IBlockState blockState = world.getBlockState(pos);
Block block = blockState.getBlock();
if (block.getBlockHardness(blockState, world, pos) == -1.0F) {
if (blockState.getBlockHardness(world, pos) == -1.0F) {
return;
}
List<ItemStack> stuff = block.getDrops(world, pos, blockState, 0);

View file

@ -80,7 +80,7 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo, IEne
@Override
public boolean canHarvestBlock(final IBlockState state, final ItemStack stack) {
return OreDictUtils.isOre(state, "stone")
|| state.getBlock().getMaterial(state) == Material.ROCK && PoweredItem.canUseEnergy(this.cost, stack);
|| state.getMaterial() == Material.ROCK && PoweredItem.canUseEnergy(this.cost, stack);
}
@Override