Skip to content

Commit 2ed4d2d

Browse files
committed
QuickShulker Sodium Fix
1 parent b9a2f78 commit 2ed4d2d

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/main/java/net/wurstclient/hacks/QuickShulkerHack.java

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,19 @@ private boolean breakPlacedShulker(BlockPos pos) throws InterruptedException
620620
if(BlockUtils.getState(pos).isAir())
621621
return true;
622622

623-
if(!BlockBreaker.breakOneBlock(pos))
623+
final BlockPos fpos = pos;
624+
final boolean[] started = new boolean[1];
625+
WurstClient.MC.execute(() -> {
626+
try
627+
{
628+
started[0] = BlockBreaker.breakOneBlock(fpos);
629+
}catch(Throwable ignored)
630+
{
631+
started[0] = false;
632+
}
633+
});
634+
635+
if(!started[0])
624636
safeSleep(50);
625637

626638
safeSleep(60);
@@ -632,10 +644,21 @@ private boolean placeShulker(BlockPos pos) throws InterruptedException
632644
{
633645
for(int attempt = 0; attempt < 3; attempt++)
634646
{
635-
if(BlockPlacer.placeOneBlock(pos))
636-
return true;
647+
final BlockPos fpos = pos;
648+
final boolean[] placed = new boolean[1];
649+
WurstClient.MC.execute(() -> {
650+
try
651+
{
652+
placed[0] = BlockPlacer.placeOneBlock(fpos);
653+
}catch(Throwable ignored)
654+
{
655+
placed[0] = false;
656+
}
657+
});
637658

638659
safeSleep(80);
660+
if(placed[0])
661+
return true;
639662
}
640663
return BlockUtils.getBlock(pos) instanceof ShulkerBoxBlock;
641664
}

0 commit comments

Comments
 (0)