Skip to content

Commit

Permalink
Improve mod compatibility by not overriding LeavesBlock.randomTick wi…
Browse files Browse the repository at this point in the history
…th an identical implementation.

- Don't override LeavesBlock.randomTick
- Make ExtendedLeavesBlock.shouldDecay public
  • Loading branch information
gniftygnome committed Nov 8, 2023
1 parent 6ebb2f6 commit 2ef8d4d
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,7 @@ public boolean hasRandomTicks(BlockState state) {
}

@Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
if (this.shouldDecay(state)) {
ExtendedLeavesBlock.dropStacks(state, world, pos);
world.removeBlock(pos, false);
}
}

@Override
protected boolean shouldDecay(BlockState state) {
public boolean shouldDecay(BlockState state) {
return !state.get(PERSISTENT) && state.get(DISTANCE) == MAX_DISTANCE;
}

Expand Down

0 comments on commit 2ef8d4d

Please sign in to comment.