Merge remote-tracking branch 'origin/main'
# Conflicts: # .gradle/7.3.1/executionHistory/executionHistory.bin # .gradle/7.3.1/executionHistory/executionHistory.lock # .gradle/7.3.1/fileHashes/fileHashes.bin # .gradle/7.3.1/fileHashes/fileHashes.lock # .gradle/buildOutputCleanup/buildOutputCleanup.lock # .project
This commit is contained in:
commit
22ff802b85
Binary file not shown.
BIN
.gradle/7.3.1/checksums/md5-checksums.bin
Normal file
BIN
.gradle/7.3.1/checksums/md5-checksums.bin
Normal file
Binary file not shown.
BIN
.gradle/7.3.1/checksums/sha1-checksums.bin
Normal file
BIN
.gradle/7.3.1/checksums/sha1-checksums.bin
Normal file
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.
Binary file not shown.
766698
javascript/ResentInternational.html
Normal file
766698
javascript/ResentInternational.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
144861
javascript/classes.js
144861
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -2,13 +2,23 @@ package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import dev.resent.module.base.Category;
|
import dev.resent.module.base.Category;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.setting.BooleanSetting;
|
||||||
import dev.resent.setting.ModeSetting;
|
import dev.resent.setting.ModeSetting;
|
||||||
|
|
||||||
public class Hitboxes extends Mod{
|
public class Hitboxes extends Mod{
|
||||||
public Hitboxes() {
|
public Hitboxes() {
|
||||||
super("Hitboxes", Category.HUD, true);
|
super("Hitboxes", Category.HUD, true);
|
||||||
addSetting(color);
|
addSetting(color, old);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModeSetting color = new ModeSetting("Color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
public static ModeSetting color = new ModeSetting("Color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
||||||
|
public BooleanSetting old = new BooleanSetting("1.7 Hitboxes", "", true);
|
||||||
|
|
||||||
|
public void onEnable(){
|
||||||
|
mc.getRenderManager().setDebugBoundingBox(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onDisable(){
|
||||||
|
mc.getRenderManager().setDebugBoundingBox(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,20 +387,13 @@ public class RenderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (W.hitboxes().isEnabled() && !entity.isInvisible()) {
|
if (W.hitboxes().isEnabled() && W.hitboxes().old.getValue() && !entity.isInvisible()) {
|
||||||
GlStateManager.disableTexture2D();
|
GlStateManager.disableTexture2D();
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
GlStateManager.depthMask(false);
|
GlStateManager.depthMask(false);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
/*
|
|
||||||
* int r = RenderUtils.getColorWithoutRGB(Hitboxes.color).getRed();
|
|
||||||
* int g = RenderUtils.getColorWithoutRGB(Hitboxes.color).getGreen();
|
|
||||||
* int b = RenderUtils.getColorWithoutRGB(Hitboxes.color).getBlue();
|
|
||||||
* var.setColorRGBA(r, g, b, 32);
|
|
||||||
* EaglerAdapter.glColor3f(r, g, b);
|
|
||||||
*/
|
|
||||||
EaglercraftGPU.glLineWidth(1.0f);
|
EaglercraftGPU.glLineWidth(1.0f);
|
||||||
|
|
||||||
RenderGlobal.func_181563_a(
|
RenderGlobal.func_181563_a(
|
||||||
|
@ -477,7 +470,11 @@ public class RenderManager {
|
||||||
RenderGlobal.func_181563_a(new AxisAlignedBB(parDouble1 - (double) f,
|
RenderGlobal.func_181563_a(new AxisAlignedBB(parDouble1 - (double) f,
|
||||||
parDouble2 + (double) entityIn.getEyeHeight() - 0.009999999776482582D, parDouble3 - (double) f,
|
parDouble2 + (double) entityIn.getEyeHeight() - 0.009999999776482582D, parDouble3 - (double) f,
|
||||||
parDouble1 + (double) f, parDouble2 + (double) entityIn.getEyeHeight() + 0.009999999776482582D,
|
parDouble1 + (double) f, parDouble2 + (double) entityIn.getEyeHeight() + 0.009999999776482582D,
|
||||||
parDouble3 + (double) f), 255, 0, 0, 255);
|
parDouble3 + (double) f),
|
||||||
|
|
||||||
|
W.hitboxes().enabled ? RenderUtils.getColorWithoutRGB(Hitboxes.color).getRed() : 255,
|
||||||
|
W.hitboxes().enabled ? RenderUtils.getColorWithoutRGB(Hitboxes.color).getGreen() : 255,
|
||||||
|
W.hitboxes().enabled ? RenderUtils.getColorWithoutRGB(Hitboxes.color).getBlue() : 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
|
|
|
@ -704,44 +704,6 @@ public class GameSettings {
|
||||||
try {
|
try {
|
||||||
String[] astring = s.split(":");
|
String[] astring = s.split(":");
|
||||||
|
|
||||||
for(Mod m : Resent.INSTANCE.modManager.modules){
|
|
||||||
|
|
||||||
if(astring[0].equals(m.name)){
|
|
||||||
m.enabled = astring[1].equals("true");
|
|
||||||
}
|
|
||||||
|
|
||||||
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.setX(Integer.parseInt(astring[1]));
|
|
||||||
}
|
|
||||||
if(astring[0].equals(rmod.name+"_y")){
|
|
||||||
rmod.setY(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(se instanceof BooleanSetting){
|
|
||||||
if(astring[0].equals(m.name+"_boolsetting_"+se.name)){
|
|
||||||
((BooleanSetting)se).setValue(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]);
|
||||||
}
|
}
|
||||||
|
@ -1048,6 +1010,45 @@ public class GameSettings {
|
||||||
this.setModelPartEnabled(enumplayermodelparts, astring[1].equals("true"));
|
this.setModelPartEnabled(enumplayermodelparts, astring[1].equals("true"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(Mod m : Resent.INSTANCE.modManager.modules){
|
||||||
|
|
||||||
|
if(astring[0].equals(m.name)){
|
||||||
|
m.enabled = astring[1].equals("true");
|
||||||
|
}
|
||||||
|
|
||||||
|
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.setX(Integer.parseInt(astring[1]));
|
||||||
|
}
|
||||||
|
if(astring[0].equals(rmod.name+"_y")){
|
||||||
|
rmod.setY(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(se instanceof BooleanSetting){
|
||||||
|
if(astring[0].equals(m.name+"_boolsetting_"+se.name)){
|
||||||
|
((BooleanSetting)se).setValue(astring[1].equals("true"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception var8) {
|
} catch (Exception var8) {
|
||||||
logger.warn("Skipping bad option: " + s);
|
logger.warn("Skipping bad option: " + s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user