-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
284 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
org.gradle.jvmargs=-Xmx2G | ||
|
||
# Fabric Properties (https://fabricmc.net/versions.html) | ||
minecraft_version=1.19.2 | ||
yarn_mappings=1.19.2+build.8 | ||
minecraft_version=1.19.3 | ||
yarn_mappings=1.19.3+build.3 | ||
loader_version=0.14.9 | ||
|
||
# Mod Properties | ||
mod_version=1.4 | ||
mod_version=1.4.1 | ||
maven_group=zgoly | ||
archives_base_name=meteorist | ||
|
||
# Meteor (https://maven.meteordev.org/) | ||
meteor_version=0.5.1-SNAPSHOT | ||
meteor_version=0.5.2-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
/* | ||
TODO: fix & add to Meteorist | ||
*/ | ||
package zgoly.meteorist.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.Categories; | ||
import meteordevelopment.meteorclient.systems.modules.Module; | ||
import meteordevelopment.meteorclient.utils.Utils; | ||
import meteordevelopment.orbit.EventHandler; | ||
import net.minecraft.client.gui.screen.DisconnectedScreen; | ||
import net.minecraft.text.Text; | ||
import org.apache.commons.lang3.RandomStringUtils; | ||
|
||
import java.util.List; | ||
|
||
public class DmSpam extends Module { | ||
private final SettingGroup sgGeneral = settings.getDefaultGroup(); | ||
|
||
private final Setting<String> command = sgGeneral.add(new StringSetting.Builder() | ||
.name("messages") | ||
.description("The command.") | ||
.defaultValue("/msg ") | ||
.build() | ||
); | ||
|
||
private final Setting<List<String>> messages = sgGeneral.add(new StringListSetting.Builder() | ||
.name("messages") | ||
.description("Messages to use for spam.") | ||
.defaultValue(List.of("Hi!")) | ||
.build() | ||
); | ||
|
||
private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder() | ||
.name("delay") | ||
.description("The delay between specified messages in ticks.") | ||
.defaultValue(20) | ||
.min(0) | ||
.sliderMax(200) | ||
.build() | ||
); | ||
|
||
private final Setting<Boolean> disableOnLeave = sgGeneral.add(new BoolSetting.Builder() | ||
.name("disable-on-leave") | ||
.description("Disables spam when you leave a server.") | ||
.defaultValue(true) | ||
.build() | ||
); | ||
|
||
|
||
private final Setting<Boolean> disableOnDisconnect = sgGeneral.add(new BoolSetting.Builder() | ||
.name("disable-on-disconnect") | ||
.description("Disables spam when you are disconnected from a server.") | ||
.defaultValue(true) | ||
.build() | ||
); | ||
|
||
private final Setting<Boolean> random = sgGeneral.add(new BoolSetting.Builder() | ||
.name("randomise") | ||
.description("Selects a random message from your spam message list.") | ||
.defaultValue(false) | ||
.build() | ||
); | ||
|
||
private final Setting<Boolean> bypass = sgGeneral.add(new BoolSetting.Builder() | ||
.name("bypass") | ||
.description("Add random text at the end of the message to try to bypass anti spams.") | ||
.defaultValue(false) | ||
.build() | ||
); | ||
|
||
private final Setting<Integer> length = sgGeneral.add(new IntSetting.Builder() | ||
.name("length") | ||
.description("Number of characters used to bypass anti spam.") | ||
.visible(bypass::get) | ||
.defaultValue(16) | ||
.sliderRange(1, 256) | ||
.build() | ||
); | ||
|
||
private int messageI, timer; | ||
|
||
public DmSpam() { | ||
super(Categories.Misc, "dm-spam", "Spams messages in players direct messages."); | ||
} | ||
|
||
@Override | ||
public void onActivate() { | ||
timer = delay.get(); | ||
messageI = 0; | ||
} | ||
|
||
@EventHandler | ||
private void onScreenOpen(OpenScreenEvent event) { | ||
if (disableOnDisconnect.get() && event.screen instanceof DisconnectedScreen) { | ||
toggle(); | ||
} | ||
} | ||
|
||
@EventHandler | ||
private void onGameLeft(GameLeftEvent event) { | ||
if (disableOnLeave.get()) toggle(); | ||
} | ||
|
||
@EventHandler | ||
private void onTick(TickEvent.Post event) { | ||
mc.player.sendMessage(Text.of(mc.world.getPlayers().toString())); | ||
if (messages.get().isEmpty()) return; | ||
|
||
if (timer <= 0) { | ||
int i; | ||
if (random.get()) { | ||
i = Utils.random(0, messages.get().size()); | ||
} | ||
else { | ||
if (messageI >= messages.get().size()) messageI = 0; | ||
i = messageI++; | ||
} | ||
|
||
String text = command.get() + messages.get().get(i); | ||
if (bypass.get()) { | ||
text += " " + RandomStringUtils.randomAlphabetic(length.get()).toLowerCase(); | ||
} | ||
mc.getNetworkHandler().sendChatCommand(text); | ||
timer = delay.get(); | ||
} | ||
else { | ||
timer--; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
//By Zgoly | ||
|
||
package zgoly.meteorist.modules; | ||
|
||
import meteordevelopment.meteorclient.gui.GuiTheme; | ||
import meteordevelopment.meteorclient.gui.screens.settings.BlockSettingScreen; | ||
import meteordevelopment.meteorclient.gui.widgets.WItem; | ||
import meteordevelopment.meteorclient.gui.widgets.WWidget; | ||
import meteordevelopment.meteorclient.gui.widgets.containers.WSection; | ||
import meteordevelopment.meteorclient.gui.widgets.containers.WTable; | ||
import meteordevelopment.meteorclient.gui.widgets.containers.WVerticalList; | ||
import meteordevelopment.meteorclient.gui.widgets.input.WIntEdit; | ||
import meteordevelopment.meteorclient.gui.widgets.pressable.WButton; | ||
import meteordevelopment.meteorclient.gui.widgets.pressable.WMinus; | ||
import meteordevelopment.meteorclient.gui.widgets.pressable.WPlus; | ||
import meteordevelopment.meteorclient.settings.BlockSetting; | ||
import meteordevelopment.meteorclient.settings.IntSetting; | ||
import meteordevelopment.meteorclient.settings.Setting; | ||
import meteordevelopment.meteorclient.settings.SettingGroup; | ||
import meteordevelopment.meteorclient.systems.modules.Module; | ||
import net.minecraft.block.Blocks; | ||
import net.minecraft.item.Items; | ||
import zgoly.meteorist.Meteorist; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class Placer extends Module { | ||
List<Object> list = new ArrayList<>(); | ||
private final SettingGroup sgGeneral = settings.getDefaultGroup(); | ||
|
||
|
||
private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder() | ||
.name("delay") | ||
.description("Delay after sending a command in ticks (20 ticks = 1 sec).") | ||
.defaultValue(20) | ||
.range(1, 1200) | ||
.sliderRange(1, 40) | ||
.build() | ||
); | ||
|
||
// It would be nice to get help for saving / loading because I don't know how to do it; other things should be easier | ||
/* | ||
TODO: add auto save / load for table using `NbtCompound toTag()` and `Module fromTag(NbtCompound tag)` | ||
- add functionality | ||
- add placing holograms, when player rotated in right direction, placing holograms should also rotate | ||
*/ | ||
|
||
public void createRow(GuiTheme theme, WTable table) { | ||
int min = -128; | ||
int max = 128; | ||
WIntEdit x1 = table.add(theme.intEdit(0, min, max, true)).expandX().widget(); | ||
WIntEdit y1 = table.add(theme.intEdit(0, min, max, true)).expandX().widget(); | ||
WIntEdit z1 = table.add(theme.intEdit(0, min, max, true)).expandX().widget(); | ||
WIntEdit x2 = table.add(theme.intEdit(0, min, max, true)).expandX().widget(); | ||
WIntEdit y2 = table.add(theme.intEdit(0, min, max, true)).expandX().widget(); | ||
WIntEdit z2 = table.add(theme.intEdit(0, min, max, true)).expandX().widget(); | ||
WItem item = table.add(theme.item(Items.AIR.getDefaultStack())).expandX().widget(); | ||
WButton blockSelect = table.add(theme.button("Select Block")).expandX().widget(); | ||
blockSelect.action = () -> mc.setScreen(new BlockSettingScreen(theme, new BlockSetting( | ||
"", "", Blocks.AIR, block -> item.set(block.asItem().getDefaultStack()), null, null, null | ||
))); | ||
WButton sideColor = table.add(theme.button("Side Color")).expandX().widget(); | ||
WButton lineColor = table.add(theme.button("Line Color")).expandX().widget(); | ||
WMinus minus = table.add(theme.minus()).widget(); | ||
minus.action = () -> { | ||
if (!table.getRow(1).isEmpty()) { | ||
table.removeRow(1); | ||
} | ||
}; | ||
table.row(); | ||
} | ||
|
||
@Override | ||
public WWidget getWidget(GuiTheme theme) { | ||
WVerticalList list = theme.verticalList(); | ||
WSection blocksSection = list.add(theme.section("Blocks")).expandX().widget(); | ||
WTable table = blocksSection.add(theme.table()).expandX().widget(); | ||
WPlus plus = table.add(theme.plus()).centerX().widget(); | ||
plus.action = () -> createRow(theme, table); | ||
table.row(); | ||
return list; | ||
} | ||
|
||
|
||
public Placer() { | ||
super(Meteorist.CATEGORY, "placer", "Places blocks in range."); | ||
} | ||
} |
Oops, something went wrong.