Skip to content

Commit

Permalink
Fix Redstone Randomizer not ticking correctly.
Browse files Browse the repository at this point in the history
This resolves #303. The tick method was previously called from randomTick
however this is no longer the case in 1.20.4 so we need to override it
ourselves.
  • Loading branch information
Darkhax committed Mar 7, 2024
1 parent 7f04a72 commit 9346287
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ public BlockRedstoneRandomizer() {
}

@Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {

super.randomTick(state, world, pos, random);
world.setBlockAndUpdate(pos, state.cycle(BlockStateProperties.ENABLED));
}

Expand Down

0 comments on commit 9346287

Please sign in to comment.