diff options
author | RoseGoldIsntGay <yoavkau@gmail.com> | 2022-01-27 20:44:16 +0200 |
---|---|---|
committer | RoseGoldIsntGay <yoavkau@gmail.com> | 2022-01-27 20:44:16 +0200 |
commit | f4b58abbda168b01513a5ac2ba2870bc00df7074 (patch) | |
tree | 2f237367764c74bba1f912acec1da281a2b74d24 /src/main/java/rosegoldaddons/features/ForagingNuker.java | |
parent | fdc569f2ab7674d850d25b41519b4e3da244dd00 (diff) | |
download | RGA-f4b58abbda168b01513a5ac2ba2870bc00df7074.tar.gz RGA-f4b58abbda168b01513a5ac2ba2870bc00df7074.tar.bz2 RGA-f4b58abbda168b01513a5ac2ba2870bc00df7074.zip |
2.7.0-pre2
Diffstat (limited to 'src/main/java/rosegoldaddons/features/ForagingNuker.java')
-rw-r--r-- | src/main/java/rosegoldaddons/features/ForagingNuker.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/rosegoldaddons/features/ForagingNuker.java b/src/main/java/rosegoldaddons/features/ForagingNuker.java index dcd3100..67b6cd7 100644 --- a/src/main/java/rosegoldaddons/features/ForagingNuker.java +++ b/src/main/java/rosegoldaddons/features/ForagingNuker.java @@ -19,7 +19,7 @@ public class ForagingNuker { @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - if (!Main.nukeWood || Minecraft.getMinecraft().thePlayer == null || !Minecraft.getMinecraft().thePlayer.onGround) { + if (!Main.nukeWood || Main.mc.thePlayer == null || !Main.mc.thePlayer.onGround) { broken.clear(); return; } @@ -28,7 +28,7 @@ public class ForagingNuker { if(broken.size() > 10) { broken.clear(); } - Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, wood, EnumFacing.DOWN)); + Main.mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, wood, EnumFacing.DOWN)); PlayerUtils.swingItem(); broken.add(wood); } @@ -37,14 +37,14 @@ public class ForagingNuker { private BlockPos closestWood() { int r = 6; - BlockPos playerPos = Minecraft.getMinecraft().thePlayer.getPosition(); + BlockPos playerPos = Main.mc.thePlayer.getPosition(); playerPos = playerPos.add(0, 1, 0); - Vec3 playerVec = Minecraft.getMinecraft().thePlayer.getPositionVector(); + Vec3 playerVec = Main.mc.thePlayer.getPositionVector(); Vec3i vec3i = new Vec3i(r, r, r); ArrayList<Vec3> warts = new ArrayList<>(); if (playerPos != null) { for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) { - IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos); + IBlockState blockState = Main.mc.theWorld.getBlockState(blockPos); if (blockState.getBlock() == Blocks.log || blockState.getBlock() == Blocks.log2) { if (!broken.contains(blockPos)) { warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5)); |