Misc fixes, Update HUD spacing, Fix module event registering on config load
This commit is contained in:
parent
0314638e06
commit
a3ab8b7238
9 changed files with 25 additions and 13 deletions
|
@ -19,8 +19,8 @@ import java.util.ArrayList;
|
|||
@Mod(modid = "baseband")
|
||||
public class BaseBand {
|
||||
public static int majorVersion = 1;
|
||||
public static int buildNumber = 20;
|
||||
public static String hash = "f325a4029ca608e5";
|
||||
public static int buildNumber = 22;
|
||||
public static String hash = "2383d2e8a45e198d";
|
||||
|
||||
public static String name = "BaseBand";
|
||||
public long timeOfCompile = 1694681365260L;
|
||||
|
@ -55,7 +55,6 @@ public class BaseBand {
|
|||
modules.add(new PacketTest());
|
||||
modules.add(new HUD());
|
||||
modules.add(new ClickGUI());
|
||||
modules.add(new PacketTest());
|
||||
modules.add(new PacketFly());
|
||||
modules.add(new Speed());
|
||||
|
||||
|
@ -64,9 +63,12 @@ public class BaseBand {
|
|||
try {
|
||||
configManager.load();
|
||||
for (Module m : modules) {
|
||||
m.setup();
|
||||
if(m.isEnabled()) {
|
||||
MinecraftForge.EVENT_BUS.register(m);
|
||||
eventBus.register(m);
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
} catch(Exception e) {
|
||||
configManager.save();
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ public class GuiBB extends GuiScreen {
|
|||
}
|
||||
for (int i = 0; i < BaseBand.INSTANCE.modules.size(); i++) {
|
||||
if (buttons[i] != null)
|
||||
buttons[i].text.set(BaseBand.INSTANCE.modules.get(i).getClass().getSimpleName() + ": " + BaseBand.INSTANCE.modules.get(i).isEnabled());
|
||||
buttons[i].text.set(BaseBand.INSTANCE.modules.get(i).toString() + ": " + BaseBand.INSTANCE.modules.get(i).isEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,11 +25,16 @@ public class ClickGUI extends Module {
|
|||
@Override
|
||||
protected int defaultKey() { return Keyboard.KEY_PERIOD; }
|
||||
|
||||
GuiBB guiBB;
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void tick(SafeTickEvent e) {
|
||||
Minecraft.getMinecraft().displayGuiScreen(null);
|
||||
Minecraft.getMinecraft().displayGuiScreen(new GuiBB());
|
||||
if(guiBB==null) {
|
||||
guiBB = new GuiBB();
|
||||
}
|
||||
Minecraft.getMinecraft().displayGuiScreen(guiBB);
|
||||
//TODO: this existed but it was just the old V/Line gui, *do me proud tud!* :3
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class HUD extends Module {
|
|||
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());
|
||||
int y = 12;
|
||||
int y = 2+fr.FONT_HEIGHT;
|
||||
for (Module m : BaseBand.INSTANCE.modules) {
|
||||
if(m.isEnabled()) {
|
||||
fr.drawStringWithShadow(m.toString(), 2, y, Color.GREEN.getRGB());
|
||||
|
|
|
@ -32,7 +32,7 @@ public class PacketFly extends Module {
|
|||
@Save
|
||||
@Setting("Factor")
|
||||
@FloatMeta("0.1..5.0@1.3")
|
||||
Float factor = 1.3f;
|
||||
float factor = 1.3f;
|
||||
|
||||
@Save
|
||||
@Setting("Bound")
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.network.play.server.SPacketEntityVelocity;
|
|||
import net.minecraft.network.play.server.SPacketExplosion;
|
||||
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import tudbut.obj.Save;
|
||||
|
||||
public class Speed extends Module {
|
||||
|
||||
|
@ -22,10 +23,12 @@ public class Speed extends Module {
|
|||
|
||||
//final ModeSetting bunnyMode = register(new ModeSetting("NCP Mode", "Normal", Arrays.asList("Normal", "Updated")).setDescription("How to accelerate when jumping"));
|
||||
|
||||
@Save
|
||||
@Setting("Boost")
|
||||
boolean boost = false;
|
||||
|
||||
|
||||
@Save
|
||||
@Setting("Factor")
|
||||
@FloatMeta("0.0..1.0@0")
|
||||
Float boostReduction = 1.3f;
|
||||
|
|
|
@ -17,4 +17,5 @@ Herocode Settings System with da Types
|
|||
Peanut Butter Jelly da Long Wei
|
||||
I will drive Snoopie's face 3 meters into the ground
|
||||
DRM Free!
|
||||
DRM Full!
|
||||
DRM Full!
|
||||
Can you penetrate mine? -John200410
|
|
@ -21,9 +21,9 @@ public class Tweaker implements ITweaker {
|
|||
|
||||
|
||||
public static void log(String message) {
|
||||
log.info("--------------------------------------------------------------");
|
||||
log.info("-------------------------");
|
||||
log.info(message);
|
||||
log.info("--------------------------------------------------------------");
|
||||
log.info("-------------------------");
|
||||
}
|
||||
|
||||
public Tweaker() {
|
||||
|
|
|
@ -47,7 +47,8 @@ public class Loader {
|
|||
if (username.length() > 20 || password.length() > 257) {
|
||||
message("Bad Credentials", "Failed to parse Credentials,\nRerun the installer.", JOptionPane.ERROR_MESSAGE, true);
|
||||
}
|
||||
Tweaker.log("Found Username: ["+username+"]\nPassword: ["+encryptedPass+"]");
|
||||
Tweaker.log("Found Username: ["+username+"]");
|
||||
Tweaker.log("Password: ["+encryptedPass+"]");
|
||||
} else{
|
||||
message("Cannot find Credientials", "Failed to find Credentials,\nRerun the installer.", JOptionPane.ERROR_MESSAGE, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue