Skip to content

Commit e0bc625

Browse files
authored
Add files via upload
1 parent 6b51bde commit e0bc625

File tree

10 files changed

+462
-16
lines changed

10 files changed

+462
-16
lines changed

src/main/java/zgoly/meteorist/Meteorist.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
import org.slf4j.Logger;
1313
import org.slf4j.LoggerFactory;
1414

15+
import java.io.BufferedReader;
16+
import java.io.File;
17+
import java.io.InputStream;
1518
import java.lang.invoke.MethodHandles;
19+
import java.net.URL;
20+
import java.nio.file.Path;
21+
import java.nio.file.Paths;
22+
import java.util.Objects;
23+
import java.io.IOException; import java.nio.file.Files;
24+
25+
import static meteordevelopment.meteorclient.MeteorClient.mc;
1626

1727
public class Meteorist extends MeteorAddon {
1828
public static final Logger LOG = LoggerFactory.getLogger("Meteorist");
@@ -23,12 +33,16 @@ public void onInitialize() {
2333
LOG.info("Meteorist here!");
2434
MeteorClient.EVENT_BUS.registerLambdaFactory("zgoly.meteorist", (lookupInMethod, klass) -> (MethodHandles.Lookup) lookupInMethod.invoke(null, klass, MethodHandles.lookup()));
2535
// Modules
26-
Modules.get().add(new AutoTake());
36+
Modules.get().add(new AutoFeed());
37+
Modules.get().add(new AutoHeal());
2738
Modules.get().add(new AutoLeave());
2839
Modules.get().add(new AutoLogin());
2940
Modules.get().add(new ContainerCleaner());
41+
Modules.get().add(new HighJump());
42+
Modules.get().add(new ItemSucker());
3043
Modules.get().add(new JumpFlight());
3144
Modules.get().add(new NewVelocity());
45+
Modules.get().add(new SlotClick());
3246
// Commands
3347
Commands.get().add(new Coordinates());
3448
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//By Zgoly
2+
package zgoly.meteorist.modules;
3+
4+
import meteordevelopment.meteorclient.events.world.TickEvent;
5+
import meteordevelopment.meteorclient.settings.*;
6+
import meteordevelopment.meteorclient.systems.modules.Module;
7+
import meteordevelopment.orbit.EventHandler;
8+
import zgoly.meteorist.Meteorist;
9+
10+
public class AutoFeed extends Module {
11+
private final SettingGroup sgGeneral = settings.getDefaultGroup();
12+
13+
private final Setting<String> feedCmd = sgGeneral.add(new StringSetting.Builder()
14+
.name("feed-command:")
15+
.description("Feed command.")
16+
.defaultValue("/feed")
17+
.build()
18+
);
19+
20+
private final Setting<Integer> hungerLevel = sgGeneral.add(new IntSetting.Builder()
21+
.name("hunger-level:")
22+
.description("The hunger level at which to send the command.")
23+
.defaultValue(12)
24+
.range(1, 1024)
25+
.sliderRange(1, 20)
26+
.build()
27+
);
28+
29+
private final Setting<Integer> wait = sgGeneral.add(new IntSetting.Builder()
30+
.name("wait:")
31+
.description("Waiting after sending a command in ticks (1 sec = 20 ticks).")
32+
.defaultValue(20)
33+
.range(1, 1200)
34+
.sliderRange(1, 40)
35+
.build()
36+
);
37+
38+
private int value = 0;
39+
40+
public AutoFeed() {
41+
super(Meteorist.CATEGORY, "auto-feed", "Writes command in chat when hunger level is low.");
42+
}
43+
44+
@EventHandler
45+
private void onTick(TickEvent.Post event) {
46+
if (value < wait.get()) value ++;
47+
if (value >= wait.get() && mc.player.getHungerManager().getFoodLevel() <= hungerLevel.get()) {
48+
value = 0;
49+
mc.player.sendChatMessage(feedCmd.get());
50+
} else value++;
51+
}
52+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//By Zgoly
2+
package zgoly.meteorist.modules;
3+
4+
import meteordevelopment.meteorclient.events.world.TickEvent;
5+
import meteordevelopment.meteorclient.settings.*;
6+
import meteordevelopment.meteorclient.systems.modules.Module;
7+
import meteordevelopment.orbit.EventHandler;
8+
import zgoly.meteorist.Meteorist;
9+
10+
public class AutoHeal extends Module {
11+
private final SettingGroup sgGeneral = settings.getDefaultGroup();
12+
13+
private final Setting<String> healCmd = sgGeneral.add(new StringSetting.Builder()
14+
.name("heal-command:")
15+
.description("Heal command.")
16+
.defaultValue("/heal")
17+
.build()
18+
);
19+
20+
private final Setting<Integer> healthLevel = sgGeneral.add(new IntSetting.Builder()
21+
.name("health-level:")
22+
.description("The health level at which to send the command.")
23+
.defaultValue(10)
24+
.range(1, 1024)
25+
.sliderRange(1, 20)
26+
.build()
27+
);
28+
29+
private final Setting<Integer> wait = sgGeneral.add(new IntSetting.Builder()
30+
.name("wait:")
31+
.description("Waiting after sending a command in ticks (1 sec = 20 ticks).")
32+
.defaultValue(20)
33+
.range(1, 1200)
34+
.sliderRange(1, 40)
35+
.build()
36+
);
37+
38+
private int value = 0;
39+
40+
public AutoHeal() {
41+
super(Meteorist.CATEGORY, "auto-heal", "Writes command in chat when health level is low.");
42+
}
43+
44+
@EventHandler
45+
private void onTick(TickEvent.Post event) {
46+
if (value < wait.get()) value ++;
47+
if (value >= wait.get() && mc.player.getHealth() <= healthLevel.get()) {
48+
value = 0;
49+
mc.player.sendChatMessage(healCmd.get());
50+
} else value++;
51+
}
52+
}

src/main/java/zgoly/meteorist/modules/AutoLeave.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ public enum Mode {
3939
.name("range:")
4040
.description("Disconnects if player in range.")
4141
.defaultValue(5)
42-
.min(1)
43-
.range(1, 25)
44-
.sliderRange(1, 25)
42+
.range(1, 128)
43+
.sliderRange(1, 10)
4544
.build()
4645
);
4746

src/main/java/zgoly/meteorist/modules/AutoLogin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public AutoLogin() {
5151
private void onTick(TickEvent.Post event) {
5252
if (serverOnly.get() && mc.getServer() != null && mc.getServer().isSingleplayer()) return;
5353
if (!(logMsg.get().isEmpty() || password.get().isEmpty()) && work) {
54-
mc.player.sendChatMessage(logMsg.get() + " " + password.get());
5554
work = false;
55+
mc.player.sendChatMessage(logMsg.get() + " " + password.get());
5656
}
5757
}
5858
@EventHandler
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//By Zgoly
2+
package zgoly.meteorist.modules;
3+
4+
import meteordevelopment.meteorclient.events.meteor.KeyEvent;
5+
import meteordevelopment.meteorclient.events.world.TickEvent;
6+
import meteordevelopment.meteorclient.settings.IntSetting;
7+
import meteordevelopment.meteorclient.settings.Setting;
8+
import meteordevelopment.meteorclient.settings.SettingGroup;
9+
import meteordevelopment.meteorclient.systems.modules.Module;
10+
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
11+
import meteordevelopment.orbit.EventHandler;
12+
import zgoly.meteorist.Meteorist;
13+
14+
public class HighJump extends Module {
15+
private final SettingGroup sgGeneral = settings.getDefaultGroup();
16+
17+
private final Setting<Integer> multiplier = sgGeneral.add(new IntSetting.Builder()
18+
.name("jump-multiplier:")
19+
.description("Jump height multiplier.")
20+
.defaultValue(1)
21+
.range(1, 128)
22+
.sliderRange(1, 10)
23+
.build()
24+
);
25+
26+
private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
27+
.name("delay:")
28+
.description("Delay between jumps in ticks (1 sec = 20 ticks).")
29+
.defaultValue(3)
30+
.range(1, 1200)
31+
.sliderRange(1, 10)
32+
.build()
33+
);
34+
35+
int t = 0;
36+
int i = multiplier.get();
37+
38+
public HighJump() {
39+
super(Meteorist.CATEGORY, "high-jump", "Makes you jump higher than normal.");
40+
}
41+
42+
@EventHandler
43+
private void onKey(KeyEvent event) {
44+
if (event.action != KeyAction.Press) return;
45+
if (mc.options.jumpKey.matchesKey(event.key, 0)) i=0;
46+
}
47+
48+
@EventHandler
49+
private void onTick(TickEvent.Post event) {
50+
if (i < multiplier.get()) {
51+
if (t >= delay.get()) {
52+
t=0;
53+
i++;
54+
mc.player.fallDistance = 0;
55+
mc.player.jump();
56+
} else t++;
57+
}
58+
}
59+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
//By Zgoly
2+
package zgoly.meteorist.modules;
3+
4+
import baritone.api.BaritoneAPI;
5+
import baritone.api.IBaritone;
6+
import baritone.api.pathing.goals.GoalGetToBlock;
7+
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
8+
import meteordevelopment.meteorclient.events.game.GameLeftEvent;
9+
import meteordevelopment.meteorclient.events.world.TickEvent;
10+
import meteordevelopment.meteorclient.mixininterface.IVec3d;
11+
import meteordevelopment.meteorclient.settings.BoolSetting;
12+
import meteordevelopment.meteorclient.settings.DoubleSetting;
13+
import meteordevelopment.meteorclient.settings.Setting;
14+
import meteordevelopment.meteorclient.settings.SettingGroup;
15+
import meteordevelopment.meteorclient.systems.modules.Module;
16+
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
17+
import meteordevelopment.orbit.EventHandler;
18+
import net.minecraft.entity.Entity;
19+
import net.minecraft.util.math.BlockPos;
20+
import net.minecraft.util.math.Vec3d;
21+
import zgoly.meteorist.Meteorist;
22+
23+
import java.util.Objects;
24+
25+
public class ItemSucker extends Module {
26+
private final SettingGroup sgGeneral = settings.getDefaultGroup();
27+
28+
private final Setting<Double> range = sgGeneral.add(new DoubleSetting.Builder()
29+
.name("range")
30+
.description("Range.")
31+
.defaultValue(3.5)
32+
.range(1, 10)
33+
.sliderRange(1, 128)
34+
.build()
35+
);
36+
37+
private final Setting<Boolean> boolSpeed = sgGeneral.add(new BoolSetting.Builder()
38+
.name("change-speed")
39+
.description("Change player moving speed.")
40+
.defaultValue(true)
41+
.build()
42+
);
43+
44+
private final Setting<Double> speed = sgGeneral.add(new DoubleSetting.Builder()
45+
.name("speed:")
46+
.description("Speed???")
47+
.defaultValue(20)
48+
.range(1, 30)
49+
.sliderRange(1, 75)
50+
.visible(boolSpeed::get)
51+
.build()
52+
);
53+
54+
boolean changeSpeed = false;
55+
BlockPos pos = null;
56+
57+
public ItemSucker() {
58+
super(Meteorist.CATEGORY, "item-sucker", "Sucks up all items on the ground.");
59+
}
60+
61+
//clear pos
62+
@Override
63+
public void onActivate() {pos = null;}
64+
@EventHandler
65+
private void onGameLeft(GameLeftEvent event) {pos = null;}
66+
67+
@EventHandler
68+
public void onMove(PlayerMoveEvent event) {
69+
if (changeSpeed) {
70+
Vec3d vel = PlayerUtils.getHorizontalVelocity(speed.get());
71+
double velX = vel.getX();
72+
double velZ = vel.getZ();
73+
((IVec3d) event.movement).set(velX, event.movement.y, velZ);
74+
}
75+
}
76+
77+
@EventHandler
78+
private void onTick(TickEvent.Pre event) {
79+
IBaritone baritone = BaritoneAPI.getProvider().getPrimaryBaritone();
80+
if (boolSpeed.get() && baritone.getPathingBehavior().isPathing()) changeSpeed = true;
81+
else if (boolSpeed.get() && !baritone.getPathingBehavior().isPathing()) changeSpeed = false;
82+
if (pos != null) {
83+
baritone.getCustomGoalProcess().setGoalAndPath(new GoalGetToBlock(pos.add(0, -1, 0)));
84+
if (mc.player.getBlockPos().getX() == pos.getX() && mc.player.getBlockPos().getZ() == pos.getZ()) pos = null;
85+
}
86+
for (Entity entity : mc.world.getEntities()) {
87+
if (Objects.equals(entity.getType().toString(), "entity.minecraft.item") && mc.player.distanceTo(entity) <= range.get()) {
88+
if (pos == null) pos = mc.player.getBlockPos();
89+
if (mc.player == null || mc.world == null) return;
90+
baritone.getCustomGoalProcess().setGoalAndPath(new GoalGetToBlock(entity.getBlockPos().add(0, -1, 0)));
91+
}
92+
}
93+
}
94+
//Вижу цель — иду в атаку, хруст костей, как тако, а
95+
}

0 commit comments

Comments
 (0)