Revert wrong changes

This commit is contained in:
drcrazy 2019-02-25 11:51:57 +03:00
parent 3314ba33b5
commit 767ce10bf1
2 changed files with 6 additions and 3 deletions

View file

@ -101,9 +101,10 @@ public class BlockRubberLog extends Block {
}
}
@SuppressWarnings("deprecation")
@Override
public void tick(IBlockState state, World worldIn, BlockPos pos, Random random) {
state.tick(worldIn, pos, random);
super.tick(state, worldIn, pos, random);
if (!state.get(HAS_SAP)) {
if (random.nextInt(50) == 0) {
EnumFacing facing = EnumFacing.byHorizontalIndex(random.nextInt(4));
@ -115,10 +116,11 @@ public class BlockRubberLog extends Block {
}
}
@SuppressWarnings("deprecation")
@Override
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn,
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
state.onBlockActivated(worldIn, pos, playerIn, hand, side, hitX, hitY, hitZ);
super.onBlockActivated(state, worldIn, pos, playerIn, hand, side, hitX, hitY, hitZ);
ItemStack stack = playerIn.getHeldItem(EnumHand.MAIN_HAND);
if (stack.isEmpty()) {
return false;

View file

@ -124,6 +124,7 @@ public class BlockCable extends BlockContainer {
}
// Block
@SuppressWarnings("deprecation")
@Override
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
ItemStack stack = playerIn.getHeldItem(EnumHand.MAIN_HAND);
@ -139,7 +140,7 @@ public class BlockCable extends BlockContainer {
return true;
}
}
return state.onBlockActivated(worldIn, pos, playerIn, hand, side, hitX, hitY, hitZ);
return super.onBlockActivated(state, worldIn, pos, playerIn, hand, side, hitX, hitY, hitZ);
}
@Override