Code improvements
This commit is contained in:
parent
fb62d1d780
commit
388659c988
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -5,7 +5,7 @@ import java.lang.annotation.Retention;
|
|||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.lang.annotation.Retention;
|
|||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package dev.resent.module.base;
|
||||
|
||||
public enum Category {
|
||||
HUD("Hud"),
|
||||
MOVEMENT("Movement"),
|
||||
MISC("Misc");
|
||||
|
||||
public final String name;
|
||||
|
||||
Category(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
|
@ -67,7 +67,17 @@ public abstract class Mod {
|
|||
if (this.enabled) onEnable(); else onDisable();
|
||||
}
|
||||
|
||||
public enum Category {
|
||||
HUD("Hud"),
|
||||
MOVEMENT("Movement"),
|
||||
MISC("Misc");
|
||||
|
||||
public final String name;
|
||||
|
||||
Category(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEnabled() { return enabled; }
|
||||
public String getName() { return name; }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
import dev.resent.util.misc.FuncUtils;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.util.misc.W;
|
||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.ui.Theme;
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
import net.minecraft.init.Items;
|
||||
|
|
|
@ -3,7 +3,7 @@ package dev.resent.module.impl.hud;
|
|||
import java.util.Collection;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
|
|
@ -3,7 +3,7 @@ package dev.resent.module.impl.hud;
|
|||
import java.text.DecimalFormat;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "Animations", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "AutoRespawn", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "Clear chat", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "Fast Crystal", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "NoDynamicFOV", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "FullBright", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "Minimal Bobbing", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "NoHurtCam", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "NoParticles", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "NoRain", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "NoSwingDelay", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "Self Nametag", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.misc;
|
||||
|
||||
import dev.resent.annotation.Module;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
|
||||
@Module(name = "Tooltips", category = Category.MISC)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package dev.resent.module.impl.movement;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.ui.Theme;
|
||||
|
|
|
@ -5,8 +5,7 @@ import net.minecraft.client.gui.FontRenderer;
|
|||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
public class ClientButton extends GuiButton
|
||||
{
|
||||
public class ClientButton extends GuiButton{
|
||||
public ClientButton(final int buttonId, final int x, final int y, final int widthIn, final int heightIn, final String buttonText) {
|
||||
super(buttonId, x, y, widthIn, heightIn, buttonText);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package dev.resent.ui;
|
|||
|
||||
import dev.resent.util.misc.GlUtils;
|
||||
import dev.resent.util.render.RenderUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
@ -14,20 +13,18 @@ public class PreGUI extends GuiScreen{
|
|||
@Override
|
||||
public void drawScreen(int i, int j, float var3) {
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0, 0.5f, 0);
|
||||
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
||||
Gui.drawModalRectWithCustomSizedTexture(GuiScreen.width/2-20, GuiScreen.height/2-50, 0, 0, 60, 60, 60, 60);
|
||||
|
||||
Gui.drawRect(GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50, isMouseInside(i, j, GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50) ? 0x40FFFFFF : 0x50FFFFFF);
|
||||
RenderUtils.drawRectOutline(GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50, 0x080FFFFFF);
|
||||
GlUtils.drawCenteredScaledString("Mods", GuiScreen.width/2+10, GuiScreen.height/2+35-mc.fontRendererObj.FONT_HEIGHT/2, -1, 1.25f);
|
||||
Gui.drawRect(GuiScreen.width/2-20, GuiScreen.height/2+20, GuiScreen.width/2+40, GuiScreen.height/2+50, isMouseInside(i, j, GuiScreen.width/2-20, GuiScreen.height/2+20, GuiScreen.width/2+40, GuiScreen.height/2+50) ? 0x40FFFFFF : 0x50FFFFFF);
|
||||
RenderUtils.drawRectOutline(GuiScreen.width/2-20, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50, 0x080FFFFFF);
|
||||
GlUtils.drawCenteredScaledString("Mods", GuiScreen.width/2+10, GuiScreen.height/2+35-mc.fontRendererObj.FONT_HEIGHT/2, -1, 1f);
|
||||
|
||||
/*drawRect(GuiScreen.width/2-30, GuiScreen.height/2+55, GuiScreen.width/2+50, GuiScreen.height/2+85, isMouseInside(i, j, GuiScreen.width/2-30, GuiScreen.height/2+55, GuiScreen.width/2+50, GuiScreen.height/2+85) ? 0x40FFFFFF : 0x50FFFFFF);
|
||||
RenderUtils.drawRectOutline(GuiScreen.width/2-30, GuiScreen.height/2+55, GuiScreen.width/2+50, GuiScreen.height/2+85, 0x080FFFFFF);
|
||||
RenderUtils.drawCenteredScaledString("Cosmetics", GuiScreen.width/2+10, GuiScreen.height/2+70-mc.fontRendererObj.FONT_HEIGHT/2, -1, 1.25f);*/
|
||||
super.drawScreen(i, j, var3);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,7 @@ public class GlUtils {
|
|||
public static void drawCenteredScaledString(String text, int param1,int param2, int color, float scale){
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(scale,scale,scale);
|
||||
Gui.drawCenteredString(Minecraft.getMinecraft().fontRendererObj, text, (int) (param1 / scale), (int) (param2 / scale), color, false);
|
||||
Gui.drawCenteredString(Minecraft.getMinecraft().fontRendererObj, text, (int) (param1 / scale), (int) (param2 / scale), color, true);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user