From bee3569c2c921936c75786787bd50c1a05b813d4 Mon Sep 17 00:00:00 2001 From: Trolman <105076612+Cabbasca@users.noreply.github.com> Date: Wed, 21 Jun 2023 15:39:02 +0200 Subject: [PATCH] Spawn eggs can be placed in the air --- .../meteorclient/systems/modules/world/AirPlace.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/world/AirPlace.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/world/AirPlace.java index a7e8c9193d..16df2177f2 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/world/AirPlace.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/world/AirPlace.java @@ -5,6 +5,7 @@ package meteordevelopment.meteorclient.systems.modules.world; +import net.minecraft.item.SpawnEggItem; import meteordevelopment.meteorclient.events.render.Render3DEvent; import meteordevelopment.meteorclient.events.world.TickEvent; import meteordevelopment.meteorclient.renderer.ShapeMode; @@ -83,7 +84,7 @@ private void onTick(TickEvent.Post event) { double r = customRange.get() ? range.get() : mc.interactionManager.getReachDistance(); hitResult = mc.getCameraEntity().raycast(r, 0, false); - if (!(hitResult instanceof BlockHitResult) || !(mc.player.getMainHandStack().getItem() instanceof BlockItem)) return; + if (!(hitResult instanceof BlockHitResult) || !(mc.player.getMainHandStack().getItem() instanceof BlockItem) && !(mc.player.getMainHandStack().getItem() instanceof SpawnEggItem)) return; if (mc.options.useKey.isPressed()) { BlockUtils.place(((BlockHitResult) hitResult).getBlockPos(), Hand.MAIN_HAND, mc.player.getInventory().selectedSlot, false, 0, true, true, false); @@ -94,7 +95,7 @@ private void onTick(TickEvent.Post event) { private void onRender(Render3DEvent event) { if (!(hitResult instanceof BlockHitResult) || !mc.world.getBlockState(((BlockHitResult) hitResult).getBlockPos()).isReplaceable() - || !(mc.player.getMainHandStack().getItem() instanceof BlockItem) + || !(mc.player.getMainHandStack().getItem() instanceof BlockItem) && !(mc.player.getMainHandStack().getItem() instanceof SpawnEggItem) || !render.get()) return; event.renderer.box(((BlockHitResult) hitResult).getBlockPos(), sideColor.get(), lineColor.get(), shapeMode.get(), 0);