Null errors kys

This commit is contained in:
ThisIsALegitUsername 2022-12-29 03:29:58 +00:00
parent b68bd8a5ad
commit 3ea2e7943e
13 changed files with 65694 additions and 65547 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,7 @@
package dev.resent.ui.mods;
import dev.resent.Resent;
import dev.resent.module.base.ModManager;
import dev.resent.module.base.RenderModule;
import net.lax1dude.eaglercraft.v1_8.Keyboard;
import net.minecraft.client.gui.GuiButton;
@ -19,9 +20,10 @@ public class HUDConfigScreen extends GuiScreen {
public void drawScreen(int mx, int my, float par3) {
this.drawDefaultBackground();
for (int i = 0; i < Resent.INSTANCE.modManager.modules.size(); i++) {
if (Resent.INSTANCE.modManager.modules.get(i).isEnabled() && (Resent.INSTANCE.modManager.modules.get(i) instanceof RenderModule)) {
((RenderModule) Resent.INSTANCE.modManager.modules.get(i)).renderLayout(mx, my);
ModManager modManager = new ModManager();
for (int i = 0; i < modManager.modules.size(); i++) {
if (modManager.modules.get(i).isEnabled() && (modManager.modules.get(i) instanceof RenderModule)) {
((RenderModule)modManager.modules.get(i)).renderLayout(mx, my);
}
}
super.drawScreen(mx, my, par3);

View File

@ -24,6 +24,7 @@ import com.google.common.collect.Lists;
import dev.resent.Resent;
import dev.resent.event.impl.EventKey;
import dev.resent.module.base.ModManager;
import dev.resent.ui.mods.ClickGUI;
import dev.resent.util.misc.W;
import net.lax1dude.eaglercraft.v1_8.Display;
@ -1354,7 +1355,8 @@ public class Minecraft implements IThreadListener {
this.currentScreen.handleKeyboardInput();
} else {
Resent.INSTANCE.modManager.onKey(Keyboard.getEventKey());
ModManager modManager = new ModManager();
modManager.onKey(Keyboard.getEventKey());
if(Keyboard.getEventKey() == this.gameSettings.keyBindFreelook.keyCode)
W.freelook().smh();

View File

@ -13,6 +13,7 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import dev.resent.Resent;
import dev.resent.module.base.ModManager;
import dev.resent.ui.mods.HUDConfigScreen;
import dev.resent.util.misc.W;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
@ -127,6 +128,7 @@ public class GuiIngame extends Gui {
}
public void renderGameOverlay(float partialTicks) {
ModManager modManager = new ModManager();
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
int i = scaledresolution.getScaledWidth();
int j = scaledresolution.getScaledHeight();
@ -318,7 +320,7 @@ public class GuiIngame extends Gui {
}
if(!(mc.currentScreen instanceof HUDConfigScreen)){
Resent.INSTANCE.modManager.renderMods();
modManager.renderMods();
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableLighting();

View File

@ -593,7 +593,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
}
this.hurtCameraEffect(partialTicks);
if (this.mc.gameSettings.viewBobbing && !Resent.INSTANCE.modManager.minimalViewBobbing.isEnabled()) {
if (this.mc.gameSettings.viewBobbing && !ModManager.minimalViewBobbing.isEnabled()) {
this.setupViewBobbing(partialTicks);
}
@ -656,7 +656,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
GlStateManager.pushMatrix();
this.hurtCameraEffect(partialTicks);
if (this.mc.gameSettings.viewBobbing || Resent.INSTANCE.modManager.minimalViewBobbing.isEnabled()) {
if (this.mc.gameSettings.viewBobbing || ModManager.minimalViewBobbing.isEnabled()) {
this.setupViewBobbing(partialTicks);
}
@ -675,7 +675,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
this.hurtCameraEffect(partialTicks);
}
if (this.mc.gameSettings.viewBobbing || Resent.INSTANCE.modManager.minimalViewBobbing.isEnabled()) {
if (this.mc.gameSettings.viewBobbing || ModManager.minimalViewBobbing.isEnabled()) {
this.setupViewBobbing(partialTicks);
}