Full module source: 1 implementation
Every implementation below is the complete module file, verbatim. Expand a client to read its code.
Meteor ClientWorldsrc/main/java/meteordevelopment/meteorclient/systems/modules/world/BuildHeight.javaJava · 30 lines · 1.2 KB
Allows you to interact with objects at the build limit.
| 1 | /*
|
| 2 | * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
|
| 3 | * Copyright (c) Meteor Development.
|
| 4 | */
|
| 5 |
|
| 6 | package meteordevelopment.meteorclient.systems.modules.world;
|
| 7 |
|
| 8 | import meteordevelopment.meteorclient.events.packets.PacketEvent;
|
| 9 | import meteordevelopment.meteorclient.mixin.BlockHitResultAccessor;
|
| 10 | import meteordevelopment.meteorclient.systems.modules.Categories;
|
| 11 | import meteordevelopment.meteorclient.systems.modules.Module;
|
| 12 | import meteordevelopment.orbit.EventHandler;
|
| 13 | import net.minecraft.core.Direction;
|
| 14 | import net.minecraft.network.protocol.game.ServerboundUseItemOnPacket;
|
| 15 |
|
| 16 | public class BuildHeight extends Module {
|
| 17 | public BuildHeight() {
|
| 18 | super(Categories.World, "build-height", "Allows you to interact with objects at the build limit.");
|
| 19 | }
|
| 20 |
|
| 21 | @EventHandler
|
| 22 | private void onSendPacket(PacketEvent.Send event) {
|
| 23 | if (!(event.packet instanceof ServerboundUseItemOnPacket p)) return;
|
| 24 | if (mc.level == null) return;
|
| 25 | if (p.getHitResult().getLocation().y >= mc.level.getHeight() && p.getHitResult().getDirection() == Direction.UP) {
|
| 26 | ((BlockHitResultAccessor) p.getHitResult()).meteor$setDirection(Direction.DOWN);
|
| 27 | }
|
| 28 | }
|
| 29 | }
|
| 30 |
|
Mixins (1)
DirectionAccessor.javaJava · 19 lines · 511 B
@Mixin(Direction.class)
| 1 | /*
|
| 2 | * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
|
| 3 | * Copyright (c) Meteor Development.
|
| 4 | */
|
| 5 |
|
| 6 | package meteordevelopment.meteorclient.mixin;
|
| 7 |
|
| 8 | import net.minecraft.core.Direction;
|
| 9 | import org.spongepowered.asm.mixin.Mixin;
|
| 10 | import org.spongepowered.asm.mixin.gen.Accessor;
|
| 11 |
|
| 12 | @Mixin(Direction.class)
|
| 13 | public interface DirectionAccessor {
|
| 14 | @Accessor("BY_2D_DATA")
|
| 15 | static Direction[] meteor$getHorizontal() {
|
| 16 | throw new AssertionError();
|
| 17 | }
|
| 18 | }
|
| 19 |
|