mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
Move bedrock fix down to avoid issues with activation chance
This commit is contained in:
parent
23bda690ab
commit
8ef53da205
@ -94,15 +94,16 @@ public final class FastBreakHack extends Hack
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
BlockPos blockPos = event.getBlockPos();
|
BlockPos blockPos = event.getBlockPos();
|
||||||
if(MC.world.getBlockState(blockPos).getBlock().getHardness() < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(!blockPos.equals(lastBlockPos))
|
if(!blockPos.equals(lastBlockPos))
|
||||||
{
|
{
|
||||||
lastBlockPos = blockPos;
|
lastBlockPos = blockPos;
|
||||||
fastBreakBlock = random.nextDouble() <= activationChance.getValue();
|
fastBreakBlock = random.nextDouble() <= activationChance.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore unbreakable blocks to avoid slowdown issue
|
||||||
|
if(MC.world.getBlockState(blockPos).getBlock().getHardness() < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if(!fastBreakBlock)
|
if(!fastBreakBlock)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user