From f1c0933001afc7b2dc9d382899ec7d7ac0fa4012 Mon Sep 17 00:00:00 2001 From: etianl <115842502+etianl@users.noreply.github.com> Date: Fri, 5 Apr 2024 03:45:52 -0700 Subject: [PATCH] 0.9.1 InstaSafetyBox Added, code cleanups --- README.md | 1 + gradle.properties | 2 +- .../java/pwn/noobs/trouserstreak/Trouser.java | 1 + .../trouserstreak/modules/AutoLavaCaster.java | 374 ++-- .../trouserstreak/modules/AutoMountain.java | 905 +++++---- .../trouserstreak/modules/InstaSafetyBox.java | 233 +++ .../trouserstreak/modules/TrouserBuild.java | 1800 +++++++++-------- src/main/resources/fabric.mod.json | 2 +- 8 files changed, 1824 insertions(+), 1494 deletions(-) create mode 100644 src/main/java/pwn/noobs/trouserstreak/modules/InstaSafetyBox.java diff --git a/README.md b/README.md index 0477de47a..894a40f89 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ This will return the lowest block placed with AutoMountain until AutoLavacast is - **Inventory Dupe (1.17):** Duplicates things in your crafting slots when the module is enabled and the Dupe button is pressed in your inventory. Only works on Minecraft servers on the version 1.17, not any version before or after.(Credit to ItsVen and Da0neDatGotAway for original creation of the dupe, and to B2H990 for making the fabric mod. Credits to etianl for porting to Meteor.) - **InstaKill:** Shoots arrows and tridents with incredible power and velocity. Enabling multiple buttons causes the amount of packets to add up. (Credits to Saturn5Vfive) - **InstaMineNuker:** Sends packets to instantly mine the blocks around you until they are gone. There is an option in it to make it only target instamineable blocks such as crops, grass, slimeblocks, and more.. (Credits to etianl and to Meteor Client, as well as Meteor Rejects for some borrowed code) +- **InstaSafetyBox:** Places a box around you for safety using the hardest blocks available in your hotbar. Also with adjustable range for thic box. (Credits to etianl :D) - **LavaAura:** Automatically places and picks up lava buckets at an entity's position on a tick delay, or sets the entity on fire using flint and steel or fire charges. Also has the option of placing lavabuckets or fire on every block face which may be useful in creative mode. (Credits to etianl :D) - **LecternCrash:** Crash 1.18.X vanilla servers and possibly below. (Credits to Coderx-Gamer) - **NbtEditor:** Requires Creative mode. Generates custom entities in the form of a custom spawn egg, and it can also generate items with custom enchantments and potions with custom effects all based on the settings you configure. (Credits to etianl :D) diff --git a/gradle.properties b/gradle.properties index 0563bdb4d..ae90feb08 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ yarn_mappings=1.20.4+build.3 loader_version=0.15.3 # Mod Properties -mod_version=0.9.0-1.20.4 +mod_version=0.9.1-1.20.4 maven_group=pwn.noobs archives_base_name=1trouser-streak diff --git a/src/main/java/pwn/noobs/trouserstreak/Trouser.java b/src/main/java/pwn/noobs/trouserstreak/Trouser.java index 7ca5e4e47..ac70f97ea 100644 --- a/src/main/java/pwn/noobs/trouserstreak/Trouser.java +++ b/src/main/java/pwn/noobs/trouserstreak/Trouser.java @@ -26,6 +26,7 @@ public void onInitialize() { Modules.get().add(new NewerNewChunks()); Modules.get().add(new SuperInstaMine()); Modules.get().add(new InstaMineNuker()); + Modules.get().add(new InstaSafetyBox()); Modules.get().add(new BaseFinder()); Modules.get().add(new Teleport()); Modules.get().add(new TPFly()); diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/AutoLavaCaster.java b/src/main/java/pwn/noobs/trouserstreak/modules/AutoLavaCaster.java index b09f32271..16e6977e9 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/AutoLavaCaster.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/AutoLavaCaster.java @@ -32,6 +32,8 @@ import net.minecraft.util.math.Vec3i; import pwn.noobs.trouserstreak.Trouser; +import java.util.List; + public class AutoLavaCaster extends Module { private final SettingGroup sgGeneral = settings.getDefaultGroup(); private final SettingGroup sgBuild = settings.createGroup("Build Options"); @@ -68,7 +70,7 @@ public class AutoLavaCaster extends Module { .description("The amount of time to let lava flow, in seconds. Use the .lavacalc Command to get a suggested time. Based on 20ticks/second.") .defaultValue(120) .sliderRange(15, 900) - .min(10) + .min(10) .visible(() -> !estlavatime.get()) .build() ); @@ -94,6 +96,12 @@ public class AutoLavaCaster extends Module { .defaultValue(true) .build() ); + private final Setting> skippableBlox = sgBuild.add(new BlockListSetting.Builder() + .name("Blocks to not use") + .description("Do not use these blocks for mountains.") + .visible(() -> incY.get()) + .build() + ); private final Setting bstyle = sgBuild.add(new BoolSetting.Builder() .name("SwitchBuildStyletoPlusSign") .description("Switches build style to increase flow") @@ -153,8 +161,8 @@ public class AutoLavaCaster extends Module { .name("YourReach") .description("Your Reach, in blocks. Maybe turn it down if not using the Reach module.") .defaultValue(4.6) - .min (2) - .max (4.6) + .min (2) + .max (4.6) .build() ); @@ -245,30 +253,30 @@ else if (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestb estimatedlavatime= ((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)+(((new AutoMountain().lowestblock.getY()-new AutoMountain().groundY)*30)/20)); } }else if (estlavatime.get() && !aMountain.autocasttimenow==true){ - switch (mode.get()) { - case UseLastMountain -> { - if (aMountain.lowestblock.getY()==666){ - toggle(); - error("Use AutoMountain first to get the timings for the last Mountain."); - return; + switch (mode.get()) { + case UseLastMountain -> { + if (aMountain.lowestblock.getY()==666){ + toggle(); + error("Use AutoMountain first to get the timings for the last Mountain."); + return; + } + if (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)+(((new AutoMountain().lowestblock.getY()-new AutoMountain().groundY)*30)/20)) <= (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)/2)+(((new AutoMountain().highestblock.getY()-new AutoMountain().groundY2)*30)/20))){ + estimatedlavatime= (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)/2)+(((new AutoMountain().highestblock.getY()-new AutoMountain().groundY2)*30)/20)); + } + else if (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)+(((new AutoMountain().lowestblock.getY()-new AutoMountain().groundY)*30)/20)) > (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)/2)+(((new AutoMountain().highestblock.getY()-new AutoMountain().groundY2)*30)/20))){ + estimatedlavatime= ((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)+(((new AutoMountain().lowestblock.getY()-new AutoMountain().groundY)*30)/20)); + } } - if (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)+(((new AutoMountain().lowestblock.getY()-new AutoMountain().groundY)*30)/20)) <= (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)/2)+(((new AutoMountain().highestblock.getY()-new AutoMountain().groundY2)*30)/20))){ - estimatedlavatime= (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)/2)+(((new AutoMountain().highestblock.getY()-new AutoMountain().groundY2)*30)/20)); + case FortyFiveDegreeStairs -> { + if (mc.player.getBlockY()>64) + estimatedlavatime= (((mc.player.getBlockY()-64)*60)/20); + else if (mc.player.getBlockY()<=64) + estimatedlavatime= (((mc.player.getBlockY()-(-60))*60)/20); } - else if (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)+(((new AutoMountain().lowestblock.getY()-new AutoMountain().groundY)*30)/20)) > (((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)/2)+(((new AutoMountain().highestblock.getY()-new AutoMountain().groundY2)*30)/20))){ - estimatedlavatime= ((((2+new AutoMountain().highestblock.getY()-new AutoMountain().lowestblock.getY())*60)/20)+(((new AutoMountain().lowestblock.getY()-new AutoMountain().groundY)*30)/20)); + case ChooseBottomY -> { + estimatedlavatime= (((mc.player.getBlockY()-estbotY.get())*60)/20); } } - case FortyFiveDegreeStairs -> { - if (mc.player.getBlockY()>64) - estimatedlavatime= (((mc.player.getBlockY()-64)*60)/20); - else if (mc.player.getBlockY()<=64) - estimatedlavatime= (((mc.player.getBlockY()-(-60))*60)/20); - } - case ChooseBottomY -> { - estimatedlavatime= (((mc.player.getBlockY()-estbotY.get())*60)/20); - } - } } if (Modules.get().get(Timer.class).isActive()) { error("Timer off."); @@ -312,7 +320,7 @@ else if (mc.player.getBlockY()<=64) return; } if (!(mc.world.getBlockState(lava).getBlock() == Blocks.AIR) && !(mc.world.getBlockState(hover).getBlock() == Blocks.AIR) && !aposition.get() && !aMountain.autocasttimenow==true){ - placeLava(); + placeLava(); } firstplace=true; } @@ -346,9 +354,9 @@ private void onPreTick(TickEvent.Pre event) { BlockPos ceiling = new BlockPos(mc.player.getBlockX(),mc.player.getBlockY()+2,mc.player.getBlockZ()); BlockPos hover = new BlockPos(mc.player.getBlockX(),mc.player.getBlockY()-1,mc.player.getBlockZ()); lavamountainticks++; - if (incY.get() && (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock)) { - cascadingpileof(); - } + if (incY.get() && isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack())) { + cascadingpileof(); + } PlayerUtils.centerPlayer(); mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(lava.getX()+0.5,lava.getY()+1.05,lava.getZ()+0.5)); if (sneaky.get()){ @@ -388,7 +396,7 @@ private void onPreTick(TickEvent.Pre event) { }else if (lavamountainticks==7 && firstplace == true && (aposition.get() || aMountain.autocasttimenow==true)){ if (!(mc.world.getBlockState(lava).getBlock() == Blocks.AIR) && !(mc.world.getBlockState(hover).getBlock() == Blocks.AIR)) placeLava(); } - else if (firstplace==false && lavamountainticks==55){ + else if (firstplace==false && lavamountainticks==55){ if (aMountain.autocasttimenow==true) { if (aMountain.lowestblock.getY()==666){ toggle(); @@ -417,12 +425,12 @@ else if (mc.player.getBlockY()<=64) } } } - placeLava(); - if (estlavatime.get() || aMountain.autocasttimenow==true){ - ChatUtils.sendMsg(Text.of("Starting layer "+layers+". Lava will take "+estimatedlavatime+" more seconds to flow.")); - }else - ChatUtils.sendMsg(Text.of("Starting layer "+layers+". Lava will take "+lavatime.get()+" more seconds to flow.")); - } + placeLava(); + if (estlavatime.get() || aMountain.autocasttimenow==true){ + ChatUtils.sendMsg(Text.of("Starting layer "+layers+". Lava will take "+estimatedlavatime+" more seconds to flow.")); + }else + ChatUtils.sendMsg(Text.of("Starting layer "+layers+". Lava will take "+lavatime.get()+" more seconds to flow.")); + } else if (MountainsOfLavaInc.get() && lavamountainticks==60 && layers>=layerstop.get()){ if (mc.options.sneakKey.isPressed()){ mc.options.sneakKey.setPressed(false); @@ -434,91 +442,91 @@ else if (MountainsOfLavaInc.get() && lavamountainticks==60 && layers>=layerstop. toggle(); return; } - else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20) || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)){ - firstplace=false; - pickupLiquid(); - } - else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get() || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()){ - placeWater(); - ChatUtils.sendMsg(Text.of("Finishing layer "+layers)); - } - else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get() || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()){ - pickupLiquid(); - if (!incY.get()){ - lavamountainticks=0; - layers++; + else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20) || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)){ + firstplace=false; + pickupLiquid(); } - if (!MountainsOfLavaInc.get() && layers>=layerstop.get()){ - if (mc.options.sneakKey.isPressed()){ - mc.options.sneakKey.setPressed(false); - } - ChatUtils.sendMsg(Text.of("Done Building!")); - lavamountainticks = 0; - mc.player.setNoGravity(false); - aMountain.autocasttimenow=false; - toggle(); - return; + else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get() || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()){ + placeWater(); + ChatUtils.sendMsg(Text.of("Finishing layer "+layers)); } - if (incY.get()){ - if (!mc.world.getBlockState(ceiling).isReplaceable()){ - if (!mc.world.getBlockState(ceiling).isReplaceable()){ - error("Hit the ceiling"); - } + else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get() || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()){ + pickupLiquid(); + if (!incY.get()){ + lavamountainticks=0; + layers++; + } + if (!MountainsOfLavaInc.get() && layers>=layerstop.get()){ if (mc.options.sneakKey.isPressed()){ mc.options.sneakKey.setPressed(false); } + ChatUtils.sendMsg(Text.of("Done Building!")); lavamountainticks = 0; mc.player.setNoGravity(false); aMountain.autocasttimenow=false; toggle(); return; } - if (mc.player.getY()>=buildlimit.get()){ + if (incY.get()){ + if (!mc.world.getBlockState(ceiling).isReplaceable()){ + if (!mc.world.getBlockState(ceiling).isReplaceable()){ + error("Hit the ceiling"); + } + if (mc.options.sneakKey.isPressed()){ + mc.options.sneakKey.setPressed(false); + } + lavamountainticks = 0; + mc.player.setNoGravity(false); + aMountain.autocasttimenow=false; + toggle(); + return; + } if (mc.player.getY()>=buildlimit.get()){ - error("Hit your Y Stop Value"); + if (mc.player.getY()>=buildlimit.get()){ + error("Hit your Y Stop Value"); + } + if (mc.options.sneakKey.isPressed()){ + mc.options.sneakKey.setPressed(false); + } + lavamountainticks = 0; + mc.player.setNoGravity(false); + aMountain.autocasttimenow=false; + toggle(); + return; } - if (mc.options.sneakKey.isPressed()){ - mc.options.sneakKey.setPressed(false); + cascadingpileof(); + if (incY.get() && isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack())) { + error("Not Enough Suitable Blocks in Hand."); + lavamountainticks = 0; + mc.player.setNoGravity(false); + aMountain.autocasttimenow=false; + toggle(); + return; } - lavamountainticks = 0; - mc.player.setNoGravity(false); - aMountain.autocasttimenow=false; - toggle(); - return; - } - cascadingpileof(); - if (incY.get() && !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock) { - error("Not Enough Suitable Blocks in Hand."); - lavamountainticks = 0; - mc.player.setNoGravity(false); - aMountain.autocasttimenow=false; - toggle(); - return; } } - } - if (incY.get()){ - if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+5 || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()+5){ - BlockPos pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); - if (mc.world.getBlockState(pos).isReplaceable()) { - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - lava = new BlockPos(lava.getX(), lava.getY()+1, lava.getZ()); - } - else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+10 || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()+10){ - mc.player.jump(); - } - else if ((estlavatime.get() || aMountain.autocasttimenow==true) && (lavamountainticks>=(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+10 && lavamountainticks<=(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+15) || !estlavatime.get() && !aMountain.autocasttimenow==true && (lavamountainticks>=(lavatime.get()*20)+watertime1.get()+waterdelay.get()+10 && lavamountainticks<=(lavatime.get()*20)+watertime1.get()+waterdelay.get()+15)) { - BlockPos pos = mc.player.getBlockPos().add(new Vec3i(0,-1,0)); - if (mc.world.getBlockState(pos).isReplaceable()) { - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+16 || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()+16){ - lavamountainticks=0; - layers++; - } - }} + if (incY.get()){ + if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+5 || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()+5){ + BlockPos pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + if (mc.world.getBlockState(pos).isReplaceable()) { + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + lava = new BlockPos(lava.getX(), lava.getY()+1, lava.getZ()); + } + else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+10 || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()+10){ + mc.player.jump(); + } + else if ((estlavatime.get() || aMountain.autocasttimenow==true) && (lavamountainticks>=(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+10 && lavamountainticks<=(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+15) || !estlavatime.get() && !aMountain.autocasttimenow==true && (lavamountainticks>=(lavatime.get()*20)+watertime1.get()+waterdelay.get()+10 && lavamountainticks<=(lavatime.get()*20)+watertime1.get()+waterdelay.get()+15)) { + BlockPos pos = mc.player.getBlockPos().add(new Vec3i(0,-1,0)); + if (mc.world.getBlockState(pos).isReplaceable()) { + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+16 || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()+16){ + lavamountainticks=0; + layers++; + } + }} else if (layers==lay.get() && bstyle.get()){ if (lavamountainticks<=5 && firstplace == true){ if (aposition.get() || aMountain.autocasttimenow==true){ @@ -638,7 +646,7 @@ else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountaint return; } cascadingpileof(); - if (bstyle.get() && incY.get() && !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock) { + if (bstyle.get() && incY.get() && isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack())) { error("Not Enough Suitable Blocks in Hand."); lavamountainticks = 0; mc.player.setNoGravity(false); @@ -652,7 +660,7 @@ else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountaint BlockPos pos2 = new BlockPos(lava.getX()+1,lava.getY()+1,lava.getZ()); if (mc.world.getBlockState(pos2).isReplaceable()) { mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos2), Direction.DOWN, pos2, false)); - } + } } else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountainticks==(estimatedlavatime*20)+watertime1.get()+waterdelay.get()+8 || !estlavatime.get() && !aMountain.autocasttimenow==true && lavamountainticks==(lavatime.get()*20)+watertime1.get()+waterdelay.get()+8) { BlockPos pos3 = new BlockPos(lava.getX()-1,lava.getY()+1,lava.getZ()); @@ -819,7 +827,7 @@ else if ((estlavatime.get() || aMountain.autocasttimenow==true) && lavamountaint return; } cascadingpileof(); - if (bstyle.get() && incY.get() && !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock) { + if (bstyle.get() && incY.get() && isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack())) { error("Not Enough Suitable Blocks in Hand."); lavamountainticks = 0; mc.player.setNoGravity(false); @@ -969,73 +977,101 @@ private BlockPos cast() { private void autoposition() { BlockPos pos = mc.player.getBlockPos().add(new Vec3i(0,-1,0)); if (mc.world.getBlockState(pos).isReplaceable()) { - if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.EAST|| aMountain.autocasttimenow==false && mc.player.getYaw()>=90 && mc.player.getYaw()<=180 || tryanotherpos==true){ //NORTHWEST - BlockPos isair = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+3,lava.getZ()+2.5); - BlockPos isair2 = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+4,lava.getZ()+2.5); - if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { - mc.player.setPos(lava.getX()+2.5,lava.getY()+3,lava.getZ()+2.5); - tryanotherpos=false; - } else { - error("Position is occupied, trying another."); - tryanotherpos=true;} - } else if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.SOUTH|| aMountain.autocasttimenow==false && mc.player.getYaw()>=-180 && mc.player.getYaw()<-90 || tryanotherpos==true){ //NORTHEAST - BlockPos isair = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+3,lava.getZ()+2.5); - BlockPos isair2 = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+4,lava.getZ()+2.5); - if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { - mc.player.setPos(lava.getX()-1.5,lava.getY()+3,lava.getZ()+2.5); - tryanotherpos=false; - } else { - error("Position is occupied, trying another."); - tryanotherpos=true;} - } else if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.WEST|| aMountain.autocasttimenow==false && mc.player.getYaw()>=-90 && mc.player.getYaw()<0 || tryanotherpos==true){ //SOUTHEAST - BlockPos isair = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+3,lava.getZ()-1.5); - BlockPos isair2 = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+4,lava.getZ()-1.5); - if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { - mc.player.setPos(lava.getX()-1.5,lava.getY()+3,lava.getZ()-1.5); - tryanotherpos=false; - } else { - error("Position is occupied, trying another."); - tryanotherpos=true;} - } else if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.NORTH|| aMountain.autocasttimenow==false && mc.player.getYaw()>=0 && mc.player.getYaw()<90 || tryanotherpos==true){ //SOUTHWEST - BlockPos isair = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+3,lava.getZ()-1.5); - BlockPos isair2 = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+4,lava.getZ()-1.5); - if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { - mc.player.setPos(lava.getX()+2.5,lava.getY()+3,lava.getZ()-1.5); - tryanotherpos=false; - } else { - error("Position is occupied, trying another."); - tryanotherpos=true;} - } + if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.EAST|| aMountain.autocasttimenow==false && mc.player.getYaw()>=90 && mc.player.getYaw()<=180 || tryanotherpos==true){ //NORTHWEST + BlockPos isair = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+3,lava.getZ()+2.5); + BlockPos isair2 = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+4,lava.getZ()+2.5); + if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { + mc.player.setPos(lava.getX()+2.5,lava.getY()+3,lava.getZ()+2.5); + tryanotherpos=false; + } else { + error("Position is occupied, trying another."); + tryanotherpos=true;} + } else if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.SOUTH|| aMountain.autocasttimenow==false && mc.player.getYaw()>=-180 && mc.player.getYaw()<-90 || tryanotherpos==true){ //NORTHEAST + BlockPos isair = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+3,lava.getZ()+2.5); + BlockPos isair2 = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+4,lava.getZ()+2.5); + if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { + mc.player.setPos(lava.getX()-1.5,lava.getY()+3,lava.getZ()+2.5); + tryanotherpos=false; + } else { + error("Position is occupied, trying another."); + tryanotherpos=true;} + } else if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.WEST|| aMountain.autocasttimenow==false && mc.player.getYaw()>=-90 && mc.player.getYaw()<0 || tryanotherpos==true){ //SOUTHEAST + BlockPos isair = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+3,lava.getZ()-1.5); + BlockPos isair2 = BlockPos.ofFloored(lava.getX()-1.5,lava.getY()+4,lava.getZ()-1.5); + if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { + mc.player.setPos(lava.getX()-1.5,lava.getY()+3,lava.getZ()-1.5); + tryanotherpos=false; + } else { + error("Position is occupied, trying another."); + tryanotherpos=true;} + } else if (aMountain.autocasttimenow==true && aMountain.wasfacingBOT==Direction.NORTH|| aMountain.autocasttimenow==false && mc.player.getYaw()>=0 && mc.player.getYaw()<90 || tryanotherpos==true){ //SOUTHWEST + BlockPos isair = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+3,lava.getZ()-1.5); + BlockPos isair2 = BlockPos.ofFloored(lava.getX()+2.5,lava.getY()+4,lava.getZ()-1.5); + if (mc.world.getBlockState(isair).isReplaceable() && mc.world.getFluidState(isair).isEmpty() && !mc.world.getBlockState(isair).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isair2).isReplaceable() && mc.world.getFluidState(isair2).isEmpty() && !mc.world.getBlockState(isair2).isOf(Blocks.POWDER_SNOW)) { + mc.player.setPos(lava.getX()+2.5,lava.getY()+3,lava.getZ()-1.5); + tryanotherpos=false; + } else { + error("Position is occupied, trying another."); + tryanotherpos=true;} + } } } private void cascadingpileof() { - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 0; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 1; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 2; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 3; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 4; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 5; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 6; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 7; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 8; - } - } - } - } - } - } - } - } + FindItemResult findResult = InvUtils.findInHotbar(block -> !isInvalidBlock(block)); + if (!findResult.found()) { + return; } + mc.player.getInventory().selectedSlot = findResult.slot(); + } + + private boolean isInvalidBlock(ItemStack stack) { + return !(stack.getItem() instanceof BlockItem) + || stack.getItem() instanceof BedItem + || stack.getItem() instanceof PowderSnowBucketItem + || stack.getItem() instanceof ScaffoldingItem + || stack.getItem() instanceof TallBlockItem + || stack.getItem() instanceof VerticallyAttachableBlockItem + || stack.getItem() instanceof PlaceableOnWaterItem + || ((BlockItem) stack.getItem()).getBlock() instanceof PlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TorchBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRedstoneGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof RedstoneWireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FallingBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRailBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractSignBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BellBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CarpetBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ConduitBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CoralParentBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireHookBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PointedDripstoneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SnowBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PressurePlateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallMountedBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ShulkerBoxBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AmethystClusterBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BuddingAmethystBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusFlowerBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusPlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LanternBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CandleBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TntBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CakeBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CobwebBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SugarCaneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SporeBlossomBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof KelpBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof GlowLichenBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CactusBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BambooBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FlowerPotBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LadderBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof Waterloggable + || skippableBlox.get().contains(((BlockItem) stack.getItem()).getBlock()); } public enum Modes { FortyFiveDegreeStairs, ChooseBottomY, UseLastMountain diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/AutoMountain.java b/src/main/java/pwn/noobs/trouserstreak/modules/AutoMountain.java index f3cc13725..2501dc51a 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/AutoMountain.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/AutoMountain.java @@ -289,9 +289,9 @@ public void onActivate() { lowblockY=-1; highblockY=-1; if (startPaused.get() == true){ - pause = false; - if (autolavamountain.get()) ChatUtils.sendMsg(Text.of("Press UseKey (RightClick) to Build a Mountain! Please wait while the bot works.")); - else ChatUtils.sendMsg(Text.of("Press UseKey (RightClick) to Build Stairs!")); + pause = false; + if (autolavamountain.get()) ChatUtils.sendMsg(Text.of("Press UseKey (RightClick) to Build a Mountain! Please wait while the bot works.")); + else ChatUtils.sendMsg(Text.of("Press UseKey (RightClick) to Build Stairs!")); } else if (startPaused.get() == false){ mc.player.setPos(mc.player.getX(),Math.ceil(mc.player.getY()),mc.player.getZ()); wasfacing=mc.player.getHorizontalFacing(); @@ -311,7 +311,7 @@ public void onActivate() { resetTimer = false; playerPos = mc.player.getBlockPos(); renderplayerPos = mc.player.getBlockPos(); - if (startPaused.get() || !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())) return; + if (startPaused.get() || isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack())) return; BlockPos pos = playerPos.add(new Vec3i(0,-1,0)); if (mc.world.getBlockState(pos).isReplaceable()) { mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); @@ -328,8 +328,8 @@ public void onDeactivate() { isthisfirstblock=false; } if (pause=true){ - if (isthisfirstblock==false && mc.player.getY()highestblock.getY()+1) highestblock=mc.player.getBlockPos().add(new Vec3i(0,-1,0)); + if (isthisfirstblock==false && mc.player.getY()highestblock.getY()+1) highestblock=mc.player.getBlockPos().add(new Vec3i(0,-1,0)); } search=true; seekground(); @@ -338,12 +338,12 @@ public void onDeactivate() { speed=0; resetTimer = true; Modules.get().get(Timer.class).setOverride(Timer.OFF); - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())) return; + if (isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack())) return; if (pause==false){ - BlockPos pos = playerPos.add(new Vec3i(0,-1,0)); - if (mc.world.getBlockState(pos).isReplaceable()) { - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + BlockPos pos = playerPos.add(new Vec3i(0,-1,0)); + if (mc.world.getBlockState(pos).isReplaceable()) { + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} } } @@ -353,119 +353,119 @@ private void onRender(Render3DEvent event) { if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ if ((mouseT.get() && mc.player.getPitch() <= 40) || (!mouseT.get() && prevPitch <= 40)){ //UP if ((mouseT.get() && mc.player.getMovementDirection()==Direction.NORTH) || (!mouseT.get() && wasfacing==Direction.NORTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, +spcoffset.get(), -1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, +spcoffset.get(), -1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.SOUTH) || (!mouseT.get() && wasfacing==Direction.SOUTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, +spcoffset.get(), 1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, +spcoffset.get(), 1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.EAST) || (!mouseT.get() && wasfacing==Direction.EAST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(1, +spcoffset.get(), 0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(1, +spcoffset.get(), 0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.WEST) || (!mouseT.get() && wasfacing==Direction.WEST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, +spcoffset.get(), 0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, +spcoffset.get(), 0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } } else if ((mouseT.get() && mc.player.getPitch() > 40) || (!mouseT.get() && prevPitch > 40)){ //DOWN if ((mouseT.get() && mc.player.getMovementDirection()==Direction.NORTH) || (!mouseT.get() && wasfacing==Direction.NORTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -spcoffset.get()-2, -1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -spcoffset.get()-2, -1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.SOUTH) || (!mouseT.get() && wasfacing==Direction.SOUTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -spcoffset.get()-2, 1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -spcoffset.get()-2, 1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.EAST) || (!mouseT.get() && wasfacing==Direction.EAST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(1, -spcoffset.get()-2, 0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(1, -spcoffset.get()-2, 0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.WEST) || (!mouseT.get() && wasfacing==Direction.WEST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, -spcoffset.get()-2, 0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, -spcoffset.get()-2, 0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } } } else if (!mc.options.jumpKey.isPressed() || autolavamountain.get()) { if (((mouseT.get() && mc.player.getPitch() <= 40) || autolavamountain.get()) || (!mouseT.get() && prevPitch <= 40 && !autolavamountain.get())) { //UP if ((mouseT.get() && mc.player.getMovementDirection()==Direction.NORTH) || (!mouseT.get() && wasfacing==Direction.NORTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, 0, -1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - if (autolavamountain.get() && pause==false){ - BlockPos pos2 = renderplayerPos.add(new Vec3i(0, botlimit.get()-1, -botlimit.get())); - BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, -2)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } else if (autolavamountain.get() && pause==true){ - BlockPos pos2 = lowestblock.add(new Vec3i(0, botlimit.get(), -botlimit.get())); - BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, -2)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, 0, -1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + if (autolavamountain.get() && pause==false){ + BlockPos pos2 = renderplayerPos.add(new Vec3i(0, botlimit.get()-1, -botlimit.get())); + BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, -2)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } else if (autolavamountain.get() && pause==true){ + BlockPos pos2 = lowestblock.add(new Vec3i(0, botlimit.get(), -botlimit.get())); + BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, -2)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.SOUTH) || (!mouseT.get() && wasfacing==Direction.SOUTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, 0, 1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - if (autolavamountain.get() && pause==false){ - BlockPos pos2 = renderplayerPos.add(new Vec3i(0, botlimit.get()-1, botlimit.get())); - BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, 2)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } else if (autolavamountain.get() && pause==true){ - BlockPos pos2 = lowestblock.add(new Vec3i(0, botlimit.get(), botlimit.get())); - BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, 2)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, 0, 1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + if (autolavamountain.get() && pause==false){ + BlockPos pos2 = renderplayerPos.add(new Vec3i(0, botlimit.get()-1, botlimit.get())); + BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, 2)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } else if (autolavamountain.get() && pause==true){ + BlockPos pos2 = lowestblock.add(new Vec3i(0, botlimit.get(), botlimit.get())); + BlockPos pos3 = renderplayerPos.add(new Vec3i(0, 1, 2)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.EAST) || (!mouseT.get() && wasfacing==Direction.EAST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(1, 0, 0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - if (autolavamountain.get() && pause==false){ - BlockPos pos3 = renderplayerPos.add(new Vec3i(2, 1, 0)); - BlockPos pos2 = renderplayerPos.add(new Vec3i(botlimit.get(), botlimit.get()-1, 0)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } else if (autolavamountain.get() && pause==true){ - BlockPos pos3 = renderplayerPos.add(new Vec3i(2, 1, 0)); - BlockPos pos2 = lowestblock.add(new Vec3i(botlimit.get(), botlimit.get(), 0)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } + BlockPos pos1 = renderplayerPos.add(new Vec3i(1, 0, 0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + if (autolavamountain.get() && pause==false){ + BlockPos pos3 = renderplayerPos.add(new Vec3i(2, 1, 0)); + BlockPos pos2 = renderplayerPos.add(new Vec3i(botlimit.get(), botlimit.get()-1, 0)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } else if (autolavamountain.get() && pause==true){ + BlockPos pos3 = renderplayerPos.add(new Vec3i(2, 1, 0)); + BlockPos pos2 = lowestblock.add(new Vec3i(botlimit.get(), botlimit.get(), 0)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.WEST) || (!mouseT.get() && wasfacing==Direction.WEST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, 0, -0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - if (autolavamountain.get() && pause==false){ - BlockPos pos3 = renderplayerPos.add(new Vec3i(-2, 1, 0)); - BlockPos pos2 = renderplayerPos.add(new Vec3i(-botlimit.get(), botlimit.get()-1, 0)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } else if (autolavamountain.get() && pause==true){ - BlockPos pos3 = renderplayerPos.add(new Vec3i(-2, 1, 0)); - BlockPos pos2 = lowestblock.add(new Vec3i(-botlimit.get(), botlimit.get(), 0)); - event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); - } + BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, 0, -0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + if (autolavamountain.get() && pause==false){ + BlockPos pos3 = renderplayerPos.add(new Vec3i(-2, 1, 0)); + BlockPos pos2 = renderplayerPos.add(new Vec3i(-botlimit.get(), botlimit.get()-1, 0)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } else if (autolavamountain.get() && pause==true){ + BlockPos pos3 = renderplayerPos.add(new Vec3i(-2, 1, 0)); + BlockPos pos2 = lowestblock.add(new Vec3i(-botlimit.get(), botlimit.get(), 0)); + event.renderer.box(pos2, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + event.renderer.box(pos3, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + } } } else if ((mouseT.get() && mc.player.getPitch() > 40) || (!mouseT.get() && prevPitch > 40)) { //DOWN if ((mouseT.get() && mc.player.getMovementDirection()==Direction.NORTH) || (!mouseT.get() && wasfacing==Direction.NORTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -2, -1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -2, -1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.SOUTH) || (!mouseT.get() && wasfacing==Direction.SOUTH)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -2, 1)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(0, -2, 1)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.EAST) || (!mouseT.get() && wasfacing==Direction.EAST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(1, -2, 0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(1, -2, 0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.WEST) || (!mouseT.get() && wasfacing==Direction.WEST)) { - BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, -2, 0)); - event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); + BlockPos pos1 = renderplayerPos.add(new Vec3i(-1, -2, 0)); + event.renderer.box(pos1, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } } } @@ -488,7 +488,7 @@ private void onMouseButton(MouseButtonEvent event) { speed=0; resetTimer = true; Modules.get().get(Timer.class).setOverride(Timer.OFF); - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())) return; + if (isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack())) return; if (isthisfirstblock==true){ highestblock=mc.player.getBlockPos().add(new Vec3i(0,-1,0)); lowestblock=mc.player.getBlockPos().add(new Vec3i(0,-1,0)); @@ -508,63 +508,63 @@ private void onMouseButton(MouseButtonEvent event) { private void onKeyEvent(KeyEvent event) { if (pause == false)return; if (!autolavamountain.get()){ - if (mc.options.forwardKey.isPressed()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } - if (mc.options.backKey.isPressed()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } - if ((lagpause.get() && timeSinceLastTick >= lag.get()) || !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock()) || pause == false) return; - if (mc.options.leftKey.isPressed() && !mc.options.sneakKey.isPressed()){ - if (mouseT.get())mc.player.setYaw(mc.player.getYaw()-90); - if (!mouseT.get()){ - if (wasfacing==Direction.NORTH){ - wasfacing=Direction.WEST; - return; - } - if (wasfacing==Direction.SOUTH){ - wasfacing=Direction.EAST; - return; - } - if (wasfacing==Direction.WEST){ - wasfacing=Direction.SOUTH; - return; - } - if (wasfacing==Direction.EAST){ - wasfacing=Direction.NORTH; - return; - } + if (mc.options.forwardKey.isPressed()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; } - } - if (mc.options.rightKey.isPressed() && !mc.options.sneakKey.isPressed()){ - if (mouseT.get())mc.player.setYaw(mc.player.getYaw()+90); - if (!mouseT.get()){ - if (wasfacing==Direction.NORTH){ - wasfacing=Direction.EAST; - return; - } - if (wasfacing==Direction.SOUTH){ - wasfacing=Direction.WEST; - return; - } - if (wasfacing==Direction.WEST){ - wasfacing=Direction.NORTH; - return; + if (mc.options.backKey.isPressed()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; + } + if ((lagpause.get() && timeSinceLastTick >= lag.get()) || isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack()) || pause == false) return; + if (mc.options.leftKey.isPressed() && !mc.options.sneakKey.isPressed()){ + if (mouseT.get())mc.player.setYaw(mc.player.getYaw()-90); + if (!mouseT.get()){ + if (wasfacing==Direction.NORTH){ + wasfacing=Direction.WEST; + return; + } + if (wasfacing==Direction.SOUTH){ + wasfacing=Direction.EAST; + return; + } + if (wasfacing==Direction.WEST){ + wasfacing=Direction.SOUTH; + return; + } + if (wasfacing==Direction.EAST){ + wasfacing=Direction.NORTH; + return; + } } - if (wasfacing==Direction.EAST){ - wasfacing=Direction.SOUTH; - return; + } + if (mc.options.rightKey.isPressed() && !mc.options.sneakKey.isPressed()){ + if (mouseT.get())mc.player.setYaw(mc.player.getYaw()+90); + if (!mouseT.get()){ + if (wasfacing==Direction.NORTH){ + wasfacing=Direction.EAST; + return; + } + if (wasfacing==Direction.SOUTH){ + wasfacing=Direction.WEST; + return; + } + if (wasfacing==Direction.WEST){ + wasfacing=Direction.NORTH; + return; + } + if (wasfacing==Direction.EAST){ + wasfacing=Direction.SOUTH; + return; + } } } } - } } @EventHandler private void onSendPacket(PacketEvent.Send event) { if (event.packet instanceof PlayerMoveC2SPacket) - ((PlayerMoveC2SPacketAccessor) event.packet).setOnGround(true); + ((PlayerMoveC2SPacketAccessor) event.packet).setOnGround(true); } @EventHandler private void onPreTick(TickEvent.Pre event) { @@ -614,23 +614,23 @@ else if (delayakick.get() && offLeft>offTime.get()){ mc.player.setVelocity(0,0,0); PlayerUtils.centerPlayer(); mc.player.setPos(mc.player.getX(),Math.round(mc.player.getY())+0.25,mc.player.getZ()); - if (Modules.get().get(Flight.class).isActive()) { - Modules.get().get(Flight.class).toggle(); - } - if (Modules.get().get(FlightAntikick.class).isActive()) { - Modules.get().get(FlightAntikick.class).toggle(); - } - if (Modules.get().get(TPFly.class).isActive()) { - Modules.get().get(TPFly.class).toggle(); - } - if (mc.world.getBlockState(mc.player.getBlockPos()).getBlock() == Blocks.AIR) { - resetTimer = false; - Modules.get().get(Timer.class).setOverride(StairTimer.get()); - } else if (!resetTimer) { - resetTimer = true; - Modules.get().get(Timer.class).setOverride(Timer.OFF); - } - if ((lagpause.get() && timeSinceLastTick >= lag.get()) || !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock()) || pause == false || go==false) return; + if (Modules.get().get(Flight.class).isActive()) { + Modules.get().get(Flight.class).toggle(); + } + if (Modules.get().get(FlightAntikick.class).isActive()) { + Modules.get().get(FlightAntikick.class).toggle(); + } + if (Modules.get().get(TPFly.class).isActive()) { + Modules.get().get(TPFly.class).toggle(); + } + if (mc.world.getBlockState(mc.player.getBlockPos()).getBlock() == Blocks.AIR) { + resetTimer = false; + Modules.get().get(Timer.class).setOverride(StairTimer.get()); + } else if (!resetTimer) { + resetTimer = true; + Modules.get().get(Timer.class).setOverride(Timer.OFF); + } + if ((lagpause.get() && timeSinceLastTick >= lag.get()) || isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack()) || pause == false || go==false) return; if (mc.options.sneakKey.isPressed() && mc.options.rightKey.isPressed() && delayLeft <= 0 && offLeft > 0 && !autolavamountain.get()){ cookie++; if (cookie==munscher.get()){ @@ -744,163 +744,163 @@ private void onPostTick(TickEvent.Post event) { else if ((!lagpause.get() || timeSinceLastTick < lag.get()) && delayLeft <= 0 && offLeft > 0 && (mc.player.getY() <= limit.get() && mc.player.getY() >= downlimit.get() && !autolavamountain.get() || mc.player.getY() <= limit.get()-4 && mc.player.getY() <= lowestblock.getY()+botlimit.get()+1 && autolavamountain.get())) { offLeft--; if (mc.player == null || mc.world == null) {toggle(); return;} - if ((lagpause.get() && timeSinceLastTick >= lag.get()) || !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock()) || pause == false || go==false) return; - if ((mouseT.get() && mc.player.getMovementDirection()==Direction.NORTH) || (!mouseT.get() && wasfacing==Direction.NORTH)) { //UP - if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ - BlockPos un1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); - BlockPos un2 = playerPos.add(new Vec3i(0,spcoffset.get()+1,-1)); - BlockPos un3 = playerPos.add(new Vec3i(0,spcoffset.get()+2,-1)); - BlockPos un4 = playerPos.add(new Vec3i(0,spcoffset.get()+3,-1)); - BlockPos pos = playerPos.add(new Vec3i(0,spcoffset.get(),-1)); - if (mc.world.getBlockState(un1).isReplaceable() && mc.world.getBlockState(un2).isReplaceable() && mc.world.getBlockState(un3).isReplaceable() && mc.world.getBlockState(un4).isReplaceable() && mc.world.getFluidState(un1).isEmpty() && mc.world.getFluidState(un2).isEmpty() && mc.world.getFluidState(un3).isEmpty() && mc.world.getFluidState(un4).isEmpty() && !mc.world.getBlockState(un1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(un2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()+1+spcoffset.get(),mc.player.getZ()-1); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + if ((lagpause.get() && timeSinceLastTick >= lag.get()) || isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack()) || pause == false || go==false) return; + if ((mouseT.get() && mc.player.getMovementDirection()==Direction.NORTH) || (!mouseT.get() && wasfacing==Direction.NORTH)) { //UP + if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ + BlockPos un1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); + BlockPos un2 = playerPos.add(new Vec3i(0,spcoffset.get()+1,-1)); + BlockPos un3 = playerPos.add(new Vec3i(0,spcoffset.get()+2,-1)); + BlockPos un4 = playerPos.add(new Vec3i(0,spcoffset.get()+3,-1)); + BlockPos pos = playerPos.add(new Vec3i(0,spcoffset.get(),-1)); + if (mc.world.getBlockState(un1).isReplaceable() && mc.world.getBlockState(un2).isReplaceable() && mc.world.getBlockState(un3).isReplaceable() && mc.world.getBlockState(un4).isReplaceable() && mc.world.getFluidState(un1).isEmpty() && mc.world.getFluidState(un2).isEmpty() && mc.world.getFluidState(un3).isEmpty() && mc.world.getFluidState(un4).isEmpty() && !mc.world.getBlockState(un1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(un2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); } + mc.player.setPosition(mc.player.getX(),mc.player.getY()+1+spcoffset.get(),mc.player.getZ()-1); } else { - BlockPos un1 = playerPos.add(new Vec3i(0,2,0)); - BlockPos un2 = playerPos.add(new Vec3i(0,1,-1)); - BlockPos un3 = playerPos.add(new Vec3i(0,2,-1)); - BlockPos un4 = playerPos.add(new Vec3i(0,3,-1)); - BlockPos pos = playerPos.add(new Vec3i(0,0,-1)); - if (mc.world.getBlockState(un1).isReplaceable() && mc.world.getBlockState(un2).isReplaceable() && mc.world.getBlockState(un3).isReplaceable() && mc.world.getBlockState(un4).isReplaceable() && mc.world.getFluidState(un1).isEmpty() && mc.world.getFluidState(un2).isEmpty() && mc.world.getFluidState(un3).isEmpty() && mc.world.getFluidState(un4).isEmpty() && !mc.world.getBlockState(un1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(un2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()+1,mc.player.getZ()-1); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; + } + } + } else { + BlockPos un1 = playerPos.add(new Vec3i(0,2,0)); + BlockPos un2 = playerPos.add(new Vec3i(0,1,-1)); + BlockPos un3 = playerPos.add(new Vec3i(0,2,-1)); + BlockPos un4 = playerPos.add(new Vec3i(0,3,-1)); + BlockPos pos = playerPos.add(new Vec3i(0,0,-1)); + if (mc.world.getBlockState(un1).isReplaceable() && mc.world.getBlockState(un2).isReplaceable() && mc.world.getBlockState(un3).isReplaceable() && mc.world.getBlockState(un4).isReplaceable() && mc.world.getFluidState(un1).isEmpty() && mc.world.getFluidState(un2).isEmpty() && mc.world.getFluidState(un3).isEmpty() && mc.world.getFluidState(un4).isEmpty() && !mc.world.getBlockState(un1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(un4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(un2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX(),mc.player.getY()+1,mc.player.getZ()-1); + } else { + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; } } } + } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.EAST) || (!mouseT.get() && wasfacing==Direction.EAST)) { //UP - if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ - BlockPos ue1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); - BlockPos ue2 = playerPos.add(new Vec3i(+1,spcoffset.get()+1,0)); - BlockPos ue3 = playerPos.add(new Vec3i(+1,spcoffset.get()+2,0)); - BlockPos ue4 = playerPos.add(new Vec3i(+1,spcoffset.get()+3,0)); - BlockPos pos = playerPos.add(new Vec3i(1,spcoffset.get(),0)); - if (mc.world.getBlockState(ue1).isReplaceable() && mc.world.getBlockState(ue2).isReplaceable() && mc.world.getBlockState(ue3).isReplaceable() && mc.world.getBlockState(ue4).isReplaceable() && mc.world.getFluidState(ue1).isEmpty() && mc.world.getFluidState(ue2).isEmpty() && mc.world.getFluidState(ue3).isEmpty() && mc.world.getFluidState(ue4).isEmpty() && !mc.world.getBlockState(ue1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ue2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()+1,mc.player.getY()+1+spcoffset.get(),mc.player.getZ()); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ + BlockPos ue1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); + BlockPos ue2 = playerPos.add(new Vec3i(+1,spcoffset.get()+1,0)); + BlockPos ue3 = playerPos.add(new Vec3i(+1,spcoffset.get()+2,0)); + BlockPos ue4 = playerPos.add(new Vec3i(+1,spcoffset.get()+3,0)); + BlockPos pos = playerPos.add(new Vec3i(1,spcoffset.get(),0)); + if (mc.world.getBlockState(ue1).isReplaceable() && mc.world.getBlockState(ue2).isReplaceable() && mc.world.getBlockState(ue3).isReplaceable() && mc.world.getBlockState(ue4).isReplaceable() && mc.world.getFluidState(ue1).isEmpty() && mc.world.getFluidState(ue2).isEmpty() && mc.world.getFluidState(ue3).isEmpty() && mc.world.getFluidState(ue4).isEmpty() && !mc.world.getBlockState(ue1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ue2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); } + mc.player.setPosition(mc.player.getX()+1,mc.player.getY()+1+spcoffset.get(),mc.player.getZ()); } else { - BlockPos ue1 = playerPos.add(new Vec3i(0,2,0)); - BlockPos ue2 = playerPos.add(new Vec3i(+1,1,0)); - BlockPos ue3 = playerPos.add(new Vec3i(+1,2,0)); - BlockPos ue4 = playerPos.add(new Vec3i(+1,3,0)); - BlockPos pos = playerPos.add(new Vec3i(1,0,0)); - if (mc.world.getBlockState(ue1).isReplaceable() && mc.world.getBlockState(ue2).isReplaceable() && mc.world.getBlockState(ue3).isReplaceable() && mc.world.getBlockState(ue4).isReplaceable() && mc.world.getFluidState(ue1).isEmpty() && mc.world.getFluidState(ue2).isEmpty() && mc.world.getFluidState(ue3).isEmpty() && mc.world.getFluidState(ue4).isEmpty() && !mc.world.getBlockState(ue1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ue2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()+1,mc.player.getY()+1,mc.player.getZ()); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; + } + } + } else { + BlockPos ue1 = playerPos.add(new Vec3i(0,2,0)); + BlockPos ue2 = playerPos.add(new Vec3i(+1,1,0)); + BlockPos ue3 = playerPos.add(new Vec3i(+1,2,0)); + BlockPos ue4 = playerPos.add(new Vec3i(+1,3,0)); + BlockPos pos = playerPos.add(new Vec3i(1,0,0)); + if (mc.world.getBlockState(ue1).isReplaceable() && mc.world.getBlockState(ue2).isReplaceable() && mc.world.getBlockState(ue3).isReplaceable() && mc.world.getBlockState(ue4).isReplaceable() && mc.world.getFluidState(ue1).isEmpty() && mc.world.getFluidState(ue2).isEmpty() && mc.world.getFluidState(ue3).isEmpty() && mc.world.getFluidState(ue4).isEmpty() && !mc.world.getBlockState(ue1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ue4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ue2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX()+1,mc.player.getY()+1,mc.player.getZ()); + } else { + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; } } } + } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.SOUTH) || (!mouseT.get() && wasfacing==Direction.SOUTH)) { //UP - if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ - BlockPos us1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); - BlockPos us2 = playerPos.add(new Vec3i(0,spcoffset.get()+1,+1)); - BlockPos us3 = playerPos.add(new Vec3i(0,spcoffset.get()+2,+1)); - BlockPos us4 = playerPos.add(new Vec3i(0,spcoffset.get()+3,+1)); - BlockPos pos = playerPos.add(new Vec3i(0,spcoffset.get(),1)); - if (mc.world.getBlockState(us1).isReplaceable() && mc.world.getBlockState(us2).isReplaceable() && mc.world.getBlockState(us3).isReplaceable() && mc.world.getBlockState(us4).isReplaceable() && mc.world.getFluidState(us1).isEmpty() && mc.world.getFluidState(us2).isEmpty() && mc.world.getFluidState(us3).isEmpty() && mc.world.getFluidState(us4).isEmpty() && !mc.world.getBlockState(us1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(us2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()+1+spcoffset.get(),mc.player.getZ()+1); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ + BlockPos us1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); + BlockPos us2 = playerPos.add(new Vec3i(0,spcoffset.get()+1,+1)); + BlockPos us3 = playerPos.add(new Vec3i(0,spcoffset.get()+2,+1)); + BlockPos us4 = playerPos.add(new Vec3i(0,spcoffset.get()+3,+1)); + BlockPos pos = playerPos.add(new Vec3i(0,spcoffset.get(),1)); + if (mc.world.getBlockState(us1).isReplaceable() && mc.world.getBlockState(us2).isReplaceable() && mc.world.getBlockState(us3).isReplaceable() && mc.world.getBlockState(us4).isReplaceable() && mc.world.getFluidState(us1).isEmpty() && mc.world.getFluidState(us2).isEmpty() && mc.world.getFluidState(us3).isEmpty() && mc.world.getFluidState(us4).isEmpty() && !mc.world.getBlockState(us1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(us2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX(),mc.player.getY()+1+spcoffset.get(),mc.player.getZ()+1); + } else { + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; + } + } + } else { + BlockPos us1 = playerPos.add(new Vec3i(0,2,0)); + BlockPos us2 = playerPos.add(new Vec3i(0,1,+1)); + BlockPos us3 = playerPos.add(new Vec3i(0,2,+1)); + BlockPos us4 = playerPos.add(new Vec3i(0,3,+1)); + BlockPos pos = playerPos.add(new Vec3i(0,0,1)); + if (mc.world.getBlockState(us1).isReplaceable() && mc.world.getBlockState(us2).isReplaceable() && mc.world.getBlockState(us3).isReplaceable() && mc.world.getBlockState(us4).isReplaceable() && mc.world.getFluidState(us1).isEmpty() && mc.world.getFluidState(us2).isEmpty() && mc.world.getFluidState(us3).isEmpty() && mc.world.getFluidState(us4).isEmpty() && !mc.world.getBlockState(us1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(us2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); } + mc.player.setPosition(mc.player.getX(),mc.player.getY()+1,mc.player.getZ()+1); } else { - BlockPos us1 = playerPos.add(new Vec3i(0,2,0)); - BlockPos us2 = playerPos.add(new Vec3i(0,1,+1)); - BlockPos us3 = playerPos.add(new Vec3i(0,2,+1)); - BlockPos us4 = playerPos.add(new Vec3i(0,3,+1)); - BlockPos pos = playerPos.add(new Vec3i(0,0,1)); - if (mc.world.getBlockState(us1).isReplaceable() && mc.world.getBlockState(us2).isReplaceable() && mc.world.getBlockState(us3).isReplaceable() && mc.world.getBlockState(us4).isReplaceable() && mc.world.getFluidState(us1).isEmpty() && mc.world.getFluidState(us2).isEmpty() && mc.world.getFluidState(us3).isEmpty() && mc.world.getFluidState(us4).isEmpty() && !mc.world.getBlockState(us1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(us4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(us2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()+1,mc.player.getZ()+1); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; } } } + } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.WEST) || (!mouseT.get() && wasfacing==Direction.WEST)) { //UP - if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ - BlockPos uw1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); - BlockPos uw2 = playerPos.add(new Vec3i(-1,spcoffset.get()+1,0)); - BlockPos uw3 = playerPos.add(new Vec3i(-1,spcoffset.get()+2,0)); - BlockPos uw4 = playerPos.add(new Vec3i(-1,spcoffset.get()+3,0)); - BlockPos pos = playerPos.add(new Vec3i(-1,spcoffset.get(),0)); - if (mc.world.getBlockState(uw1).isReplaceable() && mc.world.getBlockState(uw2).isReplaceable() && mc.world.getBlockState(uw3).isReplaceable() && mc.world.getBlockState(uw4).isReplaceable() && mc.world.getFluidState(uw1).isEmpty() && mc.world.getFluidState(uw2).isEmpty() && mc.world.getFluidState(uw3).isEmpty() && mc.world.getFluidState(uw4).isEmpty() && !mc.world.getBlockState(uw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(uw2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()-1,mc.player.getY()+1+spcoffset.get(),mc.player.getZ()); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + if (mc.options.jumpKey.isPressed() && !autolavamountain.get()){ + BlockPos uw1 = playerPos.add(new Vec3i(0,spcoffset.get()+2,0)); + BlockPos uw2 = playerPos.add(new Vec3i(-1,spcoffset.get()+1,0)); + BlockPos uw3 = playerPos.add(new Vec3i(-1,spcoffset.get()+2,0)); + BlockPos uw4 = playerPos.add(new Vec3i(-1,spcoffset.get()+3,0)); + BlockPos pos = playerPos.add(new Vec3i(-1,spcoffset.get(),0)); + if (mc.world.getBlockState(uw1).isReplaceable() && mc.world.getBlockState(uw2).isReplaceable() && mc.world.getBlockState(uw3).isReplaceable() && mc.world.getBlockState(uw4).isReplaceable() && mc.world.getFluidState(uw1).isEmpty() && mc.world.getFluidState(uw2).isEmpty() && mc.world.getFluidState(uw3).isEmpty() && mc.world.getFluidState(uw4).isEmpty() && !mc.world.getBlockState(uw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(uw2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); } - }else { - BlockPos uw1 = playerPos.add(new Vec3i(0,2,0)); - BlockPos uw2 = playerPos.add(new Vec3i(-1,1,0)); - BlockPos uw3 = playerPos.add(new Vec3i(-1,2,0)); - BlockPos uw4 = playerPos.add(new Vec3i(-1,3,0)); - BlockPos pos = playerPos.add(new Vec3i(-1,0,0)); - if (mc.world.getBlockState(uw1).isReplaceable() && mc.world.getBlockState(uw2).isReplaceable() && mc.world.getBlockState(uw3).isReplaceable() && mc.world.getBlockState(uw4).isReplaceable() && mc.world.getFluidState(uw1).isEmpty() && mc.world.getFluidState(uw2).isEmpty() && mc.world.getFluidState(uw3).isEmpty() && mc.world.getFluidState(uw4).isEmpty() && !mc.world.getBlockState(uw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(uw2)){ - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()-1,mc.player.getY()+1,mc.player.getZ()); - } else { - if (InvertUpDir.get() && !autolavamountain.get()){ - if (mouseT.get())mc.player.setPitch(75); - if (!mouseT.get())prevPitch=75; - } + mc.player.setPosition(mc.player.getX()-1,mc.player.getY()+1+spcoffset.get(),mc.player.getZ()); + } else { + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; + } + } + }else { + BlockPos uw1 = playerPos.add(new Vec3i(0,2,0)); + BlockPos uw2 = playerPos.add(new Vec3i(-1,1,0)); + BlockPos uw3 = playerPos.add(new Vec3i(-1,2,0)); + BlockPos uw4 = playerPos.add(new Vec3i(-1,3,0)); + BlockPos pos = playerPos.add(new Vec3i(-1,0,0)); + if (mc.world.getBlockState(uw1).isReplaceable() && mc.world.getBlockState(uw2).isReplaceable() && mc.world.getBlockState(uw3).isReplaceable() && mc.world.getBlockState(uw4).isReplaceable() && mc.world.getFluidState(uw1).isEmpty() && mc.world.getFluidState(uw2).isEmpty() && mc.world.getFluidState(uw3).isEmpty() && mc.world.getFluidState(uw4).isEmpty() && !mc.world.getBlockState(uw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw3).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(uw4).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(uw2)){ + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX()-1,mc.player.getY()+1,mc.player.getZ()); + } else { + if (InvertUpDir.get() && !autolavamountain.get()){ + if (mouseT.get())mc.player.setPitch(75); + if (!mouseT.get())prevPitch=75; } } } + } if (mc.player.getY() >= limit.get()-1 && InvertUpDir.get() && !autolavamountain.get()){ if (mouseT.get())mc.player.setPitch(75); if (!mouseT.get())prevPitch=75; @@ -914,150 +914,150 @@ else if ((!lagpause.get() || timeSinceLastTick < lag.get()) && delayLeft <= 0 && else if ((!lagpause.get() || timeSinceLastTick < lag.get()) && delayLeft <= 0 && offLeft > 0 && mc.player.getY() <= limit.get() && mc.player.getY() >= downlimit.get()) { offLeft--; if (mc.player == null || mc.world == null) {toggle(); return;} - if ((lagpause.get() && timeSinceLastTick >= lag.get()) || !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock()) || pause == false || go==false) return; + if ((lagpause.get() && timeSinceLastTick >= lag.get()) || isInvalidBlock(mc.player.getInventory().getMainHandStack().getItem().getDefaultStack()) || pause == false || go==false) return; if ((mouseT.get() && mc.player.getMovementDirection()==Direction.NORTH) || (!mouseT.get() && wasfacing==Direction.NORTH)) { //DOWN - if (mc.options.jumpKey.isPressed()){ - BlockPos dn1 = playerPos.add(new Vec3i(0,-spcoffset.get()-1,-1)); - BlockPos dn2 = playerPos.add(new Vec3i(0,-spcoffset.get(),-1)); - BlockPos dn3 = playerPos.add(new Vec3i(0,-spcoffset.get()+1,-1)); - BlockPos pos = playerPos.add(new Vec3i(0,-spcoffset.get()-2,-1)); - if (mc.world.getBlockState(dn1).isReplaceable() && mc.world.getBlockState(dn2).isReplaceable() && mc.world.getBlockState(dn3).isReplaceable() && mc.world.getFluidState(dn1).isEmpty() && mc.world.getFluidState(dn2).isEmpty() && mc.world.getFluidState(dn3).isEmpty() && !mc.world.getBlockState(dn1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dn2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()-1-spcoffset.get(),mc.player.getZ()-1); - } else {if (InvertDownDir.get()) mc.player.setPitch(35);} - } else { - BlockPos dn1 = playerPos.add(new Vec3i(0,-1,-1)); - BlockPos dn2 = playerPos.add(new Vec3i(0,0,-1)); - BlockPos dn3 = playerPos.add(new Vec3i(0,1,-1)); - BlockPos pos = playerPos.add(new Vec3i(0,-2,-1)); - if (mc.world.getBlockState(dn1).isReplaceable() && mc.world.getBlockState(dn2).isReplaceable() && mc.world.getBlockState(dn3).isReplaceable() && mc.world.getFluidState(dn1).isEmpty() && mc.world.getFluidState(dn2).isEmpty() && mc.world.getFluidState(dn3).isEmpty() && !mc.world.getBlockState(dn1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dn2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()-1,mc.player.getZ()-1); - } else { - if (InvertDownDir.get()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } + if (mc.options.jumpKey.isPressed()){ + BlockPos dn1 = playerPos.add(new Vec3i(0,-spcoffset.get()-1,-1)); + BlockPos dn2 = playerPos.add(new Vec3i(0,-spcoffset.get(),-1)); + BlockPos dn3 = playerPos.add(new Vec3i(0,-spcoffset.get()+1,-1)); + BlockPos pos = playerPos.add(new Vec3i(0,-spcoffset.get()-2,-1)); + if (mc.world.getBlockState(dn1).isReplaceable() && mc.world.getBlockState(dn2).isReplaceable() && mc.world.getBlockState(dn3).isReplaceable() && mc.world.getFluidState(dn1).isEmpty() && mc.world.getFluidState(dn2).isEmpty() && mc.world.getFluidState(dn3).isEmpty() && !mc.world.getBlockState(dn1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dn2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX(),mc.player.getY()-1-spcoffset.get(),mc.player.getZ()-1); + } else {if (InvertDownDir.get()) mc.player.setPitch(35);} + } else { + BlockPos dn1 = playerPos.add(new Vec3i(0,-1,-1)); + BlockPos dn2 = playerPos.add(new Vec3i(0,0,-1)); + BlockPos dn3 = playerPos.add(new Vec3i(0,1,-1)); + BlockPos pos = playerPos.add(new Vec3i(0,-2,-1)); + if (mc.world.getBlockState(dn1).isReplaceable() && mc.world.getBlockState(dn2).isReplaceable() && mc.world.getBlockState(dn3).isReplaceable() && mc.world.getFluidState(dn1).isEmpty() && mc.world.getFluidState(dn2).isEmpty() && mc.world.getFluidState(dn3).isEmpty() && !mc.world.getBlockState(dn1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dn3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dn2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX(),mc.player.getY()-1,mc.player.getZ()-1); + } else { + if (InvertDownDir.get()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; } } } + } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.EAST) || (!mouseT.get() && wasfacing==Direction.EAST)) { //DOWN - if (mc.options.jumpKey.isPressed()){ - BlockPos de1 = playerPos.add(new Vec3i(1,-spcoffset.get()-1,0)); - BlockPos de2 = playerPos.add(new Vec3i(1,-spcoffset.get(),0)); - BlockPos de3 = playerPos.add(new Vec3i(1,-spcoffset.get()+1,0)); - BlockPos pos = playerPos.add(new Vec3i(1,-spcoffset.get()-2,0)); - if (mc.world.getBlockState(de1).isReplaceable() && mc.world.getBlockState(de2).isReplaceable() && mc.world.getBlockState(de3).isReplaceable() && mc.world.getFluidState(de1).isEmpty() && mc.world.getFluidState(de2).isEmpty() && mc.world.getFluidState(de3).isEmpty() && !mc.world.getBlockState(de1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(de2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()+1,mc.player.getY()-1-spcoffset.get(),mc.player.getZ()); - } else { - if (InvertDownDir.get()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } + if (mc.options.jumpKey.isPressed()){ + BlockPos de1 = playerPos.add(new Vec3i(1,-spcoffset.get()-1,0)); + BlockPos de2 = playerPos.add(new Vec3i(1,-spcoffset.get(),0)); + BlockPos de3 = playerPos.add(new Vec3i(1,-spcoffset.get()+1,0)); + BlockPos pos = playerPos.add(new Vec3i(1,-spcoffset.get()-2,0)); + if (mc.world.getBlockState(de1).isReplaceable() && mc.world.getBlockState(de2).isReplaceable() && mc.world.getBlockState(de3).isReplaceable() && mc.world.getFluidState(de1).isEmpty() && mc.world.getFluidState(de2).isEmpty() && mc.world.getFluidState(de3).isEmpty() && !mc.world.getBlockState(de1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(de2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); } - } else { - BlockPos de1 = playerPos.add(new Vec3i(1,-1,0)); - BlockPos de2 = playerPos.add(new Vec3i(1,0,0)); - BlockPos de3 = playerPos.add(new Vec3i(1,1,0)); - BlockPos pos = playerPos.add(new Vec3i(1,-2,0)); - if (mc.world.getBlockState(de1).isReplaceable() && mc.world.getBlockState(de2).isReplaceable() && mc.world.getBlockState(de3).isReplaceable() && mc.world.getFluidState(de1).isEmpty() && mc.world.getFluidState(de2).isEmpty() && mc.world.getFluidState(de3).isEmpty() && !mc.world.getBlockState(de1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(de2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()+1,mc.player.getY()-1,mc.player.getZ()); - } else { - if (InvertDownDir.get()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } + mc.player.setPosition(mc.player.getX()+1,mc.player.getY()-1-spcoffset.get(),mc.player.getZ()); + } else { + if (InvertDownDir.get()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; + } + } + } else { + BlockPos de1 = playerPos.add(new Vec3i(1,-1,0)); + BlockPos de2 = playerPos.add(new Vec3i(1,0,0)); + BlockPos de3 = playerPos.add(new Vec3i(1,1,0)); + BlockPos pos = playerPos.add(new Vec3i(1,-2,0)); + if (mc.world.getBlockState(de1).isReplaceable() && mc.world.getBlockState(de2).isReplaceable() && mc.world.getBlockState(de3).isReplaceable() && mc.world.getFluidState(de1).isEmpty() && mc.world.getFluidState(de2).isEmpty() && mc.world.getFluidState(de3).isEmpty() && !mc.world.getBlockState(de1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(de3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(de2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX()+1,mc.player.getY()-1,mc.player.getZ()); + } else { + if (InvertDownDir.get()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; } } } + } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.SOUTH) || (!mouseT.get() && wasfacing==Direction.SOUTH)) { //DOWN - if (mc.options.jumpKey.isPressed()){ - BlockPos ds1 = playerPos.add(new Vec3i(0,-spcoffset.get()-1,1)); - BlockPos ds2 = playerPos.add(new Vec3i(0,-spcoffset.get(),1)); - BlockPos ds3 = playerPos.add(new Vec3i(0,-spcoffset.get()+1,1)); - BlockPos pos = playerPos.add(new Vec3i(0,-spcoffset.get()-2,1)); - if (mc.world.getBlockState(ds1).isReplaceable() && mc.world.getBlockState(ds2).isReplaceable() && mc.world.getBlockState(ds3).isReplaceable() && mc.world.getFluidState(ds1).isEmpty() && mc.world.getFluidState(ds2).isEmpty() && mc.world.getFluidState(ds3).isEmpty() && !mc.world.getBlockState(ds1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ds2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()-1- spcoffset.get(),mc.player.getZ()+1); - } else { - if (InvertDownDir.get()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } + if (mc.options.jumpKey.isPressed()){ + BlockPos ds1 = playerPos.add(new Vec3i(0,-spcoffset.get()-1,1)); + BlockPos ds2 = playerPos.add(new Vec3i(0,-spcoffset.get(),1)); + BlockPos ds3 = playerPos.add(new Vec3i(0,-spcoffset.get()+1,1)); + BlockPos pos = playerPos.add(new Vec3i(0,-spcoffset.get()-2,1)); + if (mc.world.getBlockState(ds1).isReplaceable() && mc.world.getBlockState(ds2).isReplaceable() && mc.world.getBlockState(ds3).isReplaceable() && mc.world.getFluidState(ds1).isEmpty() && mc.world.getFluidState(ds2).isEmpty() && mc.world.getFluidState(ds3).isEmpty() && !mc.world.getBlockState(ds1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ds2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); } - } else { - BlockPos ds1 = playerPos.add(new Vec3i(0,-1,1)); - BlockPos ds2 = playerPos.add(new Vec3i(0,0,1)); - BlockPos ds3 = playerPos.add(new Vec3i(0,1,1)); - BlockPos pos = playerPos.add(new Vec3i(0,-2,1)); - if (mc.world.getBlockState(ds1).isReplaceable() && mc.world.getBlockState(ds2).isReplaceable() && mc.world.getBlockState(ds3).isReplaceable() && mc.world.getFluidState(ds1).isEmpty() && mc.world.getFluidState(ds2).isEmpty() && mc.world.getFluidState(ds3).isEmpty() && !mc.world.getBlockState(ds1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ds2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX(),mc.player.getY()-1,mc.player.getZ()+1); - } else { - if (InvertDownDir.get()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } + mc.player.setPosition(mc.player.getX(),mc.player.getY()-1- spcoffset.get(),mc.player.getZ()+1); + } else { + if (InvertDownDir.get()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; + } + } + } else { + BlockPos ds1 = playerPos.add(new Vec3i(0,-1,1)); + BlockPos ds2 = playerPos.add(new Vec3i(0,0,1)); + BlockPos ds3 = playerPos.add(new Vec3i(0,1,1)); + BlockPos pos = playerPos.add(new Vec3i(0,-2,1)); + if (mc.world.getBlockState(ds1).isReplaceable() && mc.world.getBlockState(ds2).isReplaceable() && mc.world.getBlockState(ds3).isReplaceable() && mc.world.getFluidState(ds1).isEmpty() && mc.world.getFluidState(ds2).isEmpty() && mc.world.getFluidState(ds3).isEmpty() && !mc.world.getBlockState(ds1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(ds3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(ds2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX(),mc.player.getY()-1,mc.player.getZ()+1); + } else { + if (InvertDownDir.get()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; } } } + } if ((mouseT.get() && mc.player.getMovementDirection()==Direction.WEST) || (!mouseT.get() && wasfacing==Direction.WEST)) { //DOWN - if (mc.options.jumpKey.isPressed()){ - BlockPos dw1 = playerPos.add(new Vec3i(-1,-spcoffset.get()-1,0)); - BlockPos dw2 = playerPos.add(new Vec3i(-1,-spcoffset.get(),0)); - BlockPos dw3 = playerPos.add(new Vec3i(-1,-spcoffset.get()+1,0)); - BlockPos pos = playerPos.add(new Vec3i(-1,-spcoffset.get()-2,0)); - if (mc.world.getBlockState(dw1).isReplaceable() && mc.world.getBlockState(dw2).isReplaceable() && mc.world.getBlockState(dw3).isReplaceable() && mc.world.getFluidState(dw1).isEmpty() && mc.world.getFluidState(dw2).isEmpty() && mc.world.getFluidState(dw3).isEmpty() && !mc.world.getBlockState(dw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dw2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()-1,mc.player.getY()-1-spcoffset.get(),mc.player.getZ()); - } else { - if (InvertDownDir.get()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } + if (mc.options.jumpKey.isPressed()){ + BlockPos dw1 = playerPos.add(new Vec3i(-1,-spcoffset.get()-1,0)); + BlockPos dw2 = playerPos.add(new Vec3i(-1,-spcoffset.get(),0)); + BlockPos dw3 = playerPos.add(new Vec3i(-1,-spcoffset.get()+1,0)); + BlockPos pos = playerPos.add(new Vec3i(-1,-spcoffset.get()-2,0)); + if (mc.world.getBlockState(dw1).isReplaceable() && mc.world.getBlockState(dw2).isReplaceable() && mc.world.getBlockState(dw3).isReplaceable() && mc.world.getFluidState(dw1).isEmpty() && mc.world.getFluidState(dw2).isEmpty() && mc.world.getFluidState(dw3).isEmpty() && !mc.world.getBlockState(dw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dw2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); } - }else { - BlockPos dw1 = playerPos.add(new Vec3i(-1,-1,0)); - BlockPos dw2 = playerPos.add(new Vec3i(-1,0,0)); - BlockPos dw3 = playerPos.add(new Vec3i(-1,1,0)); - BlockPos pos = playerPos.add(new Vec3i(-1,-2,0)); - if (mc.world.getBlockState(dw1).isReplaceable() && mc.world.getBlockState(dw2).isReplaceable() && mc.world.getBlockState(dw3).isReplaceable() && mc.world.getFluidState(dw1).isEmpty() && mc.world.getFluidState(dw2).isEmpty() && mc.world.getFluidState(dw3).isEmpty() && !mc.world.getBlockState(dw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dw2)) { - if (mc.world.getBlockState(pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); - mc.player.swingHand(Hand.MAIN_HAND); - } - mc.player.setPosition(mc.player.getX()-1,mc.player.getY()-1,mc.player.getZ()); - } else { - if (InvertDownDir.get()){ - if (mouseT.get())mc.player.setPitch(35); - if (!mouseT.get())prevPitch=35; - } + mc.player.setPosition(mc.player.getX()-1,mc.player.getY()-1-spcoffset.get(),mc.player.getZ()); + } else { + if (InvertDownDir.get()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; + } + } + }else { + BlockPos dw1 = playerPos.add(new Vec3i(-1,-1,0)); + BlockPos dw2 = playerPos.add(new Vec3i(-1,0,0)); + BlockPos dw3 = playerPos.add(new Vec3i(-1,1,0)); + BlockPos pos = playerPos.add(new Vec3i(-1,-2,0)); + if (mc.world.getBlockState(dw1).isReplaceable() && mc.world.getBlockState(dw2).isReplaceable() && mc.world.getBlockState(dw3).isReplaceable() && mc.world.getFluidState(dw1).isEmpty() && mc.world.getFluidState(dw2).isEmpty() && mc.world.getFluidState(dw3).isEmpty() && !mc.world.getBlockState(dw1).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw2).isOf(Blocks.POWDER_SNOW) && !mc.world.getBlockState(dw3).isOf(Blocks.POWDER_SNOW) && mc.world.getWorldBorder().contains(dw2)) { + if (mc.world.getBlockState(pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false)); + mc.player.swingHand(Hand.MAIN_HAND); + } + mc.player.setPosition(mc.player.getX()-1,mc.player.getY()-1,mc.player.getZ()); + } else { + if (InvertDownDir.get()){ + if (mouseT.get())mc.player.setPitch(35); + if (!mouseT.get())prevPitch=35; } } } + } if (mc.player.getY() <= downlimit.get()+1 && InvertDownDir.get()){ if (mouseT.get())mc.player.setPitch(35); if (!mouseT.get())prevPitch=35; @@ -1104,32 +1104,59 @@ private void lavamountainingredients() { } } private void cascadingpileof() { - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 0; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 1; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 2; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 3; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 4; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 5; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 6; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 7; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SnowBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TntBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CobwebBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock || skippableBlox.get().contains(((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock())){ - mc.player.getInventory().selectedSlot = 8; - } - } - } - } - } - } - } - } + FindItemResult findResult = InvUtils.findInHotbar(block -> !isInvalidBlock(block)); + if (!findResult.found()) { + return; } + mc.player.getInventory().selectedSlot = findResult.slot(); + } + + private boolean isInvalidBlock(ItemStack stack) { + return !(stack.getItem() instanceof BlockItem) + || stack.getItem() instanceof BedItem + || stack.getItem() instanceof PowderSnowBucketItem + || stack.getItem() instanceof ScaffoldingItem + || stack.getItem() instanceof TallBlockItem + || stack.getItem() instanceof VerticallyAttachableBlockItem + || stack.getItem() instanceof PlaceableOnWaterItem + || ((BlockItem) stack.getItem()).getBlock() instanceof PlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TorchBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRedstoneGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof RedstoneWireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FallingBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRailBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractSignBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BellBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CarpetBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ConduitBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CoralParentBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireHookBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PointedDripstoneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SnowBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PressurePlateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallMountedBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ShulkerBoxBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AmethystClusterBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BuddingAmethystBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusFlowerBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusPlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LanternBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CandleBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TntBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CakeBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CobwebBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SugarCaneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SporeBlossomBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof KelpBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof GlowLichenBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CactusBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BambooBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FlowerPotBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LadderBlock + || skippableBlox.get().contains(((BlockItem) stack.getItem()).getBlock()); } } \ No newline at end of file diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/InstaSafetyBox.java b/src/main/java/pwn/noobs/trouserstreak/modules/InstaSafetyBox.java new file mode 100644 index 000000000..e6c327708 --- /dev/null +++ b/src/main/java/pwn/noobs/trouserstreak/modules/InstaSafetyBox.java @@ -0,0 +1,233 @@ +//Written By etianll +package pwn.noobs.trouserstreak.modules; + +import meteordevelopment.meteorclient.events.game.GameLeftEvent; +import meteordevelopment.meteorclient.events.game.OpenScreenEvent; +import meteordevelopment.meteorclient.events.world.TickEvent; +import meteordevelopment.meteorclient.settings.*; +import meteordevelopment.meteorclient.systems.modules.Module; +import meteordevelopment.meteorclient.utils.player.PlayerUtils; +import meteordevelopment.meteorclient.utils.player.Rotations; +import meteordevelopment.orbit.EventHandler; +import net.minecraft.block.*; +import net.minecraft.client.gui.screen.DeathScreen; +import net.minecraft.client.gui.screen.DisconnectedScreen; +import net.minecraft.item.*; +import net.minecraft.util.Hand; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; +import pwn.noobs.trouserstreak.Trouser; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + +public class InstaSafetyBox extends Module { + private final SettingGroup sgGeneral = settings.getDefaultGroup(); + private final Setting> skippableBlox = sgGeneral.add(new BlockListSetting.Builder() + .name("Blocks to not use") + .description("Do not use these blocks for building.") + .build() + ); + private final Setting reach = sgGeneral.add(new DoubleSetting.Builder() + .name("Range") + .description("Your Range, in blocks.") + .defaultValue(1) + .sliderRange(1,6) + .min (1) + .max (6) + .build() + ); + private final Setting blockpertick = sgGeneral.add(new IntSetting.Builder() + .name("Blocks per Tick") + .description("How many blocks to place per tick.") + .defaultValue(4) + .sliderRange(1,10) + .min (1) + .max (5) + .build() + ); + private final Setting tickdelay = sgGeneral.add(new IntSetting.Builder() + .name("TickDelay") + .description("Delays placement by this many ticks.") + .defaultValue(1) + .sliderRange(0, 10) + .build() + ); + public final Setting rotate = sgGeneral.add(new BoolSetting.Builder() + .name("Rotate Player") + .description("Rotates the player to the direction of the blocks being placed.") + .defaultValue(true) + .build() + ); + public final Setting swing = sgGeneral.add(new BoolSetting.Builder() + .name("Swing Arm") + .description("Swings arm or not.") + .defaultValue(true) + .build() + ); + public final Setting hard = sgGeneral.add(new BoolSetting.Builder() + .name("Always choose hardest block") + .description("Always chooses the hardest block even if you are already holding a valid block.") + .defaultValue(true) + .build() + ); + public final Setting toggle = sgGeneral.add(new BoolSetting.Builder() + .name("Toggle on blocks placed") + .description("Toggles module when all blocks have been attempted to be placed once.") + .defaultValue(true) + .build() + ); + private int ticks; + private boolean playerneedstosneak = false; + public InstaSafetyBox() { + super(Trouser.Main, "InstaSafetyBox", "Makes you safe by building box."); + } + @Override + public void onDeactivate() { + if (playerneedstosneak)mc.options.sneakKey.setPressed(false); + } + @EventHandler + private void onPreTick(TickEvent.Pre event) { + PlayerUtils.centerPlayer(); + if (mc.player.isOnGround() && mc.player.getY() >= Math.floor(mc.player.getY()) + 0.2) { + mc.options.sneakKey.setPressed(true); + playerneedstosneak = true; + } + if (ticks >= tickdelay.get()) { + // Create a list of all the blocks within the specified range + List blocks = new ArrayList<>(); + int bottomlimit = (int) (mc.player.getBlockY() - Math.round(Math.ceil(reach.get()))); + + for (int x = (int) (mc.player.getBlockX() - Math.round(Math.ceil(reach.get()))); x <= mc.player.getBlockX() + reach.get(); x++) { + for (int y = bottomlimit; y <= (mc.player.getBlockY()+1) + reach.get(); y++) { + for (int z = (int) (mc.player.getBlockZ() - Math.round(Math.ceil(reach.get()))); z <= mc.player.getBlockZ() + reach.get(); z++) { + BlockPos blockPos = new BlockPos(x, y, z); + Vec3d playerPos1 = new BlockPos(mc.player.getBlockX(), mc.player.getBlockY(), mc.player.getBlockZ()).toCenterPos(); + Vec3d playerPos2 = new BlockPos(mc.player.getBlockX(), mc.player.getBlockY()+1, mc.player.getBlockZ()).toCenterPos(); + double distance1 = playerPos1.distanceTo(blockPos.toCenterPos()); + double distance2 = playerPos2.distanceTo(blockPos.toCenterPos()); + if (distance1 <= reach.get() || distance2 <= reach.get() ) { + if (blockPos != new BlockPos(mc.player.getBlockX(), mc.player.getBlockY(), mc.player.getBlockZ()) && blockPos != new BlockPos(mc.player.getBlockX(), mc.player.getBlockY()+1, mc.player.getBlockZ()) && mc.world.getBlockState(blockPos).getBlock().getDefaultState().isReplaceable()) { + blocks.add(blockPos); + } + } + } + } + } + + // Sort the blocks by distance from the player + blocks.sort(Comparator.comparingDouble(pos -> pos.getSquaredDistance(mc.player.getPos()))); + + int count = 0; + for (BlockPos blockPos : blocks) { + if (count >= blockpertick.get()) { + break; + } + if (hard.get() || isInvalidBlock(mc.player.getMainHandStack().getItem().getDefaultStack())) cascadingpileof(); + + if (blockPos != new BlockPos(mc.player.getBlockX(), mc.player.getBlockY(), mc.player.getBlockZ()) && blockPos != new BlockPos(mc.player.getBlockX(), mc.player.getBlockY()+1, mc.player.getBlockZ()) && mc.world.getBlockState(blockPos).getBlock().getDefaultState().isReplaceable() && !isInvalidBlock(mc.player.getMainHandStack().getItem().getDefaultStack())) { + if (rotate.get())Rotations.rotate(Rotations.getYaw(blockPos), Rotations.getPitch(blockPos)); + if (swing.get())mc.player.swingHand(Hand.MAIN_HAND); + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(blockPos), Direction.DOWN, blockPos, false)); + count++; + } + if (count >= blocks.size() && toggle.get()) { + toggle(); + } + } + + ticks = 0; + } + ticks++; + } + @EventHandler + private void onScreenOpen(OpenScreenEvent event) { + if (event.screen instanceof DisconnectedScreen) { + toggle(); + } + if (event.screen instanceof DeathScreen) { + toggle(); + } + } + @EventHandler + private void onGameLeft(GameLeftEvent event) { + toggle(); + } + private void cascadingpileof() { + List validBlocks = new ArrayList<>(); + for (int i = 0; i < 9; i++) { + ItemStack stack = mc.player.getInventory().getStack(i); + if (stack.getItem() instanceof BlockItem && !isInvalidBlock(stack)) { + validBlocks.add(stack); + } + } + + if (validBlocks.isEmpty()) { + return; + } + + // Find the hardest block + ItemStack hardestBlock = validBlocks.stream() + .max(Comparator.comparingDouble(stack -> { + Block block = ((BlockItem) stack.getItem()).getBlock(); + return block.getHardness() < 0 ? Double.MAX_VALUE : block.getHardness(); + })) + .orElse(null); + + if (hardestBlock != null) { + mc.player.getInventory().selectedSlot = mc.player.getInventory().indexOf(hardestBlock); + } + } + private boolean isInvalidBlock(ItemStack stack) { + return !(stack.getItem() instanceof BlockItem) + || stack.getItem() instanceof BedItem + || stack.getItem() instanceof PowderSnowBucketItem + || stack.getItem() instanceof ScaffoldingItem + || stack.getItem() instanceof TallBlockItem + || stack.getItem() instanceof VerticallyAttachableBlockItem + || stack.getItem() instanceof PlaceableOnWaterItem + || ((BlockItem) stack.getItem()).getBlock() instanceof PlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TorchBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRedstoneGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof RedstoneWireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FallingBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRailBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractSignBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BellBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CarpetBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ConduitBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CoralParentBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireHookBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PointedDripstoneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PressurePlateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallMountedBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ShulkerBoxBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AmethystClusterBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BuddingAmethystBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusFlowerBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusPlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LanternBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CandleBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TntBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CakeBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CobwebBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SugarCaneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SporeBlossomBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof KelpBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof GlowLichenBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CactusBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BambooBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FlowerPotBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LadderBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SlabBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TrapdoorBlock + || skippableBlox.get().contains(((BlockItem) stack.getItem()).getBlock()); + } +} \ No newline at end of file diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/TrouserBuild.java b/src/main/java/pwn/noobs/trouserstreak/modules/TrouserBuild.java index 44523e995..d8ec88df4 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/TrouserBuild.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/TrouserBuild.java @@ -14,6 +14,8 @@ import meteordevelopment.meteorclient.renderer.ShapeMode; import meteordevelopment.meteorclient.settings.*; import meteordevelopment.meteorclient.systems.modules.Module; +import meteordevelopment.meteorclient.utils.player.FindItemResult; +import meteordevelopment.meteorclient.utils.player.InvUtils; import meteordevelopment.meteorclient.utils.render.color.SettingColor; import meteordevelopment.orbit.EventHandler; import net.minecraft.block.*; @@ -28,9 +30,16 @@ import net.minecraft.util.math.Vec3d; import pwn.noobs.trouserstreak.Trouser; +import java.util.List; + public class TrouserBuild extends Module { private final SettingGroup sgGeneral = settings.getDefaultGroup(); private final SettingGroup sgRender = settings.createGroup("Render"); + private final Setting> skippableBlox = sgGeneral.add(new BlockListSetting.Builder() + .name("Blocks to not use") + .description("Do not use these blocks for building.") + .build() + ); private final Setting orientation = sgGeneral.add(new BoolSetting.Builder() .name("AutoOrientation") .description("Automatically chooses whether to build upright or horizontal.") @@ -48,8 +57,8 @@ public class TrouserBuild extends Module { .description("Your Range, in blocks. Do not increase past max. Turn it down if not using the Reach module.") .defaultValue(3) .sliderRange(1,5) - .min (1) - .max (5) + .min (1) + .max (5) .build() ); private final Setting thislong = sgGeneral.add(new IntSetting.Builder() @@ -235,900 +244,245 @@ private void onPreTick(TickEvent.Pre event) { } if (((orientation.get() && playerpitch>40 | playerpitch<-40) || (mode.get() == Modes.Horizontal && !orientation.get())) && pause==false){ cascadingpileof(); - //north - BlockPos Nettpos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); - BlockPos Nett1pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); - BlockPos Nett2pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); - BlockPos Nett3pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); - BlockPos Nett4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); - BlockPos Ntvapos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); - BlockPos Ntva1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); - BlockPos Ntva2pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); - BlockPos Ntva3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); - BlockPos Ntva4pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); - BlockPos Ntreepos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); - BlockPos Ntree1pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); - BlockPos Ntree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Ntree3pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); - BlockPos Ntree4pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); - BlockPos Nfyrapos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); - BlockPos Nfyra1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); - BlockPos Nfyra2pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); - BlockPos Nfyra3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); - BlockPos Nfyra4pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); - BlockPos Nfempos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); - BlockPos Nfem1pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); - BlockPos Nfem2pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); - BlockPos Nfem3pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); - BlockPos Nfem4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); - //south - BlockPos Settpos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); - BlockPos Sett1pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); - BlockPos Sett2pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); - BlockPos Sett3pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); - BlockPos Sett4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); - BlockPos Stvapos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); - BlockPos Stva1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); - BlockPos Stva2pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); - BlockPos Stva3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); - BlockPos Stva4pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); - BlockPos Streepos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); - BlockPos Stree1pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); - BlockPos Stree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Stree3pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); - BlockPos Stree4pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); - BlockPos Sfyrapos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); - BlockPos Sfyra1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); - BlockPos Sfyra2pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); - BlockPos Sfyra3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); - BlockPos Sfyra4pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); - BlockPos Sfempos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); - BlockPos Sfem1pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); - BlockPos Sfem2pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); - BlockPos Sfem3pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); - BlockPos Sfem4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); - //east - BlockPos Eettpos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); - BlockPos Eett1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); - BlockPos Eett2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); - BlockPos Eett3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); - BlockPos Eett4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); - BlockPos Etvapos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); - BlockPos Etva1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); - BlockPos Etva2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); - BlockPos Etva3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); - BlockPos Etva4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); - BlockPos Etreepos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); - BlockPos Etree1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); - BlockPos Etree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Etree3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); - BlockPos Etree4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); - BlockPos Efyrapos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); - BlockPos Efyra1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); - BlockPos Efyra2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); - BlockPos Efyra3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); - BlockPos Efyra4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); - BlockPos Efempos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); - BlockPos Efem1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); - BlockPos Efem2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); - BlockPos Efem3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); - BlockPos Efem4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); - //west - BlockPos Wettpos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); - BlockPos Wett1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); - BlockPos Wett2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); - BlockPos Wett3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); - BlockPos Wett4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); - BlockPos Wtvapos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); - BlockPos Wtva1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); - BlockPos Wtva2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); - BlockPos Wtva3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); - BlockPos Wtva4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); - BlockPos Wtreepos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); - BlockPos Wtree1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); - BlockPos Wtree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Wtree3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); - BlockPos Wtree4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); - BlockPos Wfyrapos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); - BlockPos Wfyra1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); - BlockPos Wfyra2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); - BlockPos Wfyra3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); - BlockPos Wfyra4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); - BlockPos Wfempos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); - BlockPos Wfem1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); - BlockPos Wfem2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); - BlockPos Wfem3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); - BlockPos Wfem4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); - -if (playerdir == Direction.NORTH){ - //1st row - if (ett){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nettpos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nettpos), Direction.DOWN, Nettpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Ntvapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntvapos), Direction.DOWN, Ntvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Ntreepos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntreepos), Direction.DOWN, Ntreepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nfyrapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyrapos), Direction.DOWN, Nfyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nfempos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfempos), Direction.DOWN, Nfempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //2nd row - if (ett1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nett1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett1pos), Direction.DOWN, Nett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Ntva1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva1pos), Direction.DOWN, Ntva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Ntree1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree1pos), Direction.DOWN, Ntree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nfyra1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra1pos), Direction.DOWN, Nfyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nfem1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem1pos), Direction.DOWN, Nfem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //3rd row - if (ett2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nett2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett2pos), Direction.DOWN, Nett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Ntva2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva2pos), Direction.DOWN, Ntva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Ntree2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree2pos), Direction.DOWN, Ntree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nfyra2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra2pos), Direction.DOWN, Nfyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nfem2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem2pos), Direction.DOWN, Nfem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //4th row - if (ett3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nett3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett3pos), Direction.DOWN, Nett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Ntva3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva3pos), Direction.DOWN, Ntva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Ntree3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree3pos), Direction.DOWN, Ntree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nfyra3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra3pos), Direction.DOWN, Nfyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nfem3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem3pos), Direction.DOWN, Nfem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //5th row - if (ett4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nett4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett4pos), Direction.DOWN, Nett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Ntva4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva4pos), Direction.DOWN, Ntva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Ntree4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree4pos), Direction.DOWN, Ntree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nfyra4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra4pos), Direction.DOWN, Nfyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nfem4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem4pos), Direction.DOWN, Nfem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } -} - - if (playerdir == Direction.SOUTH){ - //1st row - if (ett){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Settpos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Settpos), Direction.DOWN, Settpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Stvapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stvapos), Direction.DOWN, Stvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Streepos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Streepos), Direction.DOWN, Streepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Sfyrapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyrapos), Direction.DOWN, Sfyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Sfempos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfempos), Direction.DOWN, Sfempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //2nd row - if (ett1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sett1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett1pos), Direction.DOWN, Sett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Stva1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva1pos), Direction.DOWN, Stva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Stree1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree1pos), Direction.DOWN, Stree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sfyra1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra1pos), Direction.DOWN, Sfyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sfem1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem1pos), Direction.DOWN, Sfem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //3rd row - if (ett2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sett2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett2pos), Direction.DOWN, Sett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Stva2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva2pos), Direction.DOWN, Stva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Stree2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree2pos), Direction.DOWN, Stree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sfyra2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra2pos), Direction.DOWN, Sfyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sfem2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem2pos), Direction.DOWN, Sfem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //4th row - if (ett3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sett3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett3pos), Direction.DOWN, Sett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Stva3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva3pos), Direction.DOWN, Stva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Stree3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree3pos), Direction.DOWN, Stree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sfyra3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra3pos), Direction.DOWN, Sfyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sfem3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem3pos), Direction.DOWN, Sfem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //5th row - if (ett4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sett4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett4pos), Direction.DOWN, Sett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Stva4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva4pos), Direction.DOWN, Stva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Stree4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree4pos), Direction.DOWN, Stree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sfyra4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra4pos), Direction.DOWN, Sfyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sfem4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem4pos), Direction.DOWN, Sfem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - } - - if (playerdir == Direction.EAST){ - //1st row - if (ett){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Eettpos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eettpos), Direction.DOWN, Eettpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Etvapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etvapos), Direction.DOWN, Etvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Etreepos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etreepos), Direction.DOWN, Etreepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Efyrapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyrapos), Direction.DOWN, Efyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Efempos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efempos), Direction.DOWN, Efempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //2nd row - if (ett1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Eett1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett1pos), Direction.DOWN, Eett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Etva1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva1pos), Direction.DOWN, Etva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Etree1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree1pos), Direction.DOWN, Etree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Efyra1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra1pos), Direction.DOWN, Efyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Efem1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem1pos), Direction.DOWN, Efem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //3rd row - if (ett2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Eett2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett2pos), Direction.DOWN, Eett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Etva2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva2pos), Direction.DOWN, Etva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Etree2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree2pos), Direction.DOWN, Etree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Efyra2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra2pos), Direction.DOWN, Efyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Efem2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem2pos), Direction.DOWN, Efem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //4th row - if (ett3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Eett3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett3pos), Direction.DOWN, Eett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Etva3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva3pos), Direction.DOWN, Etva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Etree3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree3pos), Direction.DOWN, Etree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Efyra3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra3pos), Direction.DOWN, Efyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Efem3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem3pos), Direction.DOWN, Efem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //5th row - if (ett4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Eett4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett4pos), Direction.DOWN, Eett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Etva4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva4pos), Direction.DOWN, Etva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Etree4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree4pos), Direction.DOWN, Etree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Efyra4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra4pos), Direction.DOWN, Efyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Efem4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem4pos), Direction.DOWN, Efem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - } - - if (playerdir == Direction.WEST){ - //1st row - if (ett){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wettpos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wettpos), Direction.DOWN, Wettpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wtvapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtvapos), Direction.DOWN, Wtvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wtreepos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtreepos), Direction.DOWN, Wtreepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wfyrapos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyrapos), Direction.DOWN, Wfyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem){ - if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wfempos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfempos), Direction.DOWN, Wfempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //2nd row - if (ett1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wett1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett1pos), Direction.DOWN, Wett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wtva1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva1pos), Direction.DOWN, Wtva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wtree1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree1pos), Direction.DOWN, Wtree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wfyra1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra1pos), Direction.DOWN, Wfyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem1){ - if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wfem1pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem1pos), Direction.DOWN, Wfem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //3rd row - if (ett2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wett2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett2pos), Direction.DOWN, Wett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wtva2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva2pos), Direction.DOWN, Wtva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wtree2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree2pos), Direction.DOWN, Wtree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wfyra2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra2pos), Direction.DOWN, Wfyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem2){ - if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wfem2pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem2pos), Direction.DOWN, Wfem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //4th row - if (ett3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wett3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett3pos), Direction.DOWN, Wett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wtva3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva3pos), Direction.DOWN, Wtva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wtree3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree3pos), Direction.DOWN, Wtree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wfyra3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra3pos), Direction.DOWN, Wfyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem3){ - if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wfem3pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem3pos), Direction.DOWN, Wfem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - - //5th row - if (ett4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wett4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett4pos), Direction.DOWN, Wett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tva4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wtva4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva4pos), Direction.DOWN, Wtva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (tree4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wtree4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree4pos), Direction.DOWN, Wtree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fyra4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wfyra4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra4pos), Direction.DOWN, Wfyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - if (fem4){ - if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wfem4pos).isReplaceable()){ - mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem4pos), Direction.DOWN, Wfem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - } - } - if (((orientation.get() && playerpitch<=40 && playerpitch>=-40) || (mode.get() == Modes.Vertical && !orientation.get())) && pause==false){ - cascadingpileof(); //north - BlockPos Nettpos = new BlockPos(lava.getX()-2,lava.getY()+2,lava.getZ()); - BlockPos Nett1pos = new BlockPos(lava.getX()-2,lava.getY()+1,lava.getZ()); + BlockPos Nettpos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); + BlockPos Nett1pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); BlockPos Nett2pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); - BlockPos Nett3pos = new BlockPos(lava.getX()-2,lava.getY()-1,lava.getZ()); - BlockPos Nett4pos = new BlockPos(lava.getX()-2,lava.getY()-2,lava.getZ()); - BlockPos Ntvapos = new BlockPos(lava.getX()-1,lava.getY()+2,lava.getZ()); - BlockPos Ntva1pos = new BlockPos(lava.getX()-1,lava.getY()+1,lava.getZ()); + BlockPos Nett3pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); + BlockPos Nett4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); + BlockPos Ntvapos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); + BlockPos Ntva1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); BlockPos Ntva2pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); - BlockPos Ntva3pos = new BlockPos(lava.getX()-1,lava.getY()-1,lava.getZ()); - BlockPos Ntva4pos = new BlockPos(lava.getX()-1,lava.getY()-2,lava.getZ()); - BlockPos Ntreepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); - BlockPos Ntree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Ntva3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); + BlockPos Ntva4pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); + BlockPos Ntreepos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); + BlockPos Ntree1pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); BlockPos Ntree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Ntree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); - BlockPos Ntree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); - BlockPos Nfyrapos = new BlockPos(lava.getX()+1,lava.getY()+2,lava.getZ()); - BlockPos Nfyra1pos = new BlockPos(lava.getX()+1,lava.getY()+1,lava.getZ()); + BlockPos Ntree3pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); + BlockPos Ntree4pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); + BlockPos Nfyrapos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); + BlockPos Nfyra1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); BlockPos Nfyra2pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); - BlockPos Nfyra3pos = new BlockPos(lava.getX()+1,lava.getY()-1,lava.getZ()); - BlockPos Nfyra4pos = new BlockPos(lava.getX()+1,lava.getY()-2,lava.getZ()); - BlockPos Nfempos = new BlockPos(lava.getX()+2,lava.getY()+2,lava.getZ()); - BlockPos Nfem1pos = new BlockPos(lava.getX()+2,lava.getY()+1,lava.getZ()); + BlockPos Nfyra3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); + BlockPos Nfyra4pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); + BlockPos Nfempos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); + BlockPos Nfem1pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); BlockPos Nfem2pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); - BlockPos Nfem3pos = new BlockPos(lava.getX()+2,lava.getY()-1,lava.getZ()); - BlockPos Nfem4pos = new BlockPos(lava.getX()+2,lava.getY()-2,lava.getZ()); + BlockPos Nfem3pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); + BlockPos Nfem4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); //south - BlockPos Settpos = new BlockPos(lava.getX()+2,lava.getY()+2,lava.getZ()); - BlockPos Sett1pos = new BlockPos(lava.getX()+2,lava.getY()+1,lava.getZ()); + BlockPos Settpos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); + BlockPos Sett1pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); BlockPos Sett2pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); - BlockPos Sett3pos = new BlockPos(lava.getX()+2,lava.getY()-1,lava.getZ()); - BlockPos Sett4pos = new BlockPos(lava.getX()+2,lava.getY()-2,lava.getZ()); - BlockPos Stvapos = new BlockPos(lava.getX()+1,lava.getY()+2,lava.getZ()); - BlockPos Stva1pos = new BlockPos(lava.getX()+1,lava.getY()+1,lava.getZ()); + BlockPos Sett3pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); + BlockPos Sett4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); + BlockPos Stvapos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); + BlockPos Stva1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); BlockPos Stva2pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); - BlockPos Stva3pos = new BlockPos(lava.getX()+1,lava.getY()-1,lava.getZ()); - BlockPos Stva4pos = new BlockPos(lava.getX()+1,lava.getY()-2,lava.getZ()); - BlockPos Streepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); - BlockPos Stree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Stva3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); + BlockPos Stva4pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); + BlockPos Streepos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); + BlockPos Stree1pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); BlockPos Stree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Stree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); - BlockPos Stree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); - BlockPos Sfyrapos = new BlockPos(lava.getX()-1,lava.getY()+2,lava.getZ()); - BlockPos Sfyra1pos = new BlockPos(lava.getX()-1,lava.getY()+1,lava.getZ()); + BlockPos Stree3pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); + BlockPos Stree4pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); + BlockPos Sfyrapos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); + BlockPos Sfyra1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); BlockPos Sfyra2pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); - BlockPos Sfyra3pos = new BlockPos(lava.getX()-1,lava.getY()-1,lava.getZ()); - BlockPos Sfyra4pos = new BlockPos(lava.getX()-1,lava.getY()-2,lava.getZ()); - BlockPos Sfempos = new BlockPos(lava.getX()-2,lava.getY()+2,lava.getZ()); - BlockPos Sfem1pos = new BlockPos(lava.getX()-2,lava.getY()+1,lava.getZ()); + BlockPos Sfyra3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); + BlockPos Sfyra4pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); + BlockPos Sfempos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); + BlockPos Sfem1pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); BlockPos Sfem2pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); - BlockPos Sfem3pos = new BlockPos(lava.getX()-2,lava.getY()-1,lava.getZ()); - BlockPos Sfem4pos = new BlockPos(lava.getX()-2,lava.getY()-2,lava.getZ()); + BlockPos Sfem3pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); + BlockPos Sfem4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); //east - BlockPos Eettpos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-2); - BlockPos Eett1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-2); + BlockPos Eettpos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); + BlockPos Eett1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); BlockPos Eett2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); - BlockPos Eett3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-2); - BlockPos Eett4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-2); - BlockPos Etvapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-1); - BlockPos Etva1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-1); + BlockPos Eett3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); + BlockPos Eett4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); + BlockPos Etvapos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); + BlockPos Etva1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); BlockPos Etva2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); - BlockPos Etva3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-1); - BlockPos Etva4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-1); - BlockPos Etreepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); - BlockPos Etree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Etva3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); + BlockPos Etva4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); + BlockPos Etreepos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); + BlockPos Etree1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); BlockPos Etree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Etree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); - BlockPos Etree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); - BlockPos Efyrapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+1); - BlockPos Efyra1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+1); + BlockPos Etree3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); + BlockPos Etree4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); + BlockPos Efyrapos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); + BlockPos Efyra1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); BlockPos Efyra2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); - BlockPos Efyra3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+1); - BlockPos Efyra4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+1); - BlockPos Efempos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+2); - BlockPos Efem1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+2); + BlockPos Efyra3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); + BlockPos Efyra4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); + BlockPos Efempos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); + BlockPos Efem1pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); BlockPos Efem2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); - BlockPos Efem3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+2); - BlockPos Efem4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+2); + BlockPos Efem3pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); + BlockPos Efem4pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); //west - BlockPos Wettpos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+2); - BlockPos Wett1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+2); + BlockPos Wettpos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+2); + BlockPos Wett1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+2); BlockPos Wett2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); - BlockPos Wett3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+2); - BlockPos Wett4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+2); - BlockPos Wtvapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+1); - BlockPos Wtva1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+1); + BlockPos Wett3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+2); + BlockPos Wett4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+2); + BlockPos Wtvapos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()+1); + BlockPos Wtva1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()+1); BlockPos Wtva2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); - BlockPos Wtva3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+1); - BlockPos Wtva4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+1); - BlockPos Wtreepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); - BlockPos Wtree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Wtva3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()+1); + BlockPos Wtva4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()+1); + BlockPos Wtreepos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); + BlockPos Wtree1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); BlockPos Wtree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); - BlockPos Wtree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); - BlockPos Wtree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); - BlockPos Wfyrapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-1); - BlockPos Wfyra1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-1); + BlockPos Wtree3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); + BlockPos Wtree4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); + BlockPos Wfyrapos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-1); + BlockPos Wfyra1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-1); BlockPos Wfyra2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); - BlockPos Wfyra3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-1); - BlockPos Wfyra4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-1); - BlockPos Wfempos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-2); - BlockPos Wfem1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-2); + BlockPos Wfyra3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-1); + BlockPos Wfyra4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-1); + BlockPos Wfempos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()-2); + BlockPos Wfem1pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()-2); BlockPos Wfem2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); - BlockPos Wfem3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-2); - BlockPos Wfem4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-2); + BlockPos Wfem3pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()-2); + BlockPos Wfem4pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()-2); if (playerdir == Direction.NORTH){ //1st row if (ett){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nettpos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nettpos), Direction.DOWN, Nettpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Ntvapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntvapos), Direction.DOWN, Ntvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Ntreepos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntreepos), Direction.DOWN, Ntreepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nfyrapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyrapos), Direction.DOWN, Nfyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nfempos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfempos), Direction.DOWN, Nfempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //2nd row if (ett1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nett1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett1pos), Direction.DOWN, Nett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Ntva1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva1pos), Direction.DOWN, Ntva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Ntree1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree1pos), Direction.DOWN, Ntree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nfyra1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra1pos), Direction.DOWN, Nfyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nfem1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem1pos), Direction.DOWN, Nfem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //3rd row if (ett2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nett2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett2pos), Direction.DOWN, Nett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Ntva2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva2pos), Direction.DOWN, Ntva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Ntree2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree2pos), Direction.DOWN, Ntree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nfyra2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra2pos), Direction.DOWN, Nfyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nfem2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem2pos), Direction.DOWN, Nfem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //4th row if (ett3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nett3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett3pos), Direction.DOWN, Nett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Ntva3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva3pos), Direction.DOWN, Ntva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Ntree3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree3pos), Direction.DOWN, Ntree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nfyra3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra3pos), Direction.DOWN, Nfyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nfem3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem3pos), Direction.DOWN, Nfem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //5th row if (ett4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nett4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett4pos), Direction.DOWN, Nett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Ntva4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva4pos), Direction.DOWN, Ntva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Ntree4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree4pos), Direction.DOWN, Ntree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nfyra4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra4pos), Direction.DOWN, Nfyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nfem4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem4pos), Direction.DOWN, Nfem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } } @@ -1137,135 +491,135 @@ private void onPreTick(TickEvent.Pre event) { if (ett){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Settpos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Settpos), Direction.DOWN, Settpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Stvapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stvapos), Direction.DOWN, Stvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Streepos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Streepos), Direction.DOWN, Streepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Sfyrapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyrapos), Direction.DOWN, Sfyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Sfempos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfempos), Direction.DOWN, Sfempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //2nd row if (ett1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sett1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett1pos), Direction.DOWN, Sett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Stva1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva1pos), Direction.DOWN, Stva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Stree1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree1pos), Direction.DOWN, Stree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sfyra1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra1pos), Direction.DOWN, Sfyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sfem1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem1pos), Direction.DOWN, Sfem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //3rd row if (ett2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sett2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett2pos), Direction.DOWN, Sett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Stva2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva2pos), Direction.DOWN, Stva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Stree2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree2pos), Direction.DOWN, Stree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sfyra2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra2pos), Direction.DOWN, Sfyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sfem2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem2pos), Direction.DOWN, Sfem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //4th row if (ett3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sett3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett3pos), Direction.DOWN, Sett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Stva3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva3pos), Direction.DOWN, Stva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Stree3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree3pos), Direction.DOWN, Stree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sfyra3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra3pos), Direction.DOWN, Sfyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sfem3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem3pos), Direction.DOWN, Sfem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //5th row if (ett4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sett4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett4pos), Direction.DOWN, Sett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Stva4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva4pos), Direction.DOWN, Stva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Stree4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree4pos), Direction.DOWN, Stree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sfyra4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra4pos), Direction.DOWN, Sfyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sfem4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem4pos), Direction.DOWN, Sfem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } } @@ -1274,135 +628,135 @@ private void onPreTick(TickEvent.Pre event) { if (ett){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Eettpos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eettpos), Direction.DOWN, Eettpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Etvapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etvapos), Direction.DOWN, Etvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Etreepos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etreepos), Direction.DOWN, Etreepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Efyrapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyrapos), Direction.DOWN, Efyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Efempos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efempos), Direction.DOWN, Efempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //2nd row if (ett1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Eett1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett1pos), Direction.DOWN, Eett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Etva1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva1pos), Direction.DOWN, Etva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Etree1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree1pos), Direction.DOWN, Etree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Efyra1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra1pos), Direction.DOWN, Efyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Efem1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem1pos), Direction.DOWN, Efem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //3rd row if (ett2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Eett2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett2pos), Direction.DOWN, Eett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Etva2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva2pos), Direction.DOWN, Etva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Etree2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree2pos), Direction.DOWN, Etree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Efyra2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra2pos), Direction.DOWN, Efyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Efem2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem2pos), Direction.DOWN, Efem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //4th row if (ett3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Eett3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett3pos), Direction.DOWN, Eett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Etva3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva3pos), Direction.DOWN, Etva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Etree3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree3pos), Direction.DOWN, Etree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Efyra3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra3pos), Direction.DOWN, Efyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Efem3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem3pos), Direction.DOWN, Efem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //5th row if (ett4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Eett4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett4pos), Direction.DOWN, Eett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Etva4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva4pos), Direction.DOWN, Etva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Etree4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree4pos), Direction.DOWN, Etree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Efyra4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra4pos), Direction.DOWN, Efyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Efem4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem4pos), Direction.DOWN, Efem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } } @@ -1411,185 +765,863 @@ private void onPreTick(TickEvent.Pre event) { if (ett){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wettpos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wettpos), Direction.DOWN, Wettpos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wtvapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtvapos), Direction.DOWN, Wtvapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wtreepos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtreepos), Direction.DOWN, Wtreepos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wfyrapos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyrapos), Direction.DOWN, Wfyrapos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem){ if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wfempos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfempos), Direction.DOWN, Wfempos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //2nd row if (ett1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wett1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett1pos), Direction.DOWN, Wett1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wtva1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva1pos), Direction.DOWN, Wtva1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wtree1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree1pos), Direction.DOWN, Wtree1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wfyra1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra1pos), Direction.DOWN, Wfyra1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem1){ if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wfem1pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem1pos), Direction.DOWN, Wfem1pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //3rd row if (ett2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wett2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett2pos), Direction.DOWN, Wett2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wtva2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva2pos), Direction.DOWN, Wtva2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wtree2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree2pos), Direction.DOWN, Wtree2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wfyra2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra2pos), Direction.DOWN, Wfyra2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem2){ if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wfem2pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem2pos), Direction.DOWN, Wfem2pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //4th row if (ett3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wett3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett3pos), Direction.DOWN, Wett3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wtva3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva3pos), Direction.DOWN, Wtva3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wtree3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree3pos), Direction.DOWN, Wtree3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wfyra3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra3pos), Direction.DOWN, Wfyra3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem3){ if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wfem3pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem3pos), Direction.DOWN, Wfem3pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } //5th row if (ett4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wett4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett4pos), Direction.DOWN, Wett4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tva4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wtva4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva4pos), Direction.DOWN, Wtva4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (tree4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wtree4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree4pos), Direction.DOWN, Wtree4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fyra4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wfyra4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra4pos), Direction.DOWN, Wfyra4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} + mc.player.swingHand(Hand.MAIN_HAND);} } if (fem4){ if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wfem4pos).isReplaceable()){ mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem4pos), Direction.DOWN, Wfem4pos, false)); - mc.player.swingHand(Hand.MAIN_HAND);} - } - } - } - } - @EventHandler - private void onScreenOpen(OpenScreenEvent event) { - if (event.screen instanceof DisconnectedScreen) { - toggle(); - } - if (event.screen instanceof DeathScreen) { - toggle(); - } - } - @EventHandler - private void onGameLeft(GameLeftEvent event) { - toggle(); - } - - private BlockPos cast() { - HitResult blockHit = mc.cameraEntity.raycast(reach.get(), 0, false); - return ((BlockHitResult) blockHit).getBlockPos(); - } - private void cascadingpileof() { - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 0; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 1; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 2; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 3; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 4; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 5; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 6; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 7; - if (!(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem) || mc.player.getInventory().getMainHandStack().getItem() instanceof BedItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PowderSnowBucketItem || mc.player.getInventory().getMainHandStack().getItem() instanceof ScaffoldingItem || mc.player.getInventory().getMainHandStack().getItem() instanceof TallBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof VerticallyAttachableBlockItem || mc.player.getInventory().getMainHandStack().getItem() instanceof PlaceableOnWaterItem || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TorchBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRedstoneGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof RedstoneWireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FenceGateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractRailBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AbstractSignBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BellBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CarpetBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ConduitBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CoralParentBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireHookBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PointedDripstoneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof TripwireBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof PressurePlateBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof WallMountedBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ShulkerBoxBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof AmethystClusterBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BuddingAmethystBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusFlowerBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof ChorusPlantBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LanternBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CandleBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CakeBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SugarCaneBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof SporeBlossomBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof KelpBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof GlowLichenBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof CactusBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof BambooBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof Waterloggable || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FallingBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof FlowerPotBlock || ((BlockItem) mc.player.getInventory().getMainHandStack().getItem()).getBlock() instanceof LadderBlock){ - mc.player.getInventory().selectedSlot = 8; - } - } - } - } - } - } + mc.player.swingHand(Hand.MAIN_HAND);} } } } + if (((orientation.get() && playerpitch<=40 && playerpitch>=-40) || (mode.get() == Modes.Vertical && !orientation.get())) && pause==false){ + cascadingpileof(); + //north + BlockPos Nettpos = new BlockPos(lava.getX()-2,lava.getY()+2,lava.getZ()); + BlockPos Nett1pos = new BlockPos(lava.getX()-2,lava.getY()+1,lava.getZ()); + BlockPos Nett2pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); + BlockPos Nett3pos = new BlockPos(lava.getX()-2,lava.getY()-1,lava.getZ()); + BlockPos Nett4pos = new BlockPos(lava.getX()-2,lava.getY()-2,lava.getZ()); + BlockPos Ntvapos = new BlockPos(lava.getX()-1,lava.getY()+2,lava.getZ()); + BlockPos Ntva1pos = new BlockPos(lava.getX()-1,lava.getY()+1,lava.getZ()); + BlockPos Ntva2pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); + BlockPos Ntva3pos = new BlockPos(lava.getX()-1,lava.getY()-1,lava.getZ()); + BlockPos Ntva4pos = new BlockPos(lava.getX()-1,lava.getY()-2,lava.getZ()); + BlockPos Ntreepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); + BlockPos Ntree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Ntree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); + BlockPos Ntree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); + BlockPos Ntree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); + BlockPos Nfyrapos = new BlockPos(lava.getX()+1,lava.getY()+2,lava.getZ()); + BlockPos Nfyra1pos = new BlockPos(lava.getX()+1,lava.getY()+1,lava.getZ()); + BlockPos Nfyra2pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); + BlockPos Nfyra3pos = new BlockPos(lava.getX()+1,lava.getY()-1,lava.getZ()); + BlockPos Nfyra4pos = new BlockPos(lava.getX()+1,lava.getY()-2,lava.getZ()); + BlockPos Nfempos = new BlockPos(lava.getX()+2,lava.getY()+2,lava.getZ()); + BlockPos Nfem1pos = new BlockPos(lava.getX()+2,lava.getY()+1,lava.getZ()); + BlockPos Nfem2pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); + BlockPos Nfem3pos = new BlockPos(lava.getX()+2,lava.getY()-1,lava.getZ()); + BlockPos Nfem4pos = new BlockPos(lava.getX()+2,lava.getY()-2,lava.getZ()); + //south + BlockPos Settpos = new BlockPos(lava.getX()+2,lava.getY()+2,lava.getZ()); + BlockPos Sett1pos = new BlockPos(lava.getX()+2,lava.getY()+1,lava.getZ()); + BlockPos Sett2pos = new BlockPos(lava.getX()+2,lava.getY(),lava.getZ()); + BlockPos Sett3pos = new BlockPos(lava.getX()+2,lava.getY()-1,lava.getZ()); + BlockPos Sett4pos = new BlockPos(lava.getX()+2,lava.getY()-2,lava.getZ()); + BlockPos Stvapos = new BlockPos(lava.getX()+1,lava.getY()+2,lava.getZ()); + BlockPos Stva1pos = new BlockPos(lava.getX()+1,lava.getY()+1,lava.getZ()); + BlockPos Stva2pos = new BlockPos(lava.getX()+1,lava.getY(),lava.getZ()); + BlockPos Stva3pos = new BlockPos(lava.getX()+1,lava.getY()-1,lava.getZ()); + BlockPos Stva4pos = new BlockPos(lava.getX()+1,lava.getY()-2,lava.getZ()); + BlockPos Streepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); + BlockPos Stree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Stree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); + BlockPos Stree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); + BlockPos Stree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); + BlockPos Sfyrapos = new BlockPos(lava.getX()-1,lava.getY()+2,lava.getZ()); + BlockPos Sfyra1pos = new BlockPos(lava.getX()-1,lava.getY()+1,lava.getZ()); + BlockPos Sfyra2pos = new BlockPos(lava.getX()-1,lava.getY(),lava.getZ()); + BlockPos Sfyra3pos = new BlockPos(lava.getX()-1,lava.getY()-1,lava.getZ()); + BlockPos Sfyra4pos = new BlockPos(lava.getX()-1,lava.getY()-2,lava.getZ()); + BlockPos Sfempos = new BlockPos(lava.getX()-2,lava.getY()+2,lava.getZ()); + BlockPos Sfem1pos = new BlockPos(lava.getX()-2,lava.getY()+1,lava.getZ()); + BlockPos Sfem2pos = new BlockPos(lava.getX()-2,lava.getY(),lava.getZ()); + BlockPos Sfem3pos = new BlockPos(lava.getX()-2,lava.getY()-1,lava.getZ()); + BlockPos Sfem4pos = new BlockPos(lava.getX()-2,lava.getY()-2,lava.getZ()); + //east + BlockPos Eettpos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-2); + BlockPos Eett1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-2); + BlockPos Eett2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); + BlockPos Eett3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-2); + BlockPos Eett4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-2); + BlockPos Etvapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-1); + BlockPos Etva1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-1); + BlockPos Etva2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); + BlockPos Etva3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-1); + BlockPos Etva4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-1); + BlockPos Etreepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); + BlockPos Etree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Etree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); + BlockPos Etree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); + BlockPos Etree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); + BlockPos Efyrapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+1); + BlockPos Efyra1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+1); + BlockPos Efyra2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); + BlockPos Efyra3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+1); + BlockPos Efyra4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+1); + BlockPos Efempos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+2); + BlockPos Efem1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+2); + BlockPos Efem2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); + BlockPos Efem3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+2); + BlockPos Efem4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+2); + //west + BlockPos Wettpos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+2); + BlockPos Wett1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+2); + BlockPos Wett2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+2); + BlockPos Wett3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+2); + BlockPos Wett4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+2); + BlockPos Wtvapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()+1); + BlockPos Wtva1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()+1); + BlockPos Wtva2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()+1); + BlockPos Wtva3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()+1); + BlockPos Wtva4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()+1); + BlockPos Wtreepos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()); + BlockPos Wtree1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()); + BlockPos Wtree2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()); + BlockPos Wtree3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()); + BlockPos Wtree4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()); + BlockPos Wfyrapos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-1); + BlockPos Wfyra1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-1); + BlockPos Wfyra2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-1); + BlockPos Wfyra3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-1); + BlockPos Wfyra4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-1); + BlockPos Wfempos = new BlockPos(lava.getX(),lava.getY()+2,lava.getZ()-2); + BlockPos Wfem1pos = new BlockPos(lava.getX(),lava.getY()+1,lava.getZ()-2); + BlockPos Wfem2pos = new BlockPos(lava.getX(),lava.getY(),lava.getZ()-2); + BlockPos Wfem3pos = new BlockPos(lava.getX(),lava.getY()-1,lava.getZ()-2); + BlockPos Wfem4pos = new BlockPos(lava.getX(),lava.getY()-2,lava.getZ()-2); + + if (playerdir == Direction.NORTH){ + //1st row + if (ett){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nettpos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nettpos), Direction.DOWN, Nettpos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Ntvapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntvapos), Direction.DOWN, Ntvapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Ntreepos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntreepos), Direction.DOWN, Ntreepos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nfyrapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyrapos), Direction.DOWN, Nfyrapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Nfempos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfempos), Direction.DOWN, Nfempos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //2nd row + if (ett1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nett1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett1pos), Direction.DOWN, Nett1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Ntva1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva1pos), Direction.DOWN, Ntva1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Ntree1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree1pos), Direction.DOWN, Ntree1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nfyra1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra1pos), Direction.DOWN, Nfyra1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Nfem1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem1pos), Direction.DOWN, Nfem1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //3rd row + if (ett2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nett2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett2pos), Direction.DOWN, Nett2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Ntva2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva2pos), Direction.DOWN, Ntva2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Ntree2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree2pos), Direction.DOWN, Ntree2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nfyra2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra2pos), Direction.DOWN, Nfyra2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Nfem2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem2pos), Direction.DOWN, Nfem2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //4th row + if (ett3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nett3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett3pos), Direction.DOWN, Nett3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Ntva3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva3pos), Direction.DOWN, Ntva3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Ntree3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree3pos), Direction.DOWN, Ntree3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nfyra3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra3pos), Direction.DOWN, Nfyra3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Nfem3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem3pos), Direction.DOWN, Nfem3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //5th row + if (ett4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nett4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nett4pos), Direction.DOWN, Nett4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Ntva4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntva4pos), Direction.DOWN, Ntva4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Ntree4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Ntree4pos), Direction.DOWN, Ntree4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nfyra4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfyra4pos), Direction.DOWN, Nfyra4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Nfem4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Nfem4pos), Direction.DOWN, Nfem4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + } + + if (playerdir == Direction.SOUTH){ + //1st row + if (ett){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Settpos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Settpos), Direction.DOWN, Settpos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Stvapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stvapos), Direction.DOWN, Stvapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Streepos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Streepos), Direction.DOWN, Streepos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Sfyrapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyrapos), Direction.DOWN, Sfyrapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Sfempos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfempos), Direction.DOWN, Sfempos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //2nd row + if (ett1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sett1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett1pos), Direction.DOWN, Sett1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Stva1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva1pos), Direction.DOWN, Stva1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Stree1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree1pos), Direction.DOWN, Stree1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sfyra1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra1pos), Direction.DOWN, Sfyra1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Sfem1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem1pos), Direction.DOWN, Sfem1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //3rd row + if (ett2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sett2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett2pos), Direction.DOWN, Sett2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Stva2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva2pos), Direction.DOWN, Stva2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Stree2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree2pos), Direction.DOWN, Stree2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sfyra2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra2pos), Direction.DOWN, Sfyra2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Sfem2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem2pos), Direction.DOWN, Sfem2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //4th row + if (ett3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sett3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett3pos), Direction.DOWN, Sett3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Stva3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva3pos), Direction.DOWN, Stva3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Stree3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree3pos), Direction.DOWN, Stree3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sfyra3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra3pos), Direction.DOWN, Sfyra3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Sfem3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem3pos), Direction.DOWN, Sfem3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //5th row + if (ett4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sett4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sett4pos), Direction.DOWN, Sett4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Stva4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stva4pos), Direction.DOWN, Stva4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Stree4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Stree4pos), Direction.DOWN, Stree4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sfyra4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfyra4pos), Direction.DOWN, Sfyra4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Sfem4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Sfem4pos), Direction.DOWN, Sfem4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + } + + if (playerdir == Direction.EAST){ + //1st row + if (ett){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Eettpos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eettpos), Direction.DOWN, Eettpos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Etvapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etvapos), Direction.DOWN, Etvapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Etreepos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etreepos), Direction.DOWN, Etreepos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Efyrapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyrapos), Direction.DOWN, Efyrapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Efempos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efempos), Direction.DOWN, Efempos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //2nd row + if (ett1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Eett1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett1pos), Direction.DOWN, Eett1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Etva1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva1pos), Direction.DOWN, Etva1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Etree1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree1pos), Direction.DOWN, Etree1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Efyra1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra1pos), Direction.DOWN, Efyra1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Efem1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem1pos), Direction.DOWN, Efem1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //3rd row + if (ett2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Eett2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett2pos), Direction.DOWN, Eett2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Etva2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva2pos), Direction.DOWN, Etva2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Etree2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree2pos), Direction.DOWN, Etree2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Efyra2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra2pos), Direction.DOWN, Efyra2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Efem2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem2pos), Direction.DOWN, Efem2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //4th row + if (ett3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Eett3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett3pos), Direction.DOWN, Eett3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Etva3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva3pos), Direction.DOWN, Etva3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Etree3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree3pos), Direction.DOWN, Etree3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Efyra3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra3pos), Direction.DOWN, Efyra3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Efem3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem3pos), Direction.DOWN, Efem3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //5th row + if (ett4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Eett4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Eett4pos), Direction.DOWN, Eett4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Etva4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etva4pos), Direction.DOWN, Etva4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Etree4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Etree4pos), Direction.DOWN, Etree4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Efyra4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efyra4pos), Direction.DOWN, Efyra4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Efem4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Efem4pos), Direction.DOWN, Efem4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + } + + if (playerdir == Direction.WEST){ + //1st row + if (ett){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wettpos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wettpos), Direction.DOWN, Wettpos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wtvapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtvapos), Direction.DOWN, Wtvapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wtreepos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtreepos), Direction.DOWN, Wtreepos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wfyrapos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyrapos), Direction.DOWN, Wfyrapos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem){ + if (blockticks==tickdelay.get()*1 && mc.world.getBlockState(Wfempos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfempos), Direction.DOWN, Wfempos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //2nd row + if (ett1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wett1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett1pos), Direction.DOWN, Wett1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wtva1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva1pos), Direction.DOWN, Wtva1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wtree1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree1pos), Direction.DOWN, Wtree1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wfyra1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra1pos), Direction.DOWN, Wfyra1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem1){ + if (blockticks==tickdelay.get()*2 && mc.world.getBlockState(Wfem1pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem1pos), Direction.DOWN, Wfem1pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //3rd row + if (ett2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wett2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett2pos), Direction.DOWN, Wett2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wtva2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva2pos), Direction.DOWN, Wtva2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wtree2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree2pos), Direction.DOWN, Wtree2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wfyra2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra2pos), Direction.DOWN, Wfyra2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem2){ + if (blockticks==tickdelay.get()*3 && mc.world.getBlockState(Wfem2pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem2pos), Direction.DOWN, Wfem2pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //4th row + if (ett3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wett3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett3pos), Direction.DOWN, Wett3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wtva3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva3pos), Direction.DOWN, Wtva3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wtree3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree3pos), Direction.DOWN, Wtree3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wfyra3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra3pos), Direction.DOWN, Wfyra3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem3){ + if (blockticks==tickdelay.get()*4 && mc.world.getBlockState(Wfem3pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem3pos), Direction.DOWN, Wfem3pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + + //5th row + if (ett4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wett4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wett4pos), Direction.DOWN, Wett4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tva4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wtva4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtva4pos), Direction.DOWN, Wtva4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (tree4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wtree4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wtree4pos), Direction.DOWN, Wtree4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fyra4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wfyra4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfyra4pos), Direction.DOWN, Wfyra4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + if (fem4){ + if (blockticks==tickdelay.get()*5 && mc.world.getBlockState(Wfem4pos).isReplaceable()){ + mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(Wfem4pos), Direction.DOWN, Wfem4pos, false)); + mc.player.swingHand(Hand.MAIN_HAND);} + } + } + } + } + @EventHandler + private void onScreenOpen(OpenScreenEvent event) { + if (event.screen instanceof DisconnectedScreen) { + toggle(); + } + if (event.screen instanceof DeathScreen) { + toggle(); + } + } + @EventHandler + private void onGameLeft(GameLeftEvent event) { + toggle(); + } + + private BlockPos cast() { + HitResult blockHit = mc.cameraEntity.raycast(reach.get(), 0, false); + return ((BlockHitResult) blockHit).getBlockPos(); + } + private void cascadingpileof() { + FindItemResult findResult = InvUtils.findInHotbar(block -> !isInvalidBlock(block)); + if (!findResult.found()) { + return; + } + mc.player.getInventory().selectedSlot = findResult.slot(); + } + private boolean isInvalidBlock(ItemStack stack) { + return !(stack.getItem() instanceof BlockItem) + || stack.getItem() instanceof BedItem + || stack.getItem() instanceof PowderSnowBucketItem + || stack.getItem() instanceof ScaffoldingItem + || stack.getItem() instanceof TallBlockItem + || stack.getItem() instanceof VerticallyAttachableBlockItem + || stack.getItem() instanceof PlaceableOnWaterItem + || ((BlockItem) stack.getItem()).getBlock() instanceof PlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TorchBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRedstoneGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof RedstoneWireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FenceGateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FallingBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractRailBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AbstractSignBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BellBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CarpetBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ConduitBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CoralParentBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireHookBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PointedDripstoneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof TripwireBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof PressurePlateBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof WallMountedBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ShulkerBoxBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof AmethystClusterBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BuddingAmethystBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusFlowerBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof ChorusPlantBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LanternBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CandleBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CakeBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SugarCaneBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof SporeBlossomBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof KelpBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof GlowLichenBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof CactusBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof BambooBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof FlowerPotBlock + || ((BlockItem) stack.getItem()).getBlock() instanceof LadderBlock + || skippableBlox.get().contains(((BlockItem) stack.getItem()).getBlock()); } public enum Modes { Horizontal, Vertical diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 53d3009a9..80cc3d708 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "streak-addon", - "version": "0.9.0", + "version": "0.9.1", "name": "TrouserStreak", "description": "Trouser-Streak is a compilation of modules, updated to the latest version and optimized for maximum grief. I did not make all of these.", "authors": [