BETA RELEASED
This commit is contained in:
parent
3ea2e7943e
commit
ccd500c6bb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
MakeOfflineDownload.sh
Normal file → Executable file
0
MakeOfflineDownload.sh
Normal file → Executable file
170432
javascript/classes.js
170432
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,16 @@
|
||||||
package dev.resent;
|
package dev.resent;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import dev.resent.event.impl.Event;
|
import dev.resent.event.impl.Event;
|
||||||
|
import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
|
import dev.resent.module.base.RenderModule;
|
||||||
|
import dev.resent.setting.BooleanSetting;
|
||||||
|
import dev.resent.setting.ModeSetting;
|
||||||
|
import dev.resent.setting.Setting;
|
||||||
import net.kyori.event.EventBus;
|
import net.kyori.event.EventBus;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
|
@ -25,6 +34,71 @@ public class Resent {
|
||||||
//modManager = new ModManager();
|
//modManager = new ModManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void saveSettings(PrintWriter printwriter){
|
||||||
|
for(Mod m : modManager.modules){
|
||||||
|
|
||||||
|
List<RenderModule> rmodules = new ArrayList<>();
|
||||||
|
if(m instanceof RenderModule){ rmodules.add((RenderModule)m); }
|
||||||
|
|
||||||
|
for(RenderModule rmod : rmodules){
|
||||||
|
printwriter.println(rmod.name+"x:"+rmod.x);
|
||||||
|
printwriter.println(rmod.name+"y:"+rmod.y);
|
||||||
|
printwriter.println(rmod.name+"lastx:"+rmod.lastX);
|
||||||
|
printwriter.println(rmod.name+"lastx:"+rmod.lastX);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(Setting s : m.settings){
|
||||||
|
if(s instanceof ModeSetting){
|
||||||
|
printwriter.println(m.name+"modesetting"+s.name+":"+((ModeSetting) s).getValue());
|
||||||
|
}
|
||||||
|
if(s instanceof BooleanSetting){
|
||||||
|
printwriter.println(m.name+"boolsetting"+s.name+":"+((BooleanSetting) s).getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printwriter.println(m.name + ":" + m.enabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadSettings(String[] astring){
|
||||||
|
modManager = new ModManager();
|
||||||
|
for(Mod m : modManager.modules){
|
||||||
|
|
||||||
|
List<RenderModule> rmodules = new ArrayList<>();
|
||||||
|
if(m instanceof RenderModule){ rmodules.add((RenderModule)m); }
|
||||||
|
|
||||||
|
for(RenderModule rmod : rmodules){
|
||||||
|
if(astring[0].equals(rmod.name+"x")){
|
||||||
|
rmod.x=Integer.parseInt(astring[1]);
|
||||||
|
}
|
||||||
|
if(astring[0].equals(rmod.name+"y")){
|
||||||
|
rmod.y=Integer.parseInt(astring[1]);
|
||||||
|
}
|
||||||
|
if(astring[0].equals(rmod.name+"lastx")){
|
||||||
|
rmod.lastX=Integer.parseInt(astring[1]);
|
||||||
|
}
|
||||||
|
if(astring[0].equals(rmod.name+"lasty")){
|
||||||
|
rmod.lastY=Integer.parseInt(astring[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(Setting se : m.settings){
|
||||||
|
if(se instanceof ModeSetting){
|
||||||
|
if(astring[0].equals(m.name+"modesetting"+se.name)){
|
||||||
|
((ModeSetting)se).setValue(astring[1]);
|
||||||
|
}
|
||||||
|
if(astring[0].equals(m.name+"boolsetting"+se.name)){
|
||||||
|
((BooleanSetting)se).setValue(astring[1].equals("true"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(astring[0].equals(m.name)){
|
||||||
|
m.setEnabled(astring[1].equals("true"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public EventBus<Event> events() {
|
public EventBus<Event> events() {
|
||||||
return eventBus;
|
return eventBus;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import java.io.IOException;
|
||||||
|
|
||||||
import dev.resent.Resent;
|
import dev.resent.Resent;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import dev.resent.setting.BooleanSetting;
|
import dev.resent.setting.BooleanSetting;
|
||||||
import dev.resent.setting.ModeSetting;
|
import dev.resent.setting.ModeSetting;
|
||||||
import dev.resent.setting.Setting;
|
import dev.resent.setting.Setting;
|
||||||
|
@ -22,7 +21,6 @@ import net.minecraft.util.MathHelper;
|
||||||
public class ClickGUI extends GuiScreen {
|
public class ClickGUI extends GuiScreen {
|
||||||
|
|
||||||
public Mod modWatching = null;
|
public Mod modWatching = null;
|
||||||
public ModManager modManager;
|
|
||||||
public ScaledResolution sr;
|
public ScaledResolution sr;
|
||||||
public int x, y, width, height;
|
public int x, y, width, height;
|
||||||
public int offset = 0;
|
public int offset = 0;
|
||||||
|
@ -43,7 +41,7 @@ public class ClickGUI extends GuiScreen {
|
||||||
y = sr.getScaledHeight() / (int) 1.1 - 10 + xy;
|
y = sr.getScaledHeight() / (int) 1.1 - 10 + xy;
|
||||||
int off = 0;
|
int off = 0;
|
||||||
|
|
||||||
for (Mod m: modManager.modules) {
|
for (Mod m: Resent.INSTANCE.modManager.modules) {
|
||||||
int fh = fr.FONT_HEIGHT;
|
int fh = fr.FONT_HEIGHT;
|
||||||
|
|
||||||
if (isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 - 1 - offset, this.x + 90 + xo - 1 + 21, height + 30 - fh * (-off) + 30 - 1 + 2 - 1 - offset) && m.hasSetting) {
|
if (isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 - 1 - offset, this.x + 90 + xo - 1 + 21, height + 30 - fh * (-off) + 30 - 1 + 2 - 1 - offset) && m.hasSetting) {
|
||||||
|
@ -102,7 +100,6 @@ public class ClickGUI extends GuiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mouseX, int mouseY, float par3) {
|
public void drawScreen(int mouseX, int mouseY, float par3) {
|
||||||
modManager = new ModManager();
|
|
||||||
sr = new ScaledResolution(mc);
|
sr = new ScaledResolution(mc);
|
||||||
offset = MathHelper.clamp_int(MathHelper.clamp_int(offset, 0, getListMaxScroll()), 0, getListMaxScroll());
|
offset = MathHelper.clamp_int(MathHelper.clamp_int(offset, 0, getListMaxScroll()), 0, getListMaxScroll());
|
||||||
int xo = 0;
|
int xo = 0;
|
||||||
|
@ -138,7 +135,7 @@ public class ClickGUI extends GuiScreen {
|
||||||
// white line
|
// white line
|
||||||
Gui.drawRect(x - 8, height + 29, width + 33, height + 30, -1);
|
Gui.drawRect(x - 8, height + 29, width + 33, height + 30, -1);
|
||||||
|
|
||||||
for (Mod m : modManager.modules) {
|
for (Mod m : Resent.INSTANCE.modManager.modules) {
|
||||||
if (this.modWatching == null) {
|
if (this.modWatching == null) {
|
||||||
int fh = fr.FONT_HEIGHT;
|
int fh = fr.FONT_HEIGHT;
|
||||||
if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29
|
if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package dev.resent.ui.mods;
|
package dev.resent.ui.mods;
|
||||||
|
|
||||||
import dev.resent.Resent;
|
import dev.resent.Resent;
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import dev.resent.module.base.RenderModule;
|
import dev.resent.module.base.RenderModule;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
|
@ -20,10 +19,9 @@ public class HUDConfigScreen extends GuiScreen {
|
||||||
|
|
||||||
public void drawScreen(int mx, int my, float par3) {
|
public void drawScreen(int mx, int my, float par3) {
|
||||||
this.drawDefaultBackground();
|
this.drawDefaultBackground();
|
||||||
ModManager modManager = new ModManager();
|
for (int i = 0; i < Resent.INSTANCE.modManager.modules.size(); i++) {
|
||||||
for (int i = 0; i < modManager.modules.size(); i++) {
|
if (Resent.INSTANCE.modManager.modules.get(i).isEnabled() && (Resent.INSTANCE.modManager.modules.get(i) instanceof RenderModule)) {
|
||||||
if (modManager.modules.get(i).isEnabled() && (modManager.modules.get(i) instanceof RenderModule)) {
|
((RenderModule)Resent.INSTANCE.modManager.modules.get(i)).renderLayout(mx, my);
|
||||||
((RenderModule)modManager.modules.get(i)).renderLayout(mx, my);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.drawScreen(mx, my, par3);
|
super.drawScreen(mx, my, par3);
|
||||||
|
|
|
@ -1355,8 +1355,7 @@ public class Minecraft implements IThreadListener {
|
||||||
this.currentScreen.handleKeyboardInput();
|
this.currentScreen.handleKeyboardInput();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ModManager modManager = new ModManager();
|
Resent.INSTANCE.modManager.onKey(Keyboard.getEventKey());
|
||||||
modManager.onKey(Keyboard.getEventKey());
|
|
||||||
if(Keyboard.getEventKey() == this.gameSettings.keyBindFreelook.keyCode)
|
if(Keyboard.getEventKey() == this.gameSettings.keyBindFreelook.keyCode)
|
||||||
W.freelook().smh();
|
W.freelook().smh();
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
package net.minecraft.client.gui;
|
package net.minecraft.client.gui;
|
||||||
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_DST_COLOR;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_COLOR;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import dev.resent.Resent;
|
import dev.resent.Resent;
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import dev.resent.ui.mods.HUDConfigScreen;
|
|
||||||
import dev.resent.util.misc.W;
|
import dev.resent.util.misc.W;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -128,7 +129,6 @@ public class GuiIngame extends Gui {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderGameOverlay(float partialTicks) {
|
public void renderGameOverlay(float partialTicks) {
|
||||||
ModManager modManager = new ModManager();
|
|
||||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||||
int i = scaledresolution.getScaledWidth();
|
int i = scaledresolution.getScaledWidth();
|
||||||
int j = scaledresolution.getScaledHeight();
|
int j = scaledresolution.getScaledHeight();
|
||||||
|
@ -319,9 +319,7 @@ public class GuiIngame extends Gui {
|
||||||
this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1);
|
this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(mc.currentScreen instanceof HUDConfigScreen)){
|
Resent.INSTANCE.modManager.renderMods();
|
||||||
modManager.renderMods();
|
|
||||||
}
|
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
|
|
|
@ -17,8 +17,8 @@ import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
|
import dev.resent.Resent;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import dev.resent.module.base.RenderModule;
|
import dev.resent.module.base.RenderModule;
|
||||||
import dev.resent.setting.BooleanSetting;
|
import dev.resent.setting.BooleanSetting;
|
||||||
import dev.resent.setting.ModeSetting;
|
import dev.resent.setting.ModeSetting;
|
||||||
|
@ -683,14 +683,12 @@ public class GameSettings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModManager modManager;
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Loads the options from the options file. It appears that this
|
* Loads the options from the options file. It appears that this
|
||||||
* has replaced the previous 'loadOptions'
|
* has replaced the previous 'loadOptions'
|
||||||
*/
|
*/
|
||||||
public void loadOptions() {
|
public void loadOptions() {
|
||||||
modManager = new ModManager();
|
|
||||||
try {
|
try {
|
||||||
byte[] options = EagRuntime.getStorage("g");
|
byte[] options = EagRuntime.getStorage("g");
|
||||||
if (options == null) {
|
if (options == null) {
|
||||||
|
@ -706,41 +704,7 @@ public class GameSettings {
|
||||||
try {
|
try {
|
||||||
String[] astring = s.split(":");
|
String[] astring = s.split(":");
|
||||||
|
|
||||||
for(Mod m : modManager.modules){
|
Resent.INSTANCE.loadSettings(astring);
|
||||||
|
|
||||||
List<RenderModule> rmodules = new ArrayList<>();
|
|
||||||
if(m instanceof RenderModule){ rmodules.add((RenderModule)m); }
|
|
||||||
|
|
||||||
for(RenderModule rmod : rmodules){
|
|
||||||
if(astring[0].equals(rmod.name+"x")){
|
|
||||||
rmod.x=Integer.parseInt(astring[1]);
|
|
||||||
}
|
|
||||||
if(astring[0].equals(rmod.name+"y")){
|
|
||||||
rmod.y=Integer.parseInt(astring[1]);
|
|
||||||
}
|
|
||||||
if(astring[0].equals(rmod.name+"lastx")){
|
|
||||||
rmod.lastX=Integer.parseInt(astring[1]);
|
|
||||||
}
|
|
||||||
if(astring[0].equals(rmod.name+"lasty")){
|
|
||||||
rmod.lastY=Integer.parseInt(astring[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(Setting se : m.settings){
|
|
||||||
if(se instanceof ModeSetting){
|
|
||||||
if(astring[0].equals(m.name+"modesetting"+se.name)){
|
|
||||||
((ModeSetting)se).setValue(astring[1]);
|
|
||||||
}
|
|
||||||
if(astring[0].equals(m.name+"boolsetting"+se.name)){
|
|
||||||
((BooleanSetting)se).setValue(astring[1].equals("true"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(astring[0].equals(m.name)){
|
|
||||||
m.setEnabled(astring[1].equals("true"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (astring[0].equals("mouseSensitivity")) {
|
if (astring[0].equals("mouseSensitivity")) {
|
||||||
this.mouseSensitivity = this.parseFloat(astring[1]);
|
this.mouseSensitivity = this.parseFloat(astring[1]);
|
||||||
|
@ -1074,29 +1038,7 @@ public class GameSettings {
|
||||||
ByteArrayOutputStream bao = new ByteArrayOutputStream();
|
ByteArrayOutputStream bao = new ByteArrayOutputStream();
|
||||||
PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(EaglerZLIB.newGZIPOutputStream(bao)));
|
PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(EaglerZLIB.newGZIPOutputStream(bao)));
|
||||||
|
|
||||||
for(Mod m : modManager.modules){
|
Resent.INSTANCE.saveSettings(printwriter);
|
||||||
|
|
||||||
List<RenderModule> rmodules = new ArrayList<>();
|
|
||||||
if(m instanceof RenderModule){ rmodules.add((RenderModule)m); }
|
|
||||||
|
|
||||||
for(RenderModule rmod : rmodules){
|
|
||||||
printwriter.println(rmod.name+"x:"+rmod.x);
|
|
||||||
printwriter.println(rmod.name+"y:"+rmod.y);
|
|
||||||
printwriter.println(rmod.name+"lastx:"+rmod.lastX);
|
|
||||||
printwriter.println(rmod.name+"lastx:"+rmod.lastX);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(Setting s : m.settings){
|
|
||||||
if(s instanceof ModeSetting){
|
|
||||||
printwriter.println(m.name+"modesetting"+s.name+":"+((ModeSetting) s).getValue());
|
|
||||||
}
|
|
||||||
if(s instanceof BooleanSetting){
|
|
||||||
printwriter.println(m.name+"boolsetting"+s.name+":"+((BooleanSetting) s).getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
printwriter.println(m.name + ":" + m.enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
printwriter.println("invertYMouse:" + this.invertMouse);
|
printwriter.println("invertYMouse:" + this.invertMouse);
|
||||||
printwriter.println("mouseSensitivity:" + this.mouseSensitivity);
|
printwriter.println("mouseSensitivity:" + this.mouseSensitivity);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user