0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Move bedrock fix down to avoid issues with activation chance

This commit is contained in:
Alexander01998 2024-05-07 17:34:07 +02:00
parent 23bda690ab
commit 8ef53da205

View File

@ -94,15 +94,16 @@ public final class FastBreakHack extends Hack
return;
BlockPos blockPos = event.getBlockPos();
if(MC.world.getBlockState(blockPos).getBlock().getHardness() < 0)
return;
if(!blockPos.equals(lastBlockPos))
{
lastBlockPos = blockPos;
fastBreakBlock = random.nextDouble() <= activationChance.getValue();
}
// Ignore unbreakable blocks to avoid slowdown issue
if(MC.world.getBlockState(blockPos).getBlock().getHardness() < 0)
return;
if(!fastBreakBlock)
return;