Update AutoTNT.java

This commit is contained in:
Cloudburst
2021-07-23 16:27:19 +02:00
committed by GitHub
parent f766032694
commit c37b61efeb

View File

@@ -182,12 +182,11 @@ public class AutoTNT extends Module {
} }
private void ignite(BlockPos pos, FindItemResult item) { private void ignite(BlockPos pos, FindItemResult item) {
prevSlot = mc.player.getInventory().selectedSlot; InvUtils.swap(item.getSlot(), true);
InvUtils.swap(item.getSlot(), false);
mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true)); mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true));
InvUtils.swap(prevSlot, false); InvUtils.swapBack();
} }
private void place(BlockPos pos, FindItemResult item) { private void place(BlockPos pos, FindItemResult item) {