Reformat & optimize
This commit is contained in:
parent
b640363f36
commit
909092720c
|
@ -470,11 +470,11 @@ public class PlatformRuntime {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showMojangScreen(){
|
public static void showMojangScreen() {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void removeLoadScreen(){
|
public static void removeLoadScreen() {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,10 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Module {
|
public @interface Module {
|
||||||
String name() default "No name set";
|
String name() default "No name set";
|
||||||
|
|
||||||
String description() default "No description set.";
|
String description() default "No description set.";
|
||||||
|
|
||||||
Category category() default Category.MISC;
|
Category category() default Category.MISC;
|
||||||
|
|
||||||
boolean hasSetting() default false;
|
boolean hasSetting() default false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,9 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface RenderModule {
|
public @interface RenderModule {
|
||||||
String name();
|
String name();
|
||||||
|
|
||||||
String description() default "No description set.";
|
String description() default "No description set.";
|
||||||
|
|
||||||
Category category();
|
Category category();
|
||||||
|
|
||||||
int x();
|
int x();
|
||||||
|
|
|
@ -17,9 +17,9 @@ public class ClientInfo {
|
||||||
STABLE("Stable");
|
STABLE("Stable");
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
|
|
||||||
Release(String name) {
|
Release(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.sound.SoundManager;
|
import dev.resent.sound.SoundManager;
|
||||||
|
|
||||||
public class Resent {
|
public class Resent {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
INSTANCE = new Resent();
|
INSTANCE = new Resent();
|
||||||
}
|
}
|
||||||
|
@ -18,5 +17,4 @@ public class Resent {
|
||||||
Resent.INSTANCE.modManager = new ModManager();
|
Resent.INSTANCE.modManager = new ModManager();
|
||||||
Resent.INSTANCE.soundManager = new SoundManager();
|
Resent.INSTANCE.soundManager = new SoundManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package dev.resent.client;
|
package dev.resent.client;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
|
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
import dev.resent.module.base.setting.BooleanSetting;
|
import dev.resent.module.base.setting.BooleanSetting;
|
||||||
import dev.resent.module.base.setting.ModeSetting;
|
import dev.resent.module.base.setting.ModeSetting;
|
||||||
import dev.resent.module.base.setting.NumberSetting;
|
import dev.resent.module.base.setting.NumberSetting;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
public class SaveUtil {
|
public class SaveUtil {
|
||||||
|
|
||||||
|
@ -29,9 +28,9 @@ public class SaveUtil {
|
||||||
if (s instanceof BooleanSetting) {
|
if (s instanceof BooleanSetting) {
|
||||||
printwriter.println(m.getName() + "_boolsetting_" + s.name + ":" + ((BooleanSetting) s).getValue());
|
printwriter.println(m.getName() + "_boolsetting_" + s.name + ":" + ((BooleanSetting) s).getValue());
|
||||||
}
|
}
|
||||||
if(s instanceof NumberSetting){
|
if (s instanceof NumberSetting) {
|
||||||
NumberSetting ss = ((NumberSetting)s);
|
NumberSetting ss = ((NumberSetting) s);
|
||||||
printwriter.println(m.getName() + "_numsetting_" + s.name + ":" + String.valueOf(ss.getValue()).substring(0, (String.valueOf(ss.getValue()).length())-2));
|
printwriter.println(m.getName() + "_numsetting_" + s.name + ":" + String.valueOf(ss.getValue()).substring(0, (String.valueOf(ss.getValue()).length()) - 2));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -73,13 +72,12 @@ public class SaveUtil {
|
||||||
((BooleanSetting) se).setValue(astring[1].equals("true"));
|
((BooleanSetting) se).setValue(astring[1].equals("true"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(se instanceof NumberSetting){
|
if (se instanceof NumberSetting) {
|
||||||
if(astring[0].equals(m.getName()+"_numsetting_"+se.name)){
|
if (astring[0].equals(m.getName() + "_numsetting_" + se.name)) {
|
||||||
((NumberSetting)se).value = Integer.parseInt(astring[1]);
|
((NumberSetting) se).value = Integer.parseInt(astring[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
package dev.resent.module.base;
|
package dev.resent.module.base;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.setting.Setting;
|
import dev.resent.module.base.setting.Setting;
|
||||||
import dev.resent.util.render.RenderUtils;
|
import dev.resent.util.render.RenderUtils;
|
||||||
import dev.resent.visual.ui.Theme;
|
import dev.resent.visual.ui.Theme;
|
||||||
import dev.resent.visual.ui.animation.SimpleAnimation;
|
import dev.resent.visual.ui.animation.SimpleAnimation;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
public abstract class Mod {
|
public abstract class Mod {
|
||||||
|
@ -39,6 +38,7 @@ public abstract class Mod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnable() {}
|
public void onEnable() {}
|
||||||
|
|
||||||
public void onDisable() {}
|
public void onDisable() {}
|
||||||
|
|
||||||
public void toggle() {
|
public void toggle() {
|
||||||
|
@ -80,16 +80,43 @@ public abstract class Mod {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEnabled() { return enabled; }
|
public boolean isEnabled() {
|
||||||
public boolean isAdmin() { return admin; }
|
return enabled;
|
||||||
public boolean doesHaveSetting() { return hasSetting; }
|
}
|
||||||
public String getName() { return name; }
|
|
||||||
public String getDescription() { return description; }
|
|
||||||
public Category getCategory() { return category; }
|
|
||||||
|
|
||||||
public void setDescription(String description) { this.description = description; }
|
public boolean isAdmin() {
|
||||||
public void setName(String name) { this.name = name; }
|
return admin;
|
||||||
public void setCategory(Category category) { this.category = category; }
|
}
|
||||||
public void setHasSetting(boolean hasSetting) { this.hasSetting = hasSetting; }
|
|
||||||
|
|
||||||
|
public boolean doesHaveSetting() {
|
||||||
|
return hasSetting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Category getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(Category category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHasSetting(boolean hasSetting) {
|
||||||
|
this.hasSetting = hasSetting;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
package dev.resent.module.base;
|
package dev.resent.module.base;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.impl.hud.ArmorHud;
|
import dev.resent.module.impl.hud.ArmorHud;
|
||||||
import dev.resent.module.impl.hud.BPS;
|
import dev.resent.module.impl.hud.BPS;
|
||||||
|
@ -41,6 +37,9 @@ import dev.resent.module.impl.setting.NoParticles;
|
||||||
import dev.resent.module.impl.setting.NoRain;
|
import dev.resent.module.impl.setting.NoRain;
|
||||||
import dev.resent.module.impl.setting.NoSwingDelay;
|
import dev.resent.module.impl.setting.NoSwingDelay;
|
||||||
import dev.resent.module.impl.setting.SelfNametag;
|
import dev.resent.module.impl.setting.SelfNametag;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class ModManager {
|
public class ModManager {
|
||||||
|
|
||||||
|
@ -79,13 +78,13 @@ public class ModManager {
|
||||||
public static ItemPhysics itemPhysics = new ItemPhysics();
|
public static ItemPhysics itemPhysics = new ItemPhysics();
|
||||||
public static FPSOptions fpsOptions = new FPSOptions();
|
public static FPSOptions fpsOptions = new FPSOptions();
|
||||||
public static AdminRay adminRay = new AdminRay();
|
public static AdminRay adminRay = new AdminRay();
|
||||||
public static AdminSpawner adminSpawner =new AdminSpawner();
|
public static AdminSpawner adminSpawner = new AdminSpawner();
|
||||||
public static ParticleMultiplier particleMultiplier = new ParticleMultiplier();
|
public static ParticleMultiplier particleMultiplier = new ParticleMultiplier();
|
||||||
public static Hand hand;
|
public static Hand hand;
|
||||||
|
|
||||||
//public static Crosshair crosshair = new Crosshair();
|
//public static Crosshair crosshair = new Crosshair();
|
||||||
|
|
||||||
public ModManager() {
|
public ModManager() {
|
||||||
|
|
||||||
//Hud
|
//Hud
|
||||||
//register(crosshair = new Crosshair());
|
//register(crosshair = new Crosshair());
|
||||||
register(hand = new Hand());
|
register(hand = new Hand());
|
||||||
|
@ -129,7 +128,7 @@ public class ModManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<Mod> modsInCategory(Category c) {
|
public ArrayList<Mod> modsInCategory(Category c) {
|
||||||
if(c == null) {
|
if (c == null) {
|
||||||
return (ArrayList<Mod>) modules;
|
return (ArrayList<Mod>) modules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public abstract class RenderMod extends Mod {
|
||||||
|
|
||||||
Gui.drawRect(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), hovered ? 0x50FFFFFF : 0x40FFFFFF);
|
Gui.drawRect(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), hovered ? 0x50FFFFFF : 0x40FFFFFF);
|
||||||
RenderUtils.drawRectOutline(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), -1);
|
RenderUtils.drawRectOutline(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), -1);
|
||||||
mc.fontRendererObj.drawStringWithShadow(getName(), this.x, this.y - 10, new Color(255,255,255).getRGB());
|
mc.fontRendererObj.drawStringWithShadow(getName(), this.x, this.y - 10, new Color(255, 255, 255).getRGB());
|
||||||
final boolean mouseOverX = (mouseX >= this.getX() && mouseX <= this.getX() + this.getWidth());
|
final boolean mouseOverX = (mouseX >= this.getX() && mouseX <= this.getX() + this.getWidth());
|
||||||
final boolean mouseOverY = (mouseY >= this.getY() && mouseY <= this.getY() + this.getHeight());
|
final boolean mouseOverY = (mouseY >= this.getY() && mouseY <= this.getY() + this.getHeight());
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package dev.resent.module.base.setting;
|
package dev.resent.module.base.setting;
|
||||||
|
|
||||||
public class CustomRectSettingDraw extends Setting{
|
public class CustomRectSettingDraw extends Setting {
|
||||||
public CustomRectSettingDraw(String name, String description){
|
|
||||||
|
public CustomRectSettingDraw(String name, String description) {
|
||||||
super(name, description);
|
super(name, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPress(){ }
|
public void onPress() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,7 @@ public final class ModeSetting extends Setting {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValue(final String mode) {
|
public void setValue(final String mode) {
|
||||||
if (modes.contains(mode))
|
if (modes.contains(mode)) index = this.modes.indexOf(mode);
|
||||||
index = this.modes.indexOf(mode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean is(String mode) {
|
public boolean is(String mode) {
|
||||||
|
@ -44,4 +43,3 @@ public final class ModeSetting extends Setting {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class NumberSetting extends Setting {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getInitialValue(){
|
public float getInitialValue() {
|
||||||
return initValue;
|
return initValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,5 +18,5 @@ public class Setting {
|
||||||
this.gameSetting = gameSetting;
|
this.gameSetting = gameSetting;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(int x, int y){ }
|
public void draw(int x, int y) {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@ package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import dev.resent.annotation.RenderModule;
|
import dev.resent.annotation.RenderModule;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.setting.BooleanSetting;
|
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
|
import dev.resent.module.base.setting.BooleanSetting;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
import net.minecraft.client.gui.GuiIngame;
|
import net.minecraft.client.gui.GuiIngame;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
|
|
|
@ -1,27 +1,30 @@
|
||||||
package dev.resent.module.impl.hud;
|
package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
|
|
||||||
import dev.resent.annotation.RenderModule;
|
import dev.resent.annotation.RenderModule;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
@RenderModule(name = "BPS", category = Category.HUD, x = 4, y = 16, description = "See your current blocks per second")
|
@RenderModule(name = "BPS", category = Category.HUD, x = 4, y = 16, description = "See your current blocks per second")
|
||||||
public class BPS extends RenderMod{
|
public class BPS extends RenderMod {
|
||||||
|
|
||||||
public int getWidth() { return mc.fontRendererObj.getStringWidth(getText()) + 4;}
|
public int getWidth() {
|
||||||
public int getHeight(){ return 13; }
|
return mc.fontRendererObj.getStringWidth(getText()) + 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return 13;
|
||||||
|
}
|
||||||
|
|
||||||
public double getBPS() {
|
public double getBPS() {
|
||||||
return mc.thePlayer.getDistance(mc.thePlayer.lastTickPosX, mc.thePlayer.lastTickPosY, mc.thePlayer.lastTickPosZ) * (mc.timer.ticksPerSecond * mc.timer.timerSpeed);
|
return mc.thePlayer.getDistance(mc.thePlayer.lastTickPosX, mc.thePlayer.lastTickPosY, mc.thePlayer.lastTickPosZ) * (mc.timer.ticksPerSecond * mc.timer.timerSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getText(){
|
public String getText() {
|
||||||
return "[BPS: " + new DecimalFormat("0.##").format(getBPS()) + "]";
|
return "[BPS: " + new DecimalFormat("0.##").format(getBPS()) + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(){
|
public void draw() {
|
||||||
drawString(getText(), x+2, y+2);
|
drawString(getText(), x + 2, y + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package dev.resent.module.impl.hud;
|
package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import dev.resent.annotation.RenderModule;
|
import dev.resent.annotation.RenderModule;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
import dev.resent.util.misc.FuncUtils;
|
import dev.resent.util.misc.FuncUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||||
|
|
||||||
@RenderModule(name = "CPS", category = Category.HUD, x = 4, y = 26, description = "See your clicks per second")
|
@RenderModule(name = "CPS", category = Category.HUD, x = 4, y = 26, description = "See your clicks per second")
|
||||||
|
|
|
@ -8,14 +8,13 @@ import dev.resent.module.base.setting.ModeSetting;
|
||||||
import dev.resent.module.base.setting.NumberSetting;
|
import dev.resent.module.base.setting.NumberSetting;
|
||||||
|
|
||||||
@Module(name = "ClickGUI", category = Category.HUD, hasSetting = true, description = "Customize Resent's UI")
|
@Module(name = "ClickGUI", category = Category.HUD, hasSetting = true, description = "Customize Resent's UI")
|
||||||
public class ClickGui extends Mod{
|
public class ClickGui extends Mod {
|
||||||
|
|
||||||
public BooleanSetting scroll = new BooleanSetting("Smooth scroll", "", false);
|
public BooleanSetting scroll = new BooleanSetting("Smooth scroll", "", false);
|
||||||
public ModeSetting guiTheme = new ModeSetting("Gui theme", "New", "New", "Classic revised");
|
public ModeSetting guiTheme = new ModeSetting("Gui theme", "New", "New", "Classic revised");
|
||||||
public NumberSetting test = new NumberSetting("Test, ignore!", "", 50, 1, 200, 5, 5);
|
public NumberSetting test = new NumberSetting("Test, ignore!", "", 50, 1, 200, 5, 5);
|
||||||
|
|
||||||
public ClickGui(){
|
public ClickGui() {
|
||||||
addSetting(scroll, guiTheme);
|
addSetting(scroll, guiTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@ package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import dev.resent.annotation.RenderModule;
|
import dev.resent.annotation.RenderModule;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.setting.BooleanSetting;
|
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
|
import dev.resent.module.base.setting.BooleanSetting;
|
||||||
import dev.resent.util.render.Color;
|
import dev.resent.util.render.Color;
|
||||||
import dev.resent.visual.ui.Theme;
|
import dev.resent.visual.ui.Theme;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
|
@ -19,12 +19,8 @@ public class Info extends RenderMod {
|
||||||
public BooleanSetting direction = new BooleanSetting("Direction", "", true);
|
public BooleanSetting direction = new BooleanSetting("Direction", "", true);
|
||||||
public static final String[] directionsF = new String[] { "\u00A79S\u00A7r", "\u00A72W\u00A7r", "\u00A74N\u00A7r", "\u00A76E\u00A7r" };
|
public static final String[] directionsF = new String[] { "\u00A79S\u00A7r", "\u00A72W\u00A7r", "\u00A74N\u00A7r", "\u00A76E\u00A7r" };
|
||||||
|
|
||||||
public int[] getPositions(){
|
public int[] getPositions() {
|
||||||
int[] poses = new int[]{
|
int[] poses = new int[] { (int) mc.thePlayer.posX, (int) mc.thePlayer.posY, (int) mc.thePlayer.posZ };
|
||||||
(int)mc.thePlayer.posX,
|
|
||||||
(int)mc.thePlayer.posY,
|
|
||||||
(int)mc.thePlayer.posZ,
|
|
||||||
};
|
|
||||||
|
|
||||||
return poses;
|
return poses;
|
||||||
}
|
}
|
||||||
|
@ -46,9 +42,9 @@ public class Info extends RenderMod {
|
||||||
drawString(" Y: " + getPositions()[1], this.x + 5, this.y + 24);
|
drawString(" Y: " + getPositions()[1], this.x + 5, this.y + 24);
|
||||||
drawString(" Z: " + getPositions()[2], this.x + 5, this.y + 34);
|
drawString(" Z: " + getPositions()[2], this.x + 5, this.y + 34);
|
||||||
|
|
||||||
if (direction.getValue()){
|
if (direction.getValue()) {
|
||||||
drawString(" Dir: ", this.x + 5 + mc.fontRendererObj.getStringWidth(" X: " + getPositions()[0]), this.y + 14);
|
drawString(" Dir: ", this.x + 5 + mc.fontRendererObj.getStringWidth(" X: " + getPositions()[0]), this.y + 14);
|
||||||
mc.fontRendererObj.drawString(directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: Dir: " + getPositions()[0]), this.y + 14, -1, Theme.getTextShadow());
|
mc.fontRendererObj.drawString(directionsF[rot], this.x + 5 + mc.fontRendererObj.getStringWidth(" X: Dir: " + getPositions()[0]), this.y + 14, -1, Theme.getTextShadow());
|
||||||
}
|
}
|
||||||
drawString(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(getPositions()[0], getPositions()[1], getPositions()[2])).biomeName, this.x + 5, this.y + 44);
|
drawString(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(getPositions()[0], getPositions()[1], getPositions()[2])).biomeName, this.x + 5, this.y + 44);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,11 @@ import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.setting.NumberSetting;
|
import dev.resent.module.base.setting.NumberSetting;
|
||||||
|
|
||||||
@Module(name = "ItemPhysics", category = Category.MISC, hasSetting = true, description = "Give items physics!")
|
@Module(name = "ItemPhysics", category = Category.MISC, hasSetting = true, description = "Give items physics!")
|
||||||
public class ItemPhysics extends Mod{
|
public class ItemPhysics extends Mod {
|
||||||
|
|
||||||
public static NumberSetting speed = new NumberSetting("Speed", "", 2, 1, 8, 1, 1);
|
public static NumberSetting speed = new NumberSetting("Speed", "", 2, 1, 8, 1, 1);
|
||||||
|
|
||||||
public ItemPhysics(){
|
public ItemPhysics() {
|
||||||
addSetting(speed);
|
addSetting(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package dev.resent.module.impl.hud;
|
package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import dev.resent.annotation.RenderModule;
|
import dev.resent.annotation.RenderModule;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
|
@ -11,6 +8,8 @@ import dev.resent.module.base.setting.ModeSetting;
|
||||||
import dev.resent.util.misc.FuncUtils;
|
import dev.resent.util.misc.FuncUtils;
|
||||||
import dev.resent.util.render.Color;
|
import dev.resent.util.render.Color;
|
||||||
import dev.resent.util.render.RenderUtils;
|
import dev.resent.util.render.RenderUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package dev.resent.module.impl.hud;
|
||||||
import dev.resent.annotation.RenderModule;
|
import dev.resent.annotation.RenderModule;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.base.setting.BooleanSetting;
|
import dev.resent.module.base.setting.BooleanSetting;
|
||||||
|
import java.util.ArrayList;
|
||||||
import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
|
import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
|
|
||||||
@Module(name = "Ray", category = Category.MISC, hasSetting = true)
|
@Module(name = "Ray", category = Category.MISC, hasSetting = true)
|
||||||
public class AdminRay extends Mod{
|
public class AdminRay extends Mod {
|
||||||
|
|
||||||
public static ArrayList<Block> rayBlocks = new ArrayList<>();
|
public static ArrayList<Block> rayBlocks = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -24,37 +23,32 @@ public class AdminRay extends Mod{
|
||||||
public static BooleanSetting quartz = new BooleanSetting("Quartz", "", false);
|
public static BooleanSetting quartz = new BooleanSetting("Quartz", "", false);
|
||||||
public static BooleanSetting water = new BooleanSetting("Water", "", false);
|
public static BooleanSetting water = new BooleanSetting("Water", "", false);
|
||||||
|
|
||||||
public AdminRay(){
|
public AdminRay() {
|
||||||
addSetting(iron, diamond, gold, redstone, lapis, quartz, water);
|
addSetting(iron, diamond, gold, redstone, lapis, quartz, water);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAdmin(){
|
public boolean isAdmin() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldRender(Block block){
|
public static boolean shouldRender(Block block) {
|
||||||
return rayBlocks.contains(block);
|
return rayBlocks.contains(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void start() {
|
public static void start() {
|
||||||
rayBlocks.clear();
|
rayBlocks.clear();
|
||||||
|
|
||||||
if(iron.getValue())
|
if (iron.getValue()) rayBlocks.add(Block.getBlockFromName("iron_ore"));
|
||||||
rayBlocks.add(Block.getBlockFromName("iron_ore"));
|
if (gold.getValue()) rayBlocks.add(Block.getBlockFromName("gold_ore"));
|
||||||
if(gold.getValue())
|
if (redstone.getValue()) {
|
||||||
rayBlocks.add(Block.getBlockFromName("gold_ore"));
|
|
||||||
if(redstone.getValue()){
|
|
||||||
rayBlocks.add(Block.getBlockFromName("redstone_ore"));
|
rayBlocks.add(Block.getBlockFromName("redstone_ore"));
|
||||||
rayBlocks.add(Block.getBlockById(74));
|
rayBlocks.add(Block.getBlockById(74));
|
||||||
}
|
}
|
||||||
if(lapis.getValue())
|
if (lapis.getValue()) rayBlocks.add(Block.getBlockFromName("lapis_ore"));
|
||||||
rayBlocks.add(Block.getBlockFromName("lapis_ore"));
|
if (diamond.getValue()) rayBlocks.add(Block.getBlockFromName("diamond_ore"));
|
||||||
if(diamond.getValue())
|
if (quartz.getValue()) rayBlocks.add(Block.getBlockFromName("quartz_ore"));
|
||||||
rayBlocks.add(Block.getBlockFromName("diamond_ore"));
|
if (water.getValue()) {
|
||||||
if(quartz.getValue())
|
|
||||||
rayBlocks.add(Block.getBlockFromName("quartz_ore"));
|
|
||||||
if(water.getValue()){
|
|
||||||
rayBlocks.add(Block.getBlockById(8));
|
rayBlocks.add(Block.getBlockById(8));
|
||||||
rayBlocks.add(Block.getBlockById(9));
|
rayBlocks.add(Block.getBlockById(9));
|
||||||
}
|
}
|
||||||
|
@ -68,7 +62,7 @@ public class AdminRay extends Mod{
|
||||||
rayBlocks.add(Block.getBlockFromName("bookshelf"));
|
rayBlocks.add(Block.getBlockFromName("bookshelf"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateGameSetting(){
|
public static void updateGameSetting() {
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
mc.gameSettings.keyBindings =
|
mc.gameSettings.keyBindings =
|
||||||
(KeyBinding[]) ArrayUtils.addAll(
|
(KeyBinding[]) ArrayUtils.addAll(
|
||||||
|
|
|
@ -11,18 +11,17 @@ import net.minecraft.tileentity.TileEntityMobSpawner;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
|
||||||
@Module(name = "Spawn", category = Category.HUD)
|
@Module(name = "Spawn", category = Category.HUD)
|
||||||
|
|
||||||
public class AdminSpawner extends Mod {
|
public class AdminSpawner extends Mod {
|
||||||
|
|
||||||
public void render(){
|
public void render() {
|
||||||
for(Object o: mc.theWorld.loadedTileEntityList) {
|
for (Object o : mc.theWorld.loadedTileEntityList) {
|
||||||
if(o instanceof TileEntityMobSpawner && this.isEnabled()) {
|
if (o instanceof TileEntityMobSpawner && this.isEnabled()) {
|
||||||
box(((TileEntityMobSpawner)o));
|
box(((TileEntityMobSpawner) o));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void box(TileEntityMobSpawner entity){
|
public static void box(TileEntityMobSpawner entity) {
|
||||||
GlStateManager.blendFunc(770, 771);
|
GlStateManager.blendFunc(770, 771);
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
EaglercraftGPU.glLineWidth(4.0F);
|
EaglercraftGPU.glLineWidth(4.0F);
|
||||||
|
@ -33,12 +32,14 @@ public class AdminSpawner extends Mod {
|
||||||
Minecraft.getMinecraft().getRenderManager();
|
Minecraft.getMinecraft().getRenderManager();
|
||||||
RenderGlobal.func_181561_a(
|
RenderGlobal.func_181561_a(
|
||||||
new AxisAlignedBB(
|
new AxisAlignedBB(
|
||||||
entity.getPos().getX()-Minecraft.getMinecraft().getRenderManager().renderPosX+0.1,
|
entity.getPos().getX() - Minecraft.getMinecraft().getRenderManager().renderPosX + 0.1,
|
||||||
entity.getPos().getY()-Minecraft.getMinecraft().getRenderManager().renderPosY+0.1,
|
entity.getPos().getY() - Minecraft.getMinecraft().getRenderManager().renderPosY + 0.1,
|
||||||
entity.getPos().getZ()-Minecraft.getMinecraft().getRenderManager().renderPosZ+0.1,
|
entity.getPos().getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ + 0.1,
|
||||||
entity.getPos().getX() -Minecraft.getMinecraft().getRenderManager().renderPosX+0.9,
|
entity.getPos().getX() - Minecraft.getMinecraft().getRenderManager().renderPosX + 0.9,
|
||||||
entity.getPos().getY() -Minecraft.getMinecraft().getRenderManager().renderPosY+0.9,
|
entity.getPos().getY() - Minecraft.getMinecraft().getRenderManager().renderPosY + 0.9,
|
||||||
entity.getPos().getZ()-Minecraft.getMinecraft().getRenderManager().renderPosZ+0.9));
|
entity.getPos().getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ + 0.9
|
||||||
|
)
|
||||||
|
);
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
GlStateManager.enableDepth();
|
GlStateManager.enableDepth();
|
||||||
GlStateManager.depthMask(true);
|
GlStateManager.depthMask(true);
|
||||||
|
@ -46,7 +47,7 @@ entity.getPos().getZ()-Minecraft.getMinecraft().getRenderManager().renderPosZ+0.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAdmin(){
|
public boolean isAdmin() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,15 +7,16 @@ import dev.resent.module.base.setting.CustomRectSettingDraw;
|
||||||
import dev.resent.visual.cape.CapeUi;
|
import dev.resent.visual.cape.CapeUi;
|
||||||
|
|
||||||
@Module(name = "Cape", category = Category.MISC, hasSetting = true)
|
@Module(name = "Cape", category = Category.MISC, hasSetting = true)
|
||||||
public class Cape extends Mod{
|
public class Cape extends Mod {
|
||||||
public CustomRectSettingDraw open = new CustomRectSettingDraw("Choose cape", "Select which cape you want to use"){
|
|
||||||
|
public CustomRectSettingDraw open = new CustomRectSettingDraw("Choose cape", "Select which cape you want to use") {
|
||||||
@Override
|
@Override
|
||||||
public void onPress(){
|
public void onPress() {
|
||||||
mc.displayGuiScreen(new CapeUi());
|
mc.displayGuiScreen(new CapeUi());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public Cape(){
|
public Cape() {
|
||||||
addSetting(open);
|
addSetting(open);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,15 +7,16 @@ import dev.resent.module.base.setting.CustomRectSettingDraw;
|
||||||
import dev.resent.visual.crosshair.CrosshairUi;
|
import dev.resent.visual.crosshair.CrosshairUi;
|
||||||
|
|
||||||
@Module(name = "Crosshair", category = Category.MISC, hasSetting = true)
|
@Module(name = "Crosshair", category = Category.MISC, hasSetting = true)
|
||||||
public class Crosshair extends Mod{
|
public class Crosshair extends Mod {
|
||||||
public CustomRectSettingDraw open = new CustomRectSettingDraw("Choose crosshair", "Select which crosshair you want to use"){
|
|
||||||
|
public CustomRectSettingDraw open = new CustomRectSettingDraw("Choose crosshair", "Select which crosshair you want to use") {
|
||||||
@Override
|
@Override
|
||||||
public void onPress(){
|
public void onPress() {
|
||||||
mc.displayGuiScreen(new CrosshairUi());
|
mc.displayGuiScreen(new CrosshairUi());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public Crosshair(){
|
public Crosshair() {
|
||||||
addSetting(open);
|
addSetting(open);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums;
|
||||||
import net.minecraft.client.settings.GameSettings;
|
import net.minecraft.client.settings.GameSettings;
|
||||||
|
|
||||||
@Module(name = "FPS Options", category = Category.MISC, hasSetting = true, description = "Increase FPS")
|
@Module(name = "FPS Options", category = Category.MISC, hasSetting = true, description = "Increase FPS")
|
||||||
public class FPSOptions extends Mod{
|
public class FPSOptions extends Mod {
|
||||||
|
|
||||||
public BooleanSetting batchRendering = new BooleanSetting("Batch rendering", "", true);
|
public BooleanSetting batchRendering = new BooleanSetting("Batch rendering", "", true);
|
||||||
public BooleanSetting blockEffects = new BooleanSetting("Remove block effects", "", true);
|
public BooleanSetting blockEffects = new BooleanSetting("Remove block effects", "", true);
|
||||||
|
@ -20,9 +20,9 @@ public class FPSOptions extends Mod{
|
||||||
public BooleanSetting lightUpdates = new BooleanSetting("No light updates", "", true);
|
public BooleanSetting lightUpdates = new BooleanSetting("No light updates", "", true);
|
||||||
public BooleanSetting noArmSwing = new BooleanSetting("No limb swing", "", false);
|
public BooleanSetting noArmSwing = new BooleanSetting("No limb swing", "", false);
|
||||||
public BooleanSetting reducedWater = new BooleanSetting("Reduced water lag", "", true);
|
public BooleanSetting reducedWater = new BooleanSetting("Reduced water lag", "", true);
|
||||||
public CustomRectSettingDraw minSetting = new CustomRectSettingDraw("Minimal settings", ""){
|
public CustomRectSettingDraw minSetting = new CustomRectSettingDraw("Minimal settings", "") {
|
||||||
@Override
|
@Override
|
||||||
public void onPress(){
|
public void onPress() {
|
||||||
GameSettings gameSettings = mc.gameSettings;
|
GameSettings gameSettings = mc.gameSettings;
|
||||||
|
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
|
@ -50,10 +50,10 @@ public class FPSOptions extends Mod{
|
||||||
ModManager.noParticles.setEnabled(true);
|
ModManager.noParticles.setEnabled(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//public BooleanSetting delay = new BooleanSetting("Chunk delay", "", false);
|
//public BooleanSetting delay = new BooleanSetting("Chunk delay", "", false);
|
||||||
|
|
||||||
public FPSOptions(){
|
public FPSOptions() {
|
||||||
addSetting(batchRendering, blockEffects, limit, lowTick, lightUpdates, noArmSwing, reducedWater, minSetting);
|
addSetting(batchRendering, blockEffects, limit, lowTick, lightUpdates, noArmSwing, reducedWater, minSetting);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,13 @@ import dev.resent.module.base.setting.BooleanSetting;
|
||||||
import dev.resent.module.base.setting.NumberSetting;
|
import dev.resent.module.base.setting.NumberSetting;
|
||||||
|
|
||||||
@Module(name = "Particles Mod", category = Category.MISC, hasSetting = true)
|
@Module(name = "Particles Mod", category = Category.MISC, hasSetting = true)
|
||||||
public class ParticleMultiplier extends Mod{
|
public class ParticleMultiplier extends Mod {
|
||||||
|
|
||||||
public static BooleanSetting alwaysCrit = new BooleanSetting("Always critical", "", false);
|
public static BooleanSetting alwaysCrit = new BooleanSetting("Always critical", "", false);
|
||||||
public static BooleanSetting alwaysSharp = new BooleanSetting("Always sharpness", "", false);
|
public static BooleanSetting alwaysSharp = new BooleanSetting("Always sharpness", "", false);
|
||||||
public static NumberSetting multiplier = new NumberSetting("Multiplier", "", 1, 1, 50, 1, 1);
|
public static NumberSetting multiplier = new NumberSetting("Multiplier", "", 1, 1, 50, 1, 1);
|
||||||
|
|
||||||
public ParticleMultiplier(){
|
public ParticleMultiplier() {
|
||||||
addSetting(alwaysCrit, alwaysSharp, multiplier);
|
addSetting(alwaysCrit, alwaysSharp, multiplier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,9 @@ import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
@Module(name = "Reach circle", category = Category.MISC)
|
@Module(name = "Reach circle", category = Category.MISC)
|
||||||
public class ReachCircle extends Mod{
|
public class ReachCircle extends Mod {
|
||||||
|
|
||||||
public void uwu(float partialTicks){
|
public void uwu(float partialTicks) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
mc.entityRenderer.disableLightmap();
|
mc.entityRenderer.disableLightmap();
|
||||||
GlStateManager.disableTexture2D();
|
GlStateManager.disableTexture2D();
|
||||||
|
@ -26,7 +26,7 @@ public class ReachCircle extends Mod{
|
||||||
//PlatformOpenGL._wglEnable(2848);
|
//PlatformOpenGL._wglEnable(2848);
|
||||||
GlStateManager.depthMask(false);
|
GlStateManager.depthMask(false);
|
||||||
|
|
||||||
for(Entity entity : mc.theWorld.loadedEntityList){
|
for (Entity entity : mc.theWorld.loadedEntityList) {
|
||||||
if (((EntityLivingBase) entity).canEntityBeSeen(mc.thePlayer) && !entity.isInvisible() && entity instanceof EntityPlayer) {
|
if (((EntityLivingBase) entity).canEntityBeSeen(mc.thePlayer) && !entity.isInvisible() && entity instanceof EntityPlayer) {
|
||||||
double posX = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * partialTicks - mc.getRenderManager().viewerPosX;
|
double posX = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * partialTicks - mc.getRenderManager().viewerPosX;
|
||||||
double posY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * partialTicks - mc.getRenderManager().viewerPosY;
|
double posY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * partialTicks - mc.getRenderManager().viewerPosY;
|
||||||
|
|
|
@ -9,12 +9,11 @@ import net.minecraft.client.settings.KeyBinding;
|
||||||
@Module(name = "ToggleSprint", category = Category.MISC)
|
@Module(name = "ToggleSprint", category = Category.MISC)
|
||||||
public class Sprint extends Mod {
|
public class Sprint extends Mod {
|
||||||
|
|
||||||
public static void onUpdate(){
|
public static void onUpdate() {
|
||||||
KeyBinding.setKeyBindState(Minecraft.getMinecraft().gameSettings.keyBindSprint.getKeyCode(), true);
|
KeyBinding.setKeyBindState(Minecraft.getMinecraft().gameSettings.keyBindSprint.getKeyCode(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSprint.getKeyCode(), false);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSprint.getKeyCode(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,4 +4,4 @@ import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
|
||||||
@Module(name = "Left hand", description = "Render your hand on the left")
|
@Module(name = "Left hand", description = "Render your hand on the left")
|
||||||
public class Hand extends Mod{ }
|
public class Hand extends Mod {}
|
||||||
|
|
|
@ -5,4 +5,4 @@ import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.base.Mod.Category;
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "Self nametag", category = Category.MISC)
|
@Module(name = "Self nametag", category = Category.MISC)
|
||||||
public class SelfNametag extends Mod{ }
|
public class SelfNametag extends Mod {}
|
||||||
|
|
|
@ -5,13 +5,11 @@ import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
import javax.sound.sampled.AudioInputStream;
|
import javax.sound.sampled.AudioInputStream;
|
||||||
import javax.sound.sampled.AudioSystem;
|
import javax.sound.sampled.AudioSystem;
|
||||||
import javax.sound.sampled.Clip;
|
import javax.sound.sampled.Clip;
|
||||||
import javax.sound.sampled.LineUnavailableException;
|
import javax.sound.sampled.LineUnavailableException;
|
||||||
import javax.sound.sampled.UnsupportedAudioFileException;
|
import javax.sound.sampled.UnsupportedAudioFileException;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.audio.ISound;
|
import net.minecraft.client.audio.ISound;
|
||||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
|
@ -22,7 +20,7 @@ public class SoundManager {
|
||||||
FileOutputStream fos = null;
|
FileOutputStream fos = null;
|
||||||
File temp;
|
File temp;
|
||||||
|
|
||||||
public void playSound(String base64) throws UnsupportedEncodingException{
|
public void playSound(String base64) throws UnsupportedEncodingException {
|
||||||
byte[] byteArray = Base64.getDecoder().decode(new String(base64).getBytes("UTF-8"));
|
byte[] byteArray = Base64.getDecoder().decode(new String(base64).getBytes("UTF-8"));
|
||||||
this.playSound(byteArray);
|
this.playSound(byteArray);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +41,6 @@ public class SoundManager {
|
||||||
Clip clip = AudioSystem.getClip();
|
Clip clip = AudioSystem.getClip();
|
||||||
clip.open(audioInputStream);
|
clip.open(audioInputStream);
|
||||||
clip.start();
|
clip.start();
|
||||||
|
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
ioe.printStackTrace();
|
ioe.printStackTrace();
|
||||||
} catch (UnsupportedAudioFileException e) {
|
} catch (UnsupportedAudioFileException e) {
|
||||||
|
@ -62,7 +59,7 @@ public class SoundManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// <3
|
// <3
|
||||||
public void playDemo(){
|
public void playDemo() {
|
||||||
ISound sound = PositionedSoundRecord.create(new ResourceLocation("minecraft:music.res"), 1);
|
ISound sound = PositionedSoundRecord.create(new ResourceLocation("minecraft:music.res"), 1);
|
||||||
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
||||||
Minecraft.getMinecraft().getSoundHandler().playSound(sound);
|
Minecraft.getMinecraft().getSoundHandler().playSound(sound);
|
||||||
|
|
|
@ -3,7 +3,6 @@ package dev.resent.util.misc;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
|
|
||||||
public class FuncUtils {
|
public class FuncUtils {
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
package dev.resent.util.misc;
|
package dev.resent.util.misc;
|
||||||
|
|
||||||
public class TimerUtil {
|
public class TimerUtil {
|
||||||
|
|
||||||
private static long halfSecond = 500000000;
|
private static long halfSecond = 500000000;
|
||||||
private long lastTime;
|
private long lastTime;
|
||||||
|
|
||||||
private long getDeltaTime(){
|
private long getDeltaTime() {
|
||||||
return (System.nanoTime()-lastTime);
|
return (System.nanoTime() - lastTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateTime(){
|
private void updateTime() {
|
||||||
this.lastTime = System.nanoTime();
|
this.lastTime = System.nanoTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +21,6 @@ public class TimerUtil {
|
||||||
if (getDeltaTime() >= halfSecond) {
|
if (getDeltaTime() >= halfSecond) {
|
||||||
updateTime();
|
updateTime();
|
||||||
return true;
|
return true;
|
||||||
}
|
} else return false;
|
||||||
else return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,56 +19,47 @@ public class RenderItemPhysics {
|
||||||
Item item = itemstack.getItem();
|
Item item = itemstack.getItem();
|
||||||
Block block = Block.getBlockFromItem(item);
|
Block block = Block.getBlockFromItem(item);
|
||||||
|
|
||||||
if (item == null)
|
if (item == null) {
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
boolean flag = p_177077_9_.isGui3d();
|
boolean flag = p_177077_9_.isGui3d();
|
||||||
int i = func_177078_a;
|
int i = func_177078_a;
|
||||||
|
|
||||||
if(ModManager.itemPhysics.isEnabled()) {
|
if (ModManager.itemPhysics.isEnabled()) {
|
||||||
if(block != null) {
|
if (block != null) {
|
||||||
GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + 0.15F, (float)p_177077_6_);
|
GlStateManager.translate((float) p_177077_2_, (float) p_177077_4_ + 0.15F, (float) p_177077_6_);
|
||||||
}else {
|
} else {
|
||||||
GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + 0.02F, (float)p_177077_6_);
|
GlStateManager.translate((float) p_177077_2_, (float) p_177077_4_ + 0.02F, (float) p_177077_6_);
|
||||||
GlStateManager.rotate(-90F, 1F, 0F, 0F);
|
GlStateManager.rotate(-90F, 1F, 0F, 0F);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
float f1 = MathHelper.sin(((float)itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F;
|
float f1 = MathHelper.sin(((float) itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F;
|
||||||
float f2 = p_177077_9_.getItemCameraTransforms().getTransform(ItemCameraTransforms.TransformType.GROUND).scale.y;
|
float f2 = p_177077_9_.getItemCameraTransforms().getTransform(ItemCameraTransforms.TransformType.GROUND).scale.y;
|
||||||
|
|
||||||
GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_);
|
GlStateManager.translate((float) p_177077_2_, (float) p_177077_4_ + f1 + 0.25F * f2, (float) p_177077_6_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!ModManager.itemPhysics.isEnabled()) {
|
if (!ModManager.itemPhysics.isEnabled()) {
|
||||||
if (flag || Minecraft.getMinecraft().getRenderManager().options != null)
|
if (flag || Minecraft.getMinecraft().getRenderManager().options != null) {
|
||||||
{
|
float f3 = (((float) itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float) Math.PI);
|
||||||
float f3 = (((float)itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float)Math.PI);
|
|
||||||
GlStateManager.rotate(f3, 0.0F, 1.0F, 0.0F);
|
GlStateManager.rotate(f3, 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!flag)
|
if (!flag) {
|
||||||
{
|
float f6 = -0.0F * (float) (i - 1) * 0.5F;
|
||||||
float f6 = -0.0F * (float)(i - 1) * 0.5F;
|
float f4 = -0.0F * (float) (i - 1) * 0.5F;
|
||||||
float f4 = -0.0F * (float)(i - 1) * 0.5F;
|
float f5 = -0.046875F * (float) (i - 1) * 0.5F;
|
||||||
float f5 = -0.046875F * (float)(i - 1) * 0.5F;
|
|
||||||
GlStateManager.translate(f6, f4, f5);
|
GlStateManager.translate(f6, f4, f5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ModManager.itemPhysics.isEnabled() && !itemIn.onGround) {
|
if (ModManager.itemPhysics.isEnabled() && !itemIn.onGround) {
|
||||||
float angle = System.currentTimeMillis() % (360 * 20) / (float) (4.5 - ItemPhysics.speed.getValue()/2);
|
float angle = System.currentTimeMillis() % (360 * 20) / (float) (4.5 - ItemPhysics.speed.getValue() / 2);
|
||||||
GlStateManager.rotate(angle, 1F, 1F, 1F);
|
GlStateManager.rotate(angle, 1F, 1F, 1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,13 +77,12 @@ public class RenderUtils {
|
||||||
paramYEnd = z;
|
paramYEnd = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
double x1 = (double)(paramXStart + radius);
|
double x1 = (double) (paramXStart + radius);
|
||||||
double y1 = (double)(paramYStart + radius);
|
double y1 = (double) (paramYStart + radius);
|
||||||
double x2 = (double)(paramXEnd - radius);
|
double x2 = (double) (paramXEnd - radius);
|
||||||
double y2 = (double)(paramYEnd - radius);
|
double y2 = (double) (paramYEnd - radius);
|
||||||
|
|
||||||
if (popPush)
|
if (popPush) GlStateManager.pushMatrix();
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
GlStateManager.blendFunc(RealOpenGLEnums.GL_SRC_ALPHA, RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA);
|
GlStateManager.blendFunc(RealOpenGLEnums.GL_SRC_ALPHA, RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
@ -99,24 +98,19 @@ public class RenderUtils {
|
||||||
worldrenderer.begin(RealOpenGLEnums.GL_LINE_SMOOTH, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(RealOpenGLEnums.GL_LINE_SMOOTH, DefaultVertexFormats.POSITION_TEX);
|
||||||
|
|
||||||
double degree = Math.PI / 180;
|
double degree = Math.PI / 180;
|
||||||
for (double i = 0; i <= 90; i += 1)
|
for (double i = 0; i <= 90; i += 1) glVertex2d(x2 + Math.sin(i * degree) * radius, y2 + Math.cos(i * degree) * radius);
|
||||||
glVertex2d(x2 + Math.sin(i * degree) * radius, y2 + Math.cos(i * degree) * radius);
|
for (double i = 90; i <= 180; i += 1) glVertex2d(x2 + Math.sin(i * degree) * radius, y1 + Math.cos(i * degree) * radius);
|
||||||
for (double i = 90; i <= 180; i += 1)
|
for (double i = 180; i <= 270; i += 1) glVertex2d(x1 + Math.sin(i * degree) * radius, y1 + Math.cos(i * degree) * radius);
|
||||||
glVertex2d(x2 + Math.sin(i * degree) * radius, y1 + Math.cos(i * degree) * radius);
|
for (double i = 270; i <= 360; i += 1) glVertex2d(x1 + Math.sin(i * degree) * radius, y2 + Math.cos(i * degree) * radius);
|
||||||
for (double i = 180; i <= 270; i += 1)
|
|
||||||
glVertex2d(x1 + Math.sin(i * degree) * radius, y1 + Math.cos(i * degree) * radius);
|
|
||||||
for (double i = 270; i <= 360; i += 1)
|
|
||||||
glVertex2d(x1 + Math.sin(i * degree) * radius, y2 + Math.cos(i * degree) * radius);
|
|
||||||
EaglercraftGPU.glEndList();
|
EaglercraftGPU.glEndList();
|
||||||
|
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
//glDisable(GL_LINE_SMOOTH);
|
//glDisable(GL_LINE_SMOOTH);
|
||||||
if (popPush)
|
if (popPush) GlStateManager.popMatrix();
|
||||||
GlStateManager.popMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glVertex2d(double idk, double idk2){
|
public static void glVertex2d(double idk, double idk2) {
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
worldrenderer.pos(idk, idk2, 0);
|
worldrenderer.pos(idk, idk2, 0);
|
||||||
|
@ -135,7 +129,6 @@ public class RenderUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void drawRoundedRect(final float paramFloat1, final float paramFloat2, final float paramFloat3, final float paramFloat4, final float paramFloat5) {
|
public static void drawRoundedRect(final float paramFloat1, final float paramFloat2, final float paramFloat3, final float paramFloat4, final float paramFloat5) {
|
||||||
final int i = 18;
|
final int i = 18;
|
||||||
final float f1 = 90.0f / i;
|
final float f1 = 90.0f / i;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||||
|
|
||||||
public class RoundedUtil {
|
public class RoundedUtil {
|
||||||
|
|
||||||
final static Minecraft mc = Minecraft.getMinecraft();
|
static final Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|
||||||
public static void drawSmoothRoundedRect(float x, float y, float x1, float y1, float radius, int color) {
|
public static void drawSmoothRoundedRect(float x, float y, float x1, float y1, float radius, int color) {
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
|
@ -29,24 +29,16 @@ public class RoundedUtil {
|
||||||
GlStateManager.color(red, green, blue, alpha);
|
GlStateManager.color(red, green, blue, alpha);
|
||||||
worldrenderer.begin(RealOpenGLEnums.GL_POLYGON, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(RealOpenGLEnums.GL_POLYGON, DefaultVertexFormats.POSITION_TEX);
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i <= 90; i += 3)
|
for (i = 0; i <= 90; i += 3) glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
for (i = 90; i <= 180; i += 3) glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||||
for (i = 90; i <= 180; i += 3)
|
for (i = 0; i <= 90; i += 3) glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
for (i = 90; i <= 180; i += 3) glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||||
for (i = 0; i <= 90; i += 3)
|
|
||||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
|
||||||
for (i = 90; i <= 180; i += 3)
|
|
||||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
worldrenderer.begin(RealOpenGLEnums.GL_LINE_LOOP, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(RealOpenGLEnums.GL_LINE_LOOP, DefaultVertexFormats.POSITION_TEX);
|
||||||
for (i = 0; i <= 90; i += 3)
|
for (i = 0; i <= 90; i += 3) glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
for (i = 90; i <= 180; i += 3) glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||||
for (i = 90; i <= 180; i += 3)
|
for (i = 0; i <= 90; i += 3) glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
for (i = 90; i <= 180; i += 3) glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||||
for (i = 0; i <= 90; i += 3)
|
|
||||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
|
||||||
for (i = 90; i <= 180; i += 3)
|
|
||||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
|
@ -55,6 +47,7 @@ public class RoundedUtil {
|
||||||
EaglercraftGPU.glLineWidth(1);
|
EaglercraftGPU.glLineWidth(1);
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void drawRoundedRect(float x, float y, float x1, float y1, float radius, int color) {
|
public static void drawRoundedRect(float x, float y, float x1, float y1, float radius, int color) {
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
|
@ -73,14 +66,10 @@ public class RoundedUtil {
|
||||||
GlStateManager.color(red, green, blue, alpha);
|
GlStateManager.color(red, green, blue, alpha);
|
||||||
worldrenderer.begin(RealOpenGLEnums.GL_POLYGON, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(RealOpenGLEnums.GL_POLYGON, DefaultVertexFormats.POSITION_TEX);
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i <= 90; i += 3)
|
for (i = 0; i <= 90; i += 3) glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
for (i = 90; i <= 180; i += 3) glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
||||||
for (i = 90; i <= 180; i += 3)
|
for (i = 0; i <= 90; i += 3) glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||||
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
|
for (i = 90; i <= 180; i += 3) glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
||||||
for (i = 0; i <= 90; i += 3)
|
|
||||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y1 - radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
|
||||||
for (i = 90; i <= 180; i += 3)
|
|
||||||
glVertex2d(x1 - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
|
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
|
@ -90,7 +79,7 @@ public class RoundedUtil {
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glVertex2d(double idk, double idk2){
|
public static void glVertex2d(double idk, double idk2) {
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
worldrenderer.pos(idk, idk2, 0);
|
worldrenderer.pos(idk, idk2, 0);
|
||||||
|
|
|
@ -11,15 +11,15 @@ public class CapeManager {
|
||||||
|
|
||||||
public static ResourceLocation capeLocation;
|
public static ResourceLocation capeLocation;
|
||||||
|
|
||||||
public static void displayChooser(){
|
public static void displayChooser() {
|
||||||
EagRuntime.displayFileChooser("image/png", "png");
|
EagRuntime.displayFileChooser("image/png", "png");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResourceLocation getCapeLocation(){
|
public static ResourceLocation getCapeLocation() {
|
||||||
return capeLocation;
|
return capeLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void free(){
|
public static void free() {
|
||||||
Minecraft.getMinecraft().getTextureManager().deleteTexture(capeLocation);
|
Minecraft.getMinecraft().getTextureManager().deleteTexture(capeLocation);
|
||||||
capeLocation = null;
|
capeLocation = null;
|
||||||
}
|
}
|
||||||
|
@ -28,33 +28,32 @@ public class CapeManager {
|
||||||
EagRuntime.setStorage("cape", texture);
|
EagRuntime.setStorage("cape", texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] read(){
|
public static byte[] read() {
|
||||||
if(EagRuntime.getStorage("cape") != null){
|
if (EagRuntime.getStorage("cape") != null) {
|
||||||
return EagRuntime.getStorage("cape");
|
return EagRuntime.getStorage("cape");
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void forceLoad(byte[] texture){
|
public static void forceLoad(byte[] texture) {
|
||||||
try{
|
try {
|
||||||
ImageData loadedCape = ImageData.loadImageFile(texture);
|
ImageData loadedCape = ImageData.loadImageFile(texture);
|
||||||
if(loadedCape != null){
|
if (loadedCape != null) {
|
||||||
CapeManager.capeLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcape", new DynamicTexture(loadedCape));
|
CapeManager.capeLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcape", new DynamicTexture(loadedCape));
|
||||||
Minecraft.getMinecraft().displayGuiScreen(null);
|
Minecraft.getMinecraft().displayGuiScreen(null);
|
||||||
//Minecraft.getMinecraft().getTextureManager().bindTexture(CapeManager.capeLocation);
|
//Minecraft.getMinecraft().getTextureManager().bindTexture(CapeManager.capeLocation);
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
} catch (Exception e) {
|
||||||
System.out.println(e);
|
System.out.println(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldRender(AbstractClientPlayer player){
|
public static boolean shouldRender(AbstractClientPlayer player) {
|
||||||
if(player == Minecraft.getMinecraft().thePlayer){
|
if (player == Minecraft.getMinecraft().thePlayer) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,14 +25,14 @@ public class CapeUi extends GuiScreen {
|
||||||
super.drawScreen(mx, my, par3);
|
super.drawScreen(mx, my, par3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateScreen(){
|
public void updateScreen() {
|
||||||
if (EagRuntime.fileChooserHasResult()) {
|
if (EagRuntime.fileChooserHasResult()) {
|
||||||
CapeManager.free();
|
CapeManager.free();
|
||||||
FileChooserResult result = EagRuntime.getFileChooserResult();
|
FileChooserResult result = EagRuntime.getFileChooserResult();
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
ImageData loadedCape = ImageData.loadImageFile(result.fileData);
|
ImageData loadedCape = ImageData.loadImageFile(result.fileData);
|
||||||
if(loadedCape != null){
|
if (loadedCape != null) {
|
||||||
for(int i = 0; 1 > i; i++){
|
for (int i = 0; 1 > i; i++) {
|
||||||
CapeManager.write(result.fileData);
|
CapeManager.write(result.fileData);
|
||||||
}
|
}
|
||||||
CapeManager.capeLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcape", new DynamicTexture(loadedCape));
|
CapeManager.capeLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcape", new DynamicTexture(loadedCape));
|
||||||
|
@ -48,7 +48,7 @@ public class CapeUi extends GuiScreen {
|
||||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||||
if (par1GuiButton.id == 200) {
|
if (par1GuiButton.id == 200) {
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
}else if(par1GuiButton.id == 1){
|
} else if (par1GuiButton.id == 1) {
|
||||||
CapeManager.displayChooser();
|
CapeManager.displayChooser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,15 +11,15 @@ public class CrosshairManager {
|
||||||
|
|
||||||
public static ResourceLocation crosshairLocation;
|
public static ResourceLocation crosshairLocation;
|
||||||
|
|
||||||
public static void displayChooser(){
|
public static void displayChooser() {
|
||||||
EagRuntime.displayFileChooser("image/png", "png");
|
EagRuntime.displayFileChooser("image/png", "png");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResourceLocation getCrosshairLocation(){
|
public static ResourceLocation getCrosshairLocation() {
|
||||||
return crosshairLocation;
|
return crosshairLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void free(){
|
public static void free() {
|
||||||
Minecraft.getMinecraft().getTextureManager().deleteTexture(crosshairLocation);
|
Minecraft.getMinecraft().getTextureManager().deleteTexture(crosshairLocation);
|
||||||
crosshairLocation = null;
|
crosshairLocation = null;
|
||||||
}
|
}
|
||||||
|
@ -28,33 +28,32 @@ public class CrosshairManager {
|
||||||
EagRuntime.setStorage("crosshair", texture);
|
EagRuntime.setStorage("crosshair", texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] read(){
|
public static byte[] read() {
|
||||||
if(EagRuntime.getStorage("crosshair") != null){
|
if (EagRuntime.getStorage("crosshair") != null) {
|
||||||
return EagRuntime.getStorage("crosshair");
|
return EagRuntime.getStorage("crosshair");
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void forceLoad(byte[] texture){
|
public static void forceLoad(byte[] texture) {
|
||||||
try{
|
try {
|
||||||
ImageData loadedCrosshair = ImageData.loadImageFile(texture);
|
ImageData loadedCrosshair = ImageData.loadImageFile(texture);
|
||||||
if(loadedCrosshair != null){
|
if (loadedCrosshair != null) {
|
||||||
CrosshairManager.crosshairLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcrosshair", new DynamicTexture(loadedCrosshair));
|
CrosshairManager.crosshairLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcrosshair", new DynamicTexture(loadedCrosshair));
|
||||||
Minecraft.getMinecraft().displayGuiScreen(null);
|
Minecraft.getMinecraft().displayGuiScreen(null);
|
||||||
//Minecraft.getMinecraft().getTextureManager().bindTexture(CrosshairManager.crosshairLocation);
|
//Minecraft.getMinecraft().getTextureManager().bindTexture(CrosshairManager.crosshairLocation);
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
} catch (Exception e) {
|
||||||
System.out.println(e);
|
System.out.println(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldRender(AbstractClientPlayer player){
|
public static boolean shouldRender(AbstractClientPlayer player) {
|
||||||
if(player == Minecraft.getMinecraft().thePlayer){
|
if (player == Minecraft.getMinecraft().thePlayer) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,14 +25,14 @@ public class CrosshairUi extends GuiScreen {
|
||||||
super.drawScreen(mx, my, par3);
|
super.drawScreen(mx, my, par3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateScreen(){
|
public void updateScreen() {
|
||||||
if (EagRuntime.fileChooserHasResult()) {
|
if (EagRuntime.fileChooserHasResult()) {
|
||||||
CrosshairManager.free();
|
CrosshairManager.free();
|
||||||
FileChooserResult result = EagRuntime.getFileChooserResult();
|
FileChooserResult result = EagRuntime.getFileChooserResult();
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
ImageData loadedCrosshair = ImageData.loadImageFile(result.fileData);
|
ImageData loadedCrosshair = ImageData.loadImageFile(result.fileData);
|
||||||
if(loadedCrosshair != null){
|
if (loadedCrosshair != null) {
|
||||||
for(int i = 0; 1 > i; i++){
|
for (int i = 0; 1 > i; i++) {
|
||||||
CrosshairManager.write(result.fileData);
|
CrosshairManager.write(result.fileData);
|
||||||
}
|
}
|
||||||
CrosshairManager.crosshairLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcrosshair", new DynamicTexture(loadedCrosshair));
|
CrosshairManager.crosshairLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("uploadedcrosshair", new DynamicTexture(loadedCrosshair));
|
||||||
|
@ -48,7 +48,7 @@ public class CrosshairUi extends GuiScreen {
|
||||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||||
if (par1GuiButton.id == 200) {
|
if (par1GuiButton.id == 200) {
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
}else if(par1GuiButton.id == 1){
|
} else if (par1GuiButton.id == 1) {
|
||||||
CrosshairManager.displayChooser();
|
CrosshairManager.displayChooser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.client.gui.GuiOptions;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.gui.GuiVideoSettings;
|
import net.minecraft.client.gui.GuiVideoSettings;
|
||||||
|
|
||||||
public class PreVideo extends GuiScreen{
|
public class PreVideo extends GuiScreen {
|
||||||
|
|
||||||
public GuiScreen uwu;
|
public GuiScreen uwu;
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ public class PreVideo extends GuiScreen{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||||
if(isMouseInside(parInt1, parInt2, width/2-50, height/2+40, width/2+50, height/2+70)) {
|
if (isMouseInside(parInt1, parInt2, width / 2 - 50, height / 2 + 40, width / 2 + 50, height / 2 + 70)) {
|
||||||
this.mc.displayGuiScreen(new GuiOptions(uwu, mc.gameSettings));
|
this.mc.displayGuiScreen(new GuiOptions(uwu, mc.gameSettings));
|
||||||
}else {
|
} else {
|
||||||
this.mc.displayGuiScreen(new GuiVideoSettings(this, mc.gameSettings));
|
this.mc.displayGuiScreen(new GuiVideoSettings(this, mc.gameSettings));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,12 +26,9 @@ public class PreVideo extends GuiScreen{
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int i, int j, float var3) {
|
public void drawScreen(int i, int j, float var3) {
|
||||||
this.drawDefaultBackground();
|
this.drawDefaultBackground();
|
||||||
drawCenteredString(mc.fontRendererObj, "Don't use Auto gui scale! Resent looks best with normal or large gui scales.", width/2, height/2, -1);
|
drawCenteredString(mc.fontRendererObj, "Don't use Auto gui scale! Resent looks best with normal or large gui scales.", width / 2, height / 2, -1);
|
||||||
drawCenteredString(mc.fontRendererObj, "Press anywhere to continue. Or, go", width/2, height/2+19, -1);
|
drawCenteredString(mc.fontRendererObj, "Press anywhere to continue. Or, go", width / 2, height / 2 + 19, -1);
|
||||||
RenderUtils.drawRoundedRect(width/2-50, height/2+40, width/2+50, height/2+70, 4, isMouseInside(i, j, width/2-50, height/2+40, width/2+50, height/2+70) ? new Color(40, 40, 40).getRGB() : new Color(21, 21, 21).getRGB());
|
RenderUtils.drawRoundedRect(width / 2 - 50, height / 2 + 40, width / 2 + 50, height / 2 + 70, 4, isMouseInside(i, j, width / 2 - 50, height / 2 + 40, width / 2 + 50, height / 2 + 70) ? new Color(40, 40, 40).getRGB() : new Color(21, 21, 21).getRGB());
|
||||||
drawCenteredString(mc.fontRendererObj, "Back", width/2, height/2+51, -1);
|
drawCenteredString(mc.fontRendererObj, "Back", width / 2, height / 2 + 51, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,6 @@ public class Theme {
|
||||||
return new DecelerateAnimation(ms, endpoint);
|
return new DecelerateAnimation(ms, endpoint);
|
||||||
case "Smooth step":
|
case "Smooth step":
|
||||||
return new SmoothStepAnimation(ms, endpoint);
|
return new SmoothStepAnimation(ms, endpoint);
|
||||||
case "None":
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -56,8 +56,7 @@ public abstract class Animation {
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getValue() {
|
public double getValue() {
|
||||||
if(HUD.animationTheme.getValue().equals("None"))
|
if (HUD.animationTheme.getValue().equals("None")) return 0;
|
||||||
return 0;
|
|
||||||
if (direction == Direction.FORWARDS) {
|
if (direction == Direction.FORWARDS) {
|
||||||
if (isDone()) return endPoint;
|
if (isDone()) return endPoint;
|
||||||
return (getEquation(timer.getTime()) * endPoint);
|
return (getEquation(timer.getTime()) * endPoint);
|
||||||
|
|
|
@ -39,6 +39,6 @@ public class SimpleAnimation {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDone() {
|
public boolean isDone() {
|
||||||
return lastValue >= value-1;
|
return lastValue >= value - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package dev.resent.visual.ui.clickgui;
|
package dev.resent.visual.ui.clickgui;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Comparator;
|
|
||||||
|
|
||||||
import dev.resent.client.ClientInfo;
|
import dev.resent.client.ClientInfo;
|
||||||
import dev.resent.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
@ -19,6 +16,8 @@ import dev.resent.util.render.RenderUtils;
|
||||||
import dev.resent.visual.ui.Theme;
|
import dev.resent.visual.ui.Theme;
|
||||||
import dev.resent.visual.ui.animation.Animation;
|
import dev.resent.visual.ui.animation.Animation;
|
||||||
import dev.resent.visual.ui.animation.Direction;
|
import dev.resent.visual.ui.animation.Direction;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Comparator;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
|
@ -53,11 +52,11 @@ public class ClickGUI extends GuiScreen {
|
||||||
int xo = 0;
|
int xo = 0;
|
||||||
int off = 0;
|
int off = 0;
|
||||||
|
|
||||||
if(isMouseInside(mouseX, mouseY, x, height+14, x+20, height+25)) {
|
if (isMouseInside(mouseX, mouseY, x, height + 14, x + 20, height + 25)) {
|
||||||
selectedCategory = null;
|
selectedCategory = null;
|
||||||
}else if(isMouseInside(mouseX, mouseY, x+24, height+14, x+46, height+25)) {
|
} else if (isMouseInside(mouseX, mouseY, x + 24, height + 14, x + 46, height + 25)) {
|
||||||
selectedCategory = Category.HUD;
|
selectedCategory = Category.HUD;
|
||||||
}else if(isMouseInside(mouseX, mouseY, x+50, height+14, x+74, height+25)) {
|
} else if (isMouseInside(mouseX, mouseY, x + 50, height + 14, x + 74, height + 25)) {
|
||||||
selectedCategory = Category.MISC;
|
selectedCategory = Category.MISC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +66,8 @@ public class ClickGUI extends GuiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
Resent.INSTANCE.modManager.modsInCategory(selectedCategory).sort(Comparator.comparingInt(m -> fr.getStringWidth(m.getName())));
|
Resent.INSTANCE.modManager.modsInCategory(selectedCategory).sort(Comparator.comparingInt(m -> fr.getStringWidth(m.getName())));
|
||||||
for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory) ) {
|
for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory)) {
|
||||||
if(!m.isAdmin() || EntityRenderer.test){
|
if (!m.isAdmin() || EntityRenderer.test) {
|
||||||
int fh = 9;
|
int fh = 9;
|
||||||
|
|
||||||
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.doesHaveSetting() && openedMod == null) {
|
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.doesHaveSetting() && openedMod == null) {
|
||||||
|
@ -81,14 +80,12 @@ public class ClickGUI extends GuiScreen {
|
||||||
// Close ui
|
// Close ui
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
this.openedMod = null;
|
this.openedMod = null;
|
||||||
}else if(isMouseInside(mouseX, mouseY, this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+80+xo, height+30-fh*-off+30+2-offset+17) && ModManager.clickGui.guiTheme.getValue() == "New" && openedMod == null){
|
} else if (isMouseInside(mouseX, mouseY, this.x + 48 + xo, height - 2 - fh * -(off) + 70 - 1 - offset, this.x + 80 + xo, height + 30 - fh * -off + 30 + 2 - offset + 17) && ModManager.clickGui.guiTheme.getValue() == "New" && openedMod == null) {
|
||||||
//toggle new
|
//toggle new
|
||||||
if(m.getName() != "ClickGUI")
|
if (m.getName() != "ClickGUI") m.toggle();
|
||||||
m.toggle();
|
|
||||||
} else if (isMouseInside(mouseX, mouseY, this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset) && mouseButton == 0 && openedMod == null && ModManager.clickGui.guiTheme.getValue() == "Classic revised") {
|
} else if (isMouseInside(mouseX, mouseY, this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset) && mouseButton == 0 && openedMod == null && ModManager.clickGui.guiTheme.getValue() == "Classic revised") {
|
||||||
//toggle classic
|
//toggle classic
|
||||||
if(m.getName() != "ClickGUI")
|
if (m.getName() != "ClickGUI") m.toggle();
|
||||||
m.toggle();
|
|
||||||
}
|
}
|
||||||
if (xo > width / 2) {
|
if (xo > width / 2) {
|
||||||
xo = 0;
|
xo = 0;
|
||||||
|
@ -102,31 +99,30 @@ public class ClickGUI extends GuiScreen {
|
||||||
if (openedMod != null) {
|
if (openedMod != null) {
|
||||||
int var = 0;
|
int var = 0;
|
||||||
for (Setting s : this.openedMod.settings) {
|
for (Setting s : this.openedMod.settings) {
|
||||||
|
if (s instanceof NumberSetting) {
|
||||||
if(s instanceof NumberSetting) {
|
if (isMouseInside(mouseX, mouseY, width - 150 + sliderOffset, height + 41 + var, width - 141 + sliderOffset, height + 50 + var)) {
|
||||||
if(isMouseInside(mouseX, mouseY, width-150+sliderOffset, height+41+var, width-141+sliderOffset, height+50+var)) {
|
|
||||||
draggingNumber = true;
|
draggingNumber = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s instanceof BooleanSetting) {
|
if (s instanceof BooleanSetting) {
|
||||||
if (isMouseInside(mouseX, mouseY, this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1) && mouseButton == 0) {
|
if (isMouseInside(mouseX, mouseY, this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1) && mouseButton == 0) {
|
||||||
((BooleanSetting)s).toggle();
|
((BooleanSetting) s).toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s instanceof ModeSetting) {
|
if (s instanceof ModeSetting) {
|
||||||
if(isMouseInside(mouseX, mouseY, this.x+360, height+40+var, this.x+370, height+50+var) && mouseButton == 0) {
|
if (isMouseInside(mouseX, mouseY, this.x + 360, height + 40 + var, this.x + 370, height + 50 + var) && mouseButton == 0) {
|
||||||
((ModeSetting)s).cycle(false);
|
((ModeSetting) s).cycle(false);
|
||||||
}
|
}
|
||||||
if(isMouseInside(mouseX, mouseY, this.x+458, height+40+var, this.x+470, height+50+var) && mouseButton == 0) {
|
if (isMouseInside(mouseX, mouseY, this.x + 458, height + 40 + var, this.x + 470, height + 50 + var) && mouseButton == 0) {
|
||||||
((ModeSetting)s).cycle(true);
|
((ModeSetting) s).cycle(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(s instanceof CustomRectSettingDraw){
|
if (s instanceof CustomRectSettingDraw) {
|
||||||
if(isMouseInside(mouseX, mouseY, x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53)){
|
if (isMouseInside(mouseX, mouseY, x + 21, height + 41 + var, x + 27 + fr.getStringWidth(s.name), height + var + 53)) {
|
||||||
((CustomRectSettingDraw)s).onPress();
|
((CustomRectSettingDraw) s).onPress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +144,7 @@ public class ClickGUI extends GuiScreen {
|
||||||
int off = 0;
|
int off = 0;
|
||||||
|
|
||||||
if (close) {
|
if (close) {
|
||||||
if(introAnimation == null) {
|
if (introAnimation == null) {
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -180,12 +176,12 @@ public class ClickGUI extends GuiScreen {
|
||||||
fr.drawString("X", width + 18, height - 2, -1);
|
fr.drawString("X", width + 18, height - 2, -1);
|
||||||
|
|
||||||
//categories
|
//categories
|
||||||
drawRect(x+0.8d, height+14, x+20, height+25, isMouseInside(mouseX, mouseY, x, height+14, x+20, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB());
|
drawRect(x + 0.8d, height + 14, x + 20, height + 25, isMouseInside(mouseX, mouseY, x, height + 14, x + 20, height + 25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB());
|
||||||
drawRect(x+23d, height+14, x+47, height+25, isMouseInside(mouseX, mouseY, x+24, height+14, x+46, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB());
|
drawRect(x + 23d, height + 14, x + 47, height + 25, isMouseInside(mouseX, mouseY, x + 24, height + 14, x + 46, height + 25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB());
|
||||||
drawRect(x+50, height+14, x+75, height+25, isMouseInside(mouseX, mouseY, x+50, height+14, x+74, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB());
|
drawRect(x + 50, height + 14, x + 75, height + 25, isMouseInside(mouseX, mouseY, x + 50, height + 14, x + 74, height + 25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB());
|
||||||
fr.drawStringWithShadow("All", x+5f, height+16, -1);
|
fr.drawStringWithShadow("All", x + 5f, height + 16, -1);
|
||||||
fr.drawStringWithShadow("Hud", x+26.5f, height+16, -1);
|
fr.drawStringWithShadow("Hud", x + 26.5f, height + 16, -1);
|
||||||
fr.drawStringWithShadow("Misc", x+53, height+16, -1);
|
fr.drawStringWithShadow("Misc", x + 53, height + 16, -1);
|
||||||
|
|
||||||
//white line
|
//white line
|
||||||
drawRect(x - 8, height + 29, width + 33, height + 30, -1);
|
drawRect(x - 8, height + 29, width + 33, height + 30, -1);
|
||||||
|
@ -195,25 +191,25 @@ public class ClickGUI extends GuiScreen {
|
||||||
for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory)) {
|
for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory)) {
|
||||||
if (this.openedMod == null && !m.isAdmin() || this.openedMod == null && EntityRenderer.test) {
|
if (this.openedMod == null && !m.isAdmin() || this.openedMod == null && EntityRenderer.test) {
|
||||||
int fh = 9;
|
int fh = 9;
|
||||||
if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29 && height + 40 - fh * (-off) + 30 +15 - offset < y + 20 && (introAnimation != null ? introAnimation.isDone() : true)) {
|
if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29 && height + 40 - fh * (-off) + 30 + 15 - offset < y + 20 && (introAnimation != null ? introAnimation.isDone() : true)) {
|
||||||
// Enabled outline
|
// Enabled outline
|
||||||
|
|
||||||
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 7);
|
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 7);
|
||||||
if(ModManager.clickGui.guiTheme.getValue() == "New"){
|
if (ModManager.clickGui.guiTheme.getValue() == "New") {
|
||||||
RenderUtils.drawRoundedRect(this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+80+xo, height+30-fh*-off+30+2-offset+17, 6, new Color(97, 97, 97).getRGB(), true);
|
RenderUtils.drawRoundedRect(this.x + 48 + xo, height - 2 - fh * -(off) + 70 - 1 - offset, this.x + 80 + xo, height + 30 - fh * -off + 30 + 2 - offset + 17, 6, new Color(97, 97, 97).getRGB(), true);
|
||||||
RenderUtils.drawRoundedRect(this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+60+xo+m.toggleAnimation.getValue(), height+30-fh*-off+30+2-offset+17, 6, Color.green.getRGB(), true);
|
RenderUtils.drawRoundedRect(this.x + 48 + xo, height - 2 - fh * -(off) + 70 - 1 - offset, this.x + 60 + xo + m.toggleAnimation.getValue(), height + 30 - fh * -off + 30 + 2 - offset + 17, 6, Color.green.getRGB(), true);
|
||||||
RenderUtils.drawRoundedRect(this.x+48+xo+m.toggleAnimation.getValue(), height-2-fh*-(off)+70-1-offset, this.x+60+xo+m.toggleAnimation.getValue(), height+30-fh*-off+30+2-offset+17, 6, -1, true);
|
RenderUtils.drawRoundedRect(this.x + 48 + xo + m.toggleAnimation.getValue(), height - 2 - fh * -(off) + 70 - 1 - offset, this.x + 60 + xo + m.toggleAnimation.getValue(), height + 30 - fh * -off + 30 + 2 - offset + 17, 6, -1, true);
|
||||||
}else if(ModManager.clickGui.guiTheme.getValue() == "Classic revised"){
|
} else if (ModManager.clickGui.guiTheme.getValue() == "Classic revised") {
|
||||||
RenderUtils.drawRoundedRect(this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset, 4, m.isEnabled() ? Color.GREEN.getRGB() : Color.RED.getRGB(), true);
|
RenderUtils.drawRoundedRect(this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset, 4, m.isEnabled() ? Color.GREEN.getRGB() : Color.RED.getRGB(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ModManager.clickGui.guiTheme.getValue().equals("New")) {
|
if (ModManager.clickGui.guiTheme.getValue().equals("New")) {
|
||||||
drawRect(
|
drawRect(
|
||||||
this.x + 10 + xo - 1 + 10,
|
this.x + 10 + xo - 1 + 10,
|
||||||
height - 2 - fh * -(off) + 50 - 1 - offset,
|
height - 2 - fh * -(off) + 50 - 1 - offset,
|
||||||
this.x + 90 + xo - 1 + 22,
|
this.x + 90 + xo - 1 + 22,
|
||||||
height + 85 - fh * (-off) - offset,
|
height + 85 - fh * (-off) - offset,
|
||||||
/*isMouseInside(mouseX, mouseY, this.x + 10 + xo - 1 + 10, height - 2 - fh * -(off) + 50 - 1 - offset, this.x + 90 + xo - 1 + 22, height + 30 - fh * (-off) + 30 - 1 + 2 - offset) ? new Color(105, 105, 105, 65).getRGB() :*/ new Color(211, 211, 211, 65).getRGB()
|
/*isMouseInside(mouseX, mouseY, this.x + 10 + xo - 1 + 10, height - 2 - fh * -(off) + 50 - 1 - offset, this.x + 90 + xo - 1 + 22, height + 30 - fh * (-off) + 30 - 1 + 2 - offset) ? new Color(105, 105, 105, 65).getRGB() :*/new Color(211, 211, 211, 65).getRGB()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,56 +228,55 @@ public class ClickGUI extends GuiScreen {
|
||||||
fr.drawStringWithShadow(ClientInfo.name + " - " + openedMod.getName(), sr.getScaledWidth() / 2 - (fr.getStringWidth("Resent - " + openedMod.getName()) / 2), height + 29 - 9 - 2, -1);
|
fr.drawStringWithShadow(ClientInfo.name + " - " + openedMod.getName(), sr.getScaledWidth() / 2 - (fr.getStringWidth("Resent - " + openedMod.getName()) / 2), height + 29 - 9 - 2, -1);
|
||||||
|
|
||||||
for (Setting s : openedMod.settings) {
|
for (Setting s : openedMod.settings) {
|
||||||
if(s instanceof CustomRectSettingDraw){
|
if (s instanceof CustomRectSettingDraw) {
|
||||||
drawRect(x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53, isMouseInside(mouseX, mouseY, x+21, height+39+var, x+26+fr.getStringWidth(s.name), height+var+51) ? new Color(150, 150, 150).getRGB() : new Color(211, 211, 211).getRGB());
|
drawRect(x + 21, height + 41 + var, x + 27 + fr.getStringWidth(s.name), height + var + 53, isMouseInside(mouseX, mouseY, x + 21, height + 39 + var, x + 26 + fr.getStringWidth(s.name), height + var + 51) ? new Color(150, 150, 150).getRGB() : new Color(211, 211, 211).getRGB());
|
||||||
//RenderUtils.drawRectOutline(x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53, -1);
|
//RenderUtils.drawRectOutline(x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53, -1);
|
||||||
fr.drawStringWithShadow(s.name, this.x + 24, height +43 + var, -1);
|
fr.drawStringWithShadow(s.name, this.x + 24, height + 43 + var, -1);
|
||||||
var += 3;
|
var += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(s instanceof NumberSetting) {
|
if (s instanceof NumberSetting) {
|
||||||
NumberSetting ss = ((NumberSetting)s);
|
NumberSetting ss = ((NumberSetting) s);
|
||||||
fr.drawStringWithShadow(s.name + ": sof " + sliderOffset + ", val: " + ((NumberSetting)s).getValue(), this.x+24, height+41+var, -1);
|
fr.drawStringWithShadow(s.name + ": sof " + sliderOffset + ", val: " + ((NumberSetting) s).getValue(), this.x + 24, height + 41 + var, -1);
|
||||||
drawRect(width-150, height+43+var, width-45, height+47+var, -1);
|
drawRect(width - 150, height + 43 + var, width - 45, height + 47 + var, -1);
|
||||||
RenderUtils.drawRoundedRect(width-150+sliderOffset, height+40+var, width-140+sliderOffset, height+50+var, 4, Color.RED.getRGB());
|
RenderUtils.drawRoundedRect(width - 150 + sliderOffset, height + 40 + var, width - 140 + sliderOffset, height + 50 + var, 4, Color.RED.getRGB());
|
||||||
|
|
||||||
if(settingDrag) {
|
if (settingDrag) {
|
||||||
sliderOffset = mouseX-(width-150);
|
sliderOffset = mouseX - (width - 150);
|
||||||
ss.setValue(sliderOffset*(ss.max/100));
|
ss.setValue(sliderOffset * (ss.max / 100));
|
||||||
}else {
|
} else {
|
||||||
sliderOffset = (int) ((ss.getValue() * 100)/ss.max);
|
sliderOffset = (int) ((ss.getValue() * 100) / ss.max);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sliderOffset < 0) {
|
if (sliderOffset < 0) {
|
||||||
settingDrag = false;
|
settingDrag = false;
|
||||||
sliderOffset = 0;
|
sliderOffset = 0;
|
||||||
}else if(draggingNumber){
|
} else if (draggingNumber) {
|
||||||
settingDrag = true;
|
settingDrag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sliderOffset > 100){
|
if (sliderOffset > 100) {
|
||||||
settingDrag = false;
|
settingDrag = false;
|
||||||
sliderOffset = 100;
|
sliderOffset = 100;
|
||||||
}else if(draggingNumber){
|
} else if (draggingNumber) {
|
||||||
settingDrag = true;
|
settingDrag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s instanceof BooleanSetting) {
|
if (s instanceof BooleanSetting) {
|
||||||
drawRect(this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1, isMouseInside(mouseX, mouseY, this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1) ? new Color(211, 211, 211, 65).getRGB() : new Color(105, 105, 105, 65).getRGB());
|
drawRect(this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1, isMouseInside(mouseX, mouseY, this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1) ? new Color(211, 211, 211, 65).getRGB() : new Color(105, 105, 105, 65).getRGB());
|
||||||
fr.drawStringWithShadow(s.name, this.x + 18 + 6, height - fr.FONT_HEIGHT + 50 + var, -1);
|
fr.drawStringWithShadow(s.name, this.x + 18 + 6, height - fr.FONT_HEIGHT + 50 + var, -1);
|
||||||
if (((BooleanSetting)s).getValue()) {
|
if (((BooleanSetting) s).getValue()) {
|
||||||
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/check.png"));
|
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/check.png"));
|
||||||
Gui.drawModalRectWithCustomSizedTexture(this.x + 9, height + 39 + var, 0, 0, 12, 12, 12, 12);
|
Gui.drawModalRectWithCustomSizedTexture(this.x + 9, height + 39 + var, 0, 0, 12, 12, 12, 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s instanceof ModeSetting) {
|
if (s instanceof ModeSetting) {
|
||||||
fr.drawStringWithShadow(s.name, this.x + 18 + 6, height - 9 + 50 + var, -1);
|
fr.drawStringWithShadow(s.name, this.x + 18 + 6, height - 9 + 50 + var, -1);
|
||||||
fr.drawStringWithShadow(((ModeSetting)s).getValue(), width-100-fr.getStringWidth(((ModeSetting)s).getValue())/2, height+41+var, -1);
|
fr.drawStringWithShadow(((ModeSetting) s).getValue(), width - 100 - fr.getStringWidth(((ModeSetting) s).getValue()) / 2, height + 41 + var, -1);
|
||||||
fr.drawStringWithShadow(EnumChatFormatting.RED + "<", width - 150, height-9+50+var, -1);
|
fr.drawStringWithShadow(EnumChatFormatting.RED + "<", width - 150, height - 9 + 50 + var, -1);
|
||||||
//RenderUtils.drawRectOutline(this.x+370, height+39+var, this.x+360, height+50+var, -1);
|
//RenderUtils.drawRectOutline(this.x+370, height+39+var, this.x+360, height+50+var, -1);
|
||||||
fr.drawStringWithShadow(EnumChatFormatting.RED + ">", this.x+463, height-9+50+var, -1);
|
fr.drawStringWithShadow(EnumChatFormatting.RED + ">", this.x + 463, height - 9 + 50 + var, -1);
|
||||||
//RenderUtils.drawRectOutline(this.x+458, height+40+var, this.x+470, height+50+var, -1);
|
//RenderUtils.drawRectOutline(this.x+458, height+40+var, this.x+470, height+50+var, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +284,7 @@ public class ClickGUI extends GuiScreen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!m.isAdmin() || EntityRenderer.test){
|
if (!m.isAdmin() || EntityRenderer.test) {
|
||||||
if (xo > width / 2) {
|
if (xo > width / 2) {
|
||||||
xo = 0;
|
xo = 0;
|
||||||
off += 5;
|
off += 5;
|
||||||
|
@ -304,10 +299,6 @@ public class ClickGUI extends GuiScreen {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMouseInside(double mouseX, double mouseY, double x, double y, double width, double height) {
|
|
||||||
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
Keyboard.enableRepeatEvents(true);
|
Keyboard.enableRepeatEvents(true);
|
||||||
ModManager.clickGui.setEnabled(false);
|
ModManager.clickGui.setEnabled(false);
|
||||||
|
@ -321,7 +312,7 @@ public class ClickGUI extends GuiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseReleased(int mouseX, int mouseY, int mouseButton){
|
public void mouseReleased(int mouseX, int mouseY, int mouseButton) {
|
||||||
draggingNumber = false;
|
draggingNumber = false;
|
||||||
settingDrag = false;
|
settingDrag = false;
|
||||||
}
|
}
|
||||||
|
@ -341,20 +332,19 @@ public class ClickGUI extends GuiScreen {
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
offset = MathHelper.clamp_int(offset + 1, 0, getListMaxScroll());
|
offset = MathHelper.clamp_int(offset + 1, 0, getListMaxScroll());
|
||||||
try {
|
try {
|
||||||
if(ModManager.clickGui.scroll.getValue())
|
if (ModManager.clickGui.scroll.getValue()) Thread.sleep(1);
|
||||||
Thread.sleep(1);
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
})
|
||||||
|
.start();
|
||||||
} else if (wheel > 0) {
|
} else if (wheel > 0) {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
offset = MathHelper.clamp_int(offset - 1, 0, getListMaxScroll());
|
offset = MathHelper.clamp_int(offset - 1, 0, getListMaxScroll());
|
||||||
try {
|
try {
|
||||||
if(ModManager.clickGui.scroll.getValue())
|
if (ModManager.clickGui.scroll.getValue()) Thread.sleep(1);
|
||||||
Thread.sleep(1);
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ public class HUDConfigScreen extends GuiScreen {
|
||||||
parentGuiScreen = parentScreen;
|
parentGuiScreen = parentScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
this.buttonList.add(new GuiButton(200, width / 2 - 100, height - 30, "Back"));
|
this.buttonList.add(new GuiButton(200, width / 2 - 100, height - 30, "Back"));
|
||||||
}
|
}
|
||||||
|
@ -24,7 +23,7 @@ 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();
|
||||||
Resent.INSTANCE.modManager.modules.stream().filter(m -> m.isEnabled() && m instanceof RenderMod).forEach(rm -> ((RenderMod)rm).renderLayout(mx, my));
|
Resent.INSTANCE.modManager.modules.stream().filter(m -> m.isEnabled() && m instanceof RenderMod).forEach(rm -> ((RenderMod) rm).renderLayout(mx, my));
|
||||||
super.drawScreen(mx, my, par3);
|
super.drawScreen(mx, my, par3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,18 +17,17 @@ public class PreGUI extends GuiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int i, int j, float var3) {
|
public void drawScreen(int i, int j, float var3) {
|
||||||
|
|
||||||
opacityAnimation.setAnimation(100, 5);
|
opacityAnimation.setAnimation(100, 5);
|
||||||
slideAnimation.setAnimation(200, 7);
|
slideAnimation.setAnimation(200, 7);
|
||||||
|
|
||||||
boolean isInside = isMouseInside(i, j, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50);
|
boolean isInside = isMouseInside(i, j, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50);
|
||||||
boolean isInside2 = isMouseInside(i, j, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 55, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 85);
|
boolean isInside2 = isMouseInside(i, j, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 55, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 85);
|
||||||
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
||||||
Gui.drawModalRectWithCustomSizedTexture(GuiScreen.width / 2 - 20, GuiScreen.height / 2 - 250 + (int)slideAnimation.getValue(), 0, 0, 60, 60, 60, 60);
|
Gui.drawModalRectWithCustomSizedTexture(GuiScreen.width / 2 - 20, GuiScreen.height / 2 - 250 + (int) slideAnimation.getValue(), 0, 0, 60, 60, 60, 60);
|
||||||
Gui.drawRect(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50, isInside ? 0x90FFFFFF : new Color(230, 230, 230, (int)opacityAnimation.getValue()).getRGB());
|
Gui.drawRect(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50, isInside ? 0x90FFFFFF : new Color(230, 230, 230, (int) opacityAnimation.getValue()).getRGB());
|
||||||
Gui.drawRect(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 55, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 85, isInside2 ? 0x90FFFFFF : new Color(230, 230, 230, (int)opacityAnimation.getValue()).getRGB());
|
Gui.drawRect(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 55, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 85, isInside2 ? 0x90FFFFFF : new Color(230, 230, 230, (int) opacityAnimation.getValue()).getRGB());
|
||||||
//RenderUtils.drawRectOutline(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50, 0x080FFFFFF);
|
//RenderUtils.drawRectOutline(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50, 0x080FFFFFF);
|
||||||
if(opacityAnimation.isDone()) {
|
if (opacityAnimation.isDone()) {
|
||||||
mc.fontRendererObj.drawStringWithShadow("Mods", GuiScreen.width / 2 - 2, GuiScreen.height / 2 + 35 - 9 / 2, -1);
|
mc.fontRendererObj.drawStringWithShadow("Mods", GuiScreen.width / 2 - 2, GuiScreen.height / 2 + 35 - 9 / 2, -1);
|
||||||
mc.fontRendererObj.drawStringWithShadow("Edit Layout", GuiScreen.width / 2 - 17, GuiScreen.height / 2 + 70 - 9 / 2, -1);
|
mc.fontRendererObj.drawStringWithShadow("Edit Layout", GuiScreen.width / 2 - 17, GuiScreen.height / 2 + 70 - 9 / 2, -1);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +58,4 @@ public class PreGUI extends GuiScreen {
|
||||||
super.keyTyped(parChar1, parInt1);
|
super.keyTyped(parChar1, parInt1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMouseInside(int mouseX, int mouseY, int x, int y, int width, int height) {
|
|
||||||
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package dev.resent.visual.ui.clickgui.rewrite;
|
package dev.resent.visual.ui.clickgui.rewrite;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import dev.resent.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.base.setting.BooleanSetting;
|
import dev.resent.module.base.setting.BooleanSetting;
|
||||||
|
@ -16,6 +13,8 @@ import dev.resent.visual.ui.animation.Direction;
|
||||||
import dev.resent.visual.ui.animation.SimpleAnimation;
|
import dev.resent.visual.ui.animation.SimpleAnimation;
|
||||||
import dev.resent.visual.ui.clickgui.rewrite.comp.Comp;
|
import dev.resent.visual.ui.clickgui.rewrite.comp.Comp;
|
||||||
import dev.resent.visual.ui.clickgui.rewrite.comp.impl.CompCheck;
|
import dev.resent.visual.ui.clickgui.rewrite.comp.impl.CompCheck;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
|
@ -32,19 +31,15 @@ import net.minecraft.util.ResourceLocation;
|
||||||
public class ClickGuiRewrite extends GuiScreen {
|
public class ClickGuiRewrite extends GuiScreen {
|
||||||
|
|
||||||
public FontRenderer fr;
|
public FontRenderer fr;
|
||||||
public ArrayList < Comp > comps = new ArrayList < > ();
|
public ArrayList<Comp> comps = new ArrayList<>();
|
||||||
public float x, y, width, height;
|
public float x, y, width, height;
|
||||||
public Animation introAnimation;
|
public Animation introAnimation;
|
||||||
public ScaledResolution sr;
|
public ScaledResolution sr;
|
||||||
public boolean closing, isSearchFocused, iforgor, iforgor2 = true;
|
public boolean closing, isSearchFocused, home = true, setting;
|
||||||
public Mod selectedMod;
|
public Mod selectedMod;
|
||||||
public String searchString = "";
|
public String searchString = "";
|
||||||
public SimpleAnimation partAnimation;
|
public SimpleAnimation partAnimation;
|
||||||
public int backgroundColor = new Color(18, 18, 18).getRGB(),
|
public int backgroundColor = new Color(18, 18, 18).getRGB(), primaryColor = 0xFF000000, secondaryColor = new Color(33, 33, 33).getRGB(), onSurfaceColor = new Color(3, 218, 197).getRGB(), secondaryFontColor = new Color(187, 134, 252).getRGB();
|
||||||
primaryColor = 0xFF000000,
|
|
||||||
secondaryColor = new Color(33, 33, 33).getRGB(),
|
|
||||||
onSurfaceColor = new Color(3, 218, 197).getRGB(),
|
|
||||||
secondaryFontColor = new Color(187, 134, 252).getRGB();
|
|
||||||
public int scrollOffset = 0;
|
public int scrollOffset = 0;
|
||||||
public String part = "Home";
|
public String part = "Home";
|
||||||
|
|
||||||
|
@ -55,6 +50,8 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
|
|
||||||
GlUtils.startScale((this.x+this.width) / 2, (this.y+this.height) / 2, introAnimation != null ? (float) introAnimation.getValue() : 1);
|
GlUtils.startScale((this.x+this.width) / 2, (this.y+this.height) / 2, introAnimation != null ? (float) introAnimation.getValue() : 1);
|
||||||
|
|
||||||
|
/* !-------------- NECESSARY ELEMENTS -----------------! */
|
||||||
|
|
||||||
//Navigation bar
|
//Navigation bar
|
||||||
RenderUtils.drawRoundedRect(x, y, x+width-60, y+height, 32, secondaryColor);
|
RenderUtils.drawRoundedRect(x, y, x+width-60, y+height, 32, secondaryColor);
|
||||||
|
|
||||||
|
@ -73,9 +70,10 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
fr.drawString("Resent", x+80, y+36, -1, false);
|
fr.drawString("Resent", x+80, y+36, -1, false);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
if (iforgor) {
|
if (setting) {
|
||||||
partAnimation.setAnimation(50, 9);
|
partAnimation.setAnimation(50, 9);
|
||||||
} else if (iforgor2) {
|
}
|
||||||
|
if (home) {
|
||||||
partAnimation.setAnimation(0, 9);
|
partAnimation.setAnimation(0, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +90,6 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
//Search
|
//Search
|
||||||
RenderUtils.drawRoundedRect(x+width-300, y+25, x+width-50, y+65, 9, secondaryColor);
|
RenderUtils.drawRoundedRect(x+width-300, y+25, x+width-50, y+65, 9, secondaryColor);
|
||||||
|
|
||||||
|
|
||||||
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/search.png"));
|
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/search.png"));
|
||||||
Gui.drawModalRectWithCustomSizedTexture(x+width-290, (int) y+36, 0, 0, 20, 20, 20, 20);
|
Gui.drawModalRectWithCustomSizedTexture(x+width-290, (int) y+36, 0, 0, 20, 20, 20, 20);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
|
@ -111,8 +108,10 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
|
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
|
/* !------------- HOME/MODULE (SOON) --------------------! */
|
||||||
|
|
||||||
//Draw module button
|
//Draw module button
|
||||||
for (Mod m: Resent.INSTANCE.modManager.modules) {
|
for (Mod m : Resent.INSTANCE.modManager.modules) {
|
||||||
if (!m.isAdmin() && m.getName().toLowerCase().startsWith(searchString.toLowerCase()) && selectedMod == null) {
|
if (!m.isAdmin() && m.getName().toLowerCase().startsWith(searchString.toLowerCase()) && selectedMod == null) {
|
||||||
if (y+125+offset+scrollOffset > y+95 && y+175+offset+scrollOffset < y+height && part == "Home") {
|
if (y+125+offset+scrollOffset > y+95 && y+175+offset+scrollOffset < y+height && part == "Home") {
|
||||||
//Body
|
//Body
|
||||||
|
@ -131,24 +130,24 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
GlUtils.startScale(x+90, y+140+offset+scrollOffset, 2);
|
GlUtils.startScale(x+90, y+140+offset+scrollOffset, 2);
|
||||||
int i = fr.drawString(m.getName(), x+120, y+140+offset+scrollOffset, -1, false);
|
int i = fr.drawString(m.getName(), x+120, y+140+offset+scrollOffset, -1, false);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
GlUtils.startScale(x+120+i/2, y+140+offset+scrollOffset, 1.5f);
|
GlUtils.startScale(x+120+i / 2, y+140+offset+scrollOffset, 1.5f);
|
||||||
fr.drawString(m.getDescription(), x+20+i, y+142+offset+scrollOffset, -1, false);
|
fr.drawString(m.getDescription(), x+20+i, y+142+offset+scrollOffset, -1, false);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
// if (isMouseInside(mouseX, mouseY, x+i+80, y+115+offset+scrollOffset, x+width-20, y+185+offset+scrollOffset)) {
|
||||||
|
// fr.drawString(m.getDescription(), mousex+8, mouseY, onSurfaceColor, false);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
offset += 60;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if (isMouseInside(mouseX, mouseY, x+i+80, y+115+offset+scrollOffset, x+width-20, y+185+offset+scrollOffset)) {
|
/* !------------- SETTINGS ----------------! */
|
||||||
// fr.drawString(m.getDescription(), mousex+8, mouseY, onSurfaceColor, false);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
offset+= 60;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedMod != null) {
|
if (selectedMod != null) {
|
||||||
|
|
||||||
fr.drawString("<", x+80, y+115+offset, -1, false);
|
fr.drawString("<", x+80, y+115+offset, -1, false);
|
||||||
|
RenderUtils.drawRoundedRect(x+80, y+125, x+width-20, y+325, 16, secondaryColor);
|
||||||
|
|
||||||
for (Comp comp: comps) {
|
for (Comp comp : comps) {
|
||||||
comp.drawScreen(mouseX, mouseY);
|
comp.drawScreen(mouseX, mouseY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,20 +166,18 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||||
|
if (isMouseInside(mouseX, mouseY, x+20, (int) y+120, x+40, (int) y+140)) {
|
||||||
if (isMouseInside(mouseX, mouseY, x+20, (int) y+170, x+40, (int) y+190)) {
|
setting = false;
|
||||||
iforgor2 = false;
|
home = true;
|
||||||
iforgor = true;
|
|
||||||
part = "Setting";
|
|
||||||
} else if (isMouseInside(mouseX, mouseY, x+20, (int) y+120, x+40, (int) y+140)) {
|
|
||||||
iforgor = false;
|
|
||||||
iforgor2 = true;
|
|
||||||
part = "Home";
|
part = "Home";
|
||||||
|
} else if (isMouseInside(mouseX, mouseY, x+20, (int) y+170, x+40, (int) y+190)) {
|
||||||
|
home = false;
|
||||||
|
setting = true;
|
||||||
|
part = "Setting";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMouseInside(mouseX, mouseY, x+width-300, y+25, x+width-50, y+65)) {
|
if (isMouseInside(mouseX, mouseY, x+width-300, y+25, x+width-50, y+65)) {
|
||||||
|
@ -191,63 +188,57 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
|
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
for (Mod m: Resent.INSTANCE.modManager.modules) {
|
for (Mod m : Resent.INSTANCE.modManager.modules) {
|
||||||
if (!m.isAdmin() && m.getName().toLowerCase().startsWith(searchString.toLowerCase()) && selectedMod == null) {
|
if (!m.isAdmin() && m.getName().toLowerCase().startsWith(searchString.toLowerCase()) && selectedMod == null) {
|
||||||
if (y+125+offset+scrollOffset > y+95 && y+175+offset+scrollOffset < y+height && part == "Home") {
|
if (y+125+offset+scrollOffset > y+95 && y+175+offset+scrollOffset < y+height && part == "Home") {
|
||||||
|
|
||||||
if (isMouseInside(mouseX, mouseY, x+width-60, y+140+offset+scrollOffset, x+width-40, y+160+offset+scrollOffset) && mouseButton == 0 && m.doesHaveSetting()) {
|
if (isMouseInside(mouseX, mouseY, x+width-60, y+140+offset+scrollOffset, x+width-40, y+160+offset+scrollOffset) && mouseButton == 0 && m.doesHaveSetting()) {
|
||||||
selectedMod = m;
|
selectedMod = m;
|
||||||
|
|
||||||
int settingOffset = 0;
|
int settingOffset = 0;
|
||||||
for (Setting s: selectedMod.settings) {
|
for (Setting s : selectedMod.settings) {
|
||||||
if (s instanceof BooleanSetting) {
|
if (s instanceof BooleanSetting) {
|
||||||
comps.add(new CompCheck(x+110, y+125+settingOffset, selectedMod, s));
|
comps.add(new CompCheck(x+110, y+125+settingOffset, selectedMod, s));
|
||||||
}
|
}
|
||||||
|
|
||||||
settingOffset+= 25;
|
settingOffset += 25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isMouseInside(mouseX, mouseY, x+80, y+125+offset+scrollOffset, x+width-20, y+175+offset+scrollOffset)) {
|
if (isMouseInside(mouseX, mouseY, x+80, y+125+offset+scrollOffset, x+width-20, y+175+offset+scrollOffset)) {
|
||||||
if(mouseButton == 1 && m.doesHaveSetting()) {
|
if (mouseButton == 1 && m.doesHaveSetting()) {
|
||||||
selectedMod = m;
|
selectedMod = m;
|
||||||
|
|
||||||
int settingOffset = 0;
|
int settingOffset = 0;
|
||||||
for (Setting s: selectedMod.settings) {
|
for (Setting s : selectedMod.settings) {
|
||||||
|
|
||||||
if (s instanceof BooleanSetting) {
|
if (s instanceof BooleanSetting) {
|
||||||
comps.add(new CompCheck(x+110, y+125+settingOffset, selectedMod, s));
|
comps.add(new CompCheck(x+110, y+125+settingOffset, selectedMod, s));
|
||||||
}
|
}
|
||||||
|
|
||||||
settingOffset+= 25;
|
settingOffset += 25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mouseButton == 0 && selectedMod == null) {
|
if (mouseButton == 0 && selectedMod == null) {
|
||||||
m.toggle();
|
m.toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
offset+= 60;
|
offset += 60;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedMod != null) {
|
if (selectedMod != null) {
|
||||||
if(isMouseInside(mouseX, mouseY, x+77, y+112, x+87, y+125)) {
|
if (isMouseInside(mouseX, mouseY, x+77, y+112, x+87, y+125)) {
|
||||||
selectedMod = null;
|
selectedMod = null;
|
||||||
comps.clear();
|
comps.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Comp c: comps) {
|
for (Comp c : comps) {
|
||||||
c.mouseClicked(mouseX, mouseY, mouseButton);
|
c.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
sr = new ScaledResolution(mc);
|
sr = new ScaledResolution(mc);
|
||||||
|
@ -267,29 +258,25 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedMod != null) {
|
if (selectedMod != null) {
|
||||||
for (Comp c: comps) {
|
for (Comp c : comps) {
|
||||||
c.keyTyped(par1, key);
|
c.keyTyped(par1, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search box stuff
|
// Search box stuff
|
||||||
else if (key == KeyboardConstants.KEY_BACK && isSearchFocused) {
|
if (key == KeyboardConstants.KEY_BACK && isSearchFocused) {
|
||||||
if (searchString.length() != 0) {
|
if (searchString.length() != 0) {
|
||||||
searchString = searchString.substring(0, searchString.length()-1);
|
searchString = searchString.substring(0, searchString.length()-1);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (searchString.length() <= 18 && isSearchFocused) {
|
||||||
if (searchString.length() <= 18 && isSearchFocused) {
|
|
||||||
String balls = ChatAllowedCharacters.filterAllowedCharacters(String.valueOf(par1));
|
String balls = ChatAllowedCharacters.filterAllowedCharacters(String.valueOf(par1));
|
||||||
if (balls != null && balls != "") {
|
if (balls != "") {
|
||||||
searchString += String.valueOf(par1);
|
searchString += String.valueOf(par1);
|
||||||
scrollOffset = 0;
|
scrollOffset = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleMouseInput() throws IOException {
|
public void handleMouseInput() throws IOException {
|
||||||
int scroll = Mouse.getEventDWheel();
|
int scroll = Mouse.getEventDWheel();
|
||||||
|
|
||||||
|
|
|
@ -17,5 +17,4 @@ public abstract class Comp {
|
||||||
public boolean isMouseInside(double mouseX, double mouseY, double x, double y, double width, double height) {
|
public boolean isMouseInside(double mouseX, double mouseY, double x, double y, double width, double height) {
|
||||||
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,15 +3,14 @@ package dev.resent.visual.ui.clickgui.rewrite.comp.impl;
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.base.setting.BooleanSetting;
|
import dev.resent.module.base.setting.BooleanSetting;
|
||||||
import dev.resent.module.base.setting.Setting;
|
import dev.resent.module.base.setting.Setting;
|
||||||
import dev.resent.util.misc.FuncUtils;
|
|
||||||
import dev.resent.util.render.Color;
|
import dev.resent.util.render.Color;
|
||||||
import dev.resent.util.render.RenderUtils;
|
import dev.resent.util.render.RenderUtils;
|
||||||
import dev.resent.visual.ui.clickgui.rewrite.comp.Comp;
|
import dev.resent.visual.ui.clickgui.rewrite.comp.Comp;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
public class CompCheck extends Comp{
|
public class CompCheck extends Comp {
|
||||||
|
|
||||||
public CompCheck(float x, float y, Mod m, Setting s){
|
public CompCheck(float x, float y, Mod m, Setting s) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.mod = m;
|
this.mod = m;
|
||||||
|
@ -20,15 +19,14 @@ public class CompCheck extends Comp{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mouseX, int mouseY) {
|
public void drawScreen(int mouseX, int mouseY) {
|
||||||
RenderUtils.drawRoundedRect(this.x, this.y, this.x+20, this.y+20, 8, ((BooleanSetting)setting).getValue() ? new Color(3, 218, 197).getRGB() : new Color(66, 66, 66).getRGB());
|
RenderUtils.drawRoundedRect(this.x, this.y, this.x + 20, this.y + 20, 8, ((BooleanSetting) setting).getValue() ? new Color(3, 218, 197).getRGB() : new Color(66, 66, 66).getRGB());
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawString(setting.name, this.x+25, this.y+6.5f, -1, false);
|
Minecraft.getMinecraft().fontRendererObj.drawString(setting.name, this.x + 25, this.y + 6.5f, -1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||||
if(isMouseInside(mouseX, mouseY, this.x, this.y, this.x+20, this.y+20)){
|
if (isMouseInside(mouseX, mouseY, this.x, this.y, this.x + 20, this.y + 20)) {
|
||||||
((BooleanSetting)setting).toggle();
|
((BooleanSetting) setting).toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package net.minecraft.block;
|
package net.minecraft.block;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.module.impl.misc.AdminRay;
|
import dev.resent.module.impl.misc.AdminRay;
|
||||||
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
import net.minecraft.block.material.MapColor;
|
import net.minecraft.block.material.MapColor;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -400,8 +399,7 @@ public class Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos) {
|
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos) {
|
||||||
|
if (ModManager.adminRay.isEnabled()) {
|
||||||
if(ModManager.adminRay.isEnabled()){
|
|
||||||
return 99999;
|
return 99999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,8 +415,7 @@ public class Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, BlockPos blockpos, EnumFacing enumfacing) {
|
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, BlockPos blockpos, EnumFacing enumfacing) {
|
||||||
|
if (ModManager.adminRay.isEnabled()) {
|
||||||
if(ModManager.adminRay.isEnabled()){
|
|
||||||
return AdminRay.shouldRender(this);
|
return AdminRay.shouldRender(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1052,12 +1049,12 @@ public class Block {
|
||||||
registerBlock(6, (String) "sapling", (new BlockSapling()).setHardness(0.0F).setStepSound(soundTypeGrass).setUnlocalizedName("sapling"));
|
registerBlock(6, (String) "sapling", (new BlockSapling()).setHardness(0.0F).setStepSound(soundTypeGrass).setUnlocalizedName("sapling"));
|
||||||
registerBlock(7, (String) "bedrock", (new Block(Material.rock)).setBlockUnbreakable().setResistance(6000000.0F).setStepSound(soundTypePiston).setUnlocalizedName("bedrock").disableStats().setCreativeTab(CreativeTabs.tabBlock));
|
registerBlock(7, (String) "bedrock", (new Block(Material.rock)).setBlockUnbreakable().setResistance(6000000.0F).setStepSound(soundTypePiston).setUnlocalizedName("bedrock").disableStats().setCreativeTab(CreativeTabs.tabBlock));
|
||||||
|
|
||||||
if(ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.reducedWater.getValue()){
|
if (ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.reducedWater.getValue()) {
|
||||||
registerBlock(8, (String) "flowing_water", (new BlockDynamicLiquid(Material.water)).setHardness(100.0F).setUnlocalizedName("water").disableStats());
|
registerBlock(8, (String) "flowing_water", (new BlockDynamicLiquid(Material.water)).setHardness(100.0F).setUnlocalizedName("water").disableStats());
|
||||||
registerBlock(9, (String) "water", (new BlockStaticLiquid(Material.water)).setHardness(100.0F).setUnlocalizedName("water").disableStats());
|
registerBlock(9, (String) "water", (new BlockStaticLiquid(Material.water)).setHardness(100.0F).setUnlocalizedName("water").disableStats());
|
||||||
registerBlock(10, (String) "flowing_lava", (new BlockDynamicLiquid(Material.lava)).setHardness(100.0F).setUnlocalizedName("lava").disableStats());
|
registerBlock(10, (String) "flowing_lava", (new BlockDynamicLiquid(Material.lava)).setHardness(100.0F).setUnlocalizedName("lava").disableStats());
|
||||||
registerBlock(11, (String) "lava", (new BlockStaticLiquid(Material.lava)).setHardness(100.0F).setUnlocalizedName("lava").disableStats());
|
registerBlock(11, (String) "lava", (new BlockStaticLiquid(Material.lava)).setHardness(100.0F).setUnlocalizedName("lava").disableStats());
|
||||||
}else {
|
} else {
|
||||||
registerBlock(8, (String) "flowing_water", (new BlockDynamicLiquid(Material.water)).setHardness(100.0F).setLightOpacity(3).setUnlocalizedName("water").disableStats());
|
registerBlock(8, (String) "flowing_water", (new BlockDynamicLiquid(Material.water)).setHardness(100.0F).setLightOpacity(3).setUnlocalizedName("water").disableStats());
|
||||||
registerBlock(9, (String) "water", (new BlockStaticLiquid(Material.water)).setHardness(100.0F).setLightOpacity(3).setUnlocalizedName("water").disableStats());
|
registerBlock(9, (String) "water", (new BlockStaticLiquid(Material.water)).setHardness(100.0F).setLightOpacity(3).setUnlocalizedName("water").disableStats());
|
||||||
registerBlock(10, (String) "flowing_lava", (new BlockDynamicLiquid(Material.lava)).setHardness(100.0F).setLightLevel(1.0F).setUnlocalizedName("lava").disableStats());
|
registerBlock(10, (String) "flowing_lava", (new BlockDynamicLiquid(Material.lava)).setHardness(100.0F).setLightLevel(1.0F).setUnlocalizedName("lava").disableStats());
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package net.minecraft.block;
|
package net.minecraft.block;
|
||||||
|
|
||||||
|
import dev.resent.module.base.ModManager;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -46,7 +45,7 @@ public class BlockDynamicLiquid extends BlockLiquid {
|
||||||
public void updateTick(World world, BlockPos blockpos, IBlockState iblockstate, EaglercraftRandom random) {
|
public void updateTick(World world, BlockPos blockpos, IBlockState iblockstate, EaglercraftRandom random) {
|
||||||
long framebufferAge = Minecraft.getMinecraft().entityRenderer.overlayFramebuffer.getAge();
|
long framebufferAge = Minecraft.getMinecraft().entityRenderer.overlayFramebuffer.getAge();
|
||||||
if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
|
if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
|
||||||
if(ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.reducedWater.getValue()){
|
if (ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.reducedWater.getValue()) {
|
||||||
int i = ((Integer) iblockstate.getValue(LEVEL)).intValue();
|
int i = ((Integer) iblockstate.getValue(LEVEL)).intValue();
|
||||||
byte b0 = 1;
|
byte b0 = 1;
|
||||||
if (this.blockMaterial == Material.lava && !world.provider.doesWaterVaporize()) {
|
if (this.blockMaterial == Material.lava && !world.provider.doesWaterVaporize()) {
|
||||||
|
@ -135,7 +134,7 @@ public class BlockDynamicLiquid extends BlockLiquid {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tryFlowInto(World worldIn, BlockPos pos, IBlockState state, int level) {
|
private void tryFlowInto(World worldIn, BlockPos pos, IBlockState state, int level) {
|
||||||
|
|
|
@ -10,6 +10,13 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_MODELVIEW;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_PROJECTION;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_PROJECTION;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SMOOTH;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SMOOTH;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import dev.resent.client.Resent;
|
||||||
|
import dev.resent.module.base.ModManager;
|
||||||
|
import dev.resent.module.impl.misc.AdminRay;
|
||||||
|
import dev.resent.util.misc.W;
|
||||||
|
import dev.resent.visual.ui.clickgui.PreGUI;
|
||||||
|
import dev.resent.visual.ui.clickgui.rewrite.ClickGuiRewrite;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
@ -18,17 +25,6 @@ import java.util.Collections;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
import org.apache.commons.lang3.Validate;
|
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
|
|
||||||
import dev.resent.client.Resent;
|
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import dev.resent.module.impl.misc.AdminRay;
|
|
||||||
import dev.resent.util.misc.W;
|
|
||||||
import dev.resent.visual.ui.clickgui.PreGUI;
|
|
||||||
import dev.resent.visual.ui.clickgui.rewrite.ClickGuiRewrite;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
||||||
|
@ -166,6 +162,7 @@ import net.minecraft.world.EnumDifficulty;
|
||||||
import net.minecraft.world.WorldProviderEnd;
|
import net.minecraft.world.WorldProviderEnd;
|
||||||
import net.minecraft.world.WorldProviderHell;
|
import net.minecraft.world.WorldProviderHell;
|
||||||
import net.minecraft.world.WorldSettings;
|
import net.minecraft.world.WorldSettings;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||||
|
@ -186,6 +183,7 @@ import net.minecraft.world.WorldSettings;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Minecraft implements IThreadListener {
|
public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
private static final Logger logger = LogManager.getLogger();
|
private static final Logger logger = LogManager.getLogger();
|
||||||
private static final ResourceLocation locationMojangPng = new ResourceLocation("textures/gui/title/mojang.png");
|
private static final ResourceLocation locationMojangPng = new ResourceLocation("textures/gui/title/mojang.png");
|
||||||
public static final boolean isRunningOnMac = false;
|
public static final boolean isRunningOnMac = false;
|
||||||
|
@ -351,15 +349,13 @@ public class Minecraft implements IThreadListener {
|
||||||
logger.fatal("Reported exception thrown!", reportedexception);
|
logger.fatal("Reported exception thrown!", reportedexception);
|
||||||
this.displayCrashReport(reportedexception.getCrashReport());
|
this.displayCrashReport(reportedexception.getCrashReport());
|
||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable1) {
|
||||||
CrashReport crashreport1 = this
|
CrashReport crashreport1 = this.addGraphicsAndWorldToCrashReport(new CrashReport("Unexpected error", throwable1));
|
||||||
.addGraphicsAndWorldToCrashReport(new CrashReport("Unexpected error", throwable1));
|
|
||||||
this.freeMemory();
|
this.freeMemory();
|
||||||
logger.fatal("Unreported exception thrown!", throwable1);
|
logger.fatal("Unreported exception thrown!", throwable1);
|
||||||
this.displayCrashReport(crashreport1);
|
this.displayCrashReport(crashreport1);
|
||||||
} finally {
|
} finally {
|
||||||
this.shutdownMinecraftApplet();
|
this.shutdownMinecraftApplet();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
|
@ -377,8 +373,7 @@ public class Minecraft implements IThreadListener {
|
||||||
logger.info("EagRuntime Version: " + EagRuntime.getVersion());
|
logger.info("EagRuntime Version: " + EagRuntime.getVersion());
|
||||||
this.createDisplay();
|
this.createDisplay();
|
||||||
this.registerMetadataSerializers();
|
this.registerMetadataSerializers();
|
||||||
this.mcResourcePackRepository = new ResourcePackRepository(this.mcDefaultResourcePack, this.metadataSerializer_,
|
this.mcResourcePackRepository = new ResourcePackRepository(this.mcDefaultResourcePack, this.metadataSerializer_, this.gameSettings);
|
||||||
this.gameSettings);
|
|
||||||
this.mcResourceManager = new SimpleReloadableResourceManager(this.metadataSerializer_);
|
this.mcResourceManager = new SimpleReloadableResourceManager(this.metadataSerializer_);
|
||||||
this.mcLanguageManager = new LanguageManager(this.metadataSerializer_, this.gameSettings.language);
|
this.mcLanguageManager = new LanguageManager(this.metadataSerializer_, this.gameSettings.language);
|
||||||
this.mcResourceManager.registerReloadListener(this.mcLanguageManager);
|
this.mcResourceManager.registerReloadListener(this.mcLanguageManager);
|
||||||
|
@ -389,10 +384,8 @@ public class Minecraft implements IThreadListener {
|
||||||
this.mcSoundHandler = new SoundHandler(this.mcResourceManager, this.gameSettings);
|
this.mcSoundHandler = new SoundHandler(this.mcResourceManager, this.gameSettings);
|
||||||
this.mcResourceManager.registerReloadListener(this.mcSoundHandler);
|
this.mcResourceManager.registerReloadListener(this.mcSoundHandler);
|
||||||
this.mcMusicTicker = new MusicTicker(this);
|
this.mcMusicTicker = new MusicTicker(this);
|
||||||
this.fontRendererObj = new EaglerFontRenderer(this.gameSettings,
|
this.fontRendererObj = new EaglerFontRenderer(this.gameSettings, new ResourceLocation("textures/font/ascii.png"), this.renderEngine, false);
|
||||||
new ResourceLocation("textures/font/ascii.png"), this.renderEngine, false);
|
this.uwuFont = new EaglerFontRenderer(this.gameSettings, new ResourceLocation("textures/font/uwufont.png"), this.renderEngine, false);
|
||||||
this.uwuFont = new EaglerFontRenderer(this.gameSettings,
|
|
||||||
new ResourceLocation("textures/font/uwufont.png"), this.renderEngine, false);
|
|
||||||
if (this.gameSettings.language != null) {
|
if (this.gameSettings.language != null) {
|
||||||
this.fontRendererObj.setUnicodeFlag(this.isUnicode());
|
this.fontRendererObj.setUnicodeFlag(this.isUnicode());
|
||||||
this.fontRendererObj.setBidiFlag(this.mcLanguageManager.isCurrentLanguageBidirectional());
|
this.fontRendererObj.setBidiFlag(this.mcLanguageManager.isCurrentLanguageBidirectional());
|
||||||
|
@ -400,23 +393,23 @@ public class Minecraft implements IThreadListener {
|
||||||
this.uwuFont.setBidiFlag(this.mcLanguageManager.isCurrentLanguageBidirectional());
|
this.uwuFont.setBidiFlag(this.mcLanguageManager.isCurrentLanguageBidirectional());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.standardGalacticFontRenderer = new EaglerFontRenderer(this.gameSettings,
|
this.standardGalacticFontRenderer = new EaglerFontRenderer(this.gameSettings, new ResourceLocation("textures/font/ascii_sga.png"), this.renderEngine, false);
|
||||||
new ResourceLocation("textures/font/ascii_sga.png"), this.renderEngine, false);
|
|
||||||
this.mcResourceManager.registerReloadListener(this.fontRendererObj);
|
this.mcResourceManager.registerReloadListener(this.fontRendererObj);
|
||||||
this.mcResourceManager.registerReloadListener(this.standardGalacticFontRenderer);
|
this.mcResourceManager.registerReloadListener(this.standardGalacticFontRenderer);
|
||||||
this.mcResourceManager.registerReloadListener(this.uwuFont);
|
this.mcResourceManager.registerReloadListener(this.uwuFont);
|
||||||
this.mcResourceManager.registerReloadListener(new GrassColorReloadListener());
|
this.mcResourceManager.registerReloadListener(new GrassColorReloadListener());
|
||||||
this.mcResourceManager.registerReloadListener(new FoliageColorReloadListener());
|
this.mcResourceManager.registerReloadListener(new FoliageColorReloadListener());
|
||||||
AchievementList.openInventory.setStatStringFormatter(new IStatStringFormat() {
|
AchievementList.openInventory.setStatStringFormatter(
|
||||||
|
new IStatStringFormat() {
|
||||||
public String formatString(String parString1) {
|
public String formatString(String parString1) {
|
||||||
try {
|
try {
|
||||||
return HString.format(parString1, new Object[] { GameSettings
|
return HString.format(parString1, new Object[] { GameSettings.getKeyDisplayString(Minecraft.this.gameSettings.keyBindInventory.getKeyCode()) });
|
||||||
.getKeyDisplayString(Minecraft.this.gameSettings.keyBindInventory.getKeyCode()) });
|
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
return "Error: " + exception.getLocalizedMessage();
|
return "Error: " + exception.getLocalizedMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
this.mouseHelper = new MouseHelper();
|
this.mouseHelper = new MouseHelper();
|
||||||
this.checkGLError("Pre startup");
|
this.checkGLError("Pre startup");
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
|
@ -444,8 +437,7 @@ public class Minecraft implements IThreadListener {
|
||||||
this.mcResourceManager.registerReloadListener(this.renderItem);
|
this.mcResourceManager.registerReloadListener(this.renderItem);
|
||||||
this.entityRenderer = new EntityRenderer(this, this.mcResourceManager);
|
this.entityRenderer = new EntityRenderer(this, this.mcResourceManager);
|
||||||
this.mcResourceManager.registerReloadListener(this.entityRenderer);
|
this.mcResourceManager.registerReloadListener(this.entityRenderer);
|
||||||
this.blockRenderDispatcher = new BlockRendererDispatcher(this.modelManager.getBlockModelShapes(),
|
this.blockRenderDispatcher = new BlockRendererDispatcher(this.modelManager.getBlockModelShapes(), this.gameSettings);
|
||||||
this.gameSettings);
|
|
||||||
this.mcResourceManager.registerReloadListener(this.blockRenderDispatcher);
|
this.mcResourceManager.registerReloadListener(this.blockRenderDispatcher);
|
||||||
this.renderGlobal = new RenderGlobal(this);
|
this.renderGlobal = new RenderGlobal(this);
|
||||||
this.mcResourceManager.registerReloadListener(this.renderGlobal);
|
this.mcResourceManager.registerReloadListener(this.renderGlobal);
|
||||||
|
@ -461,8 +453,7 @@ public class Minecraft implements IThreadListener {
|
||||||
EaglerProfile.read();
|
EaglerProfile.read();
|
||||||
|
|
||||||
if (this.serverName != null) {
|
if (this.serverName != null) {
|
||||||
this.displayGuiScreen(new GuiScreenEditProfile(
|
this.displayGuiScreen(new GuiScreenEditProfile(new GuiConnecting(new GuiMainMenu(), this, this.serverName, this.serverPort)));
|
||||||
new GuiConnecting(new GuiMainMenu(), this, this.serverName, this.serverPort)));
|
|
||||||
} else {
|
} else {
|
||||||
this.displayGuiScreen(new GuiScreenEditProfile(new GuiMainMenu()));
|
this.displayGuiScreen(new GuiScreenEditProfile(new GuiMainMenu()));
|
||||||
}
|
}
|
||||||
|
@ -476,16 +467,11 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerMetadataSerializers() {
|
private void registerMetadataSerializers() {
|
||||||
this.metadataSerializer_.registerMetadataSectionType(new TextureMetadataSectionSerializer(),
|
this.metadataSerializer_.registerMetadataSectionType(new TextureMetadataSectionSerializer(), TextureMetadataSection.class);
|
||||||
TextureMetadataSection.class);
|
this.metadataSerializer_.registerMetadataSectionType(new FontMetadataSectionSerializer(), FontMetadataSection.class);
|
||||||
this.metadataSerializer_.registerMetadataSectionType(new FontMetadataSectionSerializer(),
|
this.metadataSerializer_.registerMetadataSectionType(new AnimationMetadataSectionSerializer(), AnimationMetadataSection.class);
|
||||||
FontMetadataSection.class);
|
this.metadataSerializer_.registerMetadataSectionType(new PackMetadataSectionSerializer(), PackMetadataSection.class);
|
||||||
this.metadataSerializer_.registerMetadataSectionType(new AnimationMetadataSectionSerializer(),
|
this.metadataSerializer_.registerMetadataSectionType(new LanguageMetadataSectionSerializer(), LanguageMetadataSection.class);
|
||||||
AnimationMetadataSection.class);
|
|
||||||
this.metadataSerializer_.registerMetadataSectionType(new PackMetadataSectionSerializer(),
|
|
||||||
PackMetadataSection.class);
|
|
||||||
this.metadataSerializer_.registerMetadataSectionType(new LanguageMetadataSectionSerializer(),
|
|
||||||
LanguageMetadataSection.class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initStream() {
|
private void initStream() {
|
||||||
|
@ -518,14 +504,12 @@ public class Minecraft implements IThreadListener {
|
||||||
Bootstrap.printToSYSOUT(report);
|
Bootstrap.printToSYSOUT(report);
|
||||||
PlatformRuntime.writeCrashReport(report);
|
PlatformRuntime.writeCrashReport(report);
|
||||||
if (PlatformRuntime.getPlatformType() == EnumPlatformType.JAVASCRIPT) {
|
if (PlatformRuntime.getPlatformType() == EnumPlatformType.JAVASCRIPT) {
|
||||||
System.err.println(
|
System.err.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
|
||||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
|
|
||||||
System.err.println("NATIVE BROWSER EXCEPTION:");
|
System.err.println("NATIVE BROWSER EXCEPTION:");
|
||||||
if (!PlatformRuntime.printJSExceptionIfBrowser(crashReportIn.getCrashCause())) {
|
if (!PlatformRuntime.printJSExceptionIfBrowser(crashReportIn.getCrashCause())) {
|
||||||
System.err.println("<undefined>");
|
System.err.println("<undefined>");
|
||||||
}
|
}
|
||||||
System.err.println(
|
System.err.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
|
||||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -538,8 +522,7 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
ArrayList arraylist = Lists.newArrayList(this.defaultResourcePacks);
|
ArrayList arraylist = Lists.newArrayList(this.defaultResourcePacks);
|
||||||
|
|
||||||
for (ResourcePackRepository.Entry resourcepackrepository$entry : this.mcResourcePackRepository
|
for (ResourcePackRepository.Entry resourcepackrepository$entry : this.mcResourcePackRepository.getRepositoryEntries()) {
|
||||||
.getRepositoryEntries()) {
|
|
||||||
arraylist.add(resourcepackrepository$entry.getResourcePack());
|
arraylist.add(resourcepackrepository$entry.getResourcePack());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +548,6 @@ public class Minecraft implements IThreadListener {
|
||||||
if (this.renderGlobal != null) {
|
if (this.renderGlobal != null) {
|
||||||
this.renderGlobal.loadRenderers();
|
this.renderGlobal.loadRenderers();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDisplayMode() {
|
private void updateDisplayMode() {
|
||||||
|
@ -581,8 +563,7 @@ public class Minecraft implements IThreadListener {
|
||||||
int i = scaledresolution.getScaleFactor();
|
int i = scaledresolution.getScaleFactor();
|
||||||
GlStateManager.matrixMode(GL_PROJECTION);
|
GlStateManager.matrixMode(GL_PROJECTION);
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.loadIdentity();
|
||||||
GlStateManager.ortho(0.0D, (double) scaledresolution.getScaledWidth(),
|
GlStateManager.ortho(0.0D, (double) scaledresolution.getScaledWidth(), (double) scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
|
||||||
(double) scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
|
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.loadIdentity();
|
||||||
GlStateManager.translate(0.0F, 0.0F, -2000.0F);
|
GlStateManager.translate(0.0F, 0.0F, -2000.0F);
|
||||||
|
@ -594,8 +575,7 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
inputstream = this.mcDefaultResourcePack.getInputStream(locationMojangPng);
|
inputstream = this.mcDefaultResourcePack.getInputStream(locationMojangPng);
|
||||||
this.mojangLogo = textureManagerInstance.getDynamicTextureLocation("logo",
|
this.mojangLogo = textureManagerInstance.getDynamicTextureLocation("logo", new DynamicTexture(ImageData.loadImageFile(inputstream)));
|
||||||
new DynamicTexture(ImageData.loadImageFile(inputstream)));
|
|
||||||
textureManagerInstance.bindTexture(this.mojangLogo);
|
textureManagerInstance.bindTexture(this.mojangLogo);
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
logger.error("Unable to load logo: " + locationMojangPng, ioexception);
|
logger.error("Unable to load logo: " + locationMojangPng, ioexception);
|
||||||
|
@ -606,18 +586,15 @@ public class Minecraft implements IThreadListener {
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||||
worldrenderer.pos(0.0D, (double) this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255)
|
worldrenderer.pos(0.0D, (double) this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
|
||||||
.endVertex();
|
worldrenderer.pos((double) this.displayWidth, (double) this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
|
||||||
worldrenderer.pos((double) this.displayWidth, (double) this.displayHeight, 0.0D).tex(0.0D, 0.0D)
|
|
||||||
.color(255, 255, 255, 255).endVertex();
|
|
||||||
worldrenderer.pos((double) this.displayWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
|
worldrenderer.pos((double) this.displayWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
|
||||||
worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
|
worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
short short1 = 256;
|
short short1 = 256;
|
||||||
short short2 = 256;
|
short short2 = 256;
|
||||||
this.func_181536_a((scaledresolution.getScaledWidth() - short1) / 2,
|
this.func_181536_a((scaledresolution.getScaledWidth() - short1) / 2, (scaledresolution.getScaledHeight() - short2) / 2, 0, 0, short1, short2, 255, 255, 255, 255);
|
||||||
(scaledresolution.getScaledHeight() - short2) / 2, 0, 0, short1, short2, 255, 255, 255, 255);
|
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
GlStateManager.disableFog();
|
GlStateManager.disableFog();
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
|
@ -626,28 +603,17 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
PlatformRuntime.showMojangScreen();
|
PlatformRuntime.showMojangScreen();
|
||||||
EagUtils.sleep(200l);
|
EagUtils.sleep(200l);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void func_181536_a(int parInt1, int parInt2, int parInt3, int parInt4, int parInt5, int parInt6, int parInt7,
|
public void func_181536_a(int parInt1, int parInt2, int parInt3, int parInt4, int parInt5, int parInt6, int parInt7, int parInt8, int parInt9, int parInt10) {
|
||||||
int parInt8, int parInt9, int parInt10) {
|
|
||||||
float f = 0.00390625F;
|
float f = 0.00390625F;
|
||||||
float f1 = 0.00390625F;
|
float f1 = 0.00390625F;
|
||||||
WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
|
WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
|
||||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||||
worldrenderer.pos((double) parInt1, (double) (parInt2 + parInt6), 0.0D)
|
worldrenderer.pos((double) parInt1, (double) (parInt2 + parInt6), 0.0D).tex((double) ((float) parInt3 * f), (double) ((float) (parInt4 + parInt6) * f1)).color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
||||||
.tex((double) ((float) parInt3 * f), (double) ((float) (parInt4 + parInt6) * f1))
|
worldrenderer.pos((double) (parInt1 + parInt5), (double) (parInt2 + parInt6), 0.0D).tex((double) ((float) (parInt3 + parInt5) * f), (double) ((float) (parInt4 + parInt6) * f1)).color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
||||||
.color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
worldrenderer.pos((double) (parInt1 + parInt5), (double) parInt2, 0.0D).tex((double) ((float) (parInt3 + parInt5) * f), (double) ((float) parInt4 * f1)).color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
||||||
worldrenderer.pos((double) (parInt1 + parInt5), (double) (parInt2 + parInt6), 0.0D)
|
worldrenderer.pos((double) parInt1, (double) parInt2, 0.0D).tex((double) ((float) parInt3 * f), (double) ((float) parInt4 * f1)).color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
||||||
.tex((double) ((float) (parInt3 + parInt5) * f), (double) ((float) (parInt4 + parInt6) * f1))
|
|
||||||
.color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
|
||||||
worldrenderer.pos((double) (parInt1 + parInt5), (double) parInt2, 0.0D)
|
|
||||||
.tex((double) ((float) (parInt3 + parInt5) * f), (double) ((float) parInt4 * f1))
|
|
||||||
.color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
|
||||||
worldrenderer.pos((double) parInt1, (double) parInt2, 0.0D)
|
|
||||||
.tex((double) ((float) parInt3 * f), (double) ((float) parInt4 * f1))
|
|
||||||
.color(parInt7, parInt8, parInt9, parInt10).endVertex();
|
|
||||||
Tessellator.getInstance().draw();
|
Tessellator.getInstance().draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -683,7 +649,6 @@ public class Minecraft implements IThreadListener {
|
||||||
this.mcSoundHandler.resumeSounds();
|
this.mcSoundHandler.resumeSounds();
|
||||||
this.setIngameFocus();
|
this.setIngameFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
|
@ -699,7 +664,6 @@ public class Minecraft implements IThreadListener {
|
||||||
logger.error("@ " + message);
|
logger.error("@ " + message);
|
||||||
logger.error(i + ": " + s);
|
logger.error(i + ": " + s);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -714,9 +678,7 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.loadWorld((WorldClient) null);
|
this.loadWorld((WorldClient) null);
|
||||||
} catch (Throwable var5) {
|
} catch (Throwable var5) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.mcSoundHandler.unloadSounds();
|
this.mcSoundHandler.unloadSounds();
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -724,7 +686,6 @@ public class Minecraft implements IThreadListener {
|
||||||
if (!this.hasCrashed) {
|
if (!this.hasCrashed) {
|
||||||
EagRuntime.exit();
|
EagRuntime.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -787,8 +748,7 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mcProfiler.endSection();
|
this.mcProfiler.endSection();
|
||||||
if (this.gameSettings.showDebugInfo && this.gameSettings.showDebugProfilerChart
|
if (this.gameSettings.showDebugInfo && this.gameSettings.showDebugProfilerChart && !this.gameSettings.hideGUI) {
|
||||||
&& !this.gameSettings.hideGUI) {
|
|
||||||
if (!this.mcProfiler.profilingEnabled) {
|
if (!this.mcProfiler.profilingEnabled) {
|
||||||
this.mcProfiler.clearProfiling();
|
this.mcProfiler.clearProfiling();
|
||||||
}
|
}
|
||||||
|
@ -816,14 +776,19 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
while (getSystemTime() >= this.debugUpdateTime + 1000L) {
|
while (getSystemTime() >= this.debugUpdateTime + 1000L) {
|
||||||
debugFPS = this.fpsCounter;
|
debugFPS = this.fpsCounter;
|
||||||
this.debug = HString.format("%d fps (%d chunk update%s) T: %s%s%s%s",
|
this.debug =
|
||||||
new Object[] { Integer.valueOf(debugFPS), Integer.valueOf(RenderChunk.renderChunksUpdated),
|
HString.format(
|
||||||
|
"%d fps (%d chunk update%s) T: %s%s%s%s",
|
||||||
|
new Object[] {
|
||||||
|
Integer.valueOf(debugFPS),
|
||||||
|
Integer.valueOf(RenderChunk.renderChunksUpdated),
|
||||||
RenderChunk.renderChunksUpdated != 1 ? "s" : "",
|
RenderChunk.renderChunksUpdated != 1 ? "s" : "",
|
||||||
(float) this.gameSettings.limitFramerate == GameSettings.Options.FRAMERATE_LIMIT
|
(float) this.gameSettings.limitFramerate == GameSettings.Options.FRAMERATE_LIMIT.getValueMax() ? "inf" : Integer.valueOf(this.gameSettings.limitFramerate),
|
||||||
.getValueMax() ? "inf" : Integer.valueOf(this.gameSettings.limitFramerate),
|
|
||||||
this.gameSettings.enableVsync ? " vsync" : "",
|
this.gameSettings.enableVsync ? " vsync" : "",
|
||||||
this.gameSettings.fancyGraphics ? "" : " fast", this.gameSettings.clouds == 0 ? ""
|
this.gameSettings.fancyGraphics ? "" : " fast",
|
||||||
: (this.gameSettings.clouds == 1 ? " fast-clouds" : " fancy-clouds") });
|
this.gameSettings.clouds == 0 ? "" : (this.gameSettings.clouds == 1 ? " fast-clouds" : " fancy-clouds")
|
||||||
|
}
|
||||||
|
);
|
||||||
RenderChunk.renderChunksUpdated = 0;
|
RenderChunk.renderChunksUpdated = 0;
|
||||||
this.debugUpdateTime += 1000L;
|
this.debugUpdateTime += 1000L;
|
||||||
this.fpsCounter = 0;
|
this.fpsCounter = 0;
|
||||||
|
@ -863,7 +828,6 @@ public class Minecraft implements IThreadListener {
|
||||||
this.resize(this.displayWidth, this.displayHeight);
|
this.resize(this.displayWidth, this.displayHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLimitFramerate() {
|
public int getLimitFramerate() {
|
||||||
|
@ -878,9 +842,7 @@ public class Minecraft implements IThreadListener {
|
||||||
try {
|
try {
|
||||||
System.gc();
|
System.gc();
|
||||||
this.loadWorld((WorldClient) null);
|
this.loadWorld((WorldClient) null);
|
||||||
} catch (Throwable var2) {
|
} catch (Throwable var2) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
System.gc();
|
System.gc();
|
||||||
}
|
}
|
||||||
|
@ -902,17 +864,14 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
--keyCount;
|
--keyCount;
|
||||||
if (keyCount < list.size()
|
if (keyCount < list.size() && !((Profiler.Result) list.get(keyCount)).field_76331_c.equals("unspecified")) {
|
||||||
&& !((Profiler.Result) list.get(keyCount)).field_76331_c.equals("unspecified")) {
|
|
||||||
if (this.debugProfilerName.length() > 0) {
|
if (this.debugProfilerName.length() > 0) {
|
||||||
this.debugProfilerName = this.debugProfilerName + ".";
|
this.debugProfilerName = this.debugProfilerName + ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.debugProfilerName = this.debugProfilerName
|
this.debugProfilerName = this.debugProfilerName + ((Profiler.Result) list.get(keyCount)).field_76331_c;
|
||||||
+ ((Profiler.Result) list.get(keyCount)).field_76331_c;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,14 +899,10 @@ public class Minecraft implements IThreadListener {
|
||||||
int j = this.displayHeight - short1 * 2;
|
int j = this.displayHeight - short1 * 2;
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||||
worldrenderer.pos((double) ((float) i - (float) short1 * 1.1F),
|
worldrenderer.pos((double) ((float) i - (float) short1 * 1.1F), (double) ((float) j - (float) short1 * 0.6F - 16.0F), 0.0D).color(0, 0, 0, 100).endVertex();
|
||||||
(double) ((float) j - (float) short1 * 0.6F - 16.0F), 0.0D).color(0, 0, 0, 100).endVertex();
|
worldrenderer.pos((double) ((float) i - (float) short1 * 1.1F), (double) (j + short1 * 2), 0.0D).color(0, 0, 0, 100).endVertex();
|
||||||
worldrenderer.pos((double) ((float) i - (float) short1 * 1.1F), (double) (j + short1 * 2), 0.0D)
|
worldrenderer.pos((double) ((float) i + (float) short1 * 1.1F), (double) (j + short1 * 2), 0.0D).color(0, 0, 0, 100).endVertex();
|
||||||
.color(0, 0, 0, 100).endVertex();
|
worldrenderer.pos((double) ((float) i + (float) short1 * 1.1F), (double) ((float) j - (float) short1 * 0.6F - 16.0F), 0.0D).color(0, 0, 0, 100).endVertex();
|
||||||
worldrenderer.pos((double) ((float) i + (float) short1 * 1.1F), (double) (j + short1 * 2), 0.0D)
|
|
||||||
.color(0, 0, 0, 100).endVertex();
|
|
||||||
worldrenderer.pos((double) ((float) i + (float) short1 * 1.1F),
|
|
||||||
(double) ((float) j - (float) short1 * 0.6F - 16.0F), 0.0D).color(0, 0, 0, 100).endVertex();
|
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
double d0 = 0.0D;
|
double d0 = 0.0D;
|
||||||
|
@ -963,26 +918,21 @@ public class Minecraft implements IThreadListener {
|
||||||
worldrenderer.pos((double) i, (double) j, 0.0D).color(j1, k1, l1, 255).endVertex();
|
worldrenderer.pos((double) i, (double) j, 0.0D).color(j1, k1, l1, 255).endVertex();
|
||||||
|
|
||||||
for (int i2 = l; i2 >= 0; --i2) {
|
for (int i2 = l; i2 >= 0; --i2) {
|
||||||
float f = (float) ((d0 + profiler$result1.field_76332_a * (double) i2 / (double) l)
|
float f = (float) ((d0 + profiler$result1.field_76332_a * (double) i2 / (double) l) * 3.141 * 2.0D / 100.0D);
|
||||||
* 3.141 * 2.0D / 100.0D);
|
|
||||||
float f1 = MathHelper.sin(f) * (float) short1;
|
float f1 = MathHelper.sin(f) * (float) short1;
|
||||||
float f2 = MathHelper.cos(f) * (float) short1 * 0.5F;
|
float f2 = MathHelper.cos(f) * (float) short1 * 0.5F;
|
||||||
worldrenderer.pos((double) ((float) i + f1), (double) ((float) j - f2), 0.0D).color(j1, k1, l1, 255)
|
worldrenderer.pos((double) ((float) i + f1), (double) ((float) j - f2), 0.0D).color(j1, k1, l1, 255).endVertex();
|
||||||
.endVertex();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
worldrenderer.begin(5, DefaultVertexFormats.POSITION_COLOR);
|
worldrenderer.begin(5, DefaultVertexFormats.POSITION_COLOR);
|
||||||
|
|
||||||
for (int l2 = l; l2 >= 0; --l2) {
|
for (int l2 = l; l2 >= 0; --l2) {
|
||||||
float f3 = (float) ((d0 + profiler$result1.field_76332_a * (double) l2 / (double) l)
|
float f3 = (float) ((d0 + profiler$result1.field_76332_a * (double) l2 / (double) l) * 3.141 * 2.0D / 100.0D);
|
||||||
* 3.141 * 2.0D / 100.0D);
|
|
||||||
float f4 = MathHelper.sin(f3) * (float) short1;
|
float f4 = MathHelper.sin(f3) * (float) short1;
|
||||||
float f5 = MathHelper.cos(f3) * (float) short1 * 0.5F;
|
float f5 = MathHelper.cos(f3) * (float) short1 * 0.5F;
|
||||||
worldrenderer.pos((double) ((float) i + f4), (double) ((float) j - f5), 0.0D)
|
worldrenderer.pos((double) ((float) i + f4), (double) ((float) j - f5), 0.0D).color(j1 >> 1, k1 >> 1, l1 >> 1, 255).endVertex();
|
||||||
.color(j1 >> 1, k1 >> 1, l1 >> 1, 255).endVertex();
|
worldrenderer.pos((double) ((float) i + f4), (double) ((float) j - f5 + 10.0F), 0.0D).color(j1 >> 1, k1 >> 1, l1 >> 1, 255).endVertex();
|
||||||
worldrenderer.pos((double) ((float) i + f4), (double) ((float) j - f5 + 10.0F), 0.0D)
|
|
||||||
.color(j1 >> 1, k1 >> 1, l1 >> 1, 255).endVertex();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
|
@ -1004,8 +954,7 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
int k2 = 16777215;
|
int k2 = 16777215;
|
||||||
this.fontRendererObj.drawStringWithShadow(s, (float) (i - short1), (float) (j - short1 / 2 - 16), k2);
|
this.fontRendererObj.drawStringWithShadow(s, (float) (i - short1), (float) (j - short1 / 2 - 16), k2);
|
||||||
this.fontRendererObj.drawStringWithShadow(s = decimalformat.format(profiler$result.field_76330_b) + "%",
|
this.fontRendererObj.drawStringWithShadow(s = decimalformat.format(profiler$result.field_76330_b) + "%", (float) (i + short1 - this.fontRendererObj.getStringWidth(s)), (float) (j - short1 / 2 - 16), k2);
|
||||||
(float) (i + short1 - this.fontRendererObj.getStringWidth(s)), (float) (j - short1 / 2 - 16), k2);
|
|
||||||
|
|
||||||
for (int j2 = 0; j2 < list.size(); ++j2) {
|
for (int j2 = 0; j2 < list.size(); ++j2) {
|
||||||
Profiler.Result profiler$result2 = (Profiler.Result) list.get(j2);
|
Profiler.Result profiler$result2 = (Profiler.Result) list.get(j2);
|
||||||
|
@ -1017,18 +966,10 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
s1 = s1 + profiler$result2.field_76331_c;
|
s1 = s1 + profiler$result2.field_76331_c;
|
||||||
this.fontRendererObj.drawStringWithShadow(s1, (float) (i - short1),
|
this.fontRendererObj.drawStringWithShadow(s1, (float) (i - short1), (float) (j + short1 / 2 + j2 * 8 + 20), profiler$result2.func_76329_a());
|
||||||
(float) (j + short1 / 2 + j2 * 8 + 20), profiler$result2.func_76329_a());
|
this.fontRendererObj.drawStringWithShadow(s1 = decimalformat.format(profiler$result2.field_76332_a) + "%", (float) (i + short1 - 50 - this.fontRendererObj.getStringWidth(s1)), (float) (j + short1 / 2 + j2 * 8 + 20), profiler$result2.func_76329_a());
|
||||||
this.fontRendererObj.drawStringWithShadow(
|
this.fontRendererObj.drawStringWithShadow(s1 = decimalformat.format(profiler$result2.field_76330_b) + "%", (float) (i + short1 - this.fontRendererObj.getStringWidth(s1)), (float) (j + short1 / 2 + j2 * 8 + 20), profiler$result2.func_76329_a());
|
||||||
s1 = decimalformat.format(profiler$result2.field_76332_a) + "%",
|
|
||||||
(float) (i + short1 - 50 - this.fontRendererObj.getStringWidth(s1)),
|
|
||||||
(float) (j + short1 / 2 + j2 * 8 + 20), profiler$result2.func_76329_a());
|
|
||||||
this.fontRendererObj.drawStringWithShadow(
|
|
||||||
s1 = decimalformat.format(profiler$result2.field_76330_b) + "%",
|
|
||||||
(float) (i + short1 - this.fontRendererObj.getStringWidth(s1)),
|
|
||||||
(float) (j + short1 / 2 + j2 * 8 + 20), profiler$result2.func_76329_a());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1083,15 +1024,12 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.leftClickCounter <= 0 && !this.thePlayer.isUsingItem()) {
|
if (this.leftClickCounter <= 0 && !this.thePlayer.isUsingItem()) {
|
||||||
if (leftClick && this.objectMouseOver != null
|
if (leftClick && this.objectMouseOver != null && this.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||||
&& this.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
|
||||||
BlockPos blockpos = this.objectMouseOver.getBlockPos();
|
BlockPos blockpos = this.objectMouseOver.getBlockPos();
|
||||||
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air
|
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air && this.playerController.onPlayerDamageBlock(blockpos, this.objectMouseOver.sideHit)) {
|
||||||
&& this.playerController.onPlayerDamageBlock(blockpos, this.objectMouseOver.sideHit)) {
|
|
||||||
this.effectRenderer.addBlockHitEffects(blockpos, this.objectMouseOver.sideHit);
|
this.effectRenderer.addBlockHitEffects(blockpos, this.objectMouseOver.sideHit);
|
||||||
this.thePlayer.swingItem();
|
this.thePlayer.swingItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.playerController.resetBlockRemoving();
|
this.playerController.resetBlockRemoving();
|
||||||
}
|
}
|
||||||
|
@ -1106,7 +1044,6 @@ public class Minecraft implements IThreadListener {
|
||||||
if (this.playerController.isNotCreative()) {
|
if (this.playerController.isNotCreative()) {
|
||||||
this.leftClickCounter = 10;
|
this.leftClickCounter = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
switch (this.objectMouseOver.typeOfHit) {
|
switch (this.objectMouseOver.typeOfHit) {
|
||||||
case ENTITY:
|
case ENTITY:
|
||||||
|
@ -1124,7 +1061,6 @@ public class Minecraft implements IThreadListener {
|
||||||
this.leftClickCounter = 10;
|
this.leftClickCounter = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1142,11 +1078,9 @@ public class Minecraft implements IThreadListener {
|
||||||
} else {
|
} else {
|
||||||
switch (this.objectMouseOver.typeOfHit) {
|
switch (this.objectMouseOver.typeOfHit) {
|
||||||
case ENTITY:
|
case ENTITY:
|
||||||
if (this.playerController.func_178894_a(this.thePlayer, this.objectMouseOver.entityHit,
|
if (this.playerController.func_178894_a(this.thePlayer, this.objectMouseOver.entityHit, this.objectMouseOver)) {
|
||||||
this.objectMouseOver)) {
|
|
||||||
flag = false;
|
flag = false;
|
||||||
} else if (this.playerController.interactWithEntitySendPacket(this.thePlayer,
|
} else if (this.playerController.interactWithEntitySendPacket(this.thePlayer, this.objectMouseOver.entityHit)) {
|
||||||
this.objectMouseOver.entityHit)) {
|
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1154,8 +1088,7 @@ public class Minecraft implements IThreadListener {
|
||||||
BlockPos blockpos = this.objectMouseOver.getBlockPos();
|
BlockPos blockpos = this.objectMouseOver.getBlockPos();
|
||||||
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air) {
|
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air) {
|
||||||
int i = itemstack != null ? itemstack.stackSize : 0;
|
int i = itemstack != null ? itemstack.stackSize : 0;
|
||||||
if (this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, blockpos,
|
if (this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, blockpos, this.objectMouseOver.sideHit, this.objectMouseOver.hitVec)) {
|
||||||
this.objectMouseOver.sideHit, this.objectMouseOver.hitVec)) {
|
|
||||||
flag = false;
|
flag = false;
|
||||||
this.thePlayer.swingItem();
|
this.thePlayer.swingItem();
|
||||||
}
|
}
|
||||||
|
@ -1175,12 +1108,10 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem();
|
ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem();
|
||||||
if (itemstack1 != null
|
if (itemstack1 != null && this.playerController.sendUseItem(this.thePlayer, this.theWorld, itemstack1)) {
|
||||||
&& this.playerController.sendUseItem(this.thePlayer, this.theWorld, itemstack1)) {
|
|
||||||
this.entityRenderer.itemRenderer.resetEquippedProgress2();
|
this.entityRenderer.itemRenderer.resetEquippedProgress2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1248,8 +1179,7 @@ public class Minecraft implements IThreadListener {
|
||||||
this.displayInGameMenu();
|
this.displayInGameMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (this.currentScreen != null && this.currentScreen instanceof GuiSleepMP
|
} else if (this.currentScreen != null && this.currentScreen instanceof GuiSleepMP && !this.thePlayer.isPlayerSleeping()) {
|
||||||
&& !this.thePlayer.isPlayerSleeping()) {
|
|
||||||
this.displayGuiScreen((GuiScreen) null);
|
this.displayGuiScreen((GuiScreen) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1268,11 +1198,14 @@ public class Minecraft implements IThreadListener {
|
||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable1) {
|
||||||
CrashReport crashreport = CrashReport.makeCrashReport(throwable1, "Updating screen events");
|
CrashReport crashreport = CrashReport.makeCrashReport(throwable1, "Updating screen events");
|
||||||
CrashReportCategory crashreportcategory = crashreport.makeCategory("Affected screen");
|
CrashReportCategory crashreportcategory = crashreport.makeCategory("Affected screen");
|
||||||
crashreportcategory.addCrashSectionCallable("Screen name", new Callable<String>() {
|
crashreportcategory.addCrashSectionCallable(
|
||||||
|
"Screen name",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
return Minecraft.this.currentScreen.getClass().getName();
|
return Minecraft.this.currentScreen.getClass().getName();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1282,11 +1215,14 @@ public class Minecraft implements IThreadListener {
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport1 = CrashReport.makeCrashReport(throwable, "Ticking screen");
|
CrashReport crashreport1 = CrashReport.makeCrashReport(throwable, "Ticking screen");
|
||||||
CrashReportCategory crashreportcategory1 = crashreport1.makeCategory("Affected screen");
|
CrashReportCategory crashreportcategory1 = crashreport1.makeCategory("Affected screen");
|
||||||
crashreportcategory1.addCrashSectionCallable("Screen name", new Callable<String>() {
|
crashreportcategory1.addCrashSectionCallable(
|
||||||
|
"Screen name",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
return Minecraft.this.currentScreen.getClass().getName();
|
return Minecraft.this.currentScreen.getClass().getName();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
throw new ReportedException(crashreport1);
|
throw new ReportedException(crashreport1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1315,8 +1251,7 @@ public class Minecraft implements IThreadListener {
|
||||||
if (this.ingameGUI.getSpectatorGui().func_175262_a()) {
|
if (this.ingameGUI.getSpectatorGui().func_175262_a()) {
|
||||||
this.ingameGUI.getSpectatorGui().func_175259_b(-j);
|
this.ingameGUI.getSpectatorGui().func_175259_b(-j);
|
||||||
} else {
|
} else {
|
||||||
float f = MathHelper.clamp_float(
|
float f = MathHelper.clamp_float(this.thePlayer.capabilities.getFlySpeed() + (float) j * 0.005F, 0.0F, 0.2F);
|
||||||
this.thePlayer.capabilities.getFlySpeed() + (float) j * 0.005F, 0.0F, 0.2F);
|
|
||||||
this.thePlayer.capabilities.setFlySpeed(f);
|
this.thePlayer.capabilities.setFlySpeed(f);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1378,17 +1313,17 @@ public class Minecraft implements IThreadListener {
|
||||||
this.displayInGameMenu();
|
this.displayInGameMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(k == this.gameSettings.keyBindClickGui.getKeyCode()){
|
if (k == this.gameSettings.keyBindClickGui.getKeyCode()) {
|
||||||
this.displayGuiScreen(new PreGUI());
|
this.displayGuiScreen(new PreGUI());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(k == this.gameSettings.keyBindAdminX.keyCode && EntityRenderer.test){
|
if (k == this.gameSettings.keyBindAdminX.keyCode && EntityRenderer.test) {
|
||||||
AdminRay.start();
|
AdminRay.start();
|
||||||
ModManager.adminRay.setEnabled(!ModManager.adminRay.isEnabled());
|
ModManager.adminRay.setEnabled(!ModManager.adminRay.isEnabled());
|
||||||
this.renderGlobal.loadRenderers();
|
this.renderGlobal.loadRenderers();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(k == KeyboardConstants.KEY_0) {
|
if (k == KeyboardConstants.KEY_0) {
|
||||||
this.displayGuiScreen(new ClickGuiRewrite());
|
this.displayGuiScreen(new ClickGuiRewrite());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1400,33 +1335,22 @@ public class Minecraft implements IThreadListener {
|
||||||
this.refreshResources();
|
this.refreshResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k == 17 && Keyboard.isKeyDown(61)) {
|
if (k == 17 && Keyboard.isKeyDown(61)) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (k == 18 && Keyboard.isKeyDown(61)) {
|
if (k == 18 && Keyboard.isKeyDown(61)) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (k == 47 && Keyboard.isKeyDown(61)) {
|
if (k == 47 && Keyboard.isKeyDown(61)) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (k == 38 && Keyboard.isKeyDown(61)) {
|
if (k == 38 && Keyboard.isKeyDown(61)) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (k == 22 && Keyboard.isKeyDown(61)) {
|
if (k == 22 && Keyboard.isKeyDown(61)) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (k == 20 && Keyboard.isKeyDown(61)) {
|
if (k == 20 && Keyboard.isKeyDown(61)) {
|
||||||
this.refreshResources();
|
this.refreshResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k == 33 && Keyboard.isKeyDown(61)) {
|
if (k == 33 && Keyboard.isKeyDown(61)) {
|
||||||
this.gameSettings.setOptionValue(GameSettings.Options.RENDER_DISTANCE,
|
this.gameSettings.setOptionValue(GameSettings.Options.RENDER_DISTANCE, GuiScreen.isShiftKeyDown() ? -1 : 1);
|
||||||
GuiScreen.isShiftKeyDown() ? -1 : 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k == 30 && Keyboard.isKeyDown(61)) {
|
if (k == 30 && Keyboard.isKeyDown(61)) {
|
||||||
|
@ -1508,8 +1432,7 @@ public class Minecraft implements IThreadListener {
|
||||||
if (this.playerController.isRidingHorse()) {
|
if (this.playerController.isRidingHorse()) {
|
||||||
this.thePlayer.sendHorseInventory();
|
this.thePlayer.sendHorseInventory();
|
||||||
} else {
|
} else {
|
||||||
this.getNetHandler().addToSendQueue(
|
this.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT));
|
||||||
new C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT));
|
|
||||||
this.displayGuiScreen(new GuiInventory(this.thePlayer));
|
this.displayGuiScreen(new GuiInventory(this.thePlayer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1533,17 +1456,11 @@ public class Minecraft implements IThreadListener {
|
||||||
this.playerController.onStoppedUsingItem(this.thePlayer);
|
this.playerController.onStoppedUsingItem(this.thePlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (this.gameSettings.keyBindAttack.isPressed()) {
|
while (this.gameSettings.keyBindAttack.isPressed()) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (this.gameSettings.keyBindUseItem.isPressed()) {
|
while (this.gameSettings.keyBindUseItem.isPressed()) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (this.gameSettings.keyBindPickBlock.isPressed()) {
|
while (this.gameSettings.keyBindPickBlock.isPressed()) {}
|
||||||
;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
while (this.gameSettings.keyBindAttack.isPressed()) {
|
while (this.gameSettings.keyBindAttack.isPressed()) {
|
||||||
this.clickMouse();
|
this.clickMouse();
|
||||||
|
@ -1558,13 +1475,11 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.gameSettings.keyBindUseItem.isKeyDown() && this.rightClickDelayTimer == 0
|
if (this.gameSettings.keyBindUseItem.isKeyDown() && this.rightClickDelayTimer == 0 && !this.thePlayer.isUsingItem()) {
|
||||||
&& !this.thePlayer.isUsingItem()) {
|
|
||||||
this.rightClickMouse();
|
this.rightClickMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sendClickBlockToController(
|
this.sendClickBlockToController(this.currentScreen == null && this.gameSettings.keyBindAttack.isKeyDown() && this.inGameHasFocus);
|
||||||
this.currentScreen == null && this.gameSettings.keyBindAttack.isKeyDown() && this.inGameHasFocus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.theWorld != null) {
|
if (this.theWorld != null) {
|
||||||
|
@ -1624,8 +1539,7 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
this.mcProfiler.endStartSection("animateTick");
|
this.mcProfiler.endStartSection("animateTick");
|
||||||
if (!this.isGamePaused && this.theWorld != null) {
|
if (!this.isGamePaused && this.theWorld != null) {
|
||||||
this.theWorld.doVoidFogParticles(MathHelper.floor_double(this.thePlayer.posX),
|
this.theWorld.doVoidFogParticles(MathHelper.floor_double(this.thePlayer.posX), MathHelper.floor_double(this.thePlayer.posY), MathHelper.floor_double(this.thePlayer.posZ));
|
||||||
MathHelper.floor_double(this.thePlayer.posY), MathHelper.floor_double(this.thePlayer.posZ));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mcProfiler.endStartSection("particles");
|
this.mcProfiler.endStartSection("particles");
|
||||||
|
@ -1749,7 +1663,6 @@ public class Minecraft implements IThreadListener {
|
||||||
if (this.currentScreen instanceof GuiGameOver) {
|
if (this.currentScreen instanceof GuiGameOver) {
|
||||||
this.displayGuiScreen((GuiScreen) null);
|
this.displayGuiScreen((GuiScreen) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
|
@ -1805,14 +1718,11 @@ public class Minecraft implements IThreadListener {
|
||||||
tileentity = this.theWorld.getTileEntity(blockpos);
|
tileentity = this.theWorld.getTileEntity(blockpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Block block1 = object instanceof ItemBlock && !block.isFlowerPot()
|
Block block1 = object instanceof ItemBlock && !block.isFlowerPot() ? Block.getBlockFromItem((Item) object) : block;
|
||||||
? Block.getBlockFromItem((Item) object)
|
|
||||||
: block;
|
|
||||||
i = block1.getDamageValue(this.theWorld, blockpos);
|
i = block1.getDamageValue(this.theWorld, blockpos);
|
||||||
flag1 = ((Item) object).getHasSubtypes();
|
flag1 = ((Item) object).getHasSubtypes();
|
||||||
} else {
|
} else {
|
||||||
if (this.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.ENTITY
|
if (this.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.ENTITY || this.objectMouseOver.entityHit == null || !flag) {
|
||||||
|| this.objectMouseOver.entityHit == null || !flag) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1877,7 +1787,6 @@ public class Minecraft implements IThreadListener {
|
||||||
int j = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + inventoryplayer.currentItem;
|
int j = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + inventoryplayer.currentItem;
|
||||||
this.playerController.sendSlotPacket(inventoryplayer.getStackInSlot(inventoryplayer.currentItem), j);
|
this.playerController.sendSlotPacket(inventoryplayer.getStackInSlot(inventoryplayer.currentItem), j);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1907,33 +1816,61 @@ public class Minecraft implements IThreadListener {
|
||||||
* type), and the worldInfo to the crash report
|
* type), and the worldInfo to the crash report
|
||||||
*/
|
*/
|
||||||
public CrashReport addGraphicsAndWorldToCrashReport(CrashReport theCrash) {
|
public CrashReport addGraphicsAndWorldToCrashReport(CrashReport theCrash) {
|
||||||
theCrash.getCategory().addCrashSectionCallable("Launched Version", new Callable<String>() {
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"Launched Version",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
return Minecraft.this.launchedVersion;
|
return Minecraft.this.launchedVersion;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
theCrash.getCategory().addCrashSectionCallable("LWJGL", new Callable<String>() {
|
);
|
||||||
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"LWJGL",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() {
|
public String call() {
|
||||||
return EagRuntime.getVersion();
|
return EagRuntime.getVersion();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
theCrash.getCategory().addCrashSectionCallable("OpenGL", new Callable<String>() {
|
|
||||||
public String call() {
|
|
||||||
return EaglercraftGPU.glGetString(7937) + " GL version " + EaglercraftGPU.glGetString(7938) + ", "
|
|
||||||
+ EaglercraftGPU.glGetString(7936);
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
theCrash.getCategory().addCrashSectionCallable("Is Modded", new Callable<String>() {
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"OpenGL",
|
||||||
|
new Callable<String>() {
|
||||||
|
public String call() {
|
||||||
|
return EaglercraftGPU.glGetString(7937) + " GL version " + EaglercraftGPU.glGetString(7938) + ", " + EaglercraftGPU.glGetString(7936);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"Is Modded",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
return "Definitely Not; You're an eagler";
|
return "Definitely Not; You're an eagler";
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
theCrash.getCategory().addCrashSectionCallable("Type", new Callable<String>() {
|
);
|
||||||
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"Type",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
return "Client (map_client.txt)";
|
return "Client (map_client.txt)";
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
theCrash.getCategory().addCrashSectionCallable("Resource Packs", new Callable<String>() {
|
);
|
||||||
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"Resource Packs",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
StringBuilder stringbuilder = new StringBuilder();
|
StringBuilder stringbuilder = new StringBuilder();
|
||||||
|
|
||||||
|
@ -1950,18 +1887,28 @@ public class Minecraft implements IThreadListener {
|
||||||
|
|
||||||
return stringbuilder.toString();
|
return stringbuilder.toString();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
theCrash.getCategory().addCrashSectionCallable("Current Language", new Callable<String>() {
|
);
|
||||||
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"Current Language",
|
||||||
|
new Callable<String>() {
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
return Minecraft.this.mcLanguageManager.getCurrentLanguage().toString();
|
return Minecraft.this.mcLanguageManager.getCurrentLanguage().toString();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
theCrash.getCategory().addCrashSectionCallable("Profiler Position", new Callable<String>() {
|
|
||||||
public String call() throws Exception {
|
|
||||||
return Minecraft.this.mcProfiler.profilingEnabled ? Minecraft.this.mcProfiler.getNameOfLastSection()
|
|
||||||
: "N/A (disabled)";
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
theCrash
|
||||||
|
.getCategory()
|
||||||
|
.addCrashSectionCallable(
|
||||||
|
"Profiler Position",
|
||||||
|
new Callable<String>() {
|
||||||
|
public String call() throws Exception {
|
||||||
|
return Minecraft.this.mcProfiler.profilingEnabled ? Minecraft.this.mcProfiler.getNameOfLastSection() : "N/A (disabled)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
if (this.theWorld != null) {
|
if (this.theWorld != null) {
|
||||||
this.theWorld.addWorldInfoToCrashReport(theCrash);
|
this.theWorld.addWorldInfoToCrashReport(theCrash);
|
||||||
}
|
}
|
||||||
|
@ -1977,13 +1924,14 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListenableFuture<Object> scheduleResourcesRefresh() {
|
public ListenableFuture<Object> scheduleResourcesRefresh() {
|
||||||
return this.addScheduledTask(new Runnable() {
|
return this.addScheduledTask(
|
||||||
|
new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
Minecraft.this.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"),
|
Minecraft.this.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"), I18n.format("resourcePack.load.pleaseWait"));
|
||||||
I18n.format("resourcePack.load.pleaseWait"));
|
|
||||||
Minecraft.this.refreshResources();
|
Minecraft.this.refreshResources();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_181538_aA() {
|
private String func_181538_aA() {
|
||||||
|
@ -2020,9 +1968,7 @@ public class Minecraft implements IThreadListener {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void stopIntegratedServer() {
|
public static void stopIntegratedServer() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Gets the system time in milliseconds.
|
* Gets the system time in milliseconds.
|
||||||
|
@ -2075,22 +2021,19 @@ public class Minecraft implements IThreadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MusicTicker.MusicType getAmbientMusicType() {
|
public MusicTicker.MusicType getAmbientMusicType() {
|
||||||
return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell
|
return this.thePlayer != null
|
||||||
|
? (
|
||||||
|
this.thePlayer.worldObj.provider instanceof WorldProviderHell
|
||||||
? MusicTicker.MusicType.NETHER
|
? MusicTicker.MusicType.NETHER
|
||||||
: (this.thePlayer.worldObj.provider instanceof WorldProviderEnd
|
: (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))
|
||||||
? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS
|
)
|
||||||
: MusicTicker.MusicType.END)
|
|
||||||
: (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying
|
|
||||||
? MusicTicker.MusicType.CREATIVE
|
|
||||||
: MusicTicker.MusicType.GAME)))
|
|
||||||
: MusicTicker.MusicType.MENU;
|
: MusicTicker.MusicType.MENU;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispatchKeypresses() {
|
public void dispatchKeypresses() {
|
||||||
int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() : Keyboard.getEventKey();
|
int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() : Keyboard.getEventKey();
|
||||||
if (i != 0 && !Keyboard.isRepeatEvent()) {
|
if (i != 0 && !Keyboard.isRepeatEvent()) {
|
||||||
if (!(this.currentScreen instanceof GuiControls)
|
if (!(this.currentScreen instanceof GuiControls) || ((GuiControls) this.currentScreen).time <= getSystemTime() - 20L) {
|
||||||
|| ((GuiControls) this.currentScreen).time <= getSystemTime() - 20L) {
|
|
||||||
if (Keyboard.getEventKeyState()) {
|
if (Keyboard.getEventKeyState()) {
|
||||||
if (i == this.gameSettings.keyBindScreenshot.getKeyCode()) {
|
if (i == this.gameSettings.keyBindScreenshot.getKeyCode()) {
|
||||||
this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot());
|
this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot());
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class EntityPlayerSP extends AbstractClientPlayer {
|
||||||
* Called to update the entity's position/logic.
|
* Called to update the entity's position/logic.
|
||||||
*/
|
*/
|
||||||
public void onUpdate() {
|
public void onUpdate() {
|
||||||
if(ModManager.sprint.isEnabled()){
|
if (ModManager.sprint.isEnabled()) {
|
||||||
Sprint.onUpdate();
|
Sprint.onUpdate();
|
||||||
}
|
}
|
||||||
if (this.worldObj.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ))) {
|
if (this.worldObj.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ))) {
|
||||||
|
@ -532,13 +532,13 @@ public class EntityPlayerSP extends AbstractClientPlayer {
|
||||||
* Args: entity that was hit critically
|
* Args: entity that was hit critically
|
||||||
*/
|
*/
|
||||||
public void onCriticalHit(Entity entityHit) {
|
public void onCriticalHit(Entity entityHit) {
|
||||||
for(int i = 0; i < ParticleMultiplier.multiplier.getValue(); i++){
|
for (int i = 0; i < ParticleMultiplier.multiplier.getValue(); i++) {
|
||||||
this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT);
|
this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnchantmentCritical(Entity entityHit) {
|
public void onEnchantmentCritical(Entity entityHit) {
|
||||||
for(int i = 0; i < ParticleMultiplier.multiplier.getValue(); i++){
|
for (int i = 0; i < ParticleMultiplier.multiplier.getValue(); i++) {
|
||||||
this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT_MAGIC);
|
this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT_MAGIC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,15 +82,13 @@ public class GuiButton extends Gui {
|
||||||
FontRenderer fontrenderer = mc.fontRendererObj;
|
FontRenderer fontrenderer = mc.fontRendererObj;
|
||||||
mc.getTextureManager().bindTexture(buttonTextures);
|
mc.getTextureManager().bindTexture(buttonTextures);
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width
|
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
|
||||||
&& mouseY < this.yPosition + this.height;
|
|
||||||
int i = this.getHoverState(this.hovered);
|
int i = this.getHoverState(this.hovered);
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
GlStateManager.tryBlendFuncSeparate(RealOpenGLEnums.GL_SRC_ALPHA, RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
GlStateManager.tryBlendFuncSeparate(RealOpenGLEnums.GL_SRC_ALPHA, RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||||
GlStateManager.blendFunc(RealOpenGLEnums.GL_SRC_ALPHA, RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA);
|
GlStateManager.blendFunc(RealOpenGLEnums.GL_SRC_ALPHA, RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + i * 20, this.width / 2, this.height);
|
this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + i * 20, this.width / 2, this.height);
|
||||||
this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2,
|
this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height);
|
||||||
46 + i * 20, this.width / 2, this.height);
|
|
||||||
this.mouseDragged(mc, mouseX, mouseY);
|
this.mouseDragged(mc, mouseX, mouseY);
|
||||||
int j = 14737632;
|
int j = 14737632;
|
||||||
if (!this.enabled) {
|
if (!this.enabled) {
|
||||||
|
@ -103,7 +101,6 @@ public class GuiButton extends Gui {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Fired when the mouse button is dragged. Equivalent of
|
* Fired when the mouse button is dragged. Equivalent of
|
||||||
* MouseListener.mouseDragged(MouseEvent e).
|
* MouseListener.mouseDragged(MouseEvent e).
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package net.minecraft.client.gui;
|
package net.minecraft.client.gui;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import dev.resent.util.misc.GlUtils;
|
import dev.resent.util.misc.GlUtils;
|
||||||
import dev.resent.visual.ui.animation.SimpleAnimation;
|
import dev.resent.visual.ui.animation.SimpleAnimation;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||||
|
@ -284,8 +282,7 @@ public class GuiChat extends GuiScreen {
|
||||||
GlUtils.startTranslate(0, 29 - (int) animation.getValue());
|
GlUtils.startTranslate(0, 29 - (int) animation.getValue());
|
||||||
drawRect(2, this.height - 14, this.width - 2, this.height - 2, Integer.MIN_VALUE);
|
drawRect(2, this.height - 14, this.width - 2, this.height - 2, Integer.MIN_VALUE);
|
||||||
this.inputField.drawTextBox();
|
this.inputField.drawTextBox();
|
||||||
if (this.inputField.isTypingPassword)
|
if (this.inputField.isTypingPassword) this.mc.fontRendererObj.drawStringWithShadow("Password Hidden", 2, this.height - 25, 16770425);
|
||||||
this.mc.fontRendererObj.drawStringWithShadow("Password Hidden", 2, this.height - 25, 16770425);
|
|
||||||
|
|
||||||
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI().getChatComponent(Mouse.getX(), Mouse.getY());
|
IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI().getChatComponent(Mouse.getX(), Mouse.getY());
|
||||||
|
|
|
@ -5,19 +5,17 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_COLOR;
|
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 static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
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.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
import dev.resent.util.misc.W;
|
import dev.resent.util.misc.W;
|
||||||
import dev.resent.visual.crosshair.CrosshairManager;
|
import dev.resent.visual.crosshair.CrosshairManager;
|
||||||
import dev.resent.visual.ui.animation.SimpleAnimation;
|
import dev.resent.visual.ui.animation.SimpleAnimation;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
|
@ -303,8 +301,11 @@ public class GuiIngame extends Gui {
|
||||||
this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1);
|
this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Resent.INSTANCE.modManager.modules.stream().filter(m -> m.isEnabled() && m instanceof RenderMod).forEach(m -> {
|
Resent.INSTANCE.modManager.modules
|
||||||
if(!Minecraft.getMinecraft().gameSettings.showDebugInfo && m.getName() != "CPS"){
|
.stream()
|
||||||
|
.filter(m -> m.isEnabled() && m instanceof RenderMod)
|
||||||
|
.forEach(m -> {
|
||||||
|
if (!Minecraft.getMinecraft().gameSettings.showDebugInfo && m.getName() != "CPS") {
|
||||||
((RenderMod) m).draw();
|
((RenderMod) m).draw();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -318,9 +319,8 @@ public class GuiIngame extends Gui {
|
||||||
if (this.showCrosshair()) {
|
if (this.showCrosshair()) {
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
if(CrosshairManager.crosshairLocation == null){
|
if (CrosshairManager.crosshairLocation == null) {
|
||||||
if(CrosshairManager.read() != null)
|
if (CrosshairManager.read() != null) CrosshairManager.forceLoad(CrosshairManager.read());
|
||||||
CrosshairManager.forceLoad(CrosshairManager.read());
|
|
||||||
this.mc.getTextureManager().bindTexture(icons);
|
this.mc.getTextureManager().bindTexture(icons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,8 +343,7 @@ public class GuiIngame extends Gui {
|
||||||
float f = this.zLevel;
|
float f = this.zLevel;
|
||||||
this.zLevel = -90.0F;
|
this.zLevel = -90.0F;
|
||||||
this.drawTexturedModalRect(i - 91, sr.getScaledHeight() - 22, 0, 0, 182, 22);
|
this.drawTexturedModalRect(i - 91, sr.getScaledHeight() - 22, 0, 0, 182, 22);
|
||||||
this.drawTexturedModalRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20,
|
this.drawTexturedModalRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20, sr.getScaledHeight() - 22 - 1, 0, 22, 24, 22);
|
||||||
sr.getScaledHeight() - 22 - 1, 0, 22, 24, 22);
|
|
||||||
this.zLevel = f;
|
this.zLevel = f;
|
||||||
GlStateManager.enableRescaleNormal();
|
GlStateManager.enableRescaleNormal();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) {
|
public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) {
|
||||||
this.drawDefaultBackground();
|
this.drawDefaultBackground();
|
||||||
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/background.jpg"));
|
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/background.jpg"));
|
||||||
Gui.drawModalRectWithCustomSizedTexture(0, 0, 0.0f, 0.0f, this.width+60, this.height, this.width + 21, this.height + 50);
|
Gui.drawModalRectWithCustomSizedTexture(0, 0, 0.0f, 0.0f, this.width + 60, this.height, this.width + 21, this.height + 50);
|
||||||
final String s1 = "Copyright " + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "M" + EnumChatFormatting.RESET + "ojang AB";
|
final String s1 = "Copyright " + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "M" + EnumChatFormatting.RESET + "ojang AB";
|
||||||
this.drawString(Minecraft.getMinecraft().fontRendererObj, s1, this.width - Minecraft.getMinecraft().fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1);
|
this.drawString(Minecraft.getMinecraft().fontRendererObj, s1, this.width - Minecraft.getMinecraft().fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1);
|
||||||
GlUtils.drawCenteredScaledString("" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Resent", this.width / 2, this.height / 2 - 50, -1, 3f);
|
GlUtils.drawCenteredScaledString("" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Resent", this.width / 2, this.height / 2 - 50, -1, 3f);
|
||||||
|
|
|
@ -563,7 +563,6 @@ public abstract class GuiScreen extends Gui implements GuiYesNoCallback {
|
||||||
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Returns true if either windows ctrl key is down or if either
|
* Returns true if either windows ctrl key is down or if either
|
||||||
* mac meta key is down
|
* mac meta key is down
|
||||||
|
|
|
@ -453,10 +453,7 @@ public class GuiTextField extends Gui {
|
||||||
k = s.length();
|
k = s.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (s.length() > 0) {
|
if (s.length() > 0) {
|
||||||
|
|
||||||
String s1 = flag ? s.substring(0, j) : s;
|
String s1 = flag ? s.substring(0, j) : s;
|
||||||
String s2 = s1;
|
String s2 = s1;
|
||||||
|
|
||||||
|
@ -486,16 +483,10 @@ public class GuiTextField extends Gui {
|
||||||
s2 += "*";
|
s2 += "*";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
isTypingPassword = false;
|
isTypingPassword = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
j1 = this.fontRendererInstance.drawStringWithShadow(s2, (float) l, (float) i1, i);
|
j1 = this.fontRendererInstance.drawStringWithShadow(s2, (float) l, (float) i1, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,9 @@ package net.minecraft.client.model;
|
||||||
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_COMPILE;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_COMPILE;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||||
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;
|
||||||
|
@ -142,7 +140,6 @@ public class ModelRenderer {
|
||||||
private boolean compiledState;
|
private boolean compiledState;
|
||||||
|
|
||||||
public void render(float parFloat1) {
|
public void render(float parFloat1) {
|
||||||
|
|
||||||
boolean batchRendering = ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.batchRendering.getValue();
|
boolean batchRendering = ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.batchRendering.getValue();
|
||||||
|
|
||||||
if (compiledState != batchRendering) {
|
if (compiledState != batchRendering) {
|
||||||
|
|
|
@ -75,7 +75,6 @@ public class TexturedQuad {
|
||||||
f2 = -f2;
|
f2 = -f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean batchRendering = ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.batchRendering.getValue();
|
boolean batchRendering = ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.batchRendering.getValue();
|
||||||
this.drawOnSelf = !renderer.isDrawing;
|
this.drawOnSelf = !renderer.isDrawing;
|
||||||
if (this.drawOnSelf || !batchRendering) {
|
if (this.drawOnSelf || !batchRendering) {
|
||||||
|
|
|
@ -287,18 +287,15 @@ public class PlayerControllerMP {
|
||||||
try {
|
try {
|
||||||
this.netClientHandler.getNetworkManager().processReceivedPackets();
|
this.netClientHandler.getNetworkManager().processReceivedPackets();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
EaglercraftNetworkManager.logger
|
EaglercraftNetworkManager.logger.fatal("Unhandled IOException was thrown " + "while processing multiplayer packets!");
|
||||||
.fatal("Unhandled IOException was thrown " + "while processing multiplayer packets!");
|
|
||||||
EaglercraftNetworkManager.logger.fatal(ex);
|
EaglercraftNetworkManager.logger.fatal(ex);
|
||||||
EaglercraftNetworkManager.logger.fatal("Disconnecting...");
|
EaglercraftNetworkManager.logger.fatal("Disconnecting...");
|
||||||
this.netClientHandler.getNetworkManager()
|
this.netClientHandler.getNetworkManager().closeChannel(new ChatComponentText("Exception thrown: " + ex.toString()));
|
||||||
.closeChannel(new ChatComponentText("Exception thrown: " + ex.toString()));
|
|
||||||
}
|
}
|
||||||
this.netClientHandler.getSkinCache().flush();
|
this.netClientHandler.getSkinCache().flush();
|
||||||
} else {
|
} else {
|
||||||
this.netClientHandler.getNetworkManager().checkDisconnected();
|
this.netClientHandler.getNetworkManager().checkDisconnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isHittingPosition(BlockPos pos) {
|
private boolean isHittingPosition(BlockPos pos) {
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package net.minecraft.client.multiplayer;
|
package net.minecraft.client.multiplayer;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
|
|
|
@ -4,9 +4,7 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -359,8 +357,7 @@ public class EffectRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addBlockDestroyEffects(BlockPos pos, IBlockState state) {
|
public void addBlockDestroyEffects(BlockPos pos, IBlockState state) {
|
||||||
if(ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.blockEffects.getValue())
|
if (ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.blockEffects.getValue()) return;
|
||||||
return;
|
|
||||||
|
|
||||||
if (state.getBlock().getMaterial() != Material.air) {
|
if (state.getBlock().getMaterial() != Material.air) {
|
||||||
state = state.getBlock().getActualState(state, this.worldObj, pos);
|
state = state.getBlock().getActualState(state, this.worldObj, pos);
|
||||||
|
@ -383,8 +380,7 @@ public class EffectRenderer {
|
||||||
* Adds block hit particles for the specified block
|
* Adds block hit particles for the specified block
|
||||||
*/
|
*/
|
||||||
public void addBlockHitEffects(BlockPos pos, EnumFacing side) {
|
public void addBlockHitEffects(BlockPos pos, EnumFacing side) {
|
||||||
if(ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.blockEffects.getValue())
|
if (ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.blockEffects.getValue()) return;
|
||||||
return;
|
|
||||||
|
|
||||||
IBlockState iblockstate = this.worldObj.getBlockState(pos);
|
IBlockState iblockstate = this.worldObj.getBlockState(pos);
|
||||||
Block block = iblockstate.getBlock();
|
Block block = iblockstate.getBlock();
|
||||||
|
|
|
@ -24,7 +24,6 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_TEXTURE_WR
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
|
|
||||||
import dev.resent.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
|
@ -660,13 +659,11 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableLightmap() {
|
public void enableLightmap() {
|
||||||
if(ModManager.fpsOptions.lightUpdates.getValue() || ModManager.fullbright.isEnabled())
|
if (ModManager.fpsOptions.lightUpdates.getValue() || ModManager.fullbright.isEnabled()) return;
|
||||||
return;
|
|
||||||
|
|
||||||
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
|
@ -886,7 +883,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
GlStateManager.enableOverlayFramebufferBlending();
|
GlStateManager.enableOverlayFramebufferBlending();
|
||||||
this.mc.ingameGUI.renderGameOverlay(parFloat1);
|
this.mc.ingameGUI.renderGameOverlay(parFloat1);
|
||||||
}
|
}
|
||||||
if(ModManager.cps.isEnabled()){
|
if (ModManager.cps.isEnabled()) {
|
||||||
ModManager.cps.draw();
|
ModManager.cps.draw();
|
||||||
}
|
}
|
||||||
if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
|
if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
|
||||||
|
@ -1204,7 +1201,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
|
|
||||||
this.mc.mcProfiler.endStartSection("hand");
|
this.mc.mcProfiler.endStartSection("hand");
|
||||||
|
|
||||||
if(ModManager.adminSpawner.isEnabled()){
|
if (ModManager.adminSpawner.isEnabled()) {
|
||||||
ModManager.adminSpawner.render();
|
ModManager.adminSpawner.render();
|
||||||
}
|
}
|
||||||
if (this.renderHand) {
|
if (this.renderHand) {
|
||||||
|
|
|
@ -311,7 +311,7 @@ public class ItemRenderer {
|
||||||
this.func_178110_a((EntityPlayerSP) entityplayersp, partialTicks);
|
this.func_178110_a((EntityPlayerSP) entityplayersp, partialTicks);
|
||||||
GlStateManager.enableRescaleNormal();
|
GlStateManager.enableRescaleNormal();
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
if(ModManager.hand.isEnabled()){
|
if (ModManager.hand.isEnabled()) {
|
||||||
GlStateManager.scale(-1.0D, 1.0D, 1.0D);
|
GlStateManager.scale(-1.0D, 1.0D, 1.0D);
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,9 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_GREATER;
|
||||||
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_ALPHA;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||||
|
@ -404,8 +402,7 @@ public abstract class RendererLivingEntity<T extends EntityLivingBase> extends R
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Minecraft.isGuiEnabled() && !entitylivingbase.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer) || ModManager.selfNametag.isEnabled())
|
if (Minecraft.isGuiEnabled() && !entitylivingbase.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer) || ModManager.selfNametag.isEnabled()) return true;
|
||||||
return true;
|
|
||||||
|
|
||||||
return Minecraft.isGuiEnabled() && entitylivingbase != this.renderManager.livingPlayer && !entitylivingbase.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer) && entitylivingbase.riddenByEntity == null;
|
return Minecraft.isGuiEnabled() && entitylivingbase != this.renderManager.livingPlayer && !entitylivingbase.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer) && entitylivingbase.riddenByEntity == null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,11 +38,10 @@ public class LayerCape implements LayerRenderer<AbstractClientPlayer> {
|
||||||
public void doRenderLayer(AbstractClientPlayer abstractclientplayer, float var2, float var3, float f, float var5, float var6, float var7, float var8) {
|
public void doRenderLayer(AbstractClientPlayer abstractclientplayer, float var2, float var3, float f, float var5, float var6, float var7, float var8) {
|
||||||
if (abstractclientplayer.hasPlayerInfo() && !abstractclientplayer.isInvisible() && this.playerRenderer.getMainModel() instanceof ModelPlayer && ModManager.cape.isEnabled() && CapeManager.shouldRender(abstractclientplayer)) {
|
if (abstractclientplayer.hasPlayerInfo() && !abstractclientplayer.isInvisible() && this.playerRenderer.getMainModel() instanceof ModelPlayer && ModManager.cape.isEnabled() && CapeManager.shouldRender(abstractclientplayer)) {
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
if(CapeManager.capeLocation == null){
|
if (CapeManager.capeLocation == null) {
|
||||||
if(CapeManager.read() != null)
|
if (CapeManager.read() != null) CapeManager.forceLoad(CapeManager.read());
|
||||||
CapeManager.forceLoad(CapeManager.read());
|
|
||||||
this.playerRenderer.bindTexture(new ResourceLocation("eagler:gui/unnamed.png"));
|
this.playerRenderer.bindTexture(new ResourceLocation("eagler:gui/unnamed.png"));
|
||||||
}else {
|
} else {
|
||||||
this.playerRenderer.bindTexture(CapeManager.capeLocation);
|
this.playerRenderer.bindTexture(CapeManager.capeLocation);
|
||||||
}
|
}
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
|
|
|
@ -4,7 +4,6 @@ import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.Lists;
|
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.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
|
|
@ -802,8 +802,7 @@ public abstract class Entity {
|
||||||
* sprinting and not in water.
|
* sprinting and not in water.
|
||||||
*/
|
*/
|
||||||
public void spawnRunningParticles() {
|
public void spawnRunningParticles() {
|
||||||
if(!this.onGround)
|
if (!this.onGround) return;
|
||||||
return;
|
|
||||||
if (this.isSprinting() && !this.isInWater()) {
|
if (this.isSprinting() && !this.isInWater()) {
|
||||||
this.createRunningParticles();
|
this.createRunningParticles();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,9 @@ package net.minecraft.entity.player;
|
||||||
|
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import dev.resent.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.module.impl.misc.ParticleMultiplier;
|
import dev.resent.module.impl.misc.ParticleMultiplier;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||||
|
|
|
@ -485,7 +485,6 @@ public class MathHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
||||||
for (int j = 0; j < 4096; ++j) {
|
for (int j = 0; j < 4096; ++j) {
|
||||||
SIN_TABLE_FAST[j] = (float) Math.sin(((float) j + 0.5f) / 4096.0f * ((float) Math.PI * 2f));
|
SIN_TABLE_FAST[j] = (float) Math.sin(((float) j + 0.5f) / 4096.0f * ((float) Math.PI * 2f));
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,6 @@ public class Timer {
|
||||||
this.elapsedTicks = 10;
|
this.elapsedTicks = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.renderPartialTicks = ((int)(this.elapsedPartialTicks*64.0f) / 64.0f);
|
this.renderPartialTicks = ((int) (this.elapsedPartialTicks * 64.0f) / 64.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package net.minecraft.world;
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.util.misc.W;
|
import dev.resent.util.misc.W;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -2108,9 +2107,9 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkLightFor(EnumSkyBlock lightType, BlockPos pos) {
|
public boolean checkLightFor(EnumSkyBlock lightType, BlockPos pos) {
|
||||||
if(ModManager.fpsOptions.lightUpdates.getValue()){
|
if (ModManager.fpsOptions.lightUpdates.getValue()) {
|
||||||
return true;
|
return true;
|
||||||
}else if (!this.isAreaLoaded(pos, 17, false)) {
|
} else if (!this.isAreaLoaded(pos, 17, false)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
@ -1,12 +1,34 @@
|
||||||
package net.lax1dude.eaglercraft.v1_8.internal;
|
package net.lax1dude.eaglercraft.v1_8.internal;
|
||||||
|
|
||||||
|
import com.jcraft.jzlib.DeflaterOutputStream;
|
||||||
|
import com.jcraft.jzlib.GZIPInputStream;
|
||||||
|
import com.jcraft.jzlib.GZIPOutputStream;
|
||||||
|
import com.jcraft.jzlib.InflaterInputStream;
|
||||||
|
import dev.resent.client.ClientInfo;
|
||||||
|
import dev.resent.client.Resent;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerArrayBufferAllocator;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EPKLoader;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EarlyLoadScreen;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass.EPKFileEntry;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMClientConfigAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGL2RenderingContext;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
|
||||||
import org.teavm.interop.Async;
|
import org.teavm.interop.Async;
|
||||||
import org.teavm.interop.AsyncCallback;
|
import org.teavm.interop.AsyncCallback;
|
||||||
import org.teavm.jso.JSBody;
|
import org.teavm.jso.JSBody;
|
||||||
|
@ -28,31 +50,6 @@ import org.teavm.jso.typedarrays.ArrayBuffer;
|
||||||
import org.teavm.jso.webaudio.MediaStream;
|
import org.teavm.jso.webaudio.MediaStream;
|
||||||
import org.teavm.jso.webgl.WebGLFramebuffer;
|
import org.teavm.jso.webgl.WebGLFramebuffer;
|
||||||
|
|
||||||
import com.jcraft.jzlib.DeflaterOutputStream;
|
|
||||||
import com.jcraft.jzlib.GZIPInputStream;
|
|
||||||
import com.jcraft.jzlib.GZIPOutputStream;
|
|
||||||
import com.jcraft.jzlib.InflaterInputStream;
|
|
||||||
|
|
||||||
import dev.resent.client.ClientInfo;
|
|
||||||
import dev.resent.client.Resent;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerArrayBufferAllocator;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EPKLoader;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EarlyLoadScreen;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass.EPKFileEntry;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMClientConfigAdapter;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGL2RenderingContext;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
* Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
||||||
*
|
*
|
||||||
|
@ -159,7 +156,6 @@ public class PlatformRuntime {
|
||||||
|
|
||||||
logger.info("Decompressing: {}", logURL);
|
logger.info("Decompressing: {}", logURL);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
EPKLoader.loadEPK(epkFileData, epkFiles[i].path, PlatformAssets.assets);
|
EPKLoader.loadEPK(epkFileData, epkFiles[i].path, PlatformAssets.assets);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
@ -173,7 +169,6 @@ public class PlatformRuntime {
|
||||||
|
|
||||||
logger.info("Initializing sound engine...");
|
logger.info("Initializing sound engine...");
|
||||||
|
|
||||||
|
|
||||||
enableScreen();
|
enableScreen();
|
||||||
PlatformInput.pressAnyKeyScreen();
|
PlatformInput.pressAnyKeyScreen();
|
||||||
|
|
||||||
|
@ -197,13 +192,13 @@ public class PlatformRuntime {
|
||||||
@JSBody(params = { "version" }, script = "setVersion(version)")
|
@JSBody(params = { "version" }, script = "setVersion(version)")
|
||||||
public static native void setClientVersion(String version);
|
public static native void setClientVersion(String version);
|
||||||
|
|
||||||
@JSBody( script = "die()")
|
@JSBody(script = "die()")
|
||||||
public static native void remove();
|
public static native void remove();
|
||||||
|
|
||||||
@JSBody( script = "enable()")
|
@JSBody(script = "enable()")
|
||||||
public static native void enableScreen();
|
public static native void enableScreen();
|
||||||
|
|
||||||
@JSBody( script = "loading()")
|
@JSBody(script = "loading()")
|
||||||
public static native void loadingScreen();
|
public static native void loadingScreen();
|
||||||
|
|
||||||
@JSBody(params = {}, script = "return {antialias: false, depth: false, powerPreference: \"high-performance\", desynchronized: true, preserveDrawingBuffer: false, premultipliedAlpha: false, alpha: false};")
|
@JSBody(params = {}, script = "return {antialias: false, depth: false, powerPreference: \"high-performance\", desynchronized: true, preserveDrawingBuffer: false, premultipliedAlpha: false, alpha: false};")
|
||||||
|
@ -304,32 +299,39 @@ public class PlatformRuntime {
|
||||||
request.setResponseType("arraybuffer");
|
request.setResponseType("arraybuffer");
|
||||||
request.open("GET", assetPackageURI, true);
|
request.open("GET", assetPackageURI, true);
|
||||||
|
|
||||||
TeaVMUtils.addEventListener(request, "load", new EventListener<Event>() {
|
TeaVMUtils.addEventListener(
|
||||||
|
request,
|
||||||
|
"load",
|
||||||
|
new EventListener<Event>() {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(Event evt) {
|
public void handleEvent(Event evt) {
|
||||||
int stat = request.getStatus();
|
int stat = request.getStatus();
|
||||||
if(stat == 0 || (stat >= 200 && stat < 400)) {
|
if (stat == 0 || (stat >= 200 && stat < 400)) {
|
||||||
cb.complete((ArrayBuffer)request.getResponse());
|
cb.complete((ArrayBuffer) request.getResponse());
|
||||||
}else {
|
} else {
|
||||||
cb.complete(null);
|
cb.complete(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
TeaVMUtils.addEventListener(request, "progress", new EventListener<Event>() {
|
TeaVMUtils.addEventListener(
|
||||||
|
request,
|
||||||
|
"progress",
|
||||||
|
new EventListener<Event>() {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(Event evt) {
|
public void handleEvent(Event evt) {
|
||||||
try{
|
try {
|
||||||
int epkSize = Integer.parseInt(request.getResponseHeader("content-length"));
|
int epkSize = Integer.parseInt(request.getResponseHeader("content-length"));
|
||||||
Event event = evt;
|
Event event = evt;
|
||||||
|
|
||||||
|
|
||||||
setBarProgress(event, epkSize);
|
setBarProgress(event, epkSize);
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
TeaVMUtils.addEventListener(
|
TeaVMUtils.addEventListener(
|
||||||
request,
|
request,
|
||||||
|
@ -611,8 +613,10 @@ public class PlatformRuntime {
|
||||||
mediaRec = null;
|
mediaRec = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSBody(params = {}, script = "showMojang();")
|
@JSBody(params = {}, script = "showMojang();")
|
||||||
public static native void showMojangScreen();
|
public static native void showMojangScreen();
|
||||||
|
|
||||||
@JSBody(params = {}, script = "die2();")
|
@JSBody(params = {}, script = "die2();")
|
||||||
public static native void removeLoadScreen();
|
public static native void removeLoadScreen();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package net.lax1dude.eaglercraft.v1_8.internal.teavm;
|
package net.lax1dude.eaglercraft.v1_8.internal.teavm;
|
||||||
|
|
||||||
|
import dev.resent.client.ClientInfo;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
||||||
|
@ -19,8 +20,6 @@ import org.teavm.jso.dom.html.HTMLDocument;
|
||||||
import org.teavm.jso.dom.html.HTMLElement;
|
import org.teavm.jso.dom.html.HTMLElement;
|
||||||
import org.teavm.jso.webgl.WebGLRenderingContext;
|
import org.teavm.jso.webgl.WebGLRenderingContext;
|
||||||
|
|
||||||
import dev.resent.client.ClientInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
* Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user