Revert wrong changes
This commit is contained in:
parent
3314ba33b5
commit
767ce10bf1
2 changed files with 6 additions and 3 deletions
|
@ -101,9 +101,10 @@ public class BlockRubberLog extends Block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockState state, World worldIn, BlockPos pos, Random random) {
|
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 (!state.get(HAS_SAP)) {
|
||||||
if (random.nextInt(50) == 0) {
|
if (random.nextInt(50) == 0) {
|
||||||
EnumFacing facing = EnumFacing.byHorizontalIndex(random.nextInt(4));
|
EnumFacing facing = EnumFacing.byHorizontalIndex(random.nextInt(4));
|
||||||
|
@ -115,10 +116,11 @@ public class BlockRubberLog extends Block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn,
|
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn,
|
||||||
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
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);
|
ItemStack stack = playerIn.getHeldItem(EnumHand.MAIN_HAND);
|
||||||
if (stack.isEmpty()) {
|
if (stack.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -124,6 +124,7 @@ public class BlockCable extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block
|
// Block
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
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);
|
ItemStack stack = playerIn.getHeldItem(EnumHand.MAIN_HAND);
|
||||||
|
@ -139,7 +140,7 @@ public class BlockCable extends BlockContainer {
|
||||||
return true;
|
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
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue