Big huge massive
This commit is contained in:
parent
faf09ffe75
commit
efdf795200
18 changed files with 235 additions and 58 deletions
|
@ -19,11 +19,11 @@ import java.util.ArrayList;
|
|||
@Mod(modid = "baseband")
|
||||
public class BaseBand {
|
||||
public static int majorVersion = 1;
|
||||
public static int buildNumber = 36;
|
||||
public static String hash = "8e0a4c8d1258df5b";
|
||||
public static int buildNumber = 41;
|
||||
public static String hash = "aea9b6582e08cb95";
|
||||
|
||||
public static String name = "BaseBand";
|
||||
public long timeOfCompile = 1694864679664L;
|
||||
public long timeOfCompile = 1694889454793L;
|
||||
public CommandManager commandRegistry;
|
||||
public EventBus eventBus;
|
||||
public static ConfigManager configManager = new ConfigManager("config.bb");;
|
||||
|
@ -57,6 +57,10 @@ public class BaseBand {
|
|||
modules.add(new ClickGUI());
|
||||
modules.add(new PacketFly());
|
||||
modules.add(new Speed());
|
||||
modules.add(new TPTracker());
|
||||
modules.add(new NoSlip());
|
||||
modules.add(new FastUse());
|
||||
modules.add(new ElytraFly());
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new FMLEventProcessor());
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Arrays;
|
|||
import java.util.Date;
|
||||
|
||||
public class Utils {
|
||||
public static void sendChatMessage(String e) {
|
||||
public static void sendChatMessageWithWatermark(String e) {
|
||||
if (BaseBand.isIngame()) {
|
||||
try {
|
||||
Minecraft.getMinecraft().player.sendMessage(new TextComponentString("[" + ChatFormatting.GREEN + BaseBand.name + ChatFormatting.RESET + "]" + " " + e));
|
||||
|
@ -20,6 +20,16 @@ public class Utils {
|
|||
}
|
||||
}
|
||||
|
||||
public static void sendChatMessage(String e) {
|
||||
if (BaseBand.isIngame()) {
|
||||
try {
|
||||
Minecraft.getMinecraft().player.sendMessage(new TextComponentString("BB> "+e));
|
||||
} catch (Exception ee) {
|
||||
ee.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void check() {
|
||||
//Check if user is banned
|
||||
|
|
|
@ -2,7 +2,8 @@ package com.baseband.client.command;
|
|||
|
||||
import com.baseband.client.command.commands.CreditsCommand;
|
||||
import com.baseband.client.command.commands.HelpCommand;
|
||||
import com.baseband.client.command.commands.ToggleCommand;
|
||||
import com.baseband.client.command.commands.GenericSetCommand;
|
||||
import com.baseband.client.command.commands.VersionCommand;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -21,6 +22,7 @@ public class CommandManager {
|
|||
public void registerCommands() {
|
||||
commands.add(new CreditsCommand());
|
||||
commands.add(new HelpCommand());
|
||||
commands.add(new ToggleCommand());
|
||||
commands.add(new GenericSetCommand());
|
||||
commands.add(new VersionCommand());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.baseband.client.command.Command;
|
|||
|
||||
public class CreditsCommand extends Command {
|
||||
public CreditsCommand() {
|
||||
super("credits");
|
||||
super("+CGMI");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,7 +13,8 @@ public class CreditsCommand extends Command {
|
|||
"\nBase and most of the loader written by JessSystemV, " +
|
||||
"\nJohn200410 helped with the loader, " +
|
||||
"\nTudbuT made the GUI, " +
|
||||
"\nDoogie13 provided the PacketFly.";
|
||||
"\nDoogie13 provided the PacketFly."+
|
||||
"\nOK";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
package com.baseband.client.command.commands;
|
||||
|
||||
import com.baseband.client.BaseBand;
|
||||
import com.baseband.client.command.Command;
|
||||
import com.baseband.client.module.Module;
|
||||
|
||||
public class GenericSetCommand extends Command {
|
||||
public GenericSetCommand() {
|
||||
super("+CIND=");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String run(String[] args) {
|
||||
if (args.length < 1) {
|
||||
return "Please specify an Operation.";
|
||||
}
|
||||
|
||||
if(args[0].equals("toggle") && args.length==2) {
|
||||
Module module = BaseBand.getModule(args[1]);
|
||||
if (module == null) {
|
||||
return "ERROR";
|
||||
}
|
||||
module.setEnabled(!module.isEnabled());
|
||||
return "OK";
|
||||
}
|
||||
|
||||
if(args[0].equals("bind") && args.length==3) {
|
||||
Module module = BaseBand.getModule(args[1]);
|
||||
if (module == null) {
|
||||
return "ERROR";
|
||||
}
|
||||
try {
|
||||
module.setKey(Integer.parseInt(args[2]));
|
||||
} catch (NumberFormatException e) {
|
||||
return "ERROR";
|
||||
}
|
||||
return "OK";
|
||||
}
|
||||
|
||||
return "ERROR";
|
||||
}
|
||||
}
|
|
@ -10,9 +10,8 @@ public class HelpCommand extends Command {
|
|||
|
||||
@Override
|
||||
public String run(String[] args) {
|
||||
return "BaseBand Rewrite " + "a" + BaseBand.majorVersion + "." + BaseBand.buildNumber + "+" + BaseBand.hash +
|
||||
"\nCopyright JessSystemV & TudbuT (2023)\n" +
|
||||
getCommandList() +
|
||||
return
|
||||
"\nCopyright JessSystemV & TudbuT (2023)" +
|
||||
"\nAll rights reserved.";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
package com.baseband.client.command.commands;
|
||||
|
||||
import com.baseband.client.BaseBand;
|
||||
import com.baseband.client.command.Command;
|
||||
import com.baseband.client.module.Module;
|
||||
|
||||
public class ToggleCommand extends Command {
|
||||
public ToggleCommand() {
|
||||
super("toggle");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String run(String[] args) {
|
||||
if (args.length != 1) {
|
||||
return "Please specify a module name.";
|
||||
}
|
||||
Module module = BaseBand.getModule(args[0]);
|
||||
if (module == null) {
|
||||
return "Cannot find module.";
|
||||
}
|
||||
module.setEnabled(!module.isEnabled());
|
||||
return module + " toggled. (" + module.isEnabled() + ")";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.baseband.client.command.commands;
|
||||
|
||||
import com.baseband.client.BaseBand;
|
||||
import com.baseband.client.Utils;
|
||||
import com.baseband.client.command.Command;
|
||||
|
||||
public class VersionCommand extends Command {
|
||||
public VersionCommand() {
|
||||
super("+CGMR");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String run(String[] args) {
|
||||
Utils.sendChatMessage("BaseBand Rewrite " + "a" + BaseBand.majorVersion + "." + BaseBand.buildNumber + "+" + BaseBand.hash );
|
||||
return "OK";
|
||||
}
|
||||
}
|
|
@ -13,22 +13,21 @@ import net.minecraftforge.fml.common.gameevent.InputEvent;
|
|||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class FMLEventProcessor {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onChat(ClientChatEvent event) {
|
||||
String message = event.getOriginalMessage();
|
||||
String message = event.getMessage();
|
||||
if (message.startsWith(CommandManager.commandPrefix)) {
|
||||
event.setCanceled(true);
|
||||
Minecraft.getMinecraft().ingameGUI.getChatGUI().addToSentMessages(message);
|
||||
|
||||
String[] split = message.substring(CommandManager.commandPrefix.length()).split(",");
|
||||
|
||||
String[] split = message.split(" ");
|
||||
|
||||
String name = split[0].replace(CommandManager.commandPrefix, "");
|
||||
String[] args = Arrays.copyOfRange(split, 1, split.length);
|
||||
String nameAndArgs = split[0];
|
||||
String[] nameAndArgsSplit = nameAndArgs.split("=");
|
||||
String name = nameAndArgsSplit[0];
|
||||
String[] args = nameAndArgsSplit.length > 1 ? nameAndArgsSplit[1].split(",") : new String[0];
|
||||
|
||||
Command cmd = null;
|
||||
|
||||
|
@ -42,7 +41,7 @@ public class FMLEventProcessor {
|
|||
if (cmd != null) {
|
||||
Utils.sendChatMessage(cmd.run(args));
|
||||
} else {
|
||||
Utils.sendChatMessage("Incorrect command.");
|
||||
Utils.sendChatMessage("ERROR. (CMD NOT FOUND)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.baseband.client.module.Module;
|
|||
import com.baseband.client.setting.Setting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import java.awt.*;
|
||||
|
@ -56,10 +55,11 @@ public class ModuleButton extends Button {
|
|||
return super.getHeight();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawButton(int mouseX, int mouseY, float partialTicks) {
|
||||
Gui.drawRect(getX(), getY(), getX() + getWidth(), getY() + getHeight(), Color.GREEN.getRGB());
|
||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(module.toString() + ":" + module.isEnabled(), getX() + (float) (getWidth() - Minecraft.getMinecraft().fontRenderer.getStringWidth(module.toString() + ":" + module.isEnabled())) / 2, getY() + (float) (getHeight() - Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT) / 2, 0xffffffff);
|
||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(module.toString() + ":" + module.isEnabled(), getX() + (float) (getWidth() - Minecraft.getMinecraft().fontRenderer.getStringWidth(module.toString() + ":" + module.isEnabled())) / 2, getY() + (float) (super.getHeight() - Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT) / 2, 0xffffffff);
|
||||
if(isExtended) {
|
||||
for (SettingButton s: settingButtons) {
|
||||
s.drawButton(mouseX, mouseY, partialTicks);
|
||||
|
@ -72,17 +72,17 @@ public class ModuleButton extends Button {
|
|||
public void onClick(int mouseX, int mouseY) {
|
||||
// Toggle showSubButtons when right-clicked
|
||||
if (isMouseOver(mouseX, mouseY)) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
if (Mouse.isButtonDown(1)) {
|
||||
this.isExtended = !this.isExtended;
|
||||
} else {
|
||||
for (SettingButton subButton : settingButtons) {
|
||||
subButton.onClick(mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
if (Mouse.isButtonDown(1)) {
|
||||
this.isExtended = !this.isExtended;
|
||||
} else {
|
||||
this.module.toggle();
|
||||
}
|
||||
} else {
|
||||
for (SettingButton subButton : settingButtons) {
|
||||
if (subButton.isMouseOver(mouseX, mouseY)) {
|
||||
subButton.onClick(mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class SettingButton extends Button {
|
|||
@Override
|
||||
public void drawButton(int mouseX, int mouseY, float partialTicks) {
|
||||
try {
|
||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(settingName + ":" + field.get(parent.module), getX() + (float) (getWidth() - Minecraft.getMinecraft().fontRenderer.getStringWidth(settingName + ":" + field.getType())) / 2, getY() + (float) (getHeight() - Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT) / 2, 0xffffffff);
|
||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(settingName + ":" + field.get(parent.module), getX() + (float) (getWidth() - Minecraft.getMinecraft().fontRenderer.getStringWidth(settingName + ":" + field.get(parent.module))) / 2, getY() + (float) (getHeight() - Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT) / 2, 0xffffffff);
|
||||
} catch (IllegalAccessException e) {
|
||||
// no
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.baseband.client.mixins;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
@Mixin(Minecraft.class)
|
||||
public interface IMinecraft {
|
||||
|
||||
@Accessor("rightClickDelayTimer")
|
||||
void setRightClickDelayTimer(int value);
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.baseband.client.module.modules;
|
||||
|
||||
import com.baseband.client.event.Subscribe;
|
||||
import com.baseband.client.event.events.SafeTickEvent;
|
||||
import com.baseband.client.module.Module;
|
||||
import net.minecraft.network.play.client.CPacketEntityAction;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class ElytraFly extends Module {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ElytraFly";
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void safeTick(SafeTickEvent e) {
|
||||
if(mc.player.isInWater()) {
|
||||
Objects.requireNonNull(mc.getConnection()).sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
|
||||
return;
|
||||
}
|
||||
|
||||
if(mc.player.rotationPitch < 10){
|
||||
return;
|
||||
}
|
||||
|
||||
if(mc.gameSettings.keyBindJump.isKeyDown()) {
|
||||
float yaw = (float)Math
|
||||
.toRadians(mc.player.rotationYaw);
|
||||
mc.player.motionX -= MathHelper.sin(yaw) * 0.05F;
|
||||
mc.player.motionZ += MathHelper.cos(yaw) * 0.05F;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.baseband.client.module.modules;
|
||||
|
||||
import com.baseband.client.event.Subscribe;
|
||||
import com.baseband.client.event.events.SafeTickEvent;
|
||||
import com.baseband.client.mixins.IMinecraft;
|
||||
import com.baseband.client.module.Module;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class FastUse extends Module {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FastUse";
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void safeTick(SafeTickEvent event) {
|
||||
((IMinecraft)Minecraft.getMinecraft()).setRightClickDelayTimer(0);
|
||||
}
|
||||
}
|
|
@ -22,11 +22,11 @@ public class HUD extends Module {
|
|||
@SubscribeEvent
|
||||
public void text(RenderGameOverlayEvent.Text e) {
|
||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
fr.drawStringWithShadow("BaseBand "+ "a"+BaseBand.majorVersion+"."+ BaseBand.buildNumber + "+" + BaseBand.hash, 2, 2, Color.GREEN.getRGB());
|
||||
fr.drawStringWithShadow("BaseBand "+ "a"+BaseBand.majorVersion+"."+ BaseBand.buildNumber + "+" + BaseBand.hash, 2, 2, Color.WHITE.getRGB());
|
||||
int y = 2+fr.FONT_HEIGHT;
|
||||
for (Module m : BaseBand.INSTANCE.modules) {
|
||||
if(m.isEnabled()) {
|
||||
fr.drawStringWithShadow(m.toString(), 2, y, Color.GREEN.getRGB());
|
||||
fr.drawStringWithShadow(m.toString(), 2, y, Color.WHITE.getRGB());
|
||||
y=y+fr.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.baseband.client.module.modules;
|
||||
|
||||
import com.baseband.client.event.Subscribe;
|
||||
import com.baseband.client.event.events.SafeTickEvent;
|
||||
import com.baseband.client.module.Module;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class NoSlip extends Module {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NoSlip";
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void tick(SafeTickEvent e) {
|
||||
Blocks.ICE.slipperiness = 0f;
|
||||
Blocks.PACKED_ICE.slipperiness = 0f;
|
||||
Blocks.FROSTED_ICE.slipperiness = 0f;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.baseband.client.module.modules;
|
||||
|
||||
import com.baseband.client.Utils;
|
||||
import com.baseband.client.event.Subscribe;
|
||||
import com.baseband.client.event.events.SafeTickEvent;
|
||||
import com.baseband.client.module.Module;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class TPTracker extends Module {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TPTracker";
|
||||
}
|
||||
|
||||
private Map<Entity, Vec3d> knownPlayers = new HashMap<>();
|
||||
|
||||
@Subscribe
|
||||
public void safeTick(SafeTickEvent event) {
|
||||
ArrayList<Entity> tickEntityList = (ArrayList<Entity>) mc.world.getLoadedEntityList();
|
||||
for (Entity e : tickEntityList) {
|
||||
if (!(e instanceof EntityPlayer) || e.getName().equals(mc.player.getName())) continue;
|
||||
Vec3d targetPos = new Vec3d(e.posX, e.posY, e.posZ);
|
||||
if (this.knownPlayers.containsKey(e)) {
|
||||
if (Math.abs(mc.player.getPositionVector().distanceTo(targetPos)) >= 128.0 && this.knownPlayers.get(e).distanceTo(targetPos) >= 64.0) {
|
||||
Utils.sendChatMessage("PLAYER " + e.getName() + " TELEPORTED TO "+ targetPos);
|
||||
}
|
||||
this.knownPlayers.put(e, targetPos);
|
||||
continue;
|
||||
}
|
||||
this.knownPlayers.put(e, targetPos);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,10 +5,11 @@
|
|||
"minVersion": "0",
|
||||
"refmap": "mixins.baseband.refmap.json",
|
||||
"mixins": [
|
||||
"ISPacketPlayerPosLook",
|
||||
"MixinEntityPlayerSP",
|
||||
"MixinForgeBus",
|
||||
"MixinMinecraft",
|
||||
"MixinNetworkManager",
|
||||
"MixinEntityPlayerSP",
|
||||
"ISPacketPlayerPosLook"
|
||||
"IMinecraft"
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue