Mod class optimizations

This commit is contained in:
ThisIsALegitUsername 2023-02-02 16:05:40 +00:00
parent 2d06a594c3
commit 8ed63fd115
4 changed files with 2701 additions and 27420 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,6 @@ import dev.resent.module.Theme;
import dev.resent.module.setting.Setting;
import dev.resent.util.render.RenderUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
public class Mod {
@ -30,7 +29,7 @@ public class Mod {
this.name = modInfo.name();
this.category = modInfo.category();
this.hasSetting = modInfo.hasSetting();
}
}
}
public Mod(String name, Category cat) {
@ -61,11 +60,7 @@ public class Mod {
}
protected void drawRect(int left, int top, int right, int bottom, int color){
if(Theme.getRounded()){
RenderUtils.drawRoundedRect(left, top, right, bottom, 4, color);
}else {
Gui.drawRect(left, top, right, bottom, color);
}
RenderUtils.drawRoundedRect(left, top, right, bottom, 4, color, Theme.getRounded());
}
protected int drawString(String text, int x, int y, int color, boolean idk){

View File

@ -31,7 +31,7 @@ public class RenderUtils {
final float f4 = (color & 0xFF) / 255.0f;
GlStateManager.color(f2, f3, f4, f1);
if(rounded[0]){
drawRoundedRect(paramInt1, paramInt2, paramInt3, paramInt4, radius);
drawRoundedRect(paramInt1, paramInt2, paramInt3, paramInt4, radius);
}else {
Gui.drawRect((int)paramInt1, (int)paramInt2, (int)paramInt3, (int)paramInt4, color);
}