idk
This commit is contained in:
parent
b66ca91aae
commit
361db9057e
34782
javascript/classes.js
34782
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -16,9 +16,8 @@
|
||||||
|
|
||||||
package com.google.common.base;
|
package com.google.common.base;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
|
||||||
|
|
||||||
import com.google.common.annotations.GwtCompatible;
|
import com.google.common.annotations.GwtCompatible;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains constant definitions for the six standard {@link Charset} instances,
|
* Contains constant definitions for the six standard {@link Charset} instances,
|
||||||
|
|
|
@ -1,19 +1,25 @@
|
||||||
package dev.resent;
|
package dev.resent;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
import javax.sound.sampled.AudioInputStream;
|
||||||
|
import javax.sound.sampled.AudioSystem;
|
||||||
|
import javax.sound.sampled.Clip;
|
||||||
|
import javax.sound.sampled.LineUnavailableException;
|
||||||
|
import javax.sound.sampled.UnsupportedAudioFileException;
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
import dev.resent.module.setting.BooleanSetting;
|
import dev.resent.module.setting.BooleanSetting;
|
||||||
import dev.resent.module.setting.ModeSetting;
|
import dev.resent.module.setting.ModeSetting;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.audio.MusicTicker;
|
|
||||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
import net.minecraft.client.audio.SoundHandler;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class Resent {
|
public class Resent {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
INSTANCE = new Resent();
|
INSTANCE = new Resent();
|
||||||
}
|
}
|
||||||
|
@ -26,79 +32,114 @@ public class Resent {
|
||||||
Resent.INSTANCE.modManager = new ModManager();
|
Resent.INSTANCE.modManager = new ModManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save(PrintWriter printwriter){
|
public void save(PrintWriter printwriter) {
|
||||||
Resent.INSTANCE.modManager.modules.stream().forEach( m -> {
|
Resent.INSTANCE.modManager.modules
|
||||||
printwriter.println(m.getName() + ":" + m.isEnabled());
|
.stream()
|
||||||
if(m instanceof RenderMod){
|
.forEach(m -> {
|
||||||
printwriter.println(m.getName() + "_x:" + ((RenderMod)m).getX());
|
printwriter.println(m.getName() + ":" + m.isEnabled());
|
||||||
printwriter.println(m.getName() + "_y:" + ((RenderMod)m).getY());
|
if (m instanceof RenderMod) {
|
||||||
printwriter.println(m.getName() + "_lastx:" + ((RenderMod)m).lastX);
|
printwriter.println(m.getName() + "_x:" + ((RenderMod) m).getX());
|
||||||
printwriter.println(m.getName() + "_lasty:" + ((RenderMod)m).lastY);
|
printwriter.println(m.getName() + "_y:" + ((RenderMod) m).getY());
|
||||||
}
|
printwriter.println(m.getName() + "_lastx:" + ((RenderMod) m).lastX);
|
||||||
m.settings.stream().forEach(s -> {
|
printwriter.println(m.getName() + "_lasty:" + ((RenderMod) m).lastY);
|
||||||
if (s instanceof ModeSetting) {
|
|
||||||
printwriter.println(m.getName() + "_modesetting_" + s.name + ":" + ((ModeSetting) s).getValue());
|
|
||||||
}
|
|
||||||
if (s instanceof BooleanSetting) {
|
|
||||||
printwriter.println(m.getName() + "_boolsetting_" + s.name + ":" + ((BooleanSetting) s).getValue());
|
|
||||||
}
|
}
|
||||||
|
m.settings
|
||||||
|
.stream()
|
||||||
|
.forEach(s -> {
|
||||||
|
if (s instanceof ModeSetting) {
|
||||||
|
printwriter.println(m.getName() + "_modesetting_" + s.name + ":" + ((ModeSetting) s).getValue());
|
||||||
|
}
|
||||||
|
if (s instanceof BooleanSetting) {
|
||||||
|
printwriter.println(m.getName() + "_boolsetting_" + s.name + ":" + ((BooleanSetting) s).getValue());
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void load(String[] astring){
|
public void load(String[] astring) {
|
||||||
|
Resent.INSTANCE.modManager.modules
|
||||||
|
.stream()
|
||||||
|
.forEach(m -> {
|
||||||
|
if (astring[0].equals(m.getName())) {
|
||||||
|
m.setEnabled(astring[1].equals("true"));
|
||||||
|
}
|
||||||
|
|
||||||
Resent.INSTANCE.modManager.modules.stream().forEach(m -> {
|
if (m instanceof RenderMod) {
|
||||||
if (astring[0].equals(m.getName())) {
|
if (astring[0].equals(m.getName() + "_x")) {
|
||||||
m.setEnabled(astring[1].equals("true"));
|
((RenderMod) m).setX(Integer.parseInt(astring[1]));
|
||||||
}
|
}
|
||||||
|
if (astring[0].equals(m.getName() + "_y")) {
|
||||||
if(m instanceof RenderMod){
|
((RenderMod) m).setY(Integer.parseInt(astring[1]));
|
||||||
if (astring[0].equals(m.getName() + "_x")) {
|
}
|
||||||
((RenderMod)m).setX(Integer.parseInt(astring[1]));
|
if (astring[0].equals(m.getName() + "_lastx")) {
|
||||||
}
|
((RenderMod) m).lastX = Integer.parseInt(astring[1]);
|
||||||
if (astring[0].equals(m.getName() + "_y")) {
|
}
|
||||||
((RenderMod)m).setY(Integer.parseInt(astring[1]));
|
if (astring[0].equals(m.getName() + "_lasty")) {
|
||||||
}
|
((RenderMod) m).lastY = Integer.parseInt(astring[1]);
|
||||||
if (astring[0].equals(m.getName() + "_lastx")) {
|
|
||||||
((RenderMod)m).lastX = Integer.parseInt(astring[1]);
|
|
||||||
}
|
|
||||||
if (astring[0].equals(m.getName() + "_lasty")) {
|
|
||||||
((RenderMod)m).lastY = Integer.parseInt(astring[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m.settings.stream().forEach(se ->{
|
|
||||||
if (se instanceof ModeSetting) {
|
|
||||||
if (astring[0].equals(m.getName() + "_modesetting_" + se.name)) {
|
|
||||||
((ModeSetting) se).setValue(astring[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (se instanceof BooleanSetting) {
|
|
||||||
if (astring[0].equals(m.getName() + "_boolsetting_" + se.name)) {
|
|
||||||
((BooleanSetting) se).setValue(astring[1].equals("true"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m.settings
|
||||||
|
.stream()
|
||||||
|
.forEach(se -> {
|
||||||
|
if (se instanceof ModeSetting) {
|
||||||
|
if (astring[0].equals(m.getName() + "_modesetting_" + se.name)) {
|
||||||
|
((ModeSetting) se).setValue(astring[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (se instanceof BooleanSetting) {
|
||||||
|
if (astring[0].equals(m.getName() + "_boolsetting_" + se.name)) {
|
||||||
|
((BooleanSetting) se).setValue(astring[1].equals("true"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Legacy code below.
|
//Legacy code below.
|
||||||
|
|
||||||
/*public void playMusic(){
|
FileOutputStream fos = null;
|
||||||
MusicTicker player = Minecraft.getMinecraft().func_181535_r();
|
File temp;
|
||||||
SoundHandler soundhandler = Minecraft.getMinecraft().getSoundHandler();
|
|
||||||
player.func_181557_a();
|
public void playSoundFromByteArray(byte[] bArray) {
|
||||||
player.func_181558_a(MusicTicker.MusicType.RES);
|
try {
|
||||||
soundhandler.resumeSounds();
|
temp = new File("C:/test").getAbsoluteFile();
|
||||||
}*/
|
|
||||||
|
if (!temp.exists()) {
|
||||||
|
temp.createNewFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
fos = new FileOutputStream(temp);
|
||||||
|
fos.write(bArray);
|
||||||
|
fos.flush();
|
||||||
|
|
||||||
|
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(temp);
|
||||||
|
Clip clip = AudioSystem.getClip();
|
||||||
|
clip.open(audioInputStream);
|
||||||
|
clip.start();
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
ioe.printStackTrace();
|
||||||
|
} catch (UnsupportedAudioFileException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (LineUnavailableException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (fos != null) {
|
||||||
|
fos.close();
|
||||||
|
}
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
System.out.println("Error in closing the Stream");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void test(){
|
public void test(){
|
||||||
|
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
||||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("minecraft:music.res"), 1));
|
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("minecraft:music.res"), 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopMusic(){
|
public void stopMusic() {
|
||||||
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
package dev.resent.annotation;
|
package dev.resent.annotation;
|
||||||
|
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
|
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Module {
|
public @interface Module {
|
||||||
String name() default "placeholder";
|
String name() default "placeholder";
|
||||||
|
|
||||||
Category category() default Category.MISC;
|
Category category() default Category.MISC;
|
||||||
|
|
||||||
boolean hasSetting() default false;
|
boolean hasSetting() default false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
package dev.resent.annotation;
|
package dev.resent.annotation;
|
||||||
|
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
|
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface RenderModule {
|
public @interface RenderModule {
|
||||||
String name();
|
String name();
|
||||||
|
|
||||||
Category category();
|
Category category();
|
||||||
|
|
||||||
int x();
|
int x();
|
||||||
|
|
||||||
int y();
|
int y();
|
||||||
|
|
||||||
boolean hasSetting() default false;
|
boolean hasSetting() default false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,16 +6,17 @@ import net.minecraft.client.model.ModelBiped;
|
||||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||||
|
|
||||||
public abstract class CosmeticBase implements LayerRenderer<AbstractClientPlayer>{
|
public abstract class CosmeticBase implements LayerRenderer<AbstractClientPlayer> {
|
||||||
|
|
||||||
protected final RenderPlayer playerRenderer;
|
protected final RenderPlayer playerRenderer;
|
||||||
public CosmeticBase(RenderPlayer playerRenderer){
|
|
||||||
|
public CosmeticBase(RenderPlayer playerRenderer) {
|
||||||
this.playerRenderer = playerRenderer;
|
this.playerRenderer = playerRenderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doRenderLayer(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
|
public void doRenderLayer(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
|
||||||
if(player.hasPlayerInfo() && !player.isInvisible()){
|
if (player.hasPlayerInfo() && !player.isInvisible()) {
|
||||||
render(player, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
|
render(player, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,15 +24,16 @@ public abstract class CosmeticBase implements LayerRenderer<AbstractClientPlayer
|
||||||
public abstract void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale);
|
public abstract void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldCombineTextures() { return false; }
|
public boolean shouldCombineTextures() {
|
||||||
public class CosmeticModelBase extends ModelBase{
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CosmeticModelBase extends ModelBase {
|
||||||
|
|
||||||
protected final ModelBiped playerModel;
|
protected final ModelBiped playerModel;
|
||||||
|
|
||||||
public CosmeticModelBase(RenderPlayer player){
|
public CosmeticModelBase(RenderPlayer player) {
|
||||||
this.playerModel = player.getMainModel();
|
this.playerModel = player.getMainModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,41 +7,41 @@ import net.minecraft.client.entity.AbstractClientPlayer;
|
||||||
|
|
||||||
public class CosmeticController {
|
public class CosmeticController {
|
||||||
|
|
||||||
public static boolean renderTopHat(AbstractClientPlayer player){
|
public static boolean renderTopHat(AbstractClientPlayer player) {
|
||||||
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.hat.getValue();
|
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.hat.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean renderCrystalWings(AbstractClientPlayer player){
|
public static boolean renderCrystalWings(AbstractClientPlayer player) {
|
||||||
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.crystalwings.getValue();
|
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.crystalwings.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean renderGlasses(AbstractClientPlayer player){
|
public static boolean renderGlasses(AbstractClientPlayer player) {
|
||||||
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.glasses.getValue();
|
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.glasses.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean renderHalo(AbstractClientPlayer player){
|
public static boolean renderHalo(AbstractClientPlayer player) {
|
||||||
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.halo.getValue();
|
return ModManager.cosmetics.isEnabled() && Cosmetics.show.getValue() && shouldRender(player) && Cosmetics.halo.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static float[] getTopHatColor(AbstractClientPlayer player) {
|
||||||
public static float[] getTopHatColor(AbstractClientPlayer player){ return new float[]{1, 0, 0}; }
|
return new float[] { 1, 0, 0 };
|
||||||
public static float[] getCrystalWingsColor(AbstractClientPlayer player){ return new float[]{1, 1, 1}; }
|
}
|
||||||
public static float[] getDragonWingsColor = new float[]{1f,1f,1f,1f};
|
|
||||||
|
|
||||||
public static boolean shouldRender(AbstractClientPlayer player){
|
public static float[] getCrystalWingsColor(AbstractClientPlayer player) {
|
||||||
switch(Cosmetics.who.getValue()){
|
return new float[] { 1, 1, 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
public static float[] getDragonWingsColor = new float[] { 1f, 1f, 1f, 1f };
|
||||||
|
|
||||||
|
public static boolean shouldRender(AbstractClientPlayer player) {
|
||||||
|
switch (Cosmetics.who.getValue()) {
|
||||||
case "Only you":
|
case "Only you":
|
||||||
return player == Minecraft.getMinecraft().thePlayer;
|
return player == Minecraft.getMinecraft().thePlayer;
|
||||||
|
|
||||||
case "Everyone":
|
case "Everyone":
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "Everyone else":
|
case "Everyone else":
|
||||||
return player != Minecraft.getMinecraft().thePlayer;
|
return player != Minecraft.getMinecraft().thePlayer;
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,94 +13,93 @@ import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class CrystalWings extends CosmeticBase {
|
public class CrystalWings extends CosmeticBase {
|
||||||
private CrytsalWingsModel crytsalWingsModel;
|
|
||||||
|
|
||||||
public CrystalWings(RenderPlayer playerRenderer) {
|
|
||||||
super(playerRenderer);
|
|
||||||
this.crytsalWingsModel = new CrytsalWingsModel(playerRenderer);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
|
|
||||||
if(CosmeticController.renderCrystalWings(player)){
|
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
float[] color = CosmeticController.getCrystalWingsColor(player);
|
|
||||||
GlStateManager.color(color[0], color[1], color[2]);
|
|
||||||
this.crytsalWingsModel.render(player, limbSwing, limbSwingAmount, ageInTicks, headPitch, headPitch, scale);
|
|
||||||
GlStateManager.color(1, 1, 1);
|
|
||||||
GlStateManager.popMatrix();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CrytsalWingsModel extends CosmeticModelBase {
|
|
||||||
private ModelRenderer model;
|
|
||||||
|
|
||||||
ResourceLocation resourceLocation = new ResourceLocation("eagler:gui/crystal.png");
|
|
||||||
|
|
||||||
public CrytsalWingsModel(RenderPlayer player) {
|
|
||||||
super(player);
|
|
||||||
int i = 30;
|
|
||||||
int j = 24;
|
|
||||||
this.model = (new ModelRenderer((ModelBase)this)).setTextureSize(i, j).setTextureOffset(0, 8);
|
|
||||||
this.model.setRotationPoint(-0.0F, 1.0F, 0.0F);
|
|
||||||
this.model.addBox(0.0F, -3.0F, 0.0F, 14, 7, 1);
|
|
||||||
this.model.isHidden = true;
|
|
||||||
ModelRenderer modelrenderer = (new ModelRenderer((ModelBase)this)).setTextureSize(i, j).setTextureOffset(0, 16);
|
|
||||||
modelrenderer.setRotationPoint(-0.0F, 0.0F, 0.2F);
|
|
||||||
modelrenderer.addBox(0.0F, -3.0F, 0.0F, 14, 7, 1);
|
|
||||||
this.model.addChild(modelrenderer);
|
|
||||||
ModelRenderer modelrenderer1 = (new ModelRenderer((ModelBase)this)).setTextureSize(i, j).setTextureOffset(0, 0);
|
|
||||||
modelrenderer1.setRotationPoint(-0.0F, 0.0F, 0.2F);
|
|
||||||
modelrenderer1.addBox(0.0F, -3.0F, 0.0F, 14, 7, 1);
|
|
||||||
modelrenderer.addChild(modelrenderer1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void render(Entity entityIn, float p_78088_2_, float walkingSpeed, float tickValue, float p_78088_5_, float p_78088_6_, float scale) {
|
|
||||||
float f = (float)Math.cos((tickValue / 10.0F)) / 20.0F - 0.03F - walkingSpeed / 20.0F;
|
|
||||||
ModelRenderer modelrenderer = (ModelRenderer) this.model.childModels.get(0);
|
|
||||||
ModelRenderer modelrenderer1 = (ModelRenderer) modelrenderer.childModels.get(0);
|
|
||||||
this.model.rotateAngleZ = f * 3.0F;
|
|
||||||
modelrenderer.rotateAngleZ = f / 2.0F;
|
|
||||||
modelrenderer1.rotateAngleZ = f / 2.0F;
|
|
||||||
this.model.rotateAngleY = -0.3F - walkingSpeed / 3.0F;
|
|
||||||
this.model.rotateAngleX = 0.3F;
|
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
GlStateManager.scale(1.6D, 1.6D, 1.0D);
|
|
||||||
GlStateManager.translate(0.0D, 0.05000000074505806D, 0.05000000074505806D);
|
|
||||||
if (entityIn.isSneaking()) {
|
|
||||||
GlStateManager.translate(0.0D, 0.07999999821186066D, 0.029999999329447746D);
|
|
||||||
GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
|
|
||||||
this.model.rotateAngleZ = 0.8F;
|
|
||||||
modelrenderer.rotateAngleZ = 0.0F;
|
|
||||||
modelrenderer1.rotateAngleZ = 0.0F;
|
|
||||||
} else {
|
|
||||||
RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
|
|
||||||
if (rendermanager != null)
|
|
||||||
GlStateManager.rotate(rendermanager.playerViewX / 3.0F, 1.0F, 0.0F, 0.0F);
|
|
||||||
}
|
|
||||||
this.model.isHidden = false;
|
|
||||||
for (int i = -1; i <= 1; i += 2) {
|
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
GlStateManager.depthMask(false);
|
|
||||||
GlStateManager.enableBlend();
|
|
||||||
GlStateManager.blendFunc(770, 771);
|
|
||||||
GlStateManager.alphaFunc(516, 0.003921569F);
|
|
||||||
GlStateManager.disableLighting();
|
|
||||||
|
|
||||||
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(this.resourceLocation);
|
private CrytsalWingsModel crytsalWingsModel;
|
||||||
if (i == 1)
|
|
||||||
GlStateManager.scale(-1.0F, 1.0F, 1.0F);
|
public CrystalWings(RenderPlayer playerRenderer) {
|
||||||
GlStateManager.translate(0.05D, 0.0D, 0.0D);
|
super(playerRenderer);
|
||||||
this.model.render(scale);
|
this.crytsalWingsModel = new CrytsalWingsModel(playerRenderer);
|
||||||
GlStateManager.disableBlend();
|
|
||||||
GlStateManager.alphaFunc(516, 0.1F);
|
|
||||||
GlStateManager.popMatrix();
|
|
||||||
GlStateManager.depthMask(true);
|
|
||||||
GlStateManager.color(1,1,1);
|
|
||||||
}
|
|
||||||
this.model.isHidden = true;
|
|
||||||
GlStateManager.popMatrix();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
@Override
|
||||||
|
public void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
|
||||||
|
if (CosmeticController.renderCrystalWings(player)) {
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
float[] color = CosmeticController.getCrystalWingsColor(player);
|
||||||
|
GlStateManager.color(color[0], color[1], color[2]);
|
||||||
|
this.crytsalWingsModel.render(player, limbSwing, limbSwingAmount, ageInTicks, headPitch, headPitch, scale);
|
||||||
|
GlStateManager.color(1, 1, 1);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CrytsalWingsModel extends CosmeticModelBase {
|
||||||
|
|
||||||
|
private ModelRenderer model;
|
||||||
|
|
||||||
|
ResourceLocation resourceLocation = new ResourceLocation("eagler:gui/crystal.png");
|
||||||
|
|
||||||
|
public CrytsalWingsModel(RenderPlayer player) {
|
||||||
|
super(player);
|
||||||
|
int i = 30;
|
||||||
|
int j = 24;
|
||||||
|
this.model = (new ModelRenderer((ModelBase) this)).setTextureSize(i, j).setTextureOffset(0, 8);
|
||||||
|
this.model.setRotationPoint(-0.0F, 1.0F, 0.0F);
|
||||||
|
this.model.addBox(0.0F, -3.0F, 0.0F, 14, 7, 1);
|
||||||
|
this.model.isHidden = true;
|
||||||
|
ModelRenderer modelrenderer = (new ModelRenderer((ModelBase) this)).setTextureSize(i, j).setTextureOffset(0, 16);
|
||||||
|
modelrenderer.setRotationPoint(-0.0F, 0.0F, 0.2F);
|
||||||
|
modelrenderer.addBox(0.0F, -3.0F, 0.0F, 14, 7, 1);
|
||||||
|
this.model.addChild(modelrenderer);
|
||||||
|
ModelRenderer modelrenderer1 = (new ModelRenderer((ModelBase) this)).setTextureSize(i, j).setTextureOffset(0, 0);
|
||||||
|
modelrenderer1.setRotationPoint(-0.0F, 0.0F, 0.2F);
|
||||||
|
modelrenderer1.addBox(0.0F, -3.0F, 0.0F, 14, 7, 1);
|
||||||
|
modelrenderer.addChild(modelrenderer1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void render(Entity entityIn, float p_78088_2_, float walkingSpeed, float tickValue, float p_78088_5_, float p_78088_6_, float scale) {
|
||||||
|
float f = (float) Math.cos((tickValue / 10.0F)) / 20.0F - 0.03F - walkingSpeed / 20.0F;
|
||||||
|
ModelRenderer modelrenderer = (ModelRenderer) this.model.childModels.get(0);
|
||||||
|
ModelRenderer modelrenderer1 = (ModelRenderer) modelrenderer.childModels.get(0);
|
||||||
|
this.model.rotateAngleZ = f * 3.0F;
|
||||||
|
modelrenderer.rotateAngleZ = f / 2.0F;
|
||||||
|
modelrenderer1.rotateAngleZ = f / 2.0F;
|
||||||
|
this.model.rotateAngleY = -0.3F - walkingSpeed / 3.0F;
|
||||||
|
this.model.rotateAngleX = 0.3F;
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.scale(1.6D, 1.6D, 1.0D);
|
||||||
|
GlStateManager.translate(0.0D, 0.05000000074505806D, 0.05000000074505806D);
|
||||||
|
if (entityIn.isSneaking()) {
|
||||||
|
GlStateManager.translate(0.0D, 0.07999999821186066D, 0.029999999329447746D);
|
||||||
|
GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
|
||||||
|
this.model.rotateAngleZ = 0.8F;
|
||||||
|
modelrenderer.rotateAngleZ = 0.0F;
|
||||||
|
modelrenderer1.rotateAngleZ = 0.0F;
|
||||||
|
} else {
|
||||||
|
RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
|
||||||
|
if (rendermanager != null) GlStateManager.rotate(rendermanager.playerViewX / 3.0F, 1.0F, 0.0F, 0.0F);
|
||||||
|
}
|
||||||
|
this.model.isHidden = false;
|
||||||
|
for (int i = -1; i <= 1; i += 2) {
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.depthMask(false);
|
||||||
|
GlStateManager.enableBlend();
|
||||||
|
GlStateManager.blendFunc(770, 771);
|
||||||
|
GlStateManager.alphaFunc(516, 0.003921569F);
|
||||||
|
GlStateManager.disableLighting();
|
||||||
|
|
||||||
|
Minecraft.getMinecraft().getTextureManager().bindTexture(this.resourceLocation);
|
||||||
|
if (i == 1) GlStateManager.scale(-1.0F, 1.0F, 1.0F);
|
||||||
|
GlStateManager.translate(0.05D, 0.0D, 0.0D);
|
||||||
|
this.model.render(scale);
|
||||||
|
GlStateManager.disableBlend();
|
||||||
|
GlStateManager.alphaFunc(516, 0.1F);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
GlStateManager.depthMask(true);
|
||||||
|
GlStateManager.color(1, 1, 1);
|
||||||
|
}
|
||||||
|
this.model.isHidden = true;
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -9,122 +9,122 @@ import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
public class Glasses extends CosmeticBase {
|
public class Glasses extends CosmeticBase {
|
||||||
private final GlassesRenderer glassesModel;
|
|
||||||
|
private final GlassesRenderer glassesModel;
|
||||||
public Glasses(RenderPlayer renderPlayer) {
|
|
||||||
super(renderPlayer);
|
public Glasses(RenderPlayer renderPlayer) {
|
||||||
this.glassesModel = new GlassesRenderer(renderPlayer);
|
super(renderPlayer);
|
||||||
}
|
this.glassesModel = new GlassesRenderer(renderPlayer);
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float headYaw, float headPitch, float scale) {
|
|
||||||
if(CosmeticController.renderGlasses(player)){
|
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
if(player.isSneaking()) {
|
|
||||||
GlStateManager.translate(0, 0.225, 0);
|
|
||||||
}
|
}
|
||||||
GlStateManager.rotate(headYaw, 0.0F, 1.0F, 0.0F);
|
|
||||||
GlStateManager.rotate(headPitch, 1.0F, 0.0F, 0.0F);
|
@Override
|
||||||
this.glassesModel.render(player, limbSwing, limbSwingAmount, ageInTicks, headYaw, headPitch, scale);
|
public void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float headYaw, float headPitch, float scale) {
|
||||||
GlStateManager.popMatrix();
|
if (CosmeticController.renderGlasses(player)) {
|
||||||
}
|
GlStateManager.pushMatrix();
|
||||||
}
|
if (player.isSneaking()) {
|
||||||
|
GlStateManager.translate(0, 0.225, 0);
|
||||||
public class GlassesRenderer extends CosmeticModelBase{
|
}
|
||||||
|
GlStateManager.rotate(headYaw, 0.0F, 1.0F, 0.0F);
|
||||||
ModelRenderer Glasses1;
|
GlStateManager.rotate(headPitch, 1.0F, 0.0F, 0.0F);
|
||||||
ModelRenderer Glasses2;
|
this.glassesModel.render(player, limbSwing, limbSwingAmount, ageInTicks, headYaw, headPitch, scale);
|
||||||
ModelRenderer Glasses3;
|
GlStateManager.popMatrix();
|
||||||
ModelRenderer Glasses4;
|
}
|
||||||
ModelRenderer Glasses5;
|
|
||||||
ModelRenderer Glasses6;
|
|
||||||
ModelRenderer Glasses7;
|
|
||||||
ModelRenderer Glasses8;
|
|
||||||
ModelRenderer Glasses9;
|
|
||||||
|
|
||||||
public GlassesRenderer(RenderPlayer player) {
|
|
||||||
super(player);
|
|
||||||
textureWidth = 64;
|
|
||||||
textureHeight = 32;
|
|
||||||
|
|
||||||
Glasses1 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses1.addBox(0F, 0F, 0F, 4, 2, 1);
|
|
||||||
Glasses1.setRotationPoint(-5F, -3F, -5F);
|
|
||||||
Glasses1.setTextureSize(64, 32);
|
|
||||||
Glasses1.mirror = true;
|
|
||||||
setRotation(Glasses1, 0F, 0F, 0F);
|
|
||||||
Glasses2 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses2.addBox(0F, 0F, 0F, 10, 1, 1);
|
|
||||||
Glasses2.setRotationPoint(-5F, -3F, -5F);
|
|
||||||
Glasses2.setTextureSize(64, 32);
|
|
||||||
Glasses2.mirror = true;
|
|
||||||
setRotation(Glasses2, 0F, 0F, 0F);
|
|
||||||
Glasses3 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses3.addBox(0F, 0F, 0F, 4, 2, 1);
|
|
||||||
Glasses3.setRotationPoint(1F, -3F, -5F);
|
|
||||||
Glasses3.setTextureSize(64, 32);
|
|
||||||
Glasses3.mirror = true;
|
|
||||||
setRotation(Glasses3, 0F, 0F, 0F);
|
|
||||||
Glasses4 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses4.addBox(-3F, 0F, -2F, 1, 1, 6);
|
|
||||||
Glasses4.setRotationPoint(-2F, -3F, -3F);
|
|
||||||
Glasses4.setTextureSize(64, 32);
|
|
||||||
Glasses4.mirror = true;
|
|
||||||
setRotation(Glasses4, 0F, 0F, 0F);
|
|
||||||
Glasses5 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses5.addBox(0F, 0F, 0F, 1, 1, 6);
|
|
||||||
Glasses5.setRotationPoint(4F, -3F, -5F);
|
|
||||||
Glasses5.setTextureSize(64, 32);
|
|
||||||
Glasses5.mirror = true;
|
|
||||||
setRotation(Glasses5, 0F, 0F, 0F);
|
|
||||||
Glasses6 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses6.addBox(0F, 0F, 0F, 1, 1, 1);
|
|
||||||
Glasses6.setRotationPoint(4F, -2F, 1F);
|
|
||||||
Glasses6.setTextureSize(64, 32);
|
|
||||||
Glasses6.mirror = true;
|
|
||||||
setRotation(Glasses6, 0F, 0F, 0F);
|
|
||||||
Glasses7 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses7.addBox(0F, 0F, 0F, 1, 1, 1);
|
|
||||||
Glasses7.setRotationPoint(-5F, -2F, 1F);
|
|
||||||
Glasses7.setTextureSize(64, 32);
|
|
||||||
Glasses7.mirror = true;
|
|
||||||
setRotation(Glasses7, 0F, 0F, 0F);
|
|
||||||
Glasses8 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses8.addBox(0F, 0F, 0F, 4, 2, 1);
|
|
||||||
Glasses8.setRotationPoint(-5F, -3F, -5F);
|
|
||||||
Glasses8.setTextureSize(64, 32);
|
|
||||||
Glasses8.mirror = true;
|
|
||||||
setRotation(Glasses8, 0F, 0F, 0F);
|
|
||||||
Glasses9 = new ModelRenderer(this, 0, 0);
|
|
||||||
Glasses9.addBox(1F, -3F, -5F, 4, 2, 1);
|
|
||||||
Glasses9.setRotationPoint(0F, 0F, 0F);
|
|
||||||
Glasses9.setTextureSize(64, 32);
|
|
||||||
Glasses9.mirror = true;
|
|
||||||
setRotation(Glasses9, 0F, 0F, 0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmout, float ageInTicks, float headYaw, float headPitch, float scale) {
|
public class GlassesRenderer extends CosmeticModelBase {
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
GlStateManager.translate(0, -0.1, -0.05);
|
ModelRenderer Glasses1;
|
||||||
GlStateManager.color(0, 0, 0);
|
ModelRenderer Glasses2;
|
||||||
Glasses1.render(scale);
|
ModelRenderer Glasses3;
|
||||||
Glasses2.render(scale);
|
ModelRenderer Glasses4;
|
||||||
Glasses3.render(scale);
|
ModelRenderer Glasses5;
|
||||||
Glasses4.render(scale);
|
ModelRenderer Glasses6;
|
||||||
Glasses5.render(scale);
|
ModelRenderer Glasses7;
|
||||||
Glasses6.render(scale);
|
ModelRenderer Glasses8;
|
||||||
Glasses7.render(scale);
|
ModelRenderer Glasses9;
|
||||||
Glasses8.render(scale);
|
|
||||||
Glasses9.render(scale);
|
public GlassesRenderer(RenderPlayer player) {
|
||||||
GlStateManager.color(1, 1, 1);
|
super(player);
|
||||||
GlStateManager.popMatrix();
|
textureWidth = 64;
|
||||||
}
|
textureHeight = 32;
|
||||||
}
|
|
||||||
|
Glasses1 = new ModelRenderer(this, 0, 0);
|
||||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
Glasses1.addBox(0F, 0F, 0F, 4, 2, 1);
|
||||||
{
|
Glasses1.setRotationPoint(-5F, -3F, -5F);
|
||||||
model.rotateAngleX = x;
|
Glasses1.setTextureSize(64, 32);
|
||||||
model.rotateAngleY = y;
|
Glasses1.mirror = true;
|
||||||
model.rotateAngleZ = z;
|
setRotation(Glasses1, 0F, 0F, 0F);
|
||||||
|
Glasses2 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses2.addBox(0F, 0F, 0F, 10, 1, 1);
|
||||||
|
Glasses2.setRotationPoint(-5F, -3F, -5F);
|
||||||
|
Glasses2.setTextureSize(64, 32);
|
||||||
|
Glasses2.mirror = true;
|
||||||
|
setRotation(Glasses2, 0F, 0F, 0F);
|
||||||
|
Glasses3 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses3.addBox(0F, 0F, 0F, 4, 2, 1);
|
||||||
|
Glasses3.setRotationPoint(1F, -3F, -5F);
|
||||||
|
Glasses3.setTextureSize(64, 32);
|
||||||
|
Glasses3.mirror = true;
|
||||||
|
setRotation(Glasses3, 0F, 0F, 0F);
|
||||||
|
Glasses4 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses4.addBox(-3F, 0F, -2F, 1, 1, 6);
|
||||||
|
Glasses4.setRotationPoint(-2F, -3F, -3F);
|
||||||
|
Glasses4.setTextureSize(64, 32);
|
||||||
|
Glasses4.mirror = true;
|
||||||
|
setRotation(Glasses4, 0F, 0F, 0F);
|
||||||
|
Glasses5 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses5.addBox(0F, 0F, 0F, 1, 1, 6);
|
||||||
|
Glasses5.setRotationPoint(4F, -3F, -5F);
|
||||||
|
Glasses5.setTextureSize(64, 32);
|
||||||
|
Glasses5.mirror = true;
|
||||||
|
setRotation(Glasses5, 0F, 0F, 0F);
|
||||||
|
Glasses6 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses6.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||||
|
Glasses6.setRotationPoint(4F, -2F, 1F);
|
||||||
|
Glasses6.setTextureSize(64, 32);
|
||||||
|
Glasses6.mirror = true;
|
||||||
|
setRotation(Glasses6, 0F, 0F, 0F);
|
||||||
|
Glasses7 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses7.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||||
|
Glasses7.setRotationPoint(-5F, -2F, 1F);
|
||||||
|
Glasses7.setTextureSize(64, 32);
|
||||||
|
Glasses7.mirror = true;
|
||||||
|
setRotation(Glasses7, 0F, 0F, 0F);
|
||||||
|
Glasses8 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses8.addBox(0F, 0F, 0F, 4, 2, 1);
|
||||||
|
Glasses8.setRotationPoint(-5F, -3F, -5F);
|
||||||
|
Glasses8.setTextureSize(64, 32);
|
||||||
|
Glasses8.mirror = true;
|
||||||
|
setRotation(Glasses8, 0F, 0F, 0F);
|
||||||
|
Glasses9 = new ModelRenderer(this, 0, 0);
|
||||||
|
Glasses9.addBox(1F, -3F, -5F, 4, 2, 1);
|
||||||
|
Glasses9.setRotationPoint(0F, 0F, 0F);
|
||||||
|
Glasses9.setTextureSize(64, 32);
|
||||||
|
Glasses9.mirror = true;
|
||||||
|
setRotation(Glasses9, 0F, 0F, 0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void render(Entity entityIn, float limbSwing, float limbSwingAmout, float ageInTicks, float headYaw, float headPitch, float scale) {
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.translate(0, -0.1, -0.05);
|
||||||
|
GlStateManager.color(0, 0, 0);
|
||||||
|
Glasses1.render(scale);
|
||||||
|
Glasses2.render(scale);
|
||||||
|
Glasses3.render(scale);
|
||||||
|
Glasses4.render(scale);
|
||||||
|
Glasses5.render(scale);
|
||||||
|
Glasses6.render(scale);
|
||||||
|
Glasses7.render(scale);
|
||||||
|
Glasses8.render(scale);
|
||||||
|
Glasses9.render(scale);
|
||||||
|
GlStateManager.color(1, 1, 1);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||||
|
model.rotateAngleX = x;
|
||||||
|
model.rotateAngleY = y;
|
||||||
|
model.rotateAngleZ = z;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -12,46 +12,47 @@ import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class Halo extends CosmeticBase {
|
public class Halo extends CosmeticBase {
|
||||||
|
|
||||||
private final ModelHalo modelHalo;
|
private final ModelHalo modelHalo;
|
||||||
private static final ResourceLocation HALOBLUE;
|
private static final ResourceLocation HALOBLUE;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
HALOBLUE = new ResourceLocation("eagler:gui/blue.jpeg");
|
HALOBLUE = new ResourceLocation("eagler:gui/blue.jpeg");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Halo(final RenderPlayer renderPlayer) {
|
public Halo(final RenderPlayer renderPlayer) {
|
||||||
super(renderPlayer);
|
super(renderPlayer);
|
||||||
this.modelHalo = new ModelHalo(renderPlayer);
|
this.modelHalo = new ModelHalo(renderPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(final AbstractClientPlayer player, final float limbSwing, final float limbSwingAmount, final float partialTicks, final float ageInTicks, final float headYaw, final float headPitch, final float scale) {
|
public void render(final AbstractClientPlayer player, final float limbSwing, final float limbSwingAmount, final float partialTicks, final float ageInTicks, final float headYaw, final float headPitch, final float scale) {
|
||||||
if (CosmeticController.renderHalo(player)) {
|
if (CosmeticController.renderHalo(player)) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
this.playerRenderer.bindTexture(Halo.HALOBLUE);
|
this.playerRenderer.bindTexture(Halo.HALOBLUE);
|
||||||
if(player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
GlStateManager.translate(0, 0.225, 0);
|
GlStateManager.translate(0, 0.225, 0);
|
||||||
}
|
}
|
||||||
GlStateManager.color(1, 1, 1);
|
GlStateManager.color(1, 1, 1);
|
||||||
this.modelHalo.render(player, limbSwing, limbSwingAmount, ageInTicks, headYaw, headPitch, scale);
|
this.modelHalo.render(player, limbSwing, limbSwingAmount, ageInTicks, headYaw, headPitch, scale);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ModelHalo extends CosmeticModelBase
|
private class ModelHalo extends CosmeticModelBase {
|
||||||
{
|
|
||||||
private ModelRenderer halo;
|
private ModelRenderer halo;
|
||||||
|
|
||||||
public ModelHalo(final RenderPlayer player) {
|
public ModelHalo(final RenderPlayer player) {
|
||||||
super(player);
|
super(player);
|
||||||
(this.halo = new ModelRenderer(this.playerModel).setTextureSize(14, 2)).addBox(-3.0f, -12.5f, -4.0f, 6, 1, 1, 0.15f);
|
(this.halo = new ModelRenderer(this.playerModel).setTextureSize(14, 2)).addBox(-3.0f, -12.5f, -4.0f, 6, 1, 1, 0.15f);
|
||||||
this.halo.isHidden = true;
|
this.halo.isHidden = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(final Entity entityIn, final float limbSwing, final float limbSwingAmount, final float ageInTicks, final float headYaw, final float headPitch, final float scale) {
|
public void render(final Entity entityIn, final float limbSwing, final float limbSwingAmount, final float ageInTicks, final float headYaw, final float headPitch, final float scale) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
final float f = (float)Math.cos(ageInTicks / 10.0) / 20.0f;
|
final float f = (float) Math.cos(ageInTicks / 10.0) / 20.0f;
|
||||||
GlStateManager.rotate(headYaw + ageInTicks / 2.0f, 0.0f, 1.0f, 0.0f);
|
GlStateManager.rotate(headYaw + ageInTicks / 2.0f, 0.0f, 1.0f, 0.0f);
|
||||||
GlStateManager.translate(0.0f, f, 0.0f);
|
GlStateManager.translate(0.0f, f, 0.0f);
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Halo.HALOBLUE);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(Halo.HALOBLUE);
|
||||||
|
@ -71,6 +72,5 @@ public class Halo extends CosmeticBase {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation);
|
||||||
return colorModel;
|
return colorModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,28 +9,27 @@ import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class TopHat extends CosmeticBase{
|
public class TopHat extends CosmeticBase {
|
||||||
|
|
||||||
private final ModelTopHat modelTopHat;
|
private final ModelTopHat modelTopHat;
|
||||||
private static final ResourceLocation hat = new ResourceLocation("eagler:gui/hat.png");
|
private static final ResourceLocation hat = new ResourceLocation("eagler:gui/hat.png");
|
||||||
|
|
||||||
public TopHat(RenderPlayer renderPlayer){
|
public TopHat(RenderPlayer renderPlayer) {
|
||||||
super(renderPlayer);
|
super(renderPlayer);
|
||||||
modelTopHat = new ModelTopHat(renderPlayer);
|
modelTopHat = new ModelTopHat(renderPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks,
|
public void render(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float HeadYaw, float headPitch, float scale) {
|
||||||
float ageInTicks, float HeadYaw, float headPitch, float scale) {
|
if (CosmeticController.renderTopHat(player)) {
|
||||||
if(CosmeticController.renderTopHat(player)){
|
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
playerRenderer.bindTexture(hat);
|
playerRenderer.bindTexture(hat);
|
||||||
|
|
||||||
if(player.isSneaking()){
|
if (player.isSneaking()) {
|
||||||
GlStateManager.translate(0, 0.225D, 0);
|
GlStateManager.translate(0, 0.225D, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
float[] color = CosmeticController.getTopHatColor(player);
|
float[] color = CosmeticController.getTopHatColor(player);
|
||||||
GlStateManager.color(color[0], color[1], color[2]);
|
GlStateManager.color(color[0], color[1], color[2]);
|
||||||
modelTopHat.render(player, limbSwing, limbSwingAmount, ageInTicks, HeadYaw, headPitch, scale);
|
modelTopHat.render(player, limbSwing, limbSwingAmount, ageInTicks, HeadYaw, headPitch, scale);
|
||||||
GlStateManager.color(1, 1, 1);
|
GlStateManager.color(1, 1, 1);
|
||||||
|
@ -43,7 +42,7 @@ public class TopHat extends CosmeticBase{
|
||||||
private ModelRenderer rim;
|
private ModelRenderer rim;
|
||||||
private ModelRenderer tip;
|
private ModelRenderer tip;
|
||||||
|
|
||||||
public ModelTopHat(RenderPlayer player){
|
public ModelTopHat(RenderPlayer player) {
|
||||||
super(player);
|
super(player);
|
||||||
rim = new ModelRenderer(playerModel, 0, 0);
|
rim = new ModelRenderer(playerModel, 0, 0);
|
||||||
rim.addBox(-5.5F, -9F, -5.5F, 11, 2, 11);
|
rim.addBox(-5.5F, -9F, -5.5F, 11, 2, 11);
|
||||||
|
@ -53,7 +52,6 @@ public class TopHat extends CosmeticBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float headYaw, float headPitch, float scale) {
|
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float headYaw, float headPitch, float scale) {
|
||||||
|
|
||||||
rim.rotateAngleX = playerModel.bipedHead.rotateAngleX;
|
rim.rotateAngleX = playerModel.bipedHead.rotateAngleX;
|
||||||
rim.rotateAngleY = playerModel.bipedHead.rotateAngleY;
|
rim.rotateAngleY = playerModel.bipedHead.rotateAngleY;
|
||||||
rim.rotationPointX = 0.0f;
|
rim.rotationPointX = 0.0f;
|
||||||
|
@ -65,8 +63,6 @@ public class TopHat extends CosmeticBase{
|
||||||
tip.rotationPointX = 0.0f;
|
tip.rotationPointX = 0.0f;
|
||||||
tip.rotationPointY = 0.0f;
|
tip.rotationPointY = 0.0f;
|
||||||
tip.render(scale);
|
tip.render(scale);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
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.setting.Setting;
|
import dev.resent.module.setting.Setting;
|
||||||
import dev.resent.ui.Theme;
|
import dev.resent.ui.Theme;
|
||||||
import dev.resent.util.render.RenderUtils;
|
import dev.resent.util.render.RenderUtils;
|
||||||
|
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 {
|
||||||
|
@ -20,9 +19,9 @@ public abstract class Mod {
|
||||||
|
|
||||||
public List<Setting> settings = new ArrayList<>();
|
public List<Setting> settings = new ArrayList<>();
|
||||||
|
|
||||||
public Mod(){
|
public Mod() {
|
||||||
Module modInfo;
|
Module modInfo;
|
||||||
if(getClass().isAnnotationPresent(Module.class)){
|
if (getClass().isAnnotationPresent(Module.class)) {
|
||||||
modInfo = getClass().getAnnotation(Module.class);
|
modInfo = getClass().getAnnotation(Module.class);
|
||||||
this.setName(modInfo.name());
|
this.setName(modInfo.name());
|
||||||
this.setCategory(modInfo.category());
|
this.setCategory(modInfo.category());
|
||||||
|
@ -30,8 +29,12 @@ public abstract class Mod {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSetting(final Setting... settings) { this.settings.addAll(Arrays.asList(settings)); }
|
public void addSetting(final Setting... settings) {
|
||||||
|
this.settings.addAll(Arrays.asList(settings));
|
||||||
|
}
|
||||||
|
|
||||||
public void onEnable() {}
|
public void onEnable() {}
|
||||||
|
|
||||||
public void onDisable() {}
|
public void onDisable() {}
|
||||||
|
|
||||||
public void toggle() {
|
public void toggle() {
|
||||||
|
@ -39,48 +42,66 @@ public abstract class Mod {
|
||||||
onChange();
|
onChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onChange(){
|
private void onChange() {
|
||||||
if(enabled)
|
if (enabled) onEnable(); else onDisable();
|
||||||
onEnable();
|
|
||||||
else
|
|
||||||
onDisable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnabled(final boolean enabled) {
|
public void setEnabled(final boolean enabled) {
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
onChange();
|
onChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawRect(final int left, final int top, final int right, final int bottom, final int color){
|
protected void drawRect(final int left, final int top, final int right, final int bottom, final int color) {
|
||||||
RenderUtils.drawRoundedRect(left, top, right, bottom, 4, color, Theme.getRounded());
|
RenderUtils.drawRoundedRect(left, top, right, bottom, 4, color, Theme.getRounded());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int drawString(final String text, final int x, final int y, final int color, final boolean idk){
|
protected int drawString(final String text, final int x, final int y, final int color, final boolean idk) {
|
||||||
if(color == 6942069){
|
if (color == 6942069) {
|
||||||
RenderUtils.drawChromaString(text, x, y, idk);
|
RenderUtils.drawChromaString(text, x, y, idk);
|
||||||
}else {
|
} else {
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, color, idk);
|
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, color, idk);
|
||||||
}
|
}
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Category {
|
public enum Category {
|
||||||
HUD("Hud"),
|
HUD("Hud"),
|
||||||
MISC("Misc");
|
MISC("Misc");
|
||||||
|
|
||||||
public final String name;
|
public final String name;
|
||||||
public int i;
|
public int i;
|
||||||
|
|
||||||
Category(final String name) {
|
Category(final String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEnabled() { return enabled; }
|
public boolean isEnabled() {
|
||||||
public boolean isHasSetting() { return hasSetting; }
|
return enabled;
|
||||||
public String getName() { return name; }
|
}
|
||||||
public Category getCategory() { return category; }
|
|
||||||
public void setName(String name) { this.name = name; }
|
|
||||||
public void setCategory(Category category) { this.category = category; }
|
|
||||||
public void setHasSetting(boolean hasSetting) { this.hasSetting = hasSetting; }
|
|
||||||
|
|
||||||
|
public boolean isHasSetting() {
|
||||||
|
return hasSetting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Category getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
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.CPS;
|
import dev.resent.module.impl.hud.CPS;
|
||||||
|
@ -33,8 +29,12 @@ import dev.resent.module.impl.misc.NoSwingDelay;
|
||||||
import dev.resent.module.impl.misc.Scoreboard;
|
import dev.resent.module.impl.misc.Scoreboard;
|
||||||
import dev.resent.module.impl.misc.Sprint;
|
import dev.resent.module.impl.misc.Sprint;
|
||||||
import dev.resent.module.impl.misc.TabGui;
|
import dev.resent.module.impl.misc.TabGui;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class ModManager {
|
public class ModManager {
|
||||||
|
|
||||||
public List<Mod> modules = new ArrayList<>();
|
public List<Mod> modules = new ArrayList<>();
|
||||||
|
|
||||||
public static Cosmetics cosmetics = new Cosmetics();
|
public static Cosmetics cosmetics = new Cosmetics();
|
||||||
|
@ -100,7 +100,7 @@ public class ModManager {
|
||||||
register(animations);
|
register(animations);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<Mod> modsInCategory(Category c){
|
public ArrayList<Mod> modsInCategory(Category c) {
|
||||||
ArrayList<Mod> inCat = (ArrayList<Mod>) this.modules.stream().filter(m -> m.getCategory() == c).collect(Collectors.toList());
|
ArrayList<Mod> inCat = (ArrayList<Mod>) this.modules.stream().filter(m -> m.getCategory() == c).collect(Collectors.toList());
|
||||||
|
|
||||||
return inCat;
|
return inCat;
|
||||||
|
|
|
@ -11,9 +11,9 @@ public abstract class RenderMod extends Mod {
|
||||||
public int x, y, lastX, lastY, width, height;
|
public int x, y, lastX, lastY, width, height;
|
||||||
private boolean dragging;
|
private boolean dragging;
|
||||||
|
|
||||||
public RenderMod(){
|
public RenderMod() {
|
||||||
RenderModule modInfo;
|
RenderModule modInfo;
|
||||||
if(getClass().isAnnotationPresent(RenderModule.class)){
|
if (getClass().isAnnotationPresent(RenderModule.class)) {
|
||||||
modInfo = getClass().getAnnotation(RenderModule.class);
|
modInfo = getClass().getAnnotation(RenderModule.class);
|
||||||
this.setName(modInfo.name());
|
this.setName(modInfo.name());
|
||||||
this.setCategory(modInfo.category());
|
this.setCategory(modInfo.category());
|
||||||
|
@ -24,8 +24,8 @@ public abstract class RenderMod extends Mod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw() {}
|
public void draw() {}
|
||||||
public void renderLayout(final int mouseX, final int mouseY) {
|
|
||||||
|
|
||||||
|
public void renderLayout(final int mouseX, final int mouseY) {
|
||||||
if ((getX() + getWidth()) > GuiScreen.width) {
|
if ((getX() + getWidth()) > GuiScreen.width) {
|
||||||
this.x = GuiScreen.width - getWidth();
|
this.x = GuiScreen.width - getWidth();
|
||||||
dragging = false;
|
dragging = false;
|
||||||
|
@ -39,7 +39,7 @@ public abstract class RenderMod extends Mod {
|
||||||
this.y = 0;
|
this.y = 0;
|
||||||
dragging = false;
|
dragging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
draw();
|
draw();
|
||||||
|
|
||||||
if (this.dragging) {
|
if (this.dragging) {
|
||||||
|
@ -51,7 +51,7 @@ public abstract class RenderMod extends Mod {
|
||||||
final boolean hovered = mouseX >= getX() && mouseY >= getY() && mouseX < getX() + getWidth() && mouseY < getY() + this.getHeight();
|
final boolean hovered = mouseX >= getX() && mouseY >= getY() && mouseX < getX() + getWidth() && mouseY < getY() + this.getHeight();
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
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());
|
||||||
|
@ -61,7 +61,6 @@ public abstract class RenderMod extends Mod {
|
||||||
this.lastY = y - mouseY;
|
this.lastY = y - mouseY;
|
||||||
this.dragging = true;
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getX() {
|
public int getX() {
|
||||||
|
|
|
@ -13,7 +13,10 @@ import net.minecraft.item.ItemStack;
|
||||||
public class ArmorHud extends RenderMod {
|
public class ArmorHud extends RenderMod {
|
||||||
|
|
||||||
public ScaledResolution sr;
|
public ScaledResolution sr;
|
||||||
public ArmorHud() { addSetting(helm, chestp, leg, boot, item); }
|
|
||||||
|
public ArmorHud() {
|
||||||
|
addSetting(helm, chestp, leg, boot, item);
|
||||||
|
}
|
||||||
|
|
||||||
public static BooleanSetting helm = new BooleanSetting("Helmet", "", true);
|
public static BooleanSetting helm = new BooleanSetting("Helmet", "", true);
|
||||||
public static BooleanSetting chestp = new BooleanSetting("Chestplate", "", true);
|
public static BooleanSetting chestp = new BooleanSetting("Chestplate", "", true);
|
||||||
|
@ -21,8 +24,13 @@ public class ArmorHud extends RenderMod {
|
||||||
public static BooleanSetting boot = new BooleanSetting("Boots", "", true);
|
public static BooleanSetting boot = new BooleanSetting("Boots", "", true);
|
||||||
public static BooleanSetting item = new BooleanSetting("Item", "", true);
|
public static BooleanSetting item = new BooleanSetting("Item", "", true);
|
||||||
|
|
||||||
public int getWidth() { return 20; }
|
public int getWidth() {
|
||||||
public int getHeight() { return 96; }
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return 96;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
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.ui.Theme;
|
import dev.resent.ui.Theme;
|
||||||
import dev.resent.util.misc.FuncUtils;
|
import dev.resent.util.misc.FuncUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@RenderModule(name = "CPS", category = Category.HUD, x = 4, y = 26)
|
@RenderModule(name = "CPS", category = Category.HUD, x = 4, y = 26)
|
||||||
public class CPS extends RenderMod {
|
public class CPS extends RenderMod {
|
||||||
|
@ -16,18 +15,22 @@ public class CPS extends RenderMod {
|
||||||
private boolean wasPressed;
|
private boolean wasPressed;
|
||||||
private long lastPressed;
|
private long lastPressed;
|
||||||
|
|
||||||
public int getWidth() { return mc.fontRendererObj.getStringWidth("[CPS: "+ clicks.size() + "]") + 4; }
|
public int getWidth() {
|
||||||
public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT+4; }
|
return mc.fontRendererObj.getStringWidth("[CPS: " + clicks.size() + "]") + 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return mc.fontRendererObj.FONT_HEIGHT + 4;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
|
|
||||||
boolean pressed = mc.gameSettings.keyBindAttack.pressed || mc.gameSettings.keyBindUseItem.pressed;
|
boolean pressed = mc.gameSettings.keyBindAttack.pressed || mc.gameSettings.keyBindUseItem.pressed;
|
||||||
|
|
||||||
if(pressed != wasPressed){
|
if (pressed != wasPressed) {
|
||||||
lastPressed = System.currentTimeMillis();
|
lastPressed = System.currentTimeMillis();
|
||||||
wasPressed = pressed;
|
wasPressed = pressed;
|
||||||
if(pressed){
|
if (pressed) {
|
||||||
this.clicks.add(lastPressed);
|
this.clicks.add(lastPressed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +38,6 @@ public class CPS extends RenderMod {
|
||||||
final long time = System.currentTimeMillis();
|
final long time = System.currentTimeMillis();
|
||||||
FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time);
|
FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time);
|
||||||
|
|
||||||
drawString("[CPS: " + clicks.size() + "]", this.x+2, this.y+2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
drawString("[CPS: " + clicks.size() + "]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -27,19 +27,24 @@ public class ComboCounter extends RenderMod {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWidth() { return Minecraft.getMinecraft().fontRendererObj.getStringWidth(getText()) + 4; }
|
public int getWidth() {
|
||||||
public int getHeight() { return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT + 4; }
|
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(getText()) + 4;
|
||||||
|
}
|
||||||
|
|
||||||
private String getText(){
|
public int getHeight() {
|
||||||
return "["+combo+" Combo]";
|
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT + 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getText() {
|
||||||
|
return "[" + combo + " Combo]";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
if(Minecraft.getMinecraft().thePlayer.hurtTime > 3 && this.isEnabled()){
|
if (Minecraft.getMinecraft().thePlayer.hurtTime > 3 && this.isEnabled()) {
|
||||||
combo = 0;
|
combo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawString("["+combo+" Combo]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
drawString("[" + combo + " Combo]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,15 @@ import net.minecraft.client.Minecraft;
|
||||||
@RenderModule(name = "FPS", category = Category.HUD, x = 4, y = 38)
|
@RenderModule(name = "FPS", category = Category.HUD, x = 4, y = 38)
|
||||||
public class FPS extends RenderMod {
|
public class FPS extends RenderMod {
|
||||||
|
|
||||||
public int getWidth() { return mc.fontRendererObj.getStringWidth(getText()) + 4; }
|
public int getWidth() {
|
||||||
public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT + 4; }
|
return mc.fontRendererObj.getStringWidth(getText()) + 4;
|
||||||
|
}
|
||||||
|
|
||||||
public String getText(){
|
public int getHeight() {
|
||||||
|
return mc.fontRendererObj.FONT_HEIGHT + 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
return "[FPS: " + Minecraft.debugFPS + "]";
|
return "[FPS: " + Minecraft.debugFPS + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.hud;
|
package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.util.misc.W;
|
import dev.resent.util.misc.W;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
package dev.resent.module.impl.hud;
|
package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.setting.BooleanSetting;
|
import dev.resent.module.setting.BooleanSetting;
|
||||||
import dev.resent.module.setting.ModeSetting;
|
import dev.resent.module.setting.ModeSetting;
|
||||||
|
|
||||||
@Module(name = "Hitboxes", category = Category.HUD, hasSetting = true)
|
@Module(name = "Hitboxes", category = Category.HUD, hasSetting = true)
|
||||||
public class Hitboxes extends Mod {
|
public class Hitboxes extends Mod {
|
||||||
|
|
||||||
public Hitboxes() { addSetting(color, old); }
|
public Hitboxes() {
|
||||||
|
addSetting(color, old);
|
||||||
|
}
|
||||||
|
|
||||||
public static ModeSetting color = new ModeSetting("Color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
public static ModeSetting color = new ModeSetting("Color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
||||||
public static BooleanSetting old = new BooleanSetting("1.7 Hitboxes", "", true);
|
public static BooleanSetting old = new BooleanSetting("1.7 Hitboxes", "", true);
|
||||||
|
|
|
@ -12,12 +12,12 @@ import net.minecraft.util.MathHelper;
|
||||||
@RenderModule(name = "Info", category = Category.HUD, x = 140, y = 50, hasSetting = true)
|
@RenderModule(name = "Info", category = Category.HUD, x = 140, y = 50, hasSetting = true)
|
||||||
public class Info extends RenderMod {
|
public class Info extends RenderMod {
|
||||||
|
|
||||||
public Info(){
|
public Info() {
|
||||||
addSetting(direction);
|
addSetting(direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 getWidth() {
|
public int getWidth() {
|
||||||
return mc.fontRendererObj.getStringWidth("X: -99999999 + ");
|
return mc.fontRendererObj.getStringWidth("X: -99999999 + ");
|
||||||
|
@ -32,17 +32,15 @@ public class Info extends RenderMod {
|
||||||
int px = (int) mc.thePlayer.posX;
|
int px = (int) mc.thePlayer.posX;
|
||||||
int py = (int) mc.thePlayer.posY;
|
int py = (int) mc.thePlayer.posY;
|
||||||
int pz = (int) mc.thePlayer.posZ;
|
int pz = (int) mc.thePlayer.posZ;
|
||||||
int rot = MathHelper.floor_double(this.mc.thePlayer.rotationYaw*4/360+0.5) & 3;
|
int rot = MathHelper.floor_double(this.mc.thePlayer.rotationYaw * 4 / 360 + 0.5) & 3;
|
||||||
if (mc.thePlayer != null) {
|
if (mc.thePlayer != null) {
|
||||||
drawRect(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), new Color(0, 0, 0, 200).getRGB());
|
drawRect(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), new Color(0, 0, 0, 200).getRGB());
|
||||||
drawString(" X: " + px, this.x + 5, this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
drawString(" X: " + px, this.x + 5, this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
drawString(" Y: " + py, this.x + 5, this.y + 24, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
drawString(" Y: " + py, this.x + 5, this.y + 24, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
drawString(" Z: " + pz, this.x + 5, this.y + 34, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
drawString(" Z: " + pz, this.x + 5, this.y + 34, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
|
|
||||||
if (direction.getValue())
|
if (direction.getValue()) drawString(" Dir: " + directionsF[rot], this.x + 5 + mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
drawString(" Dir: " + directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
|
||||||
drawString(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName, this.x + 5, this.y + 44, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
drawString(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName, this.x + 5, this.y + 44, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -12,44 +9,44 @@ import dev.resent.ui.Theme;
|
||||||
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;
|
||||||
|
|
||||||
@RenderModule(name = "Keystrokes", category = Category.HUD, x = 140, y = 150, hasSetting = true)
|
@RenderModule(name = "Keystrokes", category = Category.HUD, x = 140, y = 150, hasSetting = true)
|
||||||
public class KeyStrokes extends RenderMod{
|
public class KeyStrokes extends RenderMod {
|
||||||
|
|
||||||
public static KeyStrokes INSTANCE = new KeyStrokes();
|
public static KeyStrokes INSTANCE = new KeyStrokes();
|
||||||
private Minecraft mc = Minecraft.getMinecraft();
|
private Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|
||||||
public KeyStrokes(){
|
public KeyStrokes() {
|
||||||
addSetting(sneak, jump, color, colorp, gcolor, gcolorp);
|
addSetting(sneak, jump, color, colorp, gcolor, gcolorp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BooleanSetting sneak = new BooleanSetting("Sneak", "", false);
|
public BooleanSetting sneak = new BooleanSetting("Sneak", "", false);
|
||||||
public BooleanSetting jump = new BooleanSetting("Jump", "", true);
|
public BooleanSetting jump = new BooleanSetting("Jump", "", true);
|
||||||
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", false);
|
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", false);
|
||||||
public ModeSetting color = new ModeSetting("Unpressed text color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
public ModeSetting color = new ModeSetting("Unpressed text color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
||||||
public ModeSetting colorp = new ModeSetting("Pressed text color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
|
public ModeSetting colorp = new ModeSetting("Pressed text color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
|
||||||
public ModeSetting gcolor = new ModeSetting("Pressed button color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
public ModeSetting gcolor = new ModeSetting("Pressed button color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
|
||||||
public ModeSetting gcolorp = new ModeSetting("Unpressed button color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
|
public ModeSetting gcolorp = new ModeSetting("Unpressed button color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
|
||||||
public List<Long> clicks = new ArrayList<>();
|
public List<Long> clicks = new ArrayList<>();
|
||||||
public boolean wasPressed;
|
public boolean wasPressed;
|
||||||
public long lastPressed;
|
public long lastPressed;
|
||||||
private List<Long> clicks2 = new ArrayList<>();
|
private List<Long> clicks2 = new ArrayList<>();
|
||||||
public boolean wasPressed2;
|
public boolean wasPressed2;
|
||||||
public long lastPressed2;
|
public long lastPressed2;
|
||||||
|
|
||||||
public float getSize(ModeSetting size) {
|
public float getSize(ModeSetting size) {
|
||||||
if (size.getValue() == "Small")
|
if (size.getValue() == "Small") return 0.75f;
|
||||||
return 0.75f;
|
if (size.getValue() == "Normal") return 1.0f;
|
||||||
if (size.getValue() == "Normal")
|
if (size.getValue() == "Large") return 1.25f;
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
if (size.getValue() == "Large")
|
}
|
||||||
return 1.25f;
|
|
||||||
return 1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getLeftCPS() { final long leftTime = System.currentTimeMillis() + 100L;
|
public int getLeftCPS() {
|
||||||
|
final long leftTime = System.currentTimeMillis() + 100L;
|
||||||
FuncUtils.removeIf(clicks, beenLeftTime -> beenLeftTime + 1200L < leftTime + 200L);
|
FuncUtils.removeIf(clicks, beenLeftTime -> beenLeftTime + 1200L < leftTime + 200L);
|
||||||
return this.clicks.size();
|
return this.clicks.size();
|
||||||
}
|
}
|
||||||
|
@ -60,84 +57,67 @@ public class KeyStrokes extends RenderMod{
|
||||||
return this.clicks2.size();
|
return this.clicks2.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//public static SimpleAnimation wOpacityAnimation = new SimpleAnimation(0), aOpacityAnimation = new SimpleAnimation(0), dOpacityAnimation = new SimpleAnimation(0), sOpacityAnimation = new SimpleAnimation(0), jumpOpacityAnimation = new SimpleAnimation(0);
|
//public static SimpleAnimation wOpacityAnimation = new SimpleAnimation(0), aOpacityAnimation = new SimpleAnimation(0), dOpacityAnimation = new SimpleAnimation(0), sOpacityAnimation = new SimpleAnimation(0), jumpOpacityAnimation = new SimpleAnimation(0);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
|
boolean pressed = mc.gameSettings.keyBindAttack.pressed;
|
||||||
boolean pressed = mc.gameSettings.keyBindAttack.pressed;
|
|
||||||
boolean rpressed = mc.gameSettings.keyBindUseItem.pressed;
|
boolean rpressed = mc.gameSettings.keyBindUseItem.pressed;
|
||||||
boolean wKey = mc.gameSettings.keyBindForward.pressed;
|
boolean wKey = mc.gameSettings.keyBindForward.pressed;
|
||||||
boolean aKey = mc.gameSettings.keyBindLeft.pressed;
|
boolean aKey = mc.gameSettings.keyBindLeft.pressed;
|
||||||
boolean dKey = mc.gameSettings.keyBindRight.pressed;
|
boolean dKey = mc.gameSettings.keyBindRight.pressed;
|
||||||
boolean sKey = mc.gameSettings.keyBindBack.pressed;
|
boolean sKey = mc.gameSettings.keyBindBack.pressed;
|
||||||
boolean jumpKey = mc.gameSettings.keyBindJump.pressed;
|
boolean jumpKey = mc.gameSettings.keyBindJump.pressed;
|
||||||
|
|
||||||
// wOpacityAnimation.setAnimation(wKey ? 0.8f*255 : 0, 14);
|
// wOpacityAnimation.setAnimation(wKey ? 0.8f*255 : 0, 14);
|
||||||
// aOpacityAnimation.setAnimation(aKey ? 0.8f*255 : 0, 14);
|
// aOpacityAnimation.setAnimation(aKey ? 0.8f*255 : 0, 14);
|
||||||
// dOpacityAnimation.setAnimation(dKey ? 0.8f*255 : 0, 14);
|
// dOpacityAnimation.setAnimation(dKey ? 0.8f*255 : 0, 14);
|
||||||
// sOpacityAnimation.setAnimation(sKey ? 0.8f*255 : 0, 14);
|
// sOpacityAnimation.setAnimation(sKey ? 0.8f*255 : 0, 14);
|
||||||
// jumpOpacityAnimation.setAnimation(jumpKey ? 0.8f*255 : 0, 14);
|
// jumpOpacityAnimation.setAnimation(jumpKey ? 0.8f*255 : 0, 14);
|
||||||
|
|
||||||
if (pressed != this.wasPressed) {
|
if (pressed != this.wasPressed) {
|
||||||
this.lastPressed = System.currentTimeMillis();
|
this.lastPressed = System.currentTimeMillis();
|
||||||
this.wasPressed = pressed;
|
this.wasPressed = pressed;
|
||||||
if (pressed)
|
if (pressed) this.clicks.add(Long.valueOf(this.lastPressed));
|
||||||
this.clicks.add(Long.valueOf(this.lastPressed));
|
|
||||||
}
|
}
|
||||||
if (rpressed != this.wasPressed2) {
|
if (rpressed != this.wasPressed2) {
|
||||||
this.lastPressed2 = System.currentTimeMillis() + 10L;
|
this.lastPressed2 = System.currentTimeMillis() + 10L;
|
||||||
this.wasPressed2 = rpressed;
|
this.wasPressed2 = rpressed;
|
||||||
if (rpressed)
|
if (rpressed) this.clicks2.add(Long.valueOf(this.lastPressed2));
|
||||||
this.clicks2.add(Long.valueOf(this.lastPressed2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//W
|
//W
|
||||||
RenderUtils.drawRoundedRect(this.x + 30, this.y + 3, this.x + 55, this.y + 25 + 3, 4,
|
RenderUtils.drawRoundedRect(this.x + 30, this.y + 3, this.x + 55, this.y + 25 + 3, 4, wKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
wKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
// S
|
||||||
// S
|
RenderUtils.drawRoundedRect(this.x + 30, this.y + 30, this.x + 55, this.y + 55, 4, sKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
RenderUtils.drawRoundedRect(this.x + 30, this.y + 30, this.x + 55, this.y + 55, 4,
|
// A
|
||||||
sKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
RenderUtils.drawRoundedRect(this.x + 3, this.y + 30, this.x + 25 + 3, this.y + 55, 4, aKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
// A
|
// D
|
||||||
RenderUtils.drawRoundedRect(this.x + 3, this.y + 30, this.x + 25 + 3, this.y + 55, 4,
|
RenderUtils.drawRoundedRect(this.x + 60 - 3, this.y + 30, this.x + 85 - 3, this.y + 25 + 5 + 25, 4, dKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
aKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
// LMB
|
||||||
// D
|
RenderUtils.drawRoundedRect(this.x + 3, this.y + 57, this.x + 41, this.y + 82, 4, pressed ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
RenderUtils.drawRoundedRect(this.x + 60 - 3, this.y + 30, this.x + 85 - 3, this.y + 25 + 5 + 25, 4,
|
// RMB
|
||||||
dKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
RenderUtils.drawRoundedRect(this.x + 45 - 1, this.y + 60 - 3, this.x + 85 - 3, this.y + 85 - 3, 4, rpressed ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
// LMB
|
|
||||||
RenderUtils.drawRoundedRect(this.x+3, this.y+57, this.x+41, this.y+82, 4,
|
|
||||||
pressed ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
|
||||||
// RMB
|
|
||||||
RenderUtils.drawRoundedRect(this.x + 45 - 1, this.y + 60 - 3, this.x + 85 - 3, this.y + 85 - 3, 4,
|
|
||||||
rpressed ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
|
||||||
|
|
||||||
// Jump
|
// Jump
|
||||||
if(jump.getValue())
|
if (jump.getValue()) RenderUtils.drawRoundedRect(this.x + 3, this.y + 84, this.x + 85 - 3, this.y + 105 - 6, 4, jumpKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
RenderUtils.drawRoundedRect(this.x + 3, this.y+84, this.x+85-3,
|
|
||||||
this.y + 105 - 6, 4, jumpKey ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
|
||||||
|
|
||||||
// Sneak
|
|
||||||
if (sneak.getValue())
|
|
||||||
RenderUtils.drawRoundedRect(this.x + 3, jump.getValue() ? this.y+102 : this.y+84, this.x+85-3,
|
|
||||||
jump.getValue() ? this.y+120-3 : this.y+105-6, 4, mc.gameSettings.keyBindSneak.pressed ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
|
||||||
|
|
||||||
|
// Sneak
|
||||||
mc.fontRendererObj.drawString("W", this.x+25+5+(25/2-mc.fontRendererObj.getStringWidth("W") + 4), this.y+8+3, wKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
if (sneak.getValue()) RenderUtils.drawRoundedRect(this.x + 3, jump.getValue() ? this.y + 102 : this.y + 84, this.x + 85 - 3, jump.getValue() ? this.y + 120 - 3 : this.y + 105 - 6, 4, mc.gameSettings.keyBindSneak.pressed ? getColor(gcolor) : getColor(gcolorp), Theme.getRounded());
|
||||||
mc.fontRendererObj.drawString("S", this.x+25+5+(25/2-mc.fontRendererObj.getStringWidth("S") + 4), this.y+38, sKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
|
||||||
mc.fontRendererObj.drawString("A", this.x+3+(25/2-mc.fontRendererObj.getStringWidth("A") + 4), this.y+38, aKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
mc.fontRendererObj.drawString("W", this.x + 25 + 5 + (25 / 2 - mc.fontRendererObj.getStringWidth("W") + 4), this.y + 8 + 3, wKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
mc.fontRendererObj.drawString("D", this.x+-3+25+25+10+(25/2-mc.fontRendererObj.getStringWidth("D") + 4), this.y+38, dKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
mc.fontRendererObj.drawString("S", this.x + 25 + 5 + (25 / 2 - mc.fontRendererObj.getStringWidth("S") + 4), this.y + 38, sKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
if(jump.getValue())
|
mc.fontRendererObj.drawString("A", this.x + 3 + (25 / 2 - mc.fontRendererObj.getStringWidth("A") + 4), this.y + 38, aKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
mc.fontRendererObj.drawString("\u00A7m-------", this.x+85+(25/2-mc.fontRendererObj.getStringWidth("u00A7m-------") + 4), this.y+92-3, jumpKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
mc.fontRendererObj.drawString("D", this.x + -3 + 25 + 25 + 10 + (25 / 2 - mc.fontRendererObj.getStringWidth("D") + 4), this.y + 38, dKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
if(sneak.getValue())
|
if (jump.getValue()) mc.fontRendererObj.drawString("\u00A7m-------", this.x + 85 + (25 / 2 - mc.fontRendererObj.getStringWidth("u00A7m-------") + 4), this.y + 92 - 3, jumpKey ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
mc.fontRendererObj.drawString("Sneak", this.x+38+3+(25/2-mc.fontRendererObj.getStringWidth("Sneak") + 4), jump.getValue() ? this.y+92+15+1-3 : this.y+92-4, mc.gameSettings.keyBindSneak.pressed ? getColor(colorp) : getColor(color), tshadow.getValue());
|
if (sneak.getValue()) mc.fontRendererObj.drawString("Sneak", this.x + 38 + 3 + (25 / 2 - mc.fontRendererObj.getStringWidth("Sneak") + 4), jump.getValue() ? this.y + 92 + 15 + 1 - 3 : this.y + 92 - 4, mc.gameSettings.keyBindSneak.pressed ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
mc.fontRendererObj.drawString("LMB", this.x+3+40/2-mc.fontRendererObj.getStringWidth("LMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, Mouse.isButtonDown(0) ? getColor(colorp) : getColor(color), tshadow.getValue());
|
mc.fontRendererObj.drawString("LMB", this.x + 3 + 40 / 2 - mc.fontRendererObj.getStringWidth("LMB") / 2, (this.y + 60 + 25 / 2) - mc.fontRendererObj.FONT_HEIGHT / 2 - 3, Mouse.isButtonDown(0) ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
mc.fontRendererObj.drawString("RMB", this.x+40+3+40/2-mc.fontRendererObj.getStringWidth("RMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, Mouse.isButtonDown(1) ? getColor(colorp) : getColor(color), tshadow.getValue());
|
mc.fontRendererObj.drawString("RMB", this.x + 40 + 3 + 40 / 2 - mc.fontRendererObj.getStringWidth("RMB") / 2, (this.y + 60 + 25 / 2) - mc.fontRendererObj.FONT_HEIGHT / 2 - 3, Mouse.isButtonDown(1) ? getColor(colorp) : getColor(color), tshadow.getValue());
|
||||||
this.setHeight((25 + 5 + 25 + 5 + 25 + 25));
|
this.setHeight((25 + 5 + 25 + 5 + 25 + 25));
|
||||||
this.setWidth((25 + 5 + 25 + 5 + 30));
|
this.setWidth((25 + 5 + 25 + 5 + 30));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getColor(ModeSetting asdf) {
|
public static int getColor(ModeSetting asdf) {
|
||||||
|
|
||||||
switch (asdf.getValue()) {
|
switch (asdf.getValue()) {
|
||||||
case "Red":
|
case "Red":
|
||||||
return new Color(255, 0, 0, 208).getRGB();
|
return new Color(255, 0, 0, 208).getRGB();
|
||||||
|
@ -158,5 +138,4 @@ public class KeyStrokes extends RenderMod{
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package dev.resent.module.impl.hud;
|
package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
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.util.Collection;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -39,8 +38,7 @@ public class PotionHUD extends RenderMod {
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
int l = 33;
|
int l = 33;
|
||||||
if (collection.size() > 5)
|
if (collection.size() > 5) l = 132 / (collection.size() - 1);
|
||||||
l = 132 / (collection.size() - 1);
|
|
||||||
for (PotionEffect potioneffect : mc.thePlayer.getActivePotionEffects()) {
|
for (PotionEffect potioneffect : mc.thePlayer.getActivePotionEffects()) {
|
||||||
Potion potion = Potion.potionTypes[potioneffect.getPotionID()];
|
Potion potion = Potion.potionTypes[potioneffect.getPotionID()];
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
@ -49,7 +47,7 @@ public class PotionHUD extends RenderMod {
|
||||||
int i3 = potion.getStatusIconIndex();
|
int i3 = potion.getStatusIconIndex();
|
||||||
GuiIngame guiIngame = new GuiIngame(mc);
|
GuiIngame guiIngame = new GuiIngame(mc);
|
||||||
guiIngame.drawTexturedModalRect(getX() + 21 - 20, getY() + i2 - 14, 0 + i3 % 8 * 18, 198 + i3 / 8 * 18, 18, 18);
|
guiIngame.drawTexturedModalRect(getX() + 21 - 20, getY() + i2 - 14, 0 + i3 % 8 * 18, 198 + i3 / 8 * 18, 18, 18);
|
||||||
}
|
}
|
||||||
String s1 = I18n.format(potion.getName(), new Object[0]);
|
String s1 = I18n.format(potion.getName(), new Object[0]);
|
||||||
if (potioneffect.getAmplifier() == 1) {
|
if (potioneffect.getAmplifier() == 1) {
|
||||||
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.2", new Object[0]);
|
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.2", new Object[0]);
|
||||||
|
@ -57,13 +55,13 @@ public class PotionHUD extends RenderMod {
|
||||||
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.3", new Object[0]);
|
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.3", new Object[0]);
|
||||||
} else if (potioneffect.getAmplifier() == 3) {
|
} else if (potioneffect.getAmplifier() == 3) {
|
||||||
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.4", new Object[0]);
|
s1 = String.valueOf(String.valueOf(s1)) + " " + I18n.format("enchantment.level.4", new Object[0]);
|
||||||
}
|
}
|
||||||
drawString(s1, (getX() + 21), (getY() + i2 - 14), 16777215, true);
|
drawString(s1, (getX() + 21), (getY() + i2 - 14), 16777215, true);
|
||||||
String s2 = Potion.getDurationString(potioneffect);
|
String s2 = Potion.getDurationString(potioneffect);
|
||||||
drawString(s2, (getX() + 21), (getY() + i2 + 10 - 14), 8355711, true);
|
drawString(s2, (getX() + 21), (getY() + i2 + 10 - 14), 8355711, true);
|
||||||
i2 += l;
|
i2 += l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.draw();
|
super.draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
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 dev.resent.ui.Theme;
|
import dev.resent.ui.Theme;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
|
|
||||||
|
@ -28,8 +27,8 @@ public class ReachDisplay extends RenderMod {
|
||||||
drawString("[" + df2.format(range) + " Blocks]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
drawString("[" + df2.format(range) + " Blocks]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onAttack(Entity e){
|
public void onAttack(Entity e) {
|
||||||
if(this.isEnabled()){
|
if (this.isEnabled()) {
|
||||||
final Vec3 vec3 = this.mc.getRenderViewEntity().getPositionEyes(1.0f);
|
final Vec3 vec3 = this.mc.getRenderViewEntity().getPositionEyes(1.0f);
|
||||||
this.range = this.mc.objectMouseOver.hitVec.distanceTo(vec3);
|
this.range = this.mc.objectMouseOver.hitVec.distanceTo(vec3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "Animations", category = Category.MISC)
|
@Module(name = "Animations", category = Category.MISC)
|
||||||
public class Animations extends Mod { }
|
public class Animations extends Mod {}
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.setting.BooleanSetting;
|
import dev.resent.module.setting.BooleanSetting;
|
||||||
|
|
||||||
@Module(name = "AutoGG", category = Category.MISC, hasSetting = true)
|
@Module(name = "AutoGG", category = Category.MISC, hasSetting = true)
|
||||||
public class AutoGG extends Mod {
|
public class AutoGG extends Mod {
|
||||||
|
|
||||||
public AutoGG() { addSetting(rep, onLose, onWin); }
|
public AutoGG() {
|
||||||
|
addSetting(rep, onLose, onWin);
|
||||||
|
}
|
||||||
|
|
||||||
public static BooleanSetting rep = new BooleanSetting("Repetition bypass", "", true);
|
public static BooleanSetting rep = new BooleanSetting("Repetition bypass", "", true);
|
||||||
public static BooleanSetting onLose = new BooleanSetting("On Lose", "", true);
|
public static BooleanSetting onLose = new BooleanSetting("On Lose", "", true);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "AutoRespawn", category = Category.MISC)
|
@Module(name = "AutoRespawn", category = Category.MISC)
|
||||||
public class AutoRespawn extends Mod {
|
public class AutoRespawn extends Mod {
|
||||||
|
@ -14,5 +14,4 @@ public class AutoRespawn extends Mod {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "Clear chat", category = Category.MISC)
|
@Module(name = "Clear chat", category = Category.MISC)
|
||||||
public class ClearChat extends Mod { }
|
public class ClearChat extends Mod {}
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.setting.BooleanSetting;
|
import dev.resent.module.setting.BooleanSetting;
|
||||||
import dev.resent.module.setting.ModeSetting;
|
import dev.resent.module.setting.ModeSetting;
|
||||||
|
|
||||||
@Module(name = "Cosmetics", category = Category.MISC, hasSetting = true)
|
@Module(name = "Cosmetics", category = Category.MISC, hasSetting = true)
|
||||||
public class Cosmetics extends Mod{
|
public class Cosmetics extends Mod {
|
||||||
public Cosmetics(){ addSetting(who, show, halo, crystalwings, glasses, hat); }
|
|
||||||
|
public Cosmetics() {
|
||||||
|
addSetting(who, show, halo, crystalwings, glasses, hat);
|
||||||
|
}
|
||||||
|
|
||||||
public static BooleanSetting show = new BooleanSetting("Show cosmetics", "", true);
|
public static BooleanSetting show = new BooleanSetting("Show cosmetics", "", true);
|
||||||
public static BooleanSetting crystalwings = new BooleanSetting("Crystal wings", "", true);
|
public static BooleanSetting crystalwings = new BooleanSetting("Crystal wings", "", true);
|
||||||
|
@ -17,5 +20,4 @@ public class Cosmetics extends Mod{
|
||||||
public static BooleanSetting hat = new BooleanSetting("Top hat", "", false);
|
public static BooleanSetting hat = new BooleanSetting("Top hat", "", false);
|
||||||
public static BooleanSetting glasses = new BooleanSetting("Glasses", "", false);
|
public static BooleanSetting glasses = new BooleanSetting("Glasses", "", false);
|
||||||
public static ModeSetting who = new ModeSetting("Who to render on", "", "Only you", "Everyone", "Everyone else");
|
public static ModeSetting who = new ModeSetting("Who to render on", "", "Only you", "Everyone", "Everyone else");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "Fast Crystal", category = Category.MISC)
|
@Module(name = "Fast Crystal", category = Category.MISC)
|
||||||
public class CrystalOptimizer extends Mod{ }
|
public class CrystalOptimizer extends Mod {}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "NoDynamicFOV", category = Category.MISC)
|
@Module(name = "NoDynamicFOV", category = Category.MISC)
|
||||||
public class DynamicFOV extends Mod { }
|
public class DynamicFOV extends Mod {}
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
|
|
||||||
|
|
||||||
@Module(name = "Fast math", category = Category.MISC)
|
@Module(name = "Fast math", category = Category.MISC)
|
||||||
public class FPSB extends Mod {
|
public class FPSB extends Mod {
|
||||||
public void onEnable() { MathHelper.fastMath = true; }
|
|
||||||
public void onDisable() { MathHelper.fastMath = false; }
|
|
||||||
|
|
||||||
|
public void onEnable() {
|
||||||
|
MathHelper.fastMath = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onDisable() {
|
||||||
|
MathHelper.fastMath = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ public class Fullbright extends Mod {
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
||||||
//Resent.INSTANCE.playMusic();
|
|
||||||
Resent.INSTANCE.test();
|
Resent.INSTANCE.test();
|
||||||
mc.gameSettings.gammaSetting = 100;
|
mc.gameSettings.gammaSetting = 100;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.setting.BooleanSetting;
|
import dev.resent.module.setting.BooleanSetting;
|
||||||
import dev.resent.module.setting.ModeSetting;
|
import dev.resent.module.setting.ModeSetting;
|
||||||
|
|
||||||
@Module(name = "Theme", category = Category.MISC, hasSetting = true)
|
@Module(name = "Theme", category = Category.MISC, hasSetting = true)
|
||||||
public class HUD extends Mod{
|
public class HUD extends Mod {
|
||||||
public HUD(){ addSetting(fontTheme, animationTheme, tshadow, round); }
|
|
||||||
|
public HUD() {
|
||||||
|
addSetting(fontTheme, animationTheme, tshadow, round);
|
||||||
|
}
|
||||||
|
|
||||||
public static final ModeSetting fontTheme = new ModeSetting("Font", "", "Classic", "Rainbow", "Chroma");
|
public static final ModeSetting fontTheme = new ModeSetting("Font", "", "Classic", "Rainbow", "Chroma");
|
||||||
//public static final ModeSetting rectTheme = new ModeSetting("Rectangle", "", "Classic", "Astolfo");
|
//public static final ModeSetting rectTheme = new ModeSetting("Rectangle", "", "Classic", "Astolfo");
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "Minimal Bobbing", category = Category.MISC)
|
@Module(name = "Minimal Bobbing", category = Category.MISC)
|
||||||
public class MinimalViewBobbing extends Mod { }
|
public class MinimalViewBobbing extends Mod {}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "NoParticles", category = Category.MISC)
|
@Module(name = "NoParticles", category = Category.MISC)
|
||||||
public class NoParticles extends Mod {}
|
public class NoParticles extends Mod {}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "NoRain", category = Category.MISC)
|
@Module(name = "NoRain", category = Category.MISC)
|
||||||
public class NoRain extends Mod { }
|
public class NoRain extends Mod {}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
|
|
||||||
@Module(name = "NoSwingDelay", category = Category.MISC)
|
@Module(name = "NoSwingDelay", category = Category.MISC)
|
||||||
public class NoSwingDelay extends Mod { }
|
public class NoSwingDelay extends Mod {}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.resent.module.impl.misc;
|
package dev.resent.module.impl.misc;
|
||||||
|
|
||||||
import dev.resent.annotation.Module;
|
import dev.resent.annotation.Module;
|
||||||
import dev.resent.module.base.Mod.Category;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.Mod.Category;
|
||||||
import dev.resent.module.setting.BooleanSetting;
|
import dev.resent.module.setting.BooleanSetting;
|
||||||
|
|
||||||
@Module(name = "Scoreboard", category = Category.MISC, hasSetting = true)
|
@Module(name = "Scoreboard", category = Category.MISC, hasSetting = true)
|
||||||
|
|
|
@ -38,8 +38,7 @@ public class Sprint extends RenderMod {
|
||||||
toggled = !toggled;
|
toggled = !toggled;
|
||||||
}
|
}
|
||||||
if (toggled) {
|
if (toggled) {
|
||||||
if (mc.gameSettings.keyBindForward.pressed && !mc.thePlayer.isUsingItem())
|
if (mc.gameSettings.keyBindForward.pressed && !mc.thePlayer.isUsingItem()) mc.thePlayer.setSprinting(true);
|
||||||
mc.thePlayer.setSprinting(true);
|
|
||||||
text = definitive ? text : "[Sprinting (Toggled)]";
|
text = definitive ? text : "[Sprinting (Toggled)]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +53,7 @@ public class Sprint extends RenderMod {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
if (drawn.getValue())
|
if (drawn.getValue()) drawString(getText(), x + 2, y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||||
drawString(getText(), x + 2, y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,89 +11,86 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
|
|
||||||
@RenderModule(name = "TabGUI", category = Category.HUD, x = 30, y = 150)
|
@RenderModule(name = "TabGUI", category = Category.HUD, x = 30, y = 150)
|
||||||
public class TabGui extends RenderMod{
|
public class TabGui extends RenderMod {
|
||||||
|
|
||||||
public int current = 0;
|
public int current = 0;
|
||||||
public boolean expanded;
|
public boolean expanded;
|
||||||
|
|
||||||
public int getWidth(){
|
public int getWidth() {
|
||||||
return expanded ? 139 : 70;
|
return expanded ? 139 : 70;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight(){
|
public int getHeight() {
|
||||||
return Category.values().length*16+4;
|
return Category.values().length * 16 + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw() {
|
public void draw() {
|
||||||
Gui.drawRect(x, y, x+70, y+3+Category.values().length*16, 0x90000000);
|
Gui.drawRect(x, y, x + 70, y + 3 + Category.values().length * 16, 0x90000000);
|
||||||
RenderUtils.drawChromaRectangle(x, y+current*16, x+70, y+18f+current*16, 0.6f, 0xff900000);
|
RenderUtils.drawChromaRectangle(x, y + current * 16, x + 70, y + 18f + current * 16, 0.6f, 0xff900000);
|
||||||
|
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
for(Category c : Category.values()){
|
for (Category c : Category.values()) {
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(c.name, x+10, y+6.5f+offset, -1);
|
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(c.name, x + 10, y + 6.5f + offset, -1);
|
||||||
offset += 16;
|
offset += 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(expanded){
|
if (expanded) {
|
||||||
|
|
||||||
Category category = Category.values()[current];
|
Category category = Category.values()[current];
|
||||||
if(Resent.INSTANCE.modManager.modsInCategory(category).size() == 0)
|
if (Resent.INSTANCE.modManager.modsInCategory(category).size() == 0) return;
|
||||||
return;
|
|
||||||
|
|
||||||
Gui.drawRect(x+70, y, x+138, y+3+Resent.INSTANCE.modManager.modsInCategory(category).size()*16, 0x90000000);
|
Gui.drawRect(x + 70, y, x + 138, y + 3 + Resent.INSTANCE.modManager.modsInCategory(category).size() * 16, 0x90000000);
|
||||||
RenderUtils.drawChromaRectangle(x+70, y+category.i*16, x+138, y+18f+category.i*16, 0.6f, 0xff900000);
|
RenderUtils.drawChromaRectangle(x + 70, y + category.i * 16, x + 138, y + 18f + category.i * 16, 0.6f, 0xff900000);
|
||||||
|
|
||||||
offset = 0;
|
offset = 0;
|
||||||
for(Mod m : Resent.INSTANCE.modManager.modsInCategory(category)){
|
for (Mod m : Resent.INSTANCE.modManager.modsInCategory(category)) {
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(m.getName(), x+73, y+6.5f+offset, -1);
|
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(m.getName(), x + 73, y + 6.5f + offset, -1);
|
||||||
offset += 16;
|
offset += 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onKey(int k){
|
public void onKey(int k) {
|
||||||
Category category = Category.values()[current];
|
Category category = Category.values()[current];
|
||||||
if (k ==KeyboardConstants.KEY_UP) {
|
if (k == KeyboardConstants.KEY_UP) {
|
||||||
if(expanded){
|
if (expanded) {
|
||||||
if(category.i <= 0){
|
if (category.i <= 0) {
|
||||||
category.i = Resent.INSTANCE.modManager.modsInCategory(category).size()-1;
|
category.i = Resent.INSTANCE.modManager.modsInCategory(category).size() - 1;
|
||||||
}else{
|
} else {
|
||||||
--category.i;
|
--category.i;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
if(current <= 0){
|
if (current <= 0) {
|
||||||
current = Category.values().length-1;
|
current = Category.values().length - 1;
|
||||||
}else {
|
} else {
|
||||||
--current;
|
--current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k ==KeyboardConstants.KEY_DOWN) {
|
if (k == KeyboardConstants.KEY_DOWN) {
|
||||||
if(expanded){
|
if (expanded) {
|
||||||
if(category.i >= Resent.INSTANCE.modManager.modsInCategory(category).size() - 1){
|
if (category.i >= Resent.INSTANCE.modManager.modsInCategory(category).size() - 1) {
|
||||||
category.i = 0;
|
category.i = 0;
|
||||||
}else {
|
} else {
|
||||||
++category.i;
|
++category.i;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
if(current >= Category.values().length-1){
|
if (current >= Category.values().length - 1) {
|
||||||
current = 0;
|
current = 0;
|
||||||
}else {
|
} else {
|
||||||
++current;
|
++current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k ==KeyboardConstants.KEY_RIGHT){
|
if (k == KeyboardConstants.KEY_RIGHT) {
|
||||||
if(expanded && Resent.INSTANCE.modManager.modsInCategory(category).size() != 0 && Resent.INSTANCE.modManager.modsInCategory(category).get(category.i).getName() != "TabGUI"){
|
if (expanded && Resent.INSTANCE.modManager.modsInCategory(category).size() != 0 && Resent.INSTANCE.modManager.modsInCategory(category).get(category.i).getName() != "TabGUI") {
|
||||||
Resent.INSTANCE.modManager.modsInCategory(category).get(category.i).toggle();
|
Resent.INSTANCE.modManager.modsInCategory(category).get(category.i).toggle();
|
||||||
mc.gameSettings.saveOptions();
|
mc.gameSettings.saveOptions();
|
||||||
}else {
|
} else {
|
||||||
expanded = true;
|
expanded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k ==KeyboardConstants.KEY_LEFT){
|
if (k == KeyboardConstants.KEY_LEFT) {
|
||||||
expanded = false;
|
expanded = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
package dev.resent.ui;
|
package dev.resent.ui;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import dev.resent.Resent;
|
import dev.resent.Resent;
|
||||||
import dev.resent.ui.animation.Animation;
|
|
||||||
import dev.resent.ui.animation.Direction;
|
|
||||||
import dev.resent.module.base.Mod;
|
import dev.resent.module.base.Mod;
|
||||||
import dev.resent.module.setting.BooleanSetting;
|
import dev.resent.module.setting.BooleanSetting;
|
||||||
import dev.resent.module.setting.ModeSetting;
|
import dev.resent.module.setting.ModeSetting;
|
||||||
import dev.resent.module.setting.Setting;
|
import dev.resent.module.setting.Setting;
|
||||||
|
import dev.resent.ui.animation.Animation;
|
||||||
|
import dev.resent.ui.animation.Direction;
|
||||||
import dev.resent.util.misc.GlUtils;
|
import dev.resent.util.misc.GlUtils;
|
||||||
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.io.IOException;
|
||||||
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;
|
||||||
|
@ -111,14 +110,14 @@ public class ClickGUI extends GuiScreen {
|
||||||
y = sr.getScaledHeight() - 10 + xy;
|
y = sr.getScaledHeight() - 10 + xy;
|
||||||
int off = 0;
|
int off = 0;
|
||||||
|
|
||||||
if(close) {
|
if (close) {
|
||||||
introAnimation.setDirection(Direction.BACKWARDS);
|
introAnimation.setDirection(Direction.BACKWARDS);
|
||||||
if(introAnimation.isDone(Direction.BACKWARDS)) {
|
if (introAnimation.isDone(Direction.BACKWARDS)) {
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlUtils.startScale((this.x + this.width)/2, (this.y + this.height) / 2, (float) introAnimation.getValue());
|
GlUtils.startScale((this.x + this.width) / 2, (this.y + this.height) / 2, (float) introAnimation.getValue());
|
||||||
|
|
||||||
// background
|
// background
|
||||||
drawRect(x - 10, y + 20, width + 35, height - 10, new Color(35, 39, 42, 200).getRGB());
|
drawRect(x - 10, y + 20, width + 35, height - 10, new Color(35, 39, 42, 200).getRGB());
|
||||||
|
@ -155,12 +154,10 @@ public class ClickGUI extends GuiScreen {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (m.isHasSetting()) {
|
if (m.isHasSetting()) {
|
||||||
if(isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, this.x + 90 + xo - 1 + 10 + fr.getStringWidth("o"), height - 2 - fh * -(off) + 51 + 1 - offset + 9))
|
if (isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, this.x + 90 + xo - 1 + 10 + fr.getStringWidth("o"), height - 2 - fh * -(off) + 51 + 1 - offset + 9)) GlStateManager.color(1, 1, 1, 0.6f); else {
|
||||||
GlStateManager.color(1,1,1,0.6f);
|
|
||||||
else {
|
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear.png"));
|
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear.png"));
|
||||||
Gui.drawModalRectWithCustomSizedTexture(this.x+99+xo, height - 2 - fh * -(off) + 51 + 1 - offset, 0, 0, 8, 8, 8, 8);
|
Gui.drawModalRectWithCustomSizedTexture(this.x + 99 + xo, height - 2 - fh * -(off) + 51 + 1 - offset, 0, 0, 8, 8, 8, 8);
|
||||||
GlStateManager.color(1, 1, 1);
|
GlStateManager.color(1, 1, 1);
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
}
|
}
|
||||||
|
@ -179,23 +176,13 @@ public class ClickGUI extends GuiScreen {
|
||||||
Setting s = this.modWatching.settings.get(amogus);
|
Setting s = this.modWatching.settings.get(amogus);
|
||||||
if (s instanceof BooleanSetting) {
|
if (s instanceof BooleanSetting) {
|
||||||
b = (BooleanSetting) s;
|
b = (BooleanSetting) s;
|
||||||
drawRect(
|
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());
|
||||||
this.x + 11,
|
|
||||||
height - 9 + 50 + var,
|
if (b.getValue()) {
|
||||||
this.x + 19,
|
GlStateManager.color(1, 1, 1);
|
||||||
height - 9 + 50 + 9 + var-1,
|
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/check.png"));
|
||||||
isMouseInside(
|
Gui.drawModalRectWithCustomSizedTexture(this.x + 9, height + 39 + var, 0, 0, 12, 12, 12, 12);
|
||||||
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());
|
|
||||||
|
|
||||||
if(b.getValue()){
|
|
||||||
GlStateManager.color(1, 1, 1);
|
|
||||||
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/check.png"));
|
|
||||||
Gui.drawModalRectWithCustomSizedTexture(this.x+9, height+39+var, 0, 0, 12, 12, 12, 12);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s instanceof ModeSetting) {
|
if (s instanceof ModeSetting) {
|
||||||
|
@ -229,7 +216,6 @@ public class ClickGUI extends GuiScreen {
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
Keyboard.enableRepeatEvents(true);
|
Keyboard.enableRepeatEvents(true);
|
||||||
mc.gameSettings.saveOptions();
|
mc.gameSettings.saveOptions();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,17 +5,18 @@ import net.minecraft.client.gui.FontRenderer;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
|
|
||||||
public class ClientButton extends GuiButton{
|
public class ClientButton extends GuiButton {
|
||||||
|
|
||||||
public ClientButton(final int buttonId, final int x, final int y, final int widthIn, final int heightIn, final String buttonText) {
|
public ClientButton(final int buttonId, final int x, final int y, final int widthIn, final int heightIn, final String buttonText) {
|
||||||
super(buttonId, x, y, widthIn, heightIn, buttonText);
|
super(buttonId, x, y, widthIn, heightIn, buttonText);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawButton(final Minecraft mc, final int mouseX, final int mouseY) {
|
public void drawButton(final Minecraft mc, final int mouseX, final int mouseY) {
|
||||||
FontRenderer fr = mc.fontRendererObj;
|
FontRenderer fr = mc.fontRendererObj;
|
||||||
this.hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
|
this.hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
|
||||||
Gui.drawRect(this.xPosition, this.yPosition, this.xPosition + this.width, this.yPosition + this.height, hovered ? 0x30ffffff :0x20ffffff);
|
Gui.drawRect(this.xPosition, this.yPosition, this.xPosition + this.width, this.yPosition + this.height, hovered ? 0x30ffffff : 0x20ffffff);
|
||||||
|
|
||||||
drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, -1, false);
|
drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, -1, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,25 +7,24 @@ import net.minecraft.client.gui.Gui;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class PreGUI extends GuiScreen{
|
public class PreGUI extends GuiScreen {
|
||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int i, int j, float var3) {
|
public void drawScreen(int i, int j, float var3) {
|
||||||
|
|
||||||
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-50, 0, 0, 60, 60, 60, 60);
|
Gui.drawModalRectWithCustomSizedTexture(GuiScreen.width / 2 - 20, GuiScreen.height / 2 - 50, 0, 0, 60, 60, 60, 60);
|
||||||
|
|
||||||
Gui.drawRect(GuiScreen.width/2-20, GuiScreen.height/2+20, GuiScreen.width/2+40, GuiScreen.height/2+50, isMouseInside(i, j, GuiScreen.width/2-20, GuiScreen.height/2+20, GuiScreen.width/2+40, GuiScreen.height/2+50) ? 0x40FFFFFF : 0x50FFFFFF);
|
Gui.drawRect(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50, isMouseInside(i, j, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50) ? 0x40FFFFFF : 0x50FFFFFF);
|
||||||
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);
|
||||||
GlUtils.drawCenteredScaledString("Mods", GuiScreen.width/2+10, GuiScreen.height/2+35-mc.fontRendererObj.FONT_HEIGHT/2, -1, 1f);
|
GlUtils.drawCenteredScaledString("Mods", GuiScreen.width / 2 + 10, GuiScreen.height / 2 + 35 - mc.fontRendererObj.FONT_HEIGHT / 2, -1, 1f);
|
||||||
super.drawScreen(i, j, var3);
|
super.drawScreen(i, j, var3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||||
if(isMouseInside(parInt1, parInt2, GuiScreen.width/2-30, GuiScreen.height/2+20, GuiScreen.width/2+50, GuiScreen.height/2+50) && parInt3 == 0){
|
if (isMouseInside(parInt1, parInt2, GuiScreen.width / 2 - 30, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 50, GuiScreen.height / 2 + 50) && parInt3 == 0) {
|
||||||
mc.displayGuiScreen(new ClickGUI());
|
mc.displayGuiScreen(new ClickGUI());
|
||||||
}
|
}
|
||||||
super.mouseClicked(parInt1, parInt2, parInt3);
|
super.mouseClicked(parInt1, parInt2, parInt3);
|
||||||
|
@ -33,7 +32,7 @@ public class PreGUI extends GuiScreen{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void keyTyped(char parChar1, int parInt1) {
|
protected void keyTyped(char parChar1, int parInt1) {
|
||||||
if (parInt1 == 0x01 || parInt1 == Minecraft.getMinecraft().gameSettings.keyBindClickGui.keyCode) {
|
if (parInt1 == 0x01 || parInt1 == Minecraft.getMinecraft().gameSettings.keyBindClickGui.keyCode) {
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,5 +42,4 @@ public class PreGUI extends GuiScreen{
|
||||||
public boolean isMouseInside(int mouseX, int mouseY, int x, int y, int width, int height) {
|
public boolean isMouseInside(int mouseX, int mouseY, int x, int y, int width, int height) {
|
||||||
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
return (mouseX >= x && mouseX <= width) && (mouseY >= y && mouseY <= height);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,12 @@ import dev.resent.util.render.RenderUtils;
|
||||||
|
|
||||||
public class Theme {
|
public class Theme {
|
||||||
|
|
||||||
public static int getFontColor(int id){
|
public static int getFontColor(int id) {
|
||||||
return getFontColor(id, 255);
|
return getFontColor(id, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getFontColor(int id, int opacity){
|
public static int getFontColor(int id, int opacity) {
|
||||||
switch(id){
|
switch (id) {
|
||||||
case 1:
|
case 1:
|
||||||
return -1;
|
return -1;
|
||||||
case 50:
|
case 50:
|
||||||
|
@ -27,8 +27,8 @@ public class Theme {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Animation getAnimation(int id, int ms, int endpoint, float easeAmount, float elasticity, float smooth, boolean moreElasticity){
|
public static Animation getAnimation(int id, int ms, int endpoint, float easeAmount, float elasticity, float smooth, boolean moreElasticity) {
|
||||||
switch(id){
|
switch (id) {
|
||||||
case 1:
|
case 1:
|
||||||
return new EaseBackIn(ms, endpoint, easeAmount);
|
return new EaseBackIn(ms, endpoint, easeAmount);
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -44,8 +44,8 @@ public class Theme {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getFontId(){
|
public static int getFontId() {
|
||||||
switch(HUD.fontTheme.getValue()){
|
switch (HUD.fontTheme.getValue()) {
|
||||||
case "Classic":
|
case "Classic":
|
||||||
return 1;
|
return 1;
|
||||||
case "Rainbow":
|
case "Rainbow":
|
||||||
|
@ -56,8 +56,8 @@ public class Theme {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getAnimationId(){
|
public static int getAnimationId() {
|
||||||
switch(HUD.animationTheme.getValue()){
|
switch (HUD.animationTheme.getValue()) {
|
||||||
case "Ease back in":
|
case "Ease back in":
|
||||||
return 1;
|
return 1;
|
||||||
case "Elastic":
|
case "Elastic":
|
||||||
|
@ -72,12 +72,11 @@ public class Theme {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean getRounded(){
|
public static boolean getRounded() {
|
||||||
return HUD.round.getValue();
|
return HUD.round.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean getTextShadow(){
|
public static boolean getTextShadow() {
|
||||||
return HUD.tshadow.getValue();
|
return HUD.tshadow.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package dev.resent.ui.animation;
|
||||||
public abstract class Animation {
|
public abstract class Animation {
|
||||||
|
|
||||||
public AnimationTimer timer = new AnimationTimer();
|
public AnimationTimer timer = new AnimationTimer();
|
||||||
|
|
||||||
protected int duration;
|
protected int duration;
|
||||||
|
|
||||||
protected double endPoint;
|
protected double endPoint;
|
||||||
|
@ -31,7 +31,7 @@ public abstract class Animation {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
timer.reset();
|
timer.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDone() {
|
public boolean isDone() {
|
||||||
|
@ -55,8 +55,7 @@ public abstract class Animation {
|
||||||
|
|
||||||
public double getValue() {
|
public double getValue() {
|
||||||
if (direction == Direction.FORWARDS) {
|
if (direction == Direction.FORWARDS) {
|
||||||
if (isDone())
|
if (isDone()) return endPoint;
|
||||||
return endPoint;
|
|
||||||
return (getEquation(timer.getTime()) * endPoint);
|
return (getEquation(timer.getTime()) * endPoint);
|
||||||
} else {
|
} else {
|
||||||
if (isDone()) return 0;
|
if (isDone()) return 0;
|
||||||
|
@ -69,21 +68,21 @@ public abstract class Animation {
|
||||||
|
|
||||||
protected abstract double getEquation(double x);
|
protected abstract double getEquation(double x);
|
||||||
|
|
||||||
public double getEndPoint() {
|
public double getEndPoint() {
|
||||||
return endPoint;
|
return endPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEndPoint(double endPoint) {
|
public void setEndPoint(double endPoint) {
|
||||||
this.endPoint = endPoint;
|
this.endPoint = endPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDuration() {
|
public int getDuration() {
|
||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Direction getDirection() {
|
public Direction getDirection() {
|
||||||
return direction;
|
return direction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AnimationTimer {
|
class AnimationTimer {
|
||||||
|
@ -114,5 +113,4 @@ class AnimationTimer {
|
||||||
public void setTime(long time) {
|
public void setTime(long time) {
|
||||||
lastMS = time;
|
lastMS = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,25 @@
|
||||||
package dev.resent.ui.animation;
|
package dev.resent.ui.animation;
|
||||||
|
|
||||||
public class AnimationUtils {
|
public class AnimationUtils {
|
||||||
|
|
||||||
public static float calculateCompensation(final float target, float current, final double speed, long delta) {
|
public static float calculateCompensation(final float target, float current, final double speed, long delta) {
|
||||||
|
|
||||||
final float diff = current - target;
|
final float diff = current - target;
|
||||||
|
|
||||||
double add = (delta * (speed / 50));
|
double add = (delta * (speed / 50));
|
||||||
|
|
||||||
if (diff > speed){
|
if (diff > speed) {
|
||||||
if(current - add > target) {
|
if (current - add > target) {
|
||||||
current -= add;
|
current -= add;
|
||||||
}else {
|
} else {
|
||||||
current = target;
|
current = target;
|
||||||
}
|
}
|
||||||
}
|
} else if (diff < -speed) {
|
||||||
else if (diff < -speed) {
|
if (current + add < target) {
|
||||||
if(current + add < target) {
|
|
||||||
current += add;
|
current += add;
|
||||||
}else {
|
} else {
|
||||||
current = target;
|
current = target;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
current = target;
|
current = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,40 +1,38 @@
|
||||||
package dev.resent.ui.animation;
|
package dev.resent.ui.animation;
|
||||||
|
|
||||||
public class SimpleAnimation {
|
public class SimpleAnimation {
|
||||||
|
|
||||||
private float value;
|
private float value;
|
||||||
private long lastMS;
|
private long lastMS;
|
||||||
|
|
||||||
public SimpleAnimation(final float value){
|
public SimpleAnimation(final float value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.lastMS = System.currentTimeMillis();
|
this.lastMS = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAnimation(final float value, double speed){
|
public void setAnimation(final float value, double speed) {
|
||||||
|
|
||||||
final long currentMS = System.currentTimeMillis();
|
final long currentMS = System.currentTimeMillis();
|
||||||
final long delta = currentMS - this.lastMS;
|
final long delta = currentMS - this.lastMS;
|
||||||
this.lastMS = currentMS;
|
this.lastMS = currentMS;
|
||||||
|
|
||||||
double deltaValue = 0.0;
|
double deltaValue = 0.0;
|
||||||
|
|
||||||
if(speed > 28) {
|
if (speed > 28) {
|
||||||
speed = 28;
|
speed = 28;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (speed != 0.0)
|
if (speed != 0.0) {
|
||||||
{
|
deltaValue = Math.abs(value - this.value) * 0.35f / (10.0 / speed);
|
||||||
deltaValue = Math.abs(value - this.value) * 0.35f / (10.0 / speed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.value = AnimationUtils.calculateCompensation(value, this.value, deltaValue, delta);
|
this.value = AnimationUtils.calculateCompensation(value, this.value, deltaValue, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getValue() {
|
public float getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValue(float value) {
|
public void setValue(float value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import dev.resent.ui.animation.Animation;
|
||||||
import dev.resent.ui.animation.Direction;
|
import dev.resent.ui.animation.Direction;
|
||||||
|
|
||||||
public class EaseBackIn extends Animation {
|
public class EaseBackIn extends Animation {
|
||||||
|
|
||||||
private final float easeAmount;
|
private final float easeAmount;
|
||||||
|
|
||||||
public EaseBackIn(int ms, double endPoint, float easeAmount) {
|
public EaseBackIn(int ms, double endPoint, float easeAmount) {
|
||||||
|
@ -27,5 +28,4 @@ public class EaseBackIn extends Animation {
|
||||||
float shrink = easeAmount + 1;
|
float shrink = easeAmount + 1;
|
||||||
return Math.max(0, 1 + shrink * Math.pow(x1 - 1, 3) + easeAmount * Math.pow(x1 - 1, 2));
|
return Math.max(0, 1 + shrink * Math.pow(x1 - 1, 3) + easeAmount * Math.pow(x1 - 1, 2));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -17,5 +17,4 @@ public class EaseInOutQuad extends Animation {
|
||||||
double x = x1 / duration;
|
double x = x1 / duration;
|
||||||
return x < 0.5 ? 2 * Math.pow(x, 2) : 1 - Math.pow(-2 * x + 2, 2) / 2;
|
return x < 0.5 ? 2 * Math.pow(x, 2) : 1 - Math.pow(-2 * x + 2, 2) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,4 +29,4 @@ public class ElasticAnimation extends Animation {
|
||||||
double elasticity = easeAmount * .1f;
|
double elasticity = easeAmount * .1f;
|
||||||
return Math.pow(2, -10 * (reallyElastic ? Math.sqrt(x1) : x1)) * Math.sin((x1 - (elasticity / 4)) * ((2 * Math.PI) / elasticity)) + 1;
|
return Math.pow(2, -10 * (reallyElastic ? Math.sqrt(x1) : x1)) * Math.sin((x1 - (elasticity / 4)) * ((2 * Math.PI) / elasticity)) + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,5 +17,4 @@ public class SmoothStepAnimation extends Animation {
|
||||||
double x1 = x / (double) duration; //Used to force input to range from 0 - 1
|
double x1 = x / (double) duration; //Used to force input to range from 0 - 1
|
||||||
return -2 * Math.pow(x1, 3) + (3 * Math.pow(x1, 2));
|
return -2 * Math.pow(x1, 3) + (3 * Math.pow(x1, 2));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
|
|
||||||
public class GlUtils {
|
public class GlUtils {
|
||||||
|
|
||||||
public static void startScale(float x, float y, float scale) {
|
public static void startScale(float x, float y, float scale) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.translate(x, y, 0);
|
GlStateManager.translate(x, y, 0);
|
||||||
|
@ -13,23 +13,23 @@ public class GlUtils {
|
||||||
GlStateManager.translate(-x, -y, 0);
|
GlStateManager.translate(-x, -y, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void stopScale(){
|
public static void stopScale() {
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void startTranslate(float x, float y) {
|
public static void startTranslate(float x, float y) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.translate(x, y, 0);
|
GlStateManager.translate(x, y, 0);
|
||||||
}
|
|
||||||
|
|
||||||
public static void stopTranslate() {
|
|
||||||
GlStateManager.popMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void drawCenteredScaledString(String text, int param1,int param2, int color, float scale){
|
public static void stopTranslate() {
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void drawCenteredScaledString(String text, int param1, int param2, int color, float scale) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.scale(scale,scale,scale);
|
GlStateManager.scale(scale, scale, scale);
|
||||||
Gui.drawCenteredString(Minecraft.getMinecraft().fontRendererObj, text, (int) (param1 / scale), (int) (param2 / scale), color, true);
|
Gui.drawCenteredString(Minecraft.getMinecraft().fontRendererObj, text, (int) (param1 / scale), (int) (param2 / scale), color, true);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||||
|
|
||||||
public class RenderUtils {
|
public class RenderUtils {
|
||||||
|
|
||||||
public static void drawChromaString(final String string, final int x, final int y, final boolean shadow) {
|
public static void drawChromaString(final String string, final int x, final int y, final boolean shadow) {
|
||||||
final Minecraft mc = Minecraft.getMinecraft();
|
final Minecraft mc = Minecraft.getMinecraft();
|
||||||
int xTmp = x;
|
int xTmp = x;
|
||||||
|
@ -20,40 +20,40 @@ public class RenderUtils {
|
||||||
final long l = System.currentTimeMillis() - (xTmp * 10 - y * 10);
|
final long l = System.currentTimeMillis() - (xTmp * 10 - y * 10);
|
||||||
final int i = Color.HSBtoRGB(l % 2000L / 2000.0f, 0.8f, 0.8f);
|
final int i = Color.HSBtoRGB(l % 2000L / 2000.0f, 0.8f, 0.8f);
|
||||||
final String tmp = String.valueOf(textChar);
|
final String tmp = String.valueOf(textChar);
|
||||||
mc.fontRendererObj.drawString(tmp, (float)xTmp, (float)y, i, shadow);
|
mc.fontRendererObj.drawString(tmp, (float) xTmp, (float) y, i, shadow);
|
||||||
xTmp += mc.fontRendererObj.getCharWidth(textChar);
|
xTmp += mc.fontRendererObj.getCharWidth(textChar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void drawChromaRectangle(float x, float y, float width, float height, float speed, int colorbecauseidontwanttoremovecolor) {
|
public static void drawChromaRectangle(float x, float y, float width, float height, float speed, int colorbecauseidontwanttoremovecolor) {
|
||||||
float i = x;
|
float i = x;
|
||||||
while(true) {
|
while (true) {
|
||||||
if(i+10 <= width) {
|
if (i + 10 <= width) {
|
||||||
Gui.drawRect(i, y, i+10, height,RenderUtils.astolfoColorsDraw(i, GuiScreen.width, speed*10000));
|
Gui.drawRect(i, y, i + 10, height, RenderUtils.astolfoColorsDraw(i, GuiScreen.width, speed * 10000));
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i+=10;
|
i += 10;
|
||||||
}
|
}
|
||||||
if(width-i != 0) {
|
if (width - i != 0) {
|
||||||
for(float h = i; h < width; h++) {
|
for (float h = i; h < width; h++) {
|
||||||
Gui.drawRect(h, y, h+1, height,RenderUtils.astolfoColorsDraw(h, GuiScreen.width, speed*10000));
|
Gui.drawRect(h, y, h + 1, height, RenderUtils.astolfoColorsDraw(h, GuiScreen.width, speed * 10000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int astolfoColorsDraw(float yOffset, int yTotal, float speed) {
|
public static int astolfoColorsDraw(float yOffset, int yTotal, float speed) {
|
||||||
float hue = (float) (System.currentTimeMillis() % (int)speed) + ((yTotal - yOffset) * 9);
|
float hue = (float) (System.currentTimeMillis() % (int) speed) + ((yTotal - yOffset) * 9);
|
||||||
while (hue > speed) {
|
while (hue > speed) {
|
||||||
hue -= speed;
|
hue -= speed;
|
||||||
}
|
}
|
||||||
hue /= speed;
|
hue /= speed;
|
||||||
if (hue > 0.5) {
|
if (hue > 0.5) {
|
||||||
hue = 0.5F - (hue - 0.5f);
|
hue = 0.5F - (hue - 0.5f);
|
||||||
}
|
}
|
||||||
hue += 0.5F;
|
hue += 0.5F;
|
||||||
return Color.HSBtoRGB(hue, 0.5f, 1f);
|
return Color.HSBtoRGB(hue, 0.5f, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void drawRoundedRect(final float paramInt1, final float paramInt2, final float paramInt3, final float paramInt4, final float radius, final int color, boolean... rounded) {
|
public static void drawRoundedRect(final float paramInt1, final float paramInt2, final float paramInt3, final float paramInt4, final float radius, final int color, boolean... rounded) {
|
||||||
final float f1 = (color >> 24 & 0xFF) / 255.0f;
|
final float f1 = (color >> 24 & 0xFF) / 255.0f;
|
||||||
|
@ -61,10 +61,10 @@ public class RenderUtils {
|
||||||
final float f3 = (color >> 8 & 0xFF) / 255.0f;
|
final float f3 = (color >> 8 & 0xFF) / 255.0f;
|
||||||
final float f4 = (color & 0xFF) / 255.0f;
|
final float f4 = (color & 0xFF) / 255.0f;
|
||||||
GlStateManager.color(f2, f3, f4, f1);
|
GlStateManager.color(f2, f3, f4, f1);
|
||||||
if(rounded[0]){
|
if (rounded[0]) {
|
||||||
drawRoundedRect(paramInt1, paramInt2, paramInt3, paramInt4, radius);
|
drawRoundedRect(paramInt1, paramInt2, paramInt3, paramInt4, radius);
|
||||||
}else {
|
} else {
|
||||||
Gui.drawRect((int)paramInt1, (int)paramInt2, (int)paramInt3, (int)paramInt4, color);
|
Gui.drawRect((int) paramInt1, (int) paramInt2, (int) paramInt3, (int) paramInt4, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public class RenderUtils {
|
||||||
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||||
GlStateManager.shadeModel(7425);
|
GlStateManager.shadeModel(7425);
|
||||||
worldrenderer.begin(5, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(5, DefaultVertexFormats.POSITION_TEX);
|
||||||
|
|
||||||
worldrenderer.pos(paramFloat1 + paramFloat5, paramFloat2, 0).endVertex();
|
worldrenderer.pos(paramFloat1 + paramFloat5, paramFloat2, 0).endVertex();
|
||||||
worldrenderer.pos(paramFloat1 + paramFloat5, paramFloat4, 0).endVertex();
|
worldrenderer.pos(paramFloat1 + paramFloat5, paramFloat4, 0).endVertex();
|
||||||
worldrenderer.pos(paramFloat3 - paramFloat5, paramFloat2, 0).endVertex();
|
worldrenderer.pos(paramFloat3 - paramFloat5, paramFloat2, 0).endVertex();
|
||||||
|
@ -107,7 +107,7 @@ public class RenderUtils {
|
||||||
worldrenderer.pos(f2, f3, 0).endVertex();
|
worldrenderer.pos(f2, f3, 0).endVertex();
|
||||||
for (int j = 0; j <= i; ++j) {
|
for (int j = 0; j <= i; ++j) {
|
||||||
final float f4 = j * f1;
|
final float f4 = j * f1;
|
||||||
worldrenderer.pos((float)(f2 + paramFloat5 * Math.cos(Math.toRadians(f4))), (float)(f3 - paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
worldrenderer.pos((float) (f2 + paramFloat5 * Math.cos(Math.toRadians(f4))), (float) (f3 - paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
||||||
}
|
}
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
worldrenderer.begin(6, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(6, DefaultVertexFormats.POSITION_TEX);
|
||||||
|
@ -116,7 +116,7 @@ public class RenderUtils {
|
||||||
worldrenderer.pos(f2, f3, 0).endVertex();
|
worldrenderer.pos(f2, f3, 0).endVertex();
|
||||||
for (int j = 0; j <= i; ++j) {
|
for (int j = 0; j <= i; ++j) {
|
||||||
final float f4 = j * f1;
|
final float f4 = j * f1;
|
||||||
worldrenderer.pos((float)(f2 - paramFloat5 * Math.cos(Math.toRadians(f4))), (float)(f3 - paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
worldrenderer.pos((float) (f2 - paramFloat5 * Math.cos(Math.toRadians(f4))), (float) (f3 - paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
||||||
}
|
}
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
worldrenderer.begin(6, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(6, DefaultVertexFormats.POSITION_TEX);
|
||||||
|
@ -125,7 +125,7 @@ public class RenderUtils {
|
||||||
worldrenderer.pos(f2, f3, 0).endVertex();
|
worldrenderer.pos(f2, f3, 0).endVertex();
|
||||||
for (int j = 0; j <= i; ++j) {
|
for (int j = 0; j <= i; ++j) {
|
||||||
final float f4 = j * f1;
|
final float f4 = j * f1;
|
||||||
worldrenderer.pos((float)(f2 - paramFloat5 * Math.cos(Math.toRadians(f4))), (float)(f3 + paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
worldrenderer.pos((float) (f2 - paramFloat5 * Math.cos(Math.toRadians(f4))), (float) (f3 + paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
||||||
}
|
}
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
worldrenderer.begin(6, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(6, DefaultVertexFormats.POSITION_TEX);
|
||||||
|
@ -134,7 +134,7 @@ public class RenderUtils {
|
||||||
worldrenderer.pos(f2, f3, 0).endVertex();
|
worldrenderer.pos(f2, f3, 0).endVertex();
|
||||||
for (int j = 0; j <= i; ++j) {
|
for (int j = 0; j <= i; ++j) {
|
||||||
final float f4 = j * f1;
|
final float f4 = j * f1;
|
||||||
worldrenderer.pos((float)(f2 + paramFloat5 * Math.cos(Math.toRadians(f4))), (float)(f3 + paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
worldrenderer.pos((float) (f2 + paramFloat5 * Math.cos(Math.toRadians(f4))), (float) (f3 + paramFloat5 * Math.sin(Math.toRadians(f4))), 0).endVertex();
|
||||||
}
|
}
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GlStateManager.shadeModel(7424);
|
GlStateManager.shadeModel(7424);
|
||||||
|
@ -172,7 +172,7 @@ public class RenderUtils {
|
||||||
Gui.drawRect(width1 - 1, param2, width1, height1, color);
|
Gui.drawRect(width1 - 1, param2, width1, height1, color);
|
||||||
Gui.drawRect(param1, height1 - 1, width1, height1, color);
|
Gui.drawRect(param1, height1 - 1, width1, height1, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getRainbow(float seconds, float saturation, float brightness) {
|
public static int getRainbow(float seconds, float saturation, float brightness) {
|
||||||
float hue = (System.currentTimeMillis()) % (int) (seconds * 1000) / (seconds * 1000);
|
float hue = (System.currentTimeMillis()) % (int) (seconds * 1000) / (seconds * 1000);
|
||||||
int color = Color.HSBtoRGB(hue, saturation, brightness);
|
int color = Color.HSBtoRGB(hue, saturation, brightness);
|
||||||
|
@ -184,5 +184,4 @@ public class RenderUtils {
|
||||||
rainbowState %= 360;
|
rainbowState %= 360;
|
||||||
return Color.HSBtoRGB((float) (rainbowState / 360.0f), 0.8f, 0.7f);
|
return Color.HSBtoRGB((float) (rainbowState / 360.0f), 0.8f, 0.7f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,9 +52,7 @@ public class EaglercraftRandom {
|
||||||
public int nextInt(int bound) {
|
public int nextInt(int bound) {
|
||||||
int r = next(31);
|
int r = next(31);
|
||||||
int m = bound - 1;
|
int m = bound - 1;
|
||||||
if (
|
if ((bound & m) == 0) r = (int) ((bound * (long) r) >> 31); else { // i.e., bound is a power of 2
|
||||||
(bound & m) == 0
|
|
||||||
) r = (int) ((bound * (long) r) >> 31); else { // i.e., bound is a power of 2
|
|
||||||
for (int u = r; u - (r = u % bound) + m < 0; u = next(31));
|
for (int u = r; u - (r = u % bound) + m < 0; u = next(31));
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
|
|
@ -1,40 +1,35 @@
|
||||||
package net.lax1dude.eaglercraft.v1_8;
|
package net.lax1dude.eaglercraft.v1_8;
|
||||||
|
|
||||||
public class EaglercraftVersion {
|
public class EaglercraftVersion {
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/// Customize these to fit your fork:
|
|
||||||
|
|
||||||
public static final String projectForkName = "Resent";
|
|
||||||
public static final String projectForkVersion = "3.3.2";
|
|
||||||
public static final String projectForkVendor = "Nitwit";
|
|
||||||
|
|
||||||
public static final String projectForkURL = "https://github.com/ThisIsALegitUsername/Resent-web";
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Do not change these, they must stay as credit to lax1dude's
|
|
||||||
// original repository for maintaining the project:
|
|
||||||
|
|
||||||
public static final String projectOriginName = "EaglercraftX";
|
//////////////////////////////////////////////////////////////////////
|
||||||
public static final String projectOriginAuthor = "lax1dude";
|
|
||||||
public static final String projectOriginRevision = "1.8";
|
|
||||||
public static final String projectOriginVersion = "u16";
|
|
||||||
|
|
||||||
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
|
||||||
|
|
||||||
|
|
||||||
// Miscellaneous variables:
|
|
||||||
|
|
||||||
public static final String mainMenuStringA = "Minecraft 1.8.8";
|
/// Customize these to fit your fork:
|
||||||
public static final String mainMenuStringB = projectOriginName + " " +
|
|
||||||
projectOriginRevision + "-" + projectOriginVersion;
|
public static final String projectForkName = "Resent";
|
||||||
public static final String mainMenuStringC = "Rewritten by " + projectOriginAuthor;
|
public static final String projectForkVersion = "3.3.2";
|
||||||
public static final String mainMenuStringD = "Resources Copyright Mojang AB";
|
public static final String projectForkVendor = "Nitwit";
|
||||||
|
|
||||||
|
public static final String projectForkURL = "https://github.com/ThisIsALegitUsername/Resent-web";
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Do not change these, they must stay as credit to lax1dude's
|
||||||
|
// original repository for maintaining the project:
|
||||||
|
|
||||||
|
public static final String projectOriginName = "EaglercraftX";
|
||||||
|
public static final String projectOriginAuthor = "lax1dude";
|
||||||
|
public static final String projectOriginRevision = "1.8";
|
||||||
|
public static final String projectOriginVersion = "u16";
|
||||||
|
|
||||||
|
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
||||||
|
|
||||||
|
// Miscellaneous variables:
|
||||||
|
|
||||||
|
public static final String mainMenuStringA = "Minecraft 1.8.8";
|
||||||
|
public static final String mainMenuStringB = projectOriginName + " " + projectOriginRevision + "-" + projectOriginVersion;
|
||||||
|
public static final String mainMenuStringC = "Rewritten by " + projectOriginAuthor;
|
||||||
|
public static final String mainMenuStringD = "Resources Copyright Mojang AB";
|
||||||
|
|
||||||
public static final String mainMenuStringE = projectForkName + " " + projectForkVersion;
|
public static final String mainMenuStringE = projectForkName + " " + projectForkVersion;
|
||||||
public static final String mainMenuStringF = "Made by " + projectForkVendor;
|
public static final String mainMenuStringF = "Made by " + projectForkVendor;
|
||||||
|
|
|
@ -13,219 +13,209 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
* Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES
|
* WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES
|
||||||
* NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED
|
* NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED
|
||||||
* TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE
|
* TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE
|
||||||
* SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR.
|
* SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR.
|
||||||
*
|
*
|
||||||
* NOT FOR COMMERCIAL OR MALICIOUS USE
|
* NOT FOR COMMERCIAL OR MALICIOUS USE
|
||||||
*
|
*
|
||||||
* (please read the 'LICENSE' file this repo's root directory for more info)
|
* (please read the 'LICENSE' file this repo's root directory for more info)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class EaglerFontRenderer extends FontRenderer {
|
public class EaglerFontRenderer extends FontRenderer {
|
||||||
|
|
||||||
private final int[] temporaryCodepointArray = new int[6553];
|
private final int[] temporaryCodepointArray = new int[6553];
|
||||||
|
|
||||||
public EaglerFontRenderer(GameSettings gameSettingsIn, ResourceLocation location, TextureManager textureManagerIn,
|
public EaglerFontRenderer(GameSettings gameSettingsIn, ResourceLocation location, TextureManager textureManagerIn, boolean unicode) {
|
||||||
boolean unicode) {
|
super(gameSettingsIn, location, textureManagerIn, unicode);
|
||||||
super(gameSettingsIn, location, textureManagerIn, unicode);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public int drawString(String text, float x, float y, int color, boolean dropShadow) {
|
public int drawString(String text, float x, float y, int color, boolean dropShadow) {
|
||||||
if (text == null || text.length() == 0) {
|
if (text == null || text.length() == 0) {
|
||||||
this.posX = x + (dropShadow ? 1 : 0);
|
this.posX = x + (dropShadow ? 1 : 0);
|
||||||
this.posY = y;
|
this.posY = y;
|
||||||
} else {
|
} else {
|
||||||
if(this.unicodeFlag || !decodeASCIICodepointsAndValidate(text)) {
|
if (this.unicodeFlag || !decodeASCIICodepointsAndValidate(text)) {
|
||||||
return super.drawString(text, x, y, color, dropShadow);
|
return super.drawString(text, x, y, color, dropShadow);
|
||||||
}
|
}
|
||||||
this.resetStyles();
|
this.resetStyles();
|
||||||
if ((color & 0xFC000000) == 0) {
|
if ((color & 0xFC000000) == 0) {
|
||||||
color |= 0xFF000000;
|
color |= 0xFF000000;
|
||||||
}
|
}
|
||||||
this.red = (float) (color >> 16 & 255) / 255.0F;
|
this.red = (float) (color >> 16 & 255) / 255.0F;
|
||||||
this.blue = (float) (color >> 8 & 255) / 255.0F;
|
this.blue = (float) (color >> 8 & 255) / 255.0F;
|
||||||
this.green = (float) (color & 255) / 255.0F;
|
this.green = (float) (color & 255) / 255.0F;
|
||||||
this.alpha = (float) (color >> 24 & 255) / 255.0F;
|
this.alpha = (float) (color >> 24 & 255) / 255.0F;
|
||||||
this.posX = x;
|
this.posX = x;
|
||||||
this.posY = y;
|
this.posY = y;
|
||||||
this.textColor = color;
|
this.textColor = color;
|
||||||
this.renderStringAtPos0(text, dropShadow);
|
this.renderStringAtPos0(text, dropShadow);
|
||||||
}
|
}
|
||||||
return (int) this.posX;
|
return (int) this.posX;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderStringAtPos(String parString1, boolean parFlag) {
|
protected void renderStringAtPos(String parString1, boolean parFlag) {
|
||||||
if(parString1 == null) return;
|
if (parString1 == null) return;
|
||||||
if(this.unicodeFlag || !decodeASCIICodepointsAndValidate(parString1)) {
|
if (this.unicodeFlag || !decodeASCIICodepointsAndValidate(parString1)) {
|
||||||
super.renderStringAtPos(parString1, parFlag);
|
super.renderStringAtPos(parString1, parFlag);
|
||||||
}else {
|
} else {
|
||||||
renderStringAtPos0(parString1, false);
|
renderStringAtPos0(parString1, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderStringAtPos0(String parString1, boolean parFlag) {
|
private void renderStringAtPos0(String parString1, boolean parFlag) {
|
||||||
renderEngine.bindTexture(locationFontTexture);
|
renderEngine.bindTexture(locationFontTexture);
|
||||||
InstancedFontRenderer.begin();
|
InstancedFontRenderer.begin();
|
||||||
|
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
|
||||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
|
||||||
|
|
||||||
boolean hasStrike = false;
|
|
||||||
|
|
||||||
for (int i = 0; i < parString1.length(); ++i) {
|
|
||||||
char c0 = parString1.charAt(i);
|
|
||||||
if (c0 == 167 && i + 1 < parString1.length()) {
|
|
||||||
int i1 = "0123456789abcdefklmnor".indexOf(Character.toLowerCase(parString1.charAt(i + 1)));
|
|
||||||
if (i1 < 16) {
|
|
||||||
this.randomStyle = false;
|
|
||||||
this.boldStyle = false;
|
|
||||||
this.strikethroughStyle = false;
|
|
||||||
this.underlineStyle = false;
|
|
||||||
this.italicStyle = false;
|
|
||||||
if (i1 < 0 || i1 > 15) {
|
|
||||||
i1 = 15;
|
|
||||||
}
|
|
||||||
int j1 = this.colorCode[i1];
|
|
||||||
this.textColor = j1 | (this.textColor & 0xFF000000);
|
|
||||||
} else if (i1 == 16) {
|
|
||||||
this.randomStyle = true;
|
|
||||||
} else if (i1 == 17) {
|
|
||||||
this.boldStyle = true;
|
|
||||||
} else if (i1 == 18) {
|
|
||||||
this.strikethroughStyle = true;
|
|
||||||
} else if (i1 == 19) {
|
|
||||||
this.underlineStyle = true;
|
|
||||||
} else if (i1 == 20) {
|
|
||||||
this.italicStyle = true;
|
|
||||||
} else if (i1 == 21) {
|
|
||||||
this.randomStyle = false;
|
|
||||||
this.boldStyle = false;
|
|
||||||
this.strikethroughStyle = false;
|
|
||||||
this.underlineStyle = false;
|
|
||||||
this.italicStyle = false;
|
|
||||||
this.textColor = ((int) (this.alpha * 255.0f) << 24) | ((int) (this.red * 255.0f) << 16)
|
|
||||||
| ((int) (this.green * 255.0f) << 8) | (int) (this.blue * 255.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
++i;
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
} else {
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
int j = temporaryCodepointArray[i];
|
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||||
|
|
||||||
if (this.randomStyle && j != -1) {
|
|
||||||
int k = this.getCharWidth(c0);
|
|
||||||
String chars = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000";
|
|
||||||
|
|
||||||
char c1;
|
boolean hasStrike = false;
|
||||||
while (true) {
|
|
||||||
j = this.fontRandom.nextInt(chars.length());
|
|
||||||
c1 = chars.charAt(j);
|
|
||||||
if (k == this.getCharWidth(c1)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
c0 = c1;
|
for (int i = 0; i < parString1.length(); ++i) {
|
||||||
}
|
char c0 = parString1.charAt(i);
|
||||||
|
if (c0 == 167 && i + 1 < parString1.length()) {
|
||||||
|
int i1 = "0123456789abcdefklmnor".indexOf(Character.toLowerCase(parString1.charAt(i + 1)));
|
||||||
|
if (i1 < 16) {
|
||||||
|
this.randomStyle = false;
|
||||||
|
this.boldStyle = false;
|
||||||
|
this.strikethroughStyle = false;
|
||||||
|
this.underlineStyle = false;
|
||||||
|
this.italicStyle = false;
|
||||||
|
if (i1 < 0 || i1 > 15) {
|
||||||
|
i1 = 15;
|
||||||
|
}
|
||||||
|
int j1 = this.colorCode[i1];
|
||||||
|
this.textColor = j1 | (this.textColor & 0xFF000000);
|
||||||
|
} else if (i1 == 16) {
|
||||||
|
this.randomStyle = true;
|
||||||
|
} else if (i1 == 17) {
|
||||||
|
this.boldStyle = true;
|
||||||
|
} else if (i1 == 18) {
|
||||||
|
this.strikethroughStyle = true;
|
||||||
|
} else if (i1 == 19) {
|
||||||
|
this.underlineStyle = true;
|
||||||
|
} else if (i1 == 20) {
|
||||||
|
this.italicStyle = true;
|
||||||
|
} else if (i1 == 21) {
|
||||||
|
this.randomStyle = false;
|
||||||
|
this.boldStyle = false;
|
||||||
|
this.strikethroughStyle = false;
|
||||||
|
this.underlineStyle = false;
|
||||||
|
this.italicStyle = false;
|
||||||
|
this.textColor = ((int) (this.alpha * 255.0f) << 24) | ((int) (this.red * 255.0f) << 16) | ((int) (this.green * 255.0f) << 8) | (int) (this.blue * 255.0f);
|
||||||
|
}
|
||||||
|
|
||||||
float f = this.appendCharToBuffer(j, this.textColor, this.boldStyle, this.italicStyle);
|
++i;
|
||||||
|
} else {
|
||||||
|
int j = temporaryCodepointArray[i];
|
||||||
|
|
||||||
if (this.strikethroughStyle) {
|
if (this.randomStyle && j != -1) {
|
||||||
hasStrike = true;
|
int k = this.getCharWidth(c0);
|
||||||
worldrenderer.pos((double) this.posX, (double) (this.posY + (float) (this.FONT_HEIGHT / 2)), 0.0D)
|
String chars =
|
||||||
.endVertex();
|
"\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000";
|
||||||
worldrenderer
|
|
||||||
.pos((double) (this.posX + f), (double) (this.posY + (float) (this.FONT_HEIGHT / 2)), 0.0D)
|
|
||||||
.endVertex();
|
|
||||||
worldrenderer.pos((double) (this.posX + f),
|
|
||||||
(double) (this.posY + (float) (this.FONT_HEIGHT / 2) - 1.0F), 0.0D).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) this.posX, (double) (this.posY + (float) (this.FONT_HEIGHT / 2) - 1.0F), 0.0D)
|
|
||||||
.endVertex();
|
|
||||||
worldrenderer.putColor4(this.textColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.underlineStyle) {
|
char c1;
|
||||||
hasStrike = true;
|
while (true) {
|
||||||
int l = this.underlineStyle ? -1 : 0;
|
j = this.fontRandom.nextInt(chars.length());
|
||||||
worldrenderer.pos((double) (this.posX + (float) l),
|
c1 = chars.charAt(j);
|
||||||
(double) (this.posY + (float) this.FONT_HEIGHT), 0.0D).endVertex();
|
if (k == this.getCharWidth(c1)) {
|
||||||
worldrenderer.pos((double) (this.posX + f), (double) (this.posY + (float) this.FONT_HEIGHT), 0.0D)
|
break;
|
||||||
.endVertex();
|
}
|
||||||
worldrenderer
|
}
|
||||||
.pos((double) (this.posX + f), (double) (this.posY + (float) this.FONT_HEIGHT - 1.0F), 0.0D)
|
|
||||||
.endVertex();
|
|
||||||
worldrenderer.pos((double) (this.posX + (float) l),
|
|
||||||
(double) (this.posY + (float) this.FONT_HEIGHT - 1.0F), 0.0D).endVertex();
|
|
||||||
worldrenderer.putColor4(this.textColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.posX += (float) ((int) f);
|
c0 = c1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
float texScale = 0.0625f;
|
|
||||||
|
|
||||||
if(!hasStrike) {
|
|
||||||
worldrenderer.finishDrawing();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(parFlag) {
|
|
||||||
if(hasStrike) {
|
|
||||||
GlStateManager.color(0.25f, 0.25f, 0.25f, 1.0f);
|
|
||||||
GlStateManager.translate(1.0f, 1.0f, 0.0f);
|
|
||||||
tessellator.draw();
|
|
||||||
GlStateManager.translate(-1.0f, -1.0f, 0.0f);
|
|
||||||
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
|
||||||
InstancedFontRenderer.render(8, 8, texScale, texScale, true);
|
|
||||||
EaglercraftGPU.renderAgain();
|
|
||||||
}else {
|
|
||||||
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
|
||||||
InstancedFontRenderer.render(8, 8, texScale, texScale, true);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
|
||||||
if(hasStrike) {
|
|
||||||
tessellator.draw();
|
|
||||||
}
|
|
||||||
InstancedFontRenderer.render(8, 8, texScale, texScale, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(parFlag) {
|
|
||||||
this.posX += 1.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private float appendCharToBuffer(int parInt1, int color, boolean boldStyle, boolean italicStyle) {
|
float f = this.appendCharToBuffer(j, this.textColor, this.boldStyle, this.italicStyle);
|
||||||
if (parInt1 == 32) {
|
|
||||||
return 4.0f;
|
|
||||||
}else {
|
|
||||||
int i = parInt1 % 16;
|
|
||||||
int j = parInt1 / 16;
|
|
||||||
float w = this.charWidth[parInt1];
|
|
||||||
if(boldStyle) {
|
|
||||||
InstancedFontRenderer.appendBoldQuad((int)this.posX, (int)this.posY, i, j, color, italicStyle);
|
|
||||||
++w;
|
|
||||||
}else {
|
|
||||||
InstancedFontRenderer.appendQuad((int)this.posX, (int)this.posY, i, j, color, italicStyle);
|
|
||||||
}
|
|
||||||
return w;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean decodeASCIICodepointsAndValidate(String str) {
|
if (this.strikethroughStyle) {
|
||||||
for(int i = 0, l = str.length(); i < l; ++i) {
|
hasStrike = true;
|
||||||
int j = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000\u00a7"
|
worldrenderer.pos((double) this.posX, (double) (this.posY + (float) (this.FONT_HEIGHT / 2)), 0.0D).endVertex();
|
||||||
.indexOf(str.charAt(i));
|
worldrenderer.pos((double) (this.posX + f), (double) (this.posY + (float) (this.FONT_HEIGHT / 2)), 0.0D).endVertex();
|
||||||
if(j != -1) {
|
worldrenderer.pos((double) (this.posX + f), (double) (this.posY + (float) (this.FONT_HEIGHT / 2) - 1.0F), 0.0D).endVertex();
|
||||||
temporaryCodepointArray[i] = j;
|
worldrenderer.pos((double) this.posX, (double) (this.posY + (float) (this.FONT_HEIGHT / 2) - 1.0F), 0.0D).endVertex();
|
||||||
}else {
|
worldrenderer.putColor4(this.textColor);
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
}
|
if (this.underlineStyle) {
|
||||||
return true;
|
hasStrike = true;
|
||||||
}
|
int l = this.underlineStyle ? -1 : 0;
|
||||||
|
worldrenderer.pos((double) (this.posX + (float) l), (double) (this.posY + (float) this.FONT_HEIGHT), 0.0D).endVertex();
|
||||||
|
worldrenderer.pos((double) (this.posX + f), (double) (this.posY + (float) this.FONT_HEIGHT), 0.0D).endVertex();
|
||||||
|
worldrenderer.pos((double) (this.posX + f), (double) (this.posY + (float) this.FONT_HEIGHT - 1.0F), 0.0D).endVertex();
|
||||||
|
worldrenderer.pos((double) (this.posX + (float) l), (double) (this.posY + (float) this.FONT_HEIGHT - 1.0F), 0.0D).endVertex();
|
||||||
|
worldrenderer.putColor4(this.textColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.posX += (float) ((int) f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float texScale = 0.0625f;
|
||||||
|
|
||||||
|
if (!hasStrike) {
|
||||||
|
worldrenderer.finishDrawing();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parFlag) {
|
||||||
|
if (hasStrike) {
|
||||||
|
GlStateManager.color(0.25f, 0.25f, 0.25f, 1.0f);
|
||||||
|
GlStateManager.translate(1.0f, 1.0f, 0.0f);
|
||||||
|
tessellator.draw();
|
||||||
|
GlStateManager.translate(-1.0f, -1.0f, 0.0f);
|
||||||
|
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
InstancedFontRenderer.render(8, 8, texScale, texScale, true);
|
||||||
|
EaglercraftGPU.renderAgain();
|
||||||
|
} else {
|
||||||
|
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
InstancedFontRenderer.render(8, 8, texScale, texScale, true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
if (hasStrike) {
|
||||||
|
tessellator.draw();
|
||||||
|
}
|
||||||
|
InstancedFontRenderer.render(8, 8, texScale, texScale, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parFlag) {
|
||||||
|
this.posX += 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private float appendCharToBuffer(int parInt1, int color, boolean boldStyle, boolean italicStyle) {
|
||||||
|
if (parInt1 == 32) {
|
||||||
|
return 4.0f;
|
||||||
|
} else {
|
||||||
|
int i = parInt1 % 16;
|
||||||
|
int j = parInt1 / 16;
|
||||||
|
float w = this.charWidth[parInt1];
|
||||||
|
if (boldStyle) {
|
||||||
|
InstancedFontRenderer.appendBoldQuad((int) this.posX, (int) this.posY, i, j, color, italicStyle);
|
||||||
|
++w;
|
||||||
|
} else {
|
||||||
|
InstancedFontRenderer.appendQuad((int) this.posX, (int) this.posY, i, j, color, italicStyle);
|
||||||
|
}
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean decodeASCIICodepointsAndValidate(String str) {
|
||||||
|
for (int i = 0, l = str.length(); i < l; ++i) {
|
||||||
|
int j =
|
||||||
|
"\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000\u00a7".indexOf(
|
||||||
|
str.charAt(i)
|
||||||
|
);
|
||||||
|
if (j != -1) {
|
||||||
|
temporaryCodepointArray[i] = j;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -574,11 +574,9 @@ public final class ByteBufUtil {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
(b1 & 0xFF) >
|
(b1 & 0xFF) > 0xF4 || // b1 invalid
|
||||||
0xF4 || // b1 invalid
|
|
||||||
(b1 & 0xFF) == 0xF0 &&
|
(b1 & 0xFF) == 0xF0 &&
|
||||||
(b2 & 0xFF) <
|
(b2 & 0xFF) < 0x90 || // b2 out of lower bound
|
||||||
0x90 || // b2 out of lower bound
|
|
||||||
(b1 & 0xFF) == 0xF4 &&
|
(b1 & 0xFF) == 0xF4 &&
|
||||||
(b2 & 0xFF) > 0x8F
|
(b2 & 0xFF) > 0x8F
|
||||||
) { // b2 out of upper bound
|
) { // b2 out of upper bound
|
||||||
|
|
|
@ -74,8 +74,8 @@ public class EffectPipelineFXAA {
|
||||||
|
|
||||||
shaderProgram = _wglCreateProgram();
|
shaderProgram = _wglCreateProgram();
|
||||||
|
|
||||||
_wglAttachShader(shaderProgram, SpriteLevelMixer.vshLocal);
|
_wglAttachShader(shaderProgram, SpriteLevelMixer.vshLocal);
|
||||||
_wglAttachShader(shaderProgram, frag);
|
_wglAttachShader(shaderProgram, frag);
|
||||||
|
|
||||||
_wglLinkProgram(shaderProgram);
|
_wglLinkProgram(shaderProgram);
|
||||||
|
|
||||||
|
|
|
@ -21,23 +21,23 @@ class FixedFunctionShader {
|
||||||
static final String FILENAME_VSH = "/assets/eagler/glsl/core.vsh";
|
static final String FILENAME_VSH = "/assets/eagler/glsl/core.vsh";
|
||||||
static final String FILENAME_FSH = "/assets/eagler/glsl/core.fsh";
|
static final String FILENAME_FSH = "/assets/eagler/glsl/core.fsh";
|
||||||
|
|
||||||
static final String PRECISION_INT = "lowp";
|
static final String PRECISION_INT = "lowp";
|
||||||
static final String PRECISION_FLOAT = "mediump";
|
static final String PRECISION_FLOAT = "mediump";
|
||||||
static final String PRECISION_SAMPLER = "lowp";
|
static final String PRECISION_SAMPLER = "lowp";
|
||||||
|
|
||||||
static final String MACRO_ATTRIB_TEXTURE = "COMPILE_TEXTURE_ATTRIB";
|
static final String MACRO_ATTRIB_TEXTURE = "COMPILE_TEXTURE_ATTRIB";
|
||||||
static final String MACRO_ATTRIB_COLOR = "COMPILE_COLOR_ATTRIB";
|
static final String MACRO_ATTRIB_COLOR = "COMPILE_COLOR_ATTRIB";
|
||||||
static final String MACRO_ATTRIB_NORMAL = "COMPILE_NORMAL_ATTRIB";
|
static final String MACRO_ATTRIB_NORMAL = "COMPILE_NORMAL_ATTRIB";
|
||||||
static final String MACRO_ATTRIB_LIGHTMAP = "COMPILE_LIGHTMAP_ATTRIB";
|
static final String MACRO_ATTRIB_LIGHTMAP = "COMPILE_LIGHTMAP_ATTRIB";
|
||||||
|
|
||||||
static final String MACRO_ENABLE_TEXTURE2D = "COMPILE_ENABLE_TEXTURE2D";
|
static final String MACRO_ENABLE_TEXTURE2D = "COMPILE_ENABLE_TEXTURE2D";
|
||||||
static final String MACRO_ENABLE_LIGHTMAP = "COMPILE_ENABLE_LIGHTMAP";
|
static final String MACRO_ENABLE_LIGHTMAP = "COMPILE_ENABLE_LIGHTMAP";
|
||||||
static final String MACRO_ENABLE_ALPHA_TEST = "COMPILE_ENABLE_ALPHA_TEST";
|
static final String MACRO_ENABLE_ALPHA_TEST = "COMPILE_ENABLE_ALPHA_TEST";
|
||||||
static final String MACRO_ENABLE_MC_LIGHTING = "COMPILE_ENABLE_MC_LIGHTING";
|
static final String MACRO_ENABLE_MC_LIGHTING = "COMPILE_ENABLE_MC_LIGHTING";
|
||||||
static final String MACRO_ENABLE_END_PORTAL = "COMPILE_ENABLE_TEX_GEN";
|
static final String MACRO_ENABLE_END_PORTAL = "COMPILE_ENABLE_TEX_GEN";
|
||||||
static final String MACRO_ENABLE_ANISOTROPIC_FIX = "COMPILE_ENABLE_ANISOTROPIC_FIX";
|
static final String MACRO_ENABLE_ANISOTROPIC_FIX = "COMPILE_ENABLE_ANISOTROPIC_FIX";
|
||||||
static final String MACRO_ENABLE_FOG = "COMPILE_ENABLE_FOG";
|
static final String MACRO_ENABLE_FOG = "COMPILE_ENABLE_FOG";
|
||||||
static final String MACRO_ENABLE_BLEND_ADD = "COMPILE_BLEND_ADD";
|
static final String MACRO_ENABLE_BLEND_ADD = "COMPILE_BLEND_ADD";
|
||||||
|
|
||||||
static final String ATTRIB_POSITION = "a_position3f";
|
static final String ATTRIB_POSITION = "a_position3f";
|
||||||
static final String ATTRIB_TEXTURE = "a_texture2f";
|
static final String ATTRIB_TEXTURE = "a_texture2f";
|
||||||
|
|
|
@ -1,95 +1,94 @@
|
||||||
package net.lax1dude.eaglercraft.v1_8.opengl;
|
package net.lax1dude.eaglercraft.v1_8.opengl;
|
||||||
|
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
|
import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL;
|
import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
|
import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
|
||||||
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2023 LAX1DUDE. All Rights Reserved.
|
* Copyright (c) 2023 LAX1DUDE. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES
|
* WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES
|
||||||
* NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED
|
* NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED
|
||||||
* TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE
|
* TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE
|
||||||
* SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR.
|
* SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR.
|
||||||
*
|
*
|
||||||
* NOT FOR COMMERCIAL OR MALICIOUS USE
|
* NOT FOR COMMERCIAL OR MALICIOUS USE
|
||||||
*
|
*
|
||||||
* (please read the 'LICENSE' file this repo's root directory for more info)
|
* (please read the 'LICENSE' file this repo's root directory for more info)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GameOverlayFramebuffer {
|
public class GameOverlayFramebuffer {
|
||||||
|
|
||||||
private static final int _GL_FRAMEBUFFER = 0x8D40;
|
private static final int _GL_FRAMEBUFFER = 0x8D40;
|
||||||
private static final int _GL_RENDERBUFFER = 0x8D41;
|
private static final int _GL_RENDERBUFFER = 0x8D41;
|
||||||
private static final int _GL_COLOR_ATTACHMENT0 = 0x8CE0;
|
private static final int _GL_COLOR_ATTACHMENT0 = 0x8CE0;
|
||||||
private static final int _GL_DEPTH_ATTACHMENT = 0x8D00;
|
private static final int _GL_DEPTH_ATTACHMENT = 0x8D00;
|
||||||
private static final int _GL_DEPTH_COMPONENT16 = 0x81A5;
|
private static final int _GL_DEPTH_COMPONENT16 = 0x81A5;
|
||||||
|
|
||||||
private long age = -1l;
|
private long age = -1l;
|
||||||
|
|
||||||
private int currentWidth = -1;
|
private int currentWidth = -1;
|
||||||
private int currentHeight = -1;
|
private int currentHeight = -1;
|
||||||
|
|
||||||
private IFramebufferGL framebuffer = null;
|
private IFramebufferGL framebuffer = null;
|
||||||
private IRenderbufferGL depthBuffer = null;
|
private IRenderbufferGL depthBuffer = null;
|
||||||
|
|
||||||
private int framebufferColor = -1;
|
private int framebufferColor = -1;
|
||||||
|
|
||||||
public void beginRender(int width, int height) {
|
public void beginRender(int width, int height) {
|
||||||
if(framebuffer == null) {
|
if (framebuffer == null) {
|
||||||
framebuffer = _wglCreateFramebuffer();
|
framebuffer = _wglCreateFramebuffer();
|
||||||
depthBuffer = _wglCreateRenderbuffer();
|
depthBuffer = _wglCreateRenderbuffer();
|
||||||
framebufferColor = GlStateManager.generateTexture();
|
framebufferColor = GlStateManager.generateTexture();
|
||||||
_wglBindFramebuffer(_GL_FRAMEBUFFER, framebuffer);
|
_wglBindFramebuffer(_GL_FRAMEBUFFER, framebuffer);
|
||||||
GlStateManager.bindTexture(framebufferColor);
|
GlStateManager.bindTexture(framebufferColor);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
_wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(framebufferColor), 0);
|
_wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(framebufferColor), 0);
|
||||||
_wglBindRenderbuffer(_GL_RENDERBUFFER, depthBuffer);
|
_wglBindRenderbuffer(_GL_RENDERBUFFER, depthBuffer);
|
||||||
_wglFramebufferRenderbuffer(_GL_FRAMEBUFFER, _GL_DEPTH_ATTACHMENT, _GL_RENDERBUFFER, depthBuffer);
|
_wglFramebufferRenderbuffer(_GL_FRAMEBUFFER, _GL_DEPTH_ATTACHMENT, _GL_RENDERBUFFER, depthBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(currentWidth != width || currentHeight != height) {
|
if (currentWidth != width || currentHeight != height) {
|
||||||
currentWidth = width;
|
currentWidth = width;
|
||||||
currentHeight = height;
|
currentHeight = height;
|
||||||
GlStateManager.bindTexture(framebufferColor);
|
GlStateManager.bindTexture(framebufferColor);
|
||||||
_wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (ByteBuffer)null);
|
_wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (ByteBuffer) null);
|
||||||
_wglBindRenderbuffer(_GL_RENDERBUFFER, depthBuffer);
|
_wglBindRenderbuffer(_GL_RENDERBUFFER, depthBuffer);
|
||||||
_wglRenderbufferStorage(_GL_RENDERBUFFER, _GL_DEPTH_COMPONENT16, width, height);
|
_wglRenderbufferStorage(_GL_RENDERBUFFER, _GL_DEPTH_COMPONENT16, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
_wglBindFramebuffer(_GL_FRAMEBUFFER, framebuffer);
|
_wglBindFramebuffer(_GL_FRAMEBUFFER, framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void endRender() {
|
public void endRender() {
|
||||||
_wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
_wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
||||||
age = System.currentTimeMillis();
|
age = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getAge() {
|
public long getAge() {
|
||||||
return age == -1l ? -1l : (System.currentTimeMillis() - age);
|
return age == -1l ? -1l : (System.currentTimeMillis() - age);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTexture() {
|
public int getTexture() {
|
||||||
return framebufferColor;
|
return framebufferColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void destroy() {
|
|
||||||
if(framebuffer != null) {
|
|
||||||
_wglDeleteFramebuffer(framebuffer);
|
|
||||||
_wglDeleteRenderbuffer(depthBuffer);
|
|
||||||
GlStateManager.deleteTexture(framebufferColor);
|
|
||||||
framebuffer = null;
|
|
||||||
depthBuffer = null;
|
|
||||||
framebufferColor = -1;
|
|
||||||
age = -1l;
|
|
||||||
_wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public void destroy() {
|
||||||
|
if (framebuffer != null) {
|
||||||
|
_wglDeleteFramebuffer(framebuffer);
|
||||||
|
_wglDeleteRenderbuffer(depthBuffer);
|
||||||
|
GlStateManager.deleteTexture(framebufferColor);
|
||||||
|
framebuffer = null;
|
||||||
|
depthBuffer = null;
|
||||||
|
framebufferColor = -1;
|
||||||
|
age = -1l;
|
||||||
|
_wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -120,8 +120,8 @@ public class InstancedFontRenderer {
|
||||||
|
|
||||||
shaderProgram = _wglCreateProgram();
|
shaderProgram = _wglCreateProgram();
|
||||||
|
|
||||||
_wglAttachShader(shaderProgram, vert);
|
_wglAttachShader(shaderProgram, vert);
|
||||||
_wglAttachShader(shaderProgram, frag);
|
_wglAttachShader(shaderProgram, frag);
|
||||||
|
|
||||||
_wglLinkProgram(shaderProgram);
|
_wglLinkProgram(shaderProgram);
|
||||||
|
|
||||||
|
|
|
@ -122,8 +122,8 @@ public class InstancedParticleRenderer {
|
||||||
|
|
||||||
shaderProgram = _wglCreateProgram();
|
shaderProgram = _wglCreateProgram();
|
||||||
|
|
||||||
_wglAttachShader(shaderProgram, vert);
|
_wglAttachShader(shaderProgram, vert);
|
||||||
_wglAttachShader(shaderProgram, frag);
|
_wglAttachShader(shaderProgram, frag);
|
||||||
|
|
||||||
_wglLinkProgram(shaderProgram);
|
_wglLinkProgram(shaderProgram);
|
||||||
|
|
||||||
|
|
|
@ -111,8 +111,8 @@ public class SpriteLevelMixer {
|
||||||
|
|
||||||
shaderProgram = _wglCreateProgram();
|
shaderProgram = _wglCreateProgram();
|
||||||
|
|
||||||
_wglAttachShader(shaderProgram, vshLocal);
|
_wglAttachShader(shaderProgram, vshLocal);
|
||||||
_wglAttachShader(shaderProgram, frag);
|
_wglAttachShader(shaderProgram, frag);
|
||||||
|
|
||||||
_wglLinkProgram(shaderProgram);
|
_wglLinkProgram(shaderProgram);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
|
import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package net.lax1dude.eaglercraft.v1_8.socket;
|
package net.lax1dude.eaglercraft.v1_8.socket;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.module.impl.misc.CrystalOptimizer;
|
import dev.resent.module.impl.misc.CrystalOptimizer;
|
||||||
|
import java.io.IOException;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState;
|
import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking;
|
import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
|
|
|
@ -10,6 +10,11 @@ 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.Resent;
|
||||||
|
import dev.resent.module.base.ModManager;
|
||||||
|
import dev.resent.ui.PreGUI;
|
||||||
|
import dev.resent.util.misc.W;
|
||||||
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,15 +23,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.Resent;
|
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import dev.resent.ui.PreGUI;
|
|
||||||
import dev.resent.util.misc.W;
|
|
||||||
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.HString;
|
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||||
|
@ -162,6 +158,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.
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class MusicTicker implements ITickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum MusicType {
|
public static enum MusicType {
|
||||||
RES(new ResourceLocation("minecraft:music.res"), 0,0),
|
RES(new ResourceLocation("minecraft:music.res"), 0, 0),
|
||||||
MENU(new ResourceLocation("minecraft:music.menu"), 20, 600),
|
MENU(new ResourceLocation("minecraft:music.menu"), 20, 600),
|
||||||
GAME(new ResourceLocation("minecraft:music.game"), 12000, 24000),
|
GAME(new ResourceLocation("minecraft:music.game"), 12000, 24000),
|
||||||
CREATIVE(new ResourceLocation("minecraft:music.game.creative"), 1200, 3600),
|
CREATIVE(new ResourceLocation("minecraft:music.game.creative"), 1200, 3600),
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
package net.minecraft.client.gui;
|
package net.minecraft.client.gui;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import dev.resent.ui.animation.SimpleAnimation;
|
import dev.resent.ui.animation.SimpleAnimation;
|
||||||
import dev.resent.util.misc.GlUtils;
|
import dev.resent.util.misc.GlUtils;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
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.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
|
@ -21,6 +17,7 @@ import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.util.IChatComponent;
|
import net.minecraft.util.IChatComponent;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -14,9 +14,9 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
this.buttonList.add(new ClientButton(2, this.width / 2 - 50, this.height / 2, 98, 16, "Multiplayer"));
|
this.buttonList.add(new ClientButton(2, this.width / 2 - 50, this.height / 2, 98, 16, "Multiplayer"));
|
||||||
this.buttonList.add(new ClientButton(3, this.width / 2 - 50, this.height / 2 + 17, 98, 16, "Options"));
|
this.buttonList.add(new ClientButton(3, this.width / 2 - 50, this.height / 2 + 17, 98, 16, "Options"));
|
||||||
this.buttonList.add(new ClientButton(4, this.width/2-50, this.height/2+17*2, 98, 16, "Edit profile"));
|
this.buttonList.add(new ClientButton(4, this.width / 2 - 50, this.height / 2 + 17 * 2, 98, 16, "Edit profile"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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();
|
||||||
|
@ -27,22 +27,25 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
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);
|
||||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button){
|
protected void actionPerformed(GuiButton button) {
|
||||||
switch (button.id) {
|
switch (button.id) {
|
||||||
case 2: {
|
case 2:
|
||||||
this.mc.displayGuiScreen(new GuiMultiplayer(this));
|
{
|
||||||
break;
|
this.mc.displayGuiScreen(new GuiMultiplayer(this));
|
||||||
}
|
break;
|
||||||
case 3: {
|
}
|
||||||
this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
|
case 3:
|
||||||
break;
|
{
|
||||||
}
|
this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
|
||||||
case 4: {
|
break;
|
||||||
this.mc.displayGuiScreen(new GuiScreenEditProfile(this));
|
}
|
||||||
break;
|
case 4:
|
||||||
}
|
{
|
||||||
|
this.mc.displayGuiScreen(new GuiScreenEditProfile(this));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.actionPerformed(button);
|
super.actionPerformed(button);
|
||||||
}
|
}
|
||||||
|
@ -51,4 +54,4 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
super.onGuiClosed();
|
super.onGuiClosed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package net.minecraft.client.gui;
|
||||||
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -10,10 +12,6 @@ import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
|
|
||||||
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.HString;
|
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||||
|
@ -45,459 +43,409 @@ import net.minecraft.world.chunk.Chunk;
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||||
*
|
*
|
||||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||||
*
|
*
|
||||||
* EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
* EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES
|
* WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES
|
||||||
* NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED
|
* NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED
|
||||||
* TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE
|
* TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE
|
||||||
* SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR.
|
* SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR.
|
||||||
*
|
*
|
||||||
* NOT FOR COMMERCIAL OR MALICIOUS USE
|
* NOT FOR COMMERCIAL OR MALICIOUS USE
|
||||||
*
|
*
|
||||||
* (please read the 'LICENSE' file this repo's root directory for more info)
|
* (please read the 'LICENSE' file this repo's root directory for more info)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GuiOverlayDebug extends Gui {
|
public class GuiOverlayDebug extends Gui {
|
||||||
private final Minecraft mc;
|
|
||||||
private final FontRenderer fontRenderer;
|
|
||||||
|
|
||||||
public GuiOverlayDebug(Minecraft mc) {
|
private final Minecraft mc;
|
||||||
this.mc = mc;
|
private final FontRenderer fontRenderer;
|
||||||
this.fontRenderer = mc.fontRendererObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void renderDebugInfo(ScaledResolution scaledResolutionIn) {
|
public GuiOverlayDebug(Minecraft mc) {
|
||||||
int ww = scaledResolutionIn.getScaledWidth();
|
this.mc = mc;
|
||||||
int hh = scaledResolutionIn.getScaledHeight();
|
this.fontRenderer = mc.fontRendererObj;
|
||||||
this.mc.mcProfiler.startSection("debug");
|
}
|
||||||
if (this.mc.gameSettings.showDebugInfo) {
|
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
this.renderDebugInfoLeft();
|
|
||||||
this.renderDebugInfoRight(scaledResolutionIn);
|
|
||||||
GlStateManager.popMatrix();
|
|
||||||
if (this.mc.gameSettings.field_181657_aC) {
|
|
||||||
this.func_181554_e();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
int i = 2;
|
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudFps) {
|
public void renderDebugInfo(ScaledResolution scaledResolutionIn) {
|
||||||
drawFPS(2, i);
|
int ww = scaledResolutionIn.getScaledWidth();
|
||||||
i += 9;
|
int hh = scaledResolutionIn.getScaledHeight();
|
||||||
}
|
this.mc.mcProfiler.startSection("debug");
|
||||||
|
if (this.mc.gameSettings.showDebugInfo) {
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
this.renderDebugInfoLeft();
|
||||||
|
this.renderDebugInfoRight(scaledResolutionIn);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
if (this.mc.gameSettings.field_181657_aC) {
|
||||||
|
this.func_181554_e();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int i = 2;
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudCoords) {
|
if (this.mc.gameSettings.hudFps) {
|
||||||
drawXYZ(2, i);
|
drawFPS(2, i);
|
||||||
}
|
i += 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
|
if (this.mc.gameSettings.hudCoords) {
|
||||||
if (this.mc.gameSettings.hudStats) {
|
drawXYZ(2, i);
|
||||||
drawStatsHUD(ww - 2, hh - 2);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudWorld) {
|
if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
|
||||||
drawWorldHUD(2, hh - 2);
|
if (this.mc.gameSettings.hudStats) {
|
||||||
}
|
drawStatsHUD(ww - 2, hh - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
|
if (this.mc.gameSettings.hudWorld) {
|
||||||
if (this.mc.joinWorldTickCounter > 70) {
|
drawWorldHUD(2, hh - 2);
|
||||||
GlStateManager.enableBlend();
|
}
|
||||||
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
}
|
||||||
}
|
|
||||||
int i = this.mc.joinWorldTickCounter - 70;
|
|
||||||
if (i < 0)
|
|
||||||
i = 0;
|
|
||||||
drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
|
|
||||||
if (this.mc.joinWorldTickCounter > 70) {
|
|
||||||
GlStateManager.disableBlend();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.mc.mcProfiler.endSection();
|
if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
|
||||||
}
|
if (this.mc.joinWorldTickCounter > 70) {
|
||||||
|
GlStateManager.enableBlend();
|
||||||
|
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
}
|
||||||
|
int i = this.mc.joinWorldTickCounter - 70;
|
||||||
|
if (i < 0) i = 0;
|
||||||
|
drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
|
||||||
|
if (this.mc.joinWorldTickCounter > 70) {
|
||||||
|
GlStateManager.disableBlend();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void drawFPS(int x, int y) {
|
this.mc.mcProfiler.endSection();
|
||||||
this.fontRenderer.drawStringWithShadow(this.mc.renderGlobal.getDebugInfoShort(), x, y, 0xFFFFFF);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void drawXYZ(int x, int y) {
|
private void drawFPS(int x, int y) {
|
||||||
Entity e = mc.getRenderViewEntity();
|
this.fontRenderer.drawStringWithShadow(this.mc.renderGlobal.getDebugInfoShort(), x, y, 0xFFFFFF);
|
||||||
BlockPos blockpos = new BlockPos(e.posX, e.getEntityBoundingBox().minY, e.posZ);
|
}
|
||||||
this.fontRenderer.drawStringWithShadow(
|
|
||||||
"x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ(), x, y, 0xFFFFFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void drawStatsHUD(int x, int y) {
|
private void drawXYZ(int x, int y) {
|
||||||
int i = 9;
|
Entity e = mc.getRenderViewEntity();
|
||||||
|
BlockPos blockpos = new BlockPos(e.posX, e.getEntityBoundingBox().minY, e.posZ);
|
||||||
|
this.fontRenderer.drawStringWithShadow("x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ(), x, y, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
String line = "Walk: " + EnumChatFormatting.YELLOW + HString.format("%.2f", mc.thePlayer.getAIMoveSpeed())
|
private void drawStatsHUD(int x, int y) {
|
||||||
+ EnumChatFormatting.WHITE + " Flight: "
|
int i = 9;
|
||||||
+ (mc.thePlayer.capabilities.allowFlying
|
|
||||||
? ("" + EnumChatFormatting.YELLOW + mc.thePlayer.capabilities.getFlySpeed())
|
|
||||||
: EnumChatFormatting.RED + "No");
|
|
||||||
int lw = fontRenderer.getStringWidth(line);
|
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
|
||||||
i += 11;
|
|
||||||
|
|
||||||
line = "Food: " + EnumChatFormatting.YELLOW + mc.thePlayer.getFoodStats().getFoodLevel()
|
String line = "Walk: " + EnumChatFormatting.YELLOW + HString.format("%.2f", mc.thePlayer.getAIMoveSpeed()) + EnumChatFormatting.WHITE + " Flight: " + (mc.thePlayer.capabilities.allowFlying ? ("" + EnumChatFormatting.YELLOW + mc.thePlayer.capabilities.getFlySpeed()) : EnumChatFormatting.RED + "No");
|
||||||
+ EnumChatFormatting.WHITE + ", Sat: " + EnumChatFormatting.YELLOW
|
int lw = fontRenderer.getStringWidth(line);
|
||||||
+ HString.format("%.1f", mc.thePlayer.getFoodStats().getSaturationLevel());
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
lw = fontRenderer.getStringWidth(line);
|
i += 11;
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
|
||||||
i += 11;
|
|
||||||
|
|
||||||
line = "Amr: " + EnumChatFormatting.YELLOW + mc.thePlayer.getTotalArmorValue() + EnumChatFormatting.WHITE
|
line = "Food: " + EnumChatFormatting.YELLOW + mc.thePlayer.getFoodStats().getFoodLevel() + EnumChatFormatting.WHITE + ", Sat: " + EnumChatFormatting.YELLOW + HString.format("%.1f", mc.thePlayer.getFoodStats().getSaturationLevel());
|
||||||
+ ", Health: " + EnumChatFormatting.RED + HString.format("%.1f", mc.thePlayer.getHealth());
|
lw = fontRenderer.getStringWidth(line);
|
||||||
lw = fontRenderer.getStringWidth(line);
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
i += 11;
|
||||||
i += 11;
|
|
||||||
|
|
||||||
int xpc = mc.thePlayer.xpBarCap();
|
line = "Amr: " + EnumChatFormatting.YELLOW + mc.thePlayer.getTotalArmorValue() + EnumChatFormatting.WHITE + ", Health: " + EnumChatFormatting.RED + HString.format("%.1f", mc.thePlayer.getHealth());
|
||||||
line = "XP: " + EnumChatFormatting.GREEN + MathHelper.floor_float(mc.thePlayer.experience * xpc)
|
lw = fontRenderer.getStringWidth(line);
|
||||||
+ EnumChatFormatting.WHITE + " / " + EnumChatFormatting.GREEN + xpc;
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
lw = fontRenderer.getStringWidth(line);
|
i += 11;
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
|
||||||
i += 11;
|
|
||||||
|
|
||||||
Iterator<PotionEffect> potions = mc.thePlayer.getActivePotionEffects().iterator();
|
int xpc = mc.thePlayer.xpBarCap();
|
||||||
if (potions.hasNext()) {
|
line = "XP: " + EnumChatFormatting.GREEN + MathHelper.floor_float(mc.thePlayer.experience * xpc) + EnumChatFormatting.WHITE + " / " + EnumChatFormatting.GREEN + xpc;
|
||||||
while (potions.hasNext()) {
|
lw = fontRenderer.getStringWidth(line);
|
||||||
i += 11;
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
PotionEffect e = potions.next();
|
i += 11;
|
||||||
int t = e.getDuration() / 20;
|
|
||||||
int m = t / 60;
|
|
||||||
int s = t % 60;
|
|
||||||
int j = e.getAmplifier();
|
|
||||||
if (j > 0) {
|
|
||||||
line = I18n.format(e.getEffectName())
|
|
||||||
+ (j > 0 ? (" " + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD
|
|
||||||
+ I18n.format("potion.potency." + j) + EnumChatFormatting.RESET) : "")
|
|
||||||
+ " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s)
|
|
||||||
+ EnumChatFormatting.RESET + "]";
|
|
||||||
} else {
|
|
||||||
line = I18n.format(e.getEffectName()) + " [" + EnumChatFormatting.YELLOW
|
|
||||||
+ HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
|
|
||||||
}
|
|
||||||
lw = fontRenderer.getStringWidth(line);
|
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
Iterator<PotionEffect> potions = mc.thePlayer.getActivePotionEffects().iterator();
|
||||||
|
if (potions.hasNext()) {
|
||||||
|
while (potions.hasNext()) {
|
||||||
|
i += 11;
|
||||||
|
PotionEffect e = potions.next();
|
||||||
|
int t = e.getDuration() / 20;
|
||||||
|
int m = t / 60;
|
||||||
|
int s = t % 60;
|
||||||
|
int j = e.getAmplifier();
|
||||||
|
if (j > 0) {
|
||||||
|
line = I18n.format(e.getEffectName()) + (j > 0 ? (" " + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD + I18n.format("potion.potency." + j) + EnumChatFormatting.RESET) : "") + " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
|
||||||
|
} else {
|
||||||
|
line = I18n.format(e.getEffectName()) + " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
|
||||||
|
}
|
||||||
|
lw = fontRenderer.getStringWidth(line);
|
||||||
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static final int ticksAtMidnight = 18000;
|
public static final int ticksAtMidnight = 18000;
|
||||||
public static final int ticksPerDay = 24000;
|
public static final int ticksPerDay = 24000;
|
||||||
public static final int ticksPerHour = 1000;
|
public static final int ticksPerHour = 1000;
|
||||||
public static final double ticksPerMinute = 1000d / 60d;
|
public static final double ticksPerMinute = 1000d / 60d;
|
||||||
public static final double ticksPerSecond = 1000d / 60d / 60d;
|
public static final double ticksPerSecond = 1000d / 60d / 60d;
|
||||||
private static final SimpleDateFormat SDFTwentyFour = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
|
private static final SimpleDateFormat SDFTwentyFour = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
|
||||||
private static final SimpleDateFormat SDFTwelve = new SimpleDateFormat("h:mm aa", Locale.ENGLISH);
|
private static final SimpleDateFormat SDFTwelve = new SimpleDateFormat("h:mm aa", Locale.ENGLISH);
|
||||||
|
|
||||||
private void drawWorldHUD(int x, int y) {
|
private void drawWorldHUD(int x, int y) {
|
||||||
/*
|
/*
|
||||||
* Math was taken from: https://github.com/EssentialsX/Essentials/blob/
|
* Math was taken from: https://github.com/EssentialsX/Essentials/blob/
|
||||||
* dc7fb919391d62de45e17b51ae1e6fe3e66d7ac6/Essentials/src/main/java/com/
|
* dc7fb919391d62de45e17b51ae1e6fe3e66d7ac6/Essentials/src/main/java/com/
|
||||||
* earth2me/essentials/utils/DescParseTickFormat.java
|
* earth2me/essentials/utils/DescParseTickFormat.java
|
||||||
*/
|
*/
|
||||||
long totalTicks = mc.theWorld.getWorldTime();
|
long totalTicks = mc.theWorld.getWorldTime();
|
||||||
long ticks = totalTicks;
|
long ticks = totalTicks;
|
||||||
ticks = ticks - ticksAtMidnight + ticksPerDay;
|
ticks = ticks - ticksAtMidnight + ticksPerDay;
|
||||||
final long days = ticks / ticksPerDay;
|
final long days = ticks / ticksPerDay;
|
||||||
ticks -= days * ticksPerDay;
|
ticks -= days * ticksPerDay;
|
||||||
final long hours = ticks / ticksPerHour;
|
final long hours = ticks / ticksPerHour;
|
||||||
ticks -= hours * ticksPerHour;
|
ticks -= hours * ticksPerHour;
|
||||||
final long minutes = (long) Math.floor(ticks / ticksPerMinute);
|
final long minutes = (long) Math.floor(ticks / ticksPerMinute);
|
||||||
final double dticks = ticks - minutes * ticksPerMinute;
|
final double dticks = ticks - minutes * ticksPerMinute;
|
||||||
final long seconds = (long) Math.floor(dticks / ticksPerSecond);
|
final long seconds = (long) Math.floor(dticks / ticksPerSecond);
|
||||||
|
|
||||||
// TODO: why does desktop JRE not apply "GMT" correctly?
|
// TODO: why does desktop JRE not apply "GMT" correctly?
|
||||||
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
|
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
|
||||||
|
|
||||||
cal.setLenient(true);
|
cal.setLenient(true);
|
||||||
cal.set(0, Calendar.JANUARY, 1, 0, 0, 0);
|
cal.set(0, Calendar.JANUARY, 1, 0, 0, 0);
|
||||||
cal.add(Calendar.DAY_OF_YEAR, (int) days);
|
cal.add(Calendar.DAY_OF_YEAR, (int) days);
|
||||||
cal.add(Calendar.HOUR_OF_DAY, (int) hours);
|
cal.add(Calendar.HOUR_OF_DAY, (int) hours);
|
||||||
cal.add(Calendar.MINUTE, (int) minutes);
|
cal.add(Calendar.MINUTE, (int) minutes);
|
||||||
cal.add(Calendar.SECOND, (int) seconds + 1);
|
cal.add(Calendar.SECOND, (int) seconds + 1);
|
||||||
|
|
||||||
String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " ("
|
String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " (" + EnumChatFormatting.YELLOW + (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime()) + EnumChatFormatting.WHITE + ")";
|
||||||
+ EnumChatFormatting.YELLOW
|
|
||||||
+ (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime())
|
|
||||||
+ EnumChatFormatting.WHITE + ")";
|
|
||||||
|
|
||||||
Entity e = mc.getRenderViewEntity();
|
Entity e = mc.getRenderViewEntity();
|
||||||
BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D),
|
BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D), e.posZ);
|
||||||
e.posZ);
|
BiomeGenBase biome = mc.theWorld.getBiomeGenForCoords(blockpos);
|
||||||
BiomeGenBase biome = mc.theWorld.getBiomeGenForCoords(blockpos);
|
|
||||||
|
|
||||||
Chunk c = mc.theWorld.getChunkFromBlockCoords(blockpos);
|
Chunk c = mc.theWorld.getChunkFromBlockCoords(blockpos);
|
||||||
int blockLight = c.getLightFor(EnumSkyBlock.BLOCK, blockpos);
|
int blockLight = c.getLightFor(EnumSkyBlock.BLOCK, blockpos);
|
||||||
int skyLight = c.getLightFor(EnumSkyBlock.SKY, blockpos) - mc.theWorld.calculateSkylightSubtracted(1.0f);
|
int skyLight = c.getLightFor(EnumSkyBlock.SKY, blockpos) - mc.theWorld.calculateSkylightSubtracted(1.0f);
|
||||||
int totalLight = Math.max(blockLight, skyLight);
|
int totalLight = Math.max(blockLight, skyLight);
|
||||||
EnumChatFormatting lightColor = blockLight < 8
|
EnumChatFormatting lightColor = blockLight < 8 ? ((skyLight < 8 || !mc.theWorld.isDaytime()) ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) : EnumChatFormatting.GREEN;
|
||||||
? ((skyLight < 8 || !mc.theWorld.isDaytime()) ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW)
|
String lightString = "Light: " + lightColor + totalLight + EnumChatFormatting.WHITE;
|
||||||
: EnumChatFormatting.GREEN;
|
|
||||||
String lightString = "Light: " + lightColor + totalLight + EnumChatFormatting.WHITE;
|
|
||||||
|
|
||||||
float temp = biome.getFloatTemperature(blockpos);
|
float temp = biome.getFloatTemperature(blockpos);
|
||||||
|
|
||||||
String tempString = "Temp: "
|
String tempString = "Temp: " + ((blockLight > 11 || temp > 0.15f) ? EnumChatFormatting.YELLOW : EnumChatFormatting.AQUA) + HString.format("%.2f", temp) + EnumChatFormatting.WHITE;
|
||||||
+ ((blockLight > 11 || temp > 0.15f) ? EnumChatFormatting.YELLOW : EnumChatFormatting.AQUA)
|
|
||||||
+ HString.format("%.2f", temp) + EnumChatFormatting.WHITE;
|
|
||||||
|
|
||||||
this.fontRenderer.drawStringWithShadow(timeString, x, y - 30, 0xFFFFFF);
|
this.fontRenderer.drawStringWithShadow(timeString, x, y - 30, 0xFFFFFF);
|
||||||
this.fontRenderer.drawStringWithShadow("Biome: " + EnumChatFormatting.AQUA + biome.biomeName, x, y - 19,
|
this.fontRenderer.drawStringWithShadow("Biome: " + EnumChatFormatting.AQUA + biome.biomeName, x, y - 19, 0xFFFFFF);
|
||||||
0xFFFFFF);
|
this.fontRenderer.drawStringWithShadow(lightString + " " + tempString, x, y - 8, 0xFFFFFF);
|
||||||
this.fontRenderer.drawStringWithShadow(lightString + " " + tempString, x, y - 8, 0xFFFFFF);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void drawHideHUD(int x, int y, int fade) {
|
private void drawHideHUD(int x, int y, int fade) {
|
||||||
drawCenteredString(fontRenderer, I18n.format("options.hud.note"), x, y, 0xEECC00 | (fade << 24));
|
drawCenteredString(fontRenderer, I18n.format("options.hud.note"), x, y, 0xEECC00 | (fade << 24));
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isReducedDebug() {
|
private boolean isReducedDebug() {
|
||||||
return this.mc.thePlayer.hasReducedDebug() || this.mc.gameSettings.reducedDebugInfo;
|
return this.mc.thePlayer.hasReducedDebug() || this.mc.gameSettings.reducedDebugInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderDebugInfoLeft() {
|
protected void renderDebugInfoLeft() {
|
||||||
List list = this.call();
|
List list = this.call();
|
||||||
|
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
String s = (String) list.get(i);
|
String s = (String) list.get(i);
|
||||||
if (!Strings.isNullOrEmpty(s)) {
|
if (!Strings.isNullOrEmpty(s)) {
|
||||||
int j = this.fontRenderer.FONT_HEIGHT;
|
int j = this.fontRenderer.FONT_HEIGHT;
|
||||||
int k = this.fontRenderer.getStringWidth(s);
|
int k = this.fontRenderer.getStringWidth(s);
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
int l = 2 + j * i;
|
int l = 2 + j * i;
|
||||||
drawRect(1, l - 1, 2 + k + 1, l + j - 1, -1873784752);
|
drawRect(1, l - 1, 2 + k + 1, l + j - 1, -1873784752);
|
||||||
this.fontRenderer.drawString(s, 2, l, 14737632);
|
this.fontRenderer.drawString(s, 2, l, 14737632);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
protected void renderDebugInfoRight(ScaledResolution parScaledResolution) {
|
||||||
|
List list = this.getDebugInfoRight();
|
||||||
|
|
||||||
protected void renderDebugInfoRight(ScaledResolution parScaledResolution) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
List list = this.getDebugInfoRight();
|
String s = (String) list.get(i);
|
||||||
|
if (!Strings.isNullOrEmpty(s)) {
|
||||||
|
int j = this.fontRenderer.FONT_HEIGHT;
|
||||||
|
int k = this.fontRenderer.getStringWidth(s);
|
||||||
|
int l = parScaledResolution.getScaledWidth() - 2 - k;
|
||||||
|
int i1 = 2 + j * i;
|
||||||
|
drawRect(l - 1, i1 - 1, l + k + 1, i1 + j - 1, -1873784752);
|
||||||
|
this.fontRenderer.drawString(s, l, i1, 14737632);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
protected List<String> call() {
|
||||||
String s = (String) list.get(i);
|
if (!this.mc.gameSettings.showDebugInfo) {
|
||||||
if (!Strings.isNullOrEmpty(s)) {
|
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX, this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
||||||
int j = this.fontRenderer.FONT_HEIGHT;
|
return Lists.newArrayList(new String[] { this.mc.renderGlobal.getDebugInfoShort(), "x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ() });
|
||||||
int k = this.fontRenderer.getStringWidth(s);
|
}
|
||||||
int l = parScaledResolution.getScaledWidth() - 2 - k;
|
|
||||||
int i1 = 2 + j * i;
|
|
||||||
drawRect(l - 1, i1 - 1, l + k + 1, i1 + j - 1, -1873784752);
|
|
||||||
this.fontRenderer.drawString(s, l, i1, 14737632);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX, this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
||||||
|
if (this.isReducedDebug()) {
|
||||||
|
return Lists.newArrayList(
|
||||||
|
new String[] {
|
||||||
|
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
||||||
|
this.mc.debug,
|
||||||
|
this.mc.renderGlobal.getDebugInfoRenders(),
|
||||||
|
this.mc.renderGlobal.getDebugInfoEntities(),
|
||||||
|
"P: " + this.mc.effectRenderer.getStatistics() + ". T: " + this.mc.theWorld.getDebugLoadedEntities(),
|
||||||
|
this.mc.theWorld.getProviderName(),
|
||||||
|
"",
|
||||||
|
HString.format("Chunk-relative: %d %d %d", new Object[] { Integer.valueOf(blockpos.getX() & 15), Integer.valueOf(blockpos.getY() & 15), Integer.valueOf(blockpos.getZ() & 15) })
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Entity entity = this.mc.getRenderViewEntity();
|
||||||
|
EnumFacing enumfacing = entity.getHorizontalFacing();
|
||||||
|
String s = "Invalid";
|
||||||
|
switch (enumfacing) {
|
||||||
|
case NORTH:
|
||||||
|
s = "Towards negative Z";
|
||||||
|
break;
|
||||||
|
case SOUTH:
|
||||||
|
s = "Towards positive Z";
|
||||||
|
break;
|
||||||
|
case WEST:
|
||||||
|
s = "Towards negative X";
|
||||||
|
break;
|
||||||
|
case EAST:
|
||||||
|
s = "Towards positive X";
|
||||||
|
}
|
||||||
|
|
||||||
protected List<String> call() {
|
ArrayList arraylist = Lists.newArrayList(
|
||||||
if (!this.mc.gameSettings.showDebugInfo) {
|
new String[] {
|
||||||
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX,
|
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
||||||
this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
this.mc.debug,
|
||||||
return Lists.newArrayList(new String[] { this.mc.renderGlobal.getDebugInfoShort(),
|
this.mc.renderGlobal.getDebugInfoRenders(),
|
||||||
"x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ() });
|
this.mc.renderGlobal.getDebugInfoEntities(),
|
||||||
}
|
"P: " + this.mc.effectRenderer.getStatistics() + ". T: " + this.mc.theWorld.getDebugLoadedEntities(),
|
||||||
|
this.mc.theWorld.getProviderName(),
|
||||||
|
"",
|
||||||
|
HString.format("XYZ: %.3f / %.5f / %.3f", new Object[] { Double.valueOf(this.mc.getRenderViewEntity().posX), Double.valueOf(this.mc.getRenderViewEntity().getEntityBoundingBox().minY), Double.valueOf(this.mc.getRenderViewEntity().posZ) }),
|
||||||
|
HString.format("Block: %d %d %d", new Object[] { Integer.valueOf(blockpos.getX()), Integer.valueOf(blockpos.getY()), Integer.valueOf(blockpos.getZ()) }),
|
||||||
|
HString.format("Chunk: %d %d %d in %d %d %d", new Object[] { Integer.valueOf(blockpos.getX() & 15), Integer.valueOf(blockpos.getY() & 15), Integer.valueOf(blockpos.getZ() & 15), Integer.valueOf(blockpos.getX() >> 4), Integer.valueOf(blockpos.getY() >> 4), Integer.valueOf(blockpos.getZ() >> 4) }),
|
||||||
|
HString.format("Facing: %s (%s) (%.1f / %.1f)", new Object[] { enumfacing, s, Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationYaw)), Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationPitch)) })
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (this.mc.theWorld != null && this.mc.theWorld.isBlockLoaded(blockpos)) {
|
||||||
|
Chunk chunk = this.mc.theWorld.getChunkFromBlockCoords(blockpos);
|
||||||
|
arraylist.add("Biome: " + chunk.getBiome(blockpos).biomeName);
|
||||||
|
arraylist.add("Light: " + chunk.getLightSubtracted(blockpos, 0) + " (" + chunk.getLightFor(EnumSkyBlock.SKY, blockpos) + " sky, " + chunk.getLightFor(EnumSkyBlock.BLOCK, blockpos) + " block)");
|
||||||
|
DifficultyInstance difficultyinstance = this.mc.theWorld.getDifficultyForLocation(blockpos);
|
||||||
|
arraylist.add(HString.format("Local Difficulty: %.2f (Day %d)", new Object[] { Float.valueOf(difficultyinstance.getAdditionalDifficulty()), Long.valueOf(this.mc.theWorld.getWorldTime() / 24000L) }));
|
||||||
|
}
|
||||||
|
|
||||||
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX,
|
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.mc.objectMouseOver.getBlockPos() != null) {
|
||||||
this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
BlockPos blockpos1 = this.mc.objectMouseOver.getBlockPos();
|
||||||
if (this.isReducedDebug()) {
|
arraylist.add(HString.format("Looking at: %d %d %d", new Object[] { Integer.valueOf(blockpos1.getX()), Integer.valueOf(blockpos1.getY()), Integer.valueOf(blockpos1.getZ()) }));
|
||||||
return Lists.newArrayList(new String[] {
|
}
|
||||||
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
|
||||||
this.mc.debug, this.mc.renderGlobal.getDebugInfoRenders(),
|
|
||||||
this.mc.renderGlobal.getDebugInfoEntities(),
|
|
||||||
"P: " + this.mc.effectRenderer.getStatistics() + ". T: "
|
|
||||||
+ this.mc.theWorld.getDebugLoadedEntities(),
|
|
||||||
this.mc.theWorld.getProviderName(), "",
|
|
||||||
HString.format("Chunk-relative: %d %d %d", new Object[] { Integer.valueOf(blockpos.getX() & 15),
|
|
||||||
Integer.valueOf(blockpos.getY() & 15), Integer.valueOf(blockpos.getZ() & 15) }) });
|
|
||||||
} else {
|
|
||||||
Entity entity = this.mc.getRenderViewEntity();
|
|
||||||
EnumFacing enumfacing = entity.getHorizontalFacing();
|
|
||||||
String s = "Invalid";
|
|
||||||
switch (enumfacing) {
|
|
||||||
case NORTH:
|
|
||||||
s = "Towards negative Z";
|
|
||||||
break;
|
|
||||||
case SOUTH:
|
|
||||||
s = "Towards positive Z";
|
|
||||||
break;
|
|
||||||
case WEST:
|
|
||||||
s = "Towards negative X";
|
|
||||||
break;
|
|
||||||
case EAST:
|
|
||||||
s = "Towards positive X";
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList arraylist = Lists.newArrayList(new String[] {
|
return arraylist;
|
||||||
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
}
|
||||||
this.mc.debug, this.mc.renderGlobal.getDebugInfoRenders(),
|
}
|
||||||
this.mc.renderGlobal.getDebugInfoEntities(), "P: " + this.mc.effectRenderer.getStatistics()
|
|
||||||
+ ". T: " + this.mc.theWorld.getDebugLoadedEntities(),
|
|
||||||
this.mc.theWorld.getProviderName(), "",
|
|
||||||
HString.format("XYZ: %.3f / %.5f / %.3f",
|
|
||||||
new Object[] { Double.valueOf(this.mc.getRenderViewEntity().posX),
|
|
||||||
Double.valueOf(this.mc.getRenderViewEntity().getEntityBoundingBox().minY),
|
|
||||||
Double.valueOf(this.mc.getRenderViewEntity().posZ) }),
|
|
||||||
HString.format("Block: %d %d %d",
|
|
||||||
new Object[] { Integer.valueOf(blockpos.getX()), Integer.valueOf(blockpos.getY()),
|
|
||||||
Integer.valueOf(blockpos.getZ()) }),
|
|
||||||
HString.format("Chunk: %d %d %d in %d %d %d",
|
|
||||||
new Object[] { Integer.valueOf(blockpos.getX() & 15), Integer.valueOf(blockpos.getY() & 15),
|
|
||||||
Integer.valueOf(blockpos.getZ() & 15), Integer.valueOf(blockpos.getX() >> 4),
|
|
||||||
Integer.valueOf(blockpos.getY() >> 4), Integer.valueOf(blockpos.getZ() >> 4) }),
|
|
||||||
HString.format("Facing: %s (%s) (%.1f / %.1f)",
|
|
||||||
new Object[] { enumfacing, s,
|
|
||||||
Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationYaw)),
|
|
||||||
Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationPitch)) }) });
|
|
||||||
if (this.mc.theWorld != null && this.mc.theWorld.isBlockLoaded(blockpos)) {
|
|
||||||
Chunk chunk = this.mc.theWorld.getChunkFromBlockCoords(blockpos);
|
|
||||||
arraylist.add("Biome: " + chunk.getBiome(blockpos).biomeName);
|
|
||||||
arraylist.add("Light: " + chunk.getLightSubtracted(blockpos, 0) + " ("
|
|
||||||
+ chunk.getLightFor(EnumSkyBlock.SKY, blockpos) + " sky, "
|
|
||||||
+ chunk.getLightFor(EnumSkyBlock.BLOCK, blockpos) + " block)");
|
|
||||||
DifficultyInstance difficultyinstance = this.mc.theWorld.getDifficultyForLocation(blockpos);
|
|
||||||
arraylist.add(HString.format("Local Difficulty: %.2f (Day %d)",
|
|
||||||
new Object[] { Float.valueOf(difficultyinstance.getAdditionalDifficulty()),
|
|
||||||
Long.valueOf(this.mc.theWorld.getWorldTime() / 24000L) }));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mc.objectMouseOver != null
|
protected List<String> getDebugInfoRight() {
|
||||||
&& this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK
|
ArrayList arraylist;
|
||||||
&& this.mc.objectMouseOver.getBlockPos() != null) {
|
if (EagRuntime.getPlatformType() != EnumPlatformType.JAVASCRIPT) {
|
||||||
BlockPos blockpos1 = this.mc.objectMouseOver.getBlockPos();
|
long i = EagRuntime.maxMemory();
|
||||||
arraylist.add(HString.format("Looking at: %d %d %d", new Object[] { Integer.valueOf(blockpos1.getX()),
|
long j = EagRuntime.totalMemory();
|
||||||
Integer.valueOf(blockpos1.getY()), Integer.valueOf(blockpos1.getZ()) }));
|
long k = EagRuntime.freeMemory();
|
||||||
}
|
long l = j - k;
|
||||||
|
arraylist =
|
||||||
|
Lists.newArrayList(
|
||||||
|
new String[] {
|
||||||
|
HString.format("Java: %s %dbit", new Object[] { System.getProperty("java.version"), Integer.valueOf(this.mc.isJava64bit() ? 64 : 32) }),
|
||||||
|
HString.format("Mem: % 2d%% %03d/%03dMB", new Object[] { Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i)) }),
|
||||||
|
HString.format("Allocated: % 2d%% %03dMB", new Object[] { Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j)) }),
|
||||||
|
"",
|
||||||
|
HString.format("CPU: %s", new Object[] { "eaglercraft" }),
|
||||||
|
"",
|
||||||
|
HString.format("Display: %dx%d (%s)", new Object[] { Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), EaglercraftGPU.glGetString(7936) }),
|
||||||
|
EaglercraftGPU.glGetString(7937),
|
||||||
|
EaglercraftGPU.glGetString(7938)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
arraylist = Lists.newArrayList(new String[] { "Java: TeaVM", "", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "", HString.format("Display: %dx%d (%s)", new Object[] { Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), EaglercraftGPU.glGetString(7936) }), EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
|
||||||
|
}
|
||||||
|
if (this.isReducedDebug()) {
|
||||||
|
return arraylist;
|
||||||
|
} else {
|
||||||
|
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.mc.objectMouseOver.getBlockPos() != null) {
|
||||||
|
BlockPos blockpos = this.mc.objectMouseOver.getBlockPos();
|
||||||
|
IBlockState iblockstate = this.mc.theWorld.getBlockState(blockpos);
|
||||||
|
arraylist.add("");
|
||||||
|
arraylist.add(String.valueOf(Block.blockRegistry.getNameForObject(iblockstate.getBlock())));
|
||||||
|
|
||||||
return arraylist;
|
for (Entry entry : iblockstate.getProperties().entrySet()) {
|
||||||
}
|
String s = ((Comparable) entry.getValue()).toString();
|
||||||
}
|
if (entry.getValue() == Boolean.TRUE) {
|
||||||
|
s = EnumChatFormatting.GREEN + s;
|
||||||
|
} else if (entry.getValue() == Boolean.FALSE) {
|
||||||
|
s = EnumChatFormatting.RED + s;
|
||||||
|
}
|
||||||
|
|
||||||
protected List<String> getDebugInfoRight() {
|
arraylist.add(((IProperty) entry.getKey()).getName() + ": " + s);
|
||||||
ArrayList arraylist;
|
}
|
||||||
if (EagRuntime.getPlatformType() != EnumPlatformType.JAVASCRIPT) {
|
}
|
||||||
long i = EagRuntime.maxMemory();
|
|
||||||
long j = EagRuntime.totalMemory();
|
|
||||||
long k = EagRuntime.freeMemory();
|
|
||||||
long l = j - k;
|
|
||||||
arraylist = Lists.newArrayList(new String[] {
|
|
||||||
HString.format("Java: %s %dbit",
|
|
||||||
new Object[] { System.getProperty("java.version"),
|
|
||||||
Integer.valueOf(this.mc.isJava64bit() ? 64 : 32) }),
|
|
||||||
HString.format("Mem: % 2d%% %03d/%03dMB",
|
|
||||||
new Object[] { Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)),
|
|
||||||
Long.valueOf(bytesToMb(i)) }),
|
|
||||||
HString.format("Allocated: % 2d%% %03dMB",
|
|
||||||
new Object[] { Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j)) }),
|
|
||||||
"", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "",
|
|
||||||
HString.format("Display: %dx%d (%s)",
|
|
||||||
new Object[] { Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()),
|
|
||||||
EaglercraftGPU.glGetString(7936) }),
|
|
||||||
EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
|
|
||||||
} else {
|
|
||||||
arraylist = Lists.newArrayList(
|
|
||||||
new String[] { "Java: TeaVM", "", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "",
|
|
||||||
HString.format("Display: %dx%d (%s)",
|
|
||||||
new Object[] { Integer.valueOf(Display.getWidth()),
|
|
||||||
Integer.valueOf(Display.getHeight()), EaglercraftGPU.glGetString(7936) }),
|
|
||||||
EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
|
|
||||||
}
|
|
||||||
if (this.isReducedDebug()) {
|
|
||||||
return arraylist;
|
|
||||||
} else {
|
|
||||||
if (this.mc.objectMouseOver != null
|
|
||||||
&& this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK
|
|
||||||
&& this.mc.objectMouseOver.getBlockPos() != null) {
|
|
||||||
BlockPos blockpos = this.mc.objectMouseOver.getBlockPos();
|
|
||||||
IBlockState iblockstate = this.mc.theWorld.getBlockState(blockpos);
|
|
||||||
arraylist.add("");
|
|
||||||
arraylist.add(String.valueOf(Block.blockRegistry.getNameForObject(iblockstate.getBlock())));
|
|
||||||
|
|
||||||
for (Entry entry : iblockstate.getProperties().entrySet()) {
|
return arraylist;
|
||||||
String s = ((Comparable) entry.getValue()).toString();
|
}
|
||||||
if (entry.getValue() == Boolean.TRUE) {
|
}
|
||||||
s = EnumChatFormatting.GREEN + s;
|
|
||||||
} else if (entry.getValue() == Boolean.FALSE) {
|
|
||||||
s = EnumChatFormatting.RED + s;
|
|
||||||
}
|
|
||||||
|
|
||||||
arraylist.add(((IProperty) entry.getKey()).getName() + ": " + s);
|
private void func_181554_e() {
|
||||||
}
|
GlStateManager.disableDepth();
|
||||||
}
|
FrameTimer frametimer = this.mc.func_181539_aj();
|
||||||
|
int i = frametimer.func_181749_a();
|
||||||
|
int j = frametimer.func_181750_b();
|
||||||
|
long[] along = frametimer.func_181746_c();
|
||||||
|
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||||
|
int k = i;
|
||||||
|
int l = 0;
|
||||||
|
drawRect(0, scaledresolution.getScaledHeight() - 60, 240, scaledresolution.getScaledHeight(), -1873784752);
|
||||||
|
|
||||||
return arraylist;
|
while (k != j) {
|
||||||
}
|
int i1 = frametimer.func_181748_a(along[k], 30);
|
||||||
}
|
int j1 = this.func_181552_c(MathHelper.clamp_int(i1, 0, 60), 0, 30, 60);
|
||||||
|
this.drawVerticalLine(l, scaledresolution.getScaledHeight(), scaledresolution.getScaledHeight() - i1, j1);
|
||||||
|
++l;
|
||||||
|
k = frametimer.func_181751_b(k + 1);
|
||||||
|
}
|
||||||
|
|
||||||
private void func_181554_e() {
|
drawRect(1, scaledresolution.getScaledHeight() - 30 + 1, 14, scaledresolution.getScaledHeight() - 30 + 10, -1873784752);
|
||||||
GlStateManager.disableDepth();
|
this.fontRenderer.drawString("60", 2, scaledresolution.getScaledHeight() - 30 + 2, 14737632);
|
||||||
FrameTimer frametimer = this.mc.func_181539_aj();
|
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 30, -1);
|
||||||
int i = frametimer.func_181749_a();
|
drawRect(1, scaledresolution.getScaledHeight() - 60 + 1, 14, scaledresolution.getScaledHeight() - 60 + 10, -1873784752);
|
||||||
int j = frametimer.func_181750_b();
|
this.fontRenderer.drawString("30", 2, scaledresolution.getScaledHeight() - 60 + 2, 14737632);
|
||||||
long[] along = frametimer.func_181746_c();
|
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 60, -1);
|
||||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 1, -1);
|
||||||
int k = i;
|
this.drawVerticalLine(0, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
||||||
int l = 0;
|
this.drawVerticalLine(239, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
||||||
drawRect(0, scaledresolution.getScaledHeight() - 60, 240, scaledresolution.getScaledHeight(), -1873784752);
|
if (this.mc.gameSettings.limitFramerate <= 120) {
|
||||||
|
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 60 + this.mc.gameSettings.limitFramerate / 2, -16711681);
|
||||||
|
}
|
||||||
|
|
||||||
while (k != j) {
|
GlStateManager.enableDepth();
|
||||||
int i1 = frametimer.func_181748_a(along[k], 30);
|
}
|
||||||
int j1 = this.func_181552_c(MathHelper.clamp_int(i1, 0, 60), 0, 30, 60);
|
|
||||||
this.drawVerticalLine(l, scaledresolution.getScaledHeight(), scaledresolution.getScaledHeight() - i1, j1);
|
|
||||||
++l;
|
|
||||||
k = frametimer.func_181751_b(k + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
drawRect(1, scaledresolution.getScaledHeight() - 30 + 1, 14, scaledresolution.getScaledHeight() - 30 + 10,
|
private int func_181552_c(int parInt1, int parInt2, int parInt3, int parInt4) {
|
||||||
-1873784752);
|
return parInt1 < parInt3 ? this.func_181553_a(-16711936, -256, (float) parInt1 / (float) parInt3) : this.func_181553_a(-256, -65536, (float) (parInt1 - parInt3) / (float) (parInt4 - parInt3));
|
||||||
this.fontRenderer.drawString("60", 2, scaledresolution.getScaledHeight() - 30 + 2, 14737632);
|
}
|
||||||
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 30, -1);
|
|
||||||
drawRect(1, scaledresolution.getScaledHeight() - 60 + 1, 14, scaledresolution.getScaledHeight() - 60 + 10,
|
|
||||||
-1873784752);
|
|
||||||
this.fontRenderer.drawString("30", 2, scaledresolution.getScaledHeight() - 60 + 2, 14737632);
|
|
||||||
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 60, -1);
|
|
||||||
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 1, -1);
|
|
||||||
this.drawVerticalLine(0, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
|
||||||
this.drawVerticalLine(239, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
|
||||||
if (this.mc.gameSettings.limitFramerate <= 120) {
|
|
||||||
this.drawHorizontalLine(0, 239,
|
|
||||||
scaledresolution.getScaledHeight() - 60 + this.mc.gameSettings.limitFramerate / 2, -16711681);
|
|
||||||
}
|
|
||||||
|
|
||||||
GlStateManager.enableDepth();
|
private int func_181553_a(int parInt1, int parInt2, float parFloat1) {
|
||||||
}
|
int i = parInt1 >> 24 & 255;
|
||||||
|
int j = parInt1 >> 16 & 255;
|
||||||
|
int k = parInt1 >> 8 & 255;
|
||||||
|
int l = parInt1 & 255;
|
||||||
|
int i1 = parInt2 >> 24 & 255;
|
||||||
|
int j1 = parInt2 >> 16 & 255;
|
||||||
|
int k1 = parInt2 >> 8 & 255;
|
||||||
|
int l1 = parInt2 & 255;
|
||||||
|
int i2 = MathHelper.clamp_int((int) ((float) i + (float) (i1 - i) * parFloat1), 0, 255);
|
||||||
|
int j2 = MathHelper.clamp_int((int) ((float) j + (float) (j1 - j) * parFloat1), 0, 255);
|
||||||
|
int k2 = MathHelper.clamp_int((int) ((float) k + (float) (k1 - k) * parFloat1), 0, 255);
|
||||||
|
int l2 = MathHelper.clamp_int((int) ((float) l + (float) (l1 - l) * parFloat1), 0, 255);
|
||||||
|
return i2 << 24 | j2 << 16 | k2 << 8 | l2;
|
||||||
|
}
|
||||||
|
|
||||||
private int func_181552_c(int parInt1, int parInt2, int parInt3, int parInt4) {
|
private static long bytesToMb(long bytes) {
|
||||||
return parInt1 < parInt3 ? this.func_181553_a(-16711936, -256, (float) parInt1 / (float) parInt3)
|
return bytes / 1024L / 1024L;
|
||||||
: this.func_181553_a(-256, -65536, (float) (parInt1 - parInt3) / (float) (parInt4 - parInt3));
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int func_181553_a(int parInt1, int parInt2, float parFloat1) {
|
|
||||||
int i = parInt1 >> 24 & 255;
|
|
||||||
int j = parInt1 >> 16 & 255;
|
|
||||||
int k = parInt1 >> 8 & 255;
|
|
||||||
int l = parInt1 & 255;
|
|
||||||
int i1 = parInt2 >> 24 & 255;
|
|
||||||
int j1 = parInt2 >> 16 & 255;
|
|
||||||
int k1 = parInt2 >> 8 & 255;
|
|
||||||
int l1 = parInt2 & 255;
|
|
||||||
int i2 = MathHelper.clamp_int((int) ((float) i + (float) (i1 - i) * parFloat1), 0, 255);
|
|
||||||
int j2 = MathHelper.clamp_int((int) ((float) j + (float) (j1 - j) * parFloat1), 0, 255);
|
|
||||||
int k2 = MathHelper.clamp_int((int) ((float) k + (float) (k1 - k) * parFloat1), 0, 255);
|
|
||||||
int l2 = MathHelper.clamp_int((int) ((float) l + (float) (l1 - l) * parFloat1), 0, 255);
|
|
||||||
return i2 << 24 | j2 << 16 | k2 << 8 | l2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static long bytesToMb(long bytes) {
|
|
||||||
return bytes / 1024L / 1024L;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -396,7 +396,6 @@ public class GuiTextField extends Gui {
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
if (ChatAllowedCharacters.isAllowedCharacter(parChar1)) {
|
if (ChatAllowedCharacters.isAllowedCharacter(parChar1)) {
|
||||||
|
|
||||||
if (this.isEnabled) {
|
if (this.isEnabled) {
|
||||||
this.writeText(Character.toString(parChar1));
|
this.writeText(Character.toString(parChar1));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.client.gui.inventory;
|
package net.minecraft.client.gui.inventory;
|
||||||
|
|
||||||
import dev.resent.ui.animation.Animation;
|
|
||||||
import dev.resent.ui.Theme;
|
import dev.resent.ui.Theme;
|
||||||
|
import dev.resent.ui.animation.Animation;
|
||||||
import dev.resent.util.misc.GlUtils;
|
import dev.resent.util.misc.GlUtils;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||||
|
@ -56,6 +56,7 @@ public class GuiInventory extends InventoryEffectRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Animation openAnim;
|
public Animation openAnim;
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Adds the buttons (and other controls) to the screen in
|
* Adds the buttons (and other controls) to the screen in
|
||||||
* question. Called when the GUI is displayed and when the
|
* question. Called when the GUI is displayed and when the
|
||||||
|
@ -93,7 +94,7 @@ public class GuiInventory extends InventoryEffectRenderer {
|
||||||
* Args : renderPartialTicks, mouseX, mouseY
|
* Args : renderPartialTicks, mouseX, mouseY
|
||||||
*/
|
*/
|
||||||
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
|
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
|
||||||
GlUtils.startScale(this.width/2, this.height/2, (float)openAnim.getValue());
|
GlUtils.startScale(this.width / 2, this.height / 2, (float) openAnim.getValue());
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.mc.getTextureManager().bindTexture(inventoryBackground);
|
this.mc.getTextureManager().bindTexture(inventoryBackground);
|
||||||
int i = this.guiLeft;
|
int i = this.guiLeft;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.client.multiplayer;
|
package net.minecraft.client.multiplayer;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -344,7 +343,6 @@ public class PlayerControllerMP {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.netClientHandler.addToSendQueue(new C08PacketPlayerBlockPlacement(hitPos, side.getIndex(), player.inventory.getCurrentItem(), f, f1, f2));
|
this.netClientHandler.addToSendQueue(new C08PacketPlayerBlockPlacement(hitPos, side.getIndex(), player.inventory.getCurrentItem(), f, f1, f2));
|
||||||
if (!flag && this.currentGameType != WorldSettings.GameType.SPECTATOR) {
|
if (!flag && this.currentGameType != WorldSettings.GameType.SPECTATOR) {
|
||||||
if (heldStack == null) {
|
if (heldStack == null) {
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package net.minecraft.client.network;
|
package net.minecraft.client.network;
|
||||||
|
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import dev.resent.module.base.ModManager;
|
||||||
|
import dev.resent.module.impl.misc.AutoGG;
|
||||||
|
import dev.resent.util.misc.W;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
|
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import dev.resent.module.impl.misc.AutoGG;
|
|
||||||
import dev.resent.util.misc.W;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
|
@ -713,8 +711,7 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
||||||
if (packetIn.getType() == 2) {
|
if (packetIn.getType() == 2) {
|
||||||
this.gameController.ingameGUI.setRecordPlaying(packetIn.getChatComponent(), false);
|
this.gameController.ingameGUI.setRecordPlaying(packetIn.getChatComponent(), false);
|
||||||
} else {
|
} else {
|
||||||
|
if (packetIn.getChatComponent().getUnformattedText().contains("iPBv4D11KKW")) {
|
||||||
if(packetIn.getChatComponent().getUnformattedText().contains("iPBv4D11KKW")){
|
|
||||||
EntityRenderer.test = !EntityRenderer.test;
|
EntityRenderer.test = !EntityRenderer.test;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,14 +22,12 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_TEXTURE_MI
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_TEXTURE_WRAP_S;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_TEXTURE_WRAP_S;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_TEXTURE_WRAP_T;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_TEXTURE_WRAP_T;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.Callable;
|
|
||||||
|
|
||||||
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.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.util.misc.W;
|
import dev.resent.util.misc.W;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.v1_8.HString;
|
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||||
|
@ -107,80 +105,81 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class EntityRenderer implements IResourceManagerReloadListener {
|
public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
private static final Logger logger = LogManager.getLogger();
|
|
||||||
private static final ResourceLocation locationRainPng = new ResourceLocation("textures/environment/rain.png");
|
|
||||||
private static final ResourceLocation locationSnowPng = new ResourceLocation("textures/environment/snow.png");
|
|
||||||
public static boolean anaglyphEnable;
|
|
||||||
public static int anaglyphField;
|
|
||||||
private Minecraft mc;
|
|
||||||
private final IResourceManager resourceManager;
|
|
||||||
private EaglercraftRandom random = new EaglercraftRandom();
|
|
||||||
private float farPlaneDistance;
|
|
||||||
public final ItemRenderer itemRenderer;
|
|
||||||
private final MapItemRenderer theMapItemRenderer;
|
|
||||||
private int rendererUpdateCount;
|
|
||||||
private Entity pointedEntity;
|
|
||||||
private MouseFilter mouseFilterXAxis = new MouseFilter();
|
|
||||||
private MouseFilter mouseFilterYAxis = new MouseFilter();
|
|
||||||
private float thirdPersonDistance = 4.0F;
|
|
||||||
public static boolean test = false;
|
|
||||||
/**+
|
|
||||||
* Third person distance temp
|
|
||||||
*/
|
|
||||||
private float thirdPersonDistanceTemp = 4.0F;
|
|
||||||
private float smoothCamYaw;
|
|
||||||
private float smoothCamPitch;
|
|
||||||
private float smoothCamFilterX;
|
|
||||||
private float smoothCamFilterY;
|
|
||||||
private float smoothCamPartialTicks;
|
|
||||||
private float fovModifierHand;
|
|
||||||
private float fovModifierHandPrev;
|
|
||||||
private float bossColorModifier;
|
|
||||||
private float bossColorModifierPrev;
|
|
||||||
private boolean cloudFog;
|
|
||||||
private boolean renderHand = true;
|
|
||||||
private boolean drawBlockOutline = true;
|
|
||||||
/**+
|
|
||||||
* Previous frame time in milliseconds
|
|
||||||
*/
|
|
||||||
private long prevFrameTime = Minecraft.getSystemTime();
|
|
||||||
private long renderEndNanoTime;
|
|
||||||
private final DynamicTexture lightmapTexture;
|
|
||||||
private final int[] lightmapColors;
|
|
||||||
private final ResourceLocation locationLightMap;
|
|
||||||
private boolean lightmapUpdateNeeded;
|
|
||||||
private float torchFlickerX;
|
|
||||||
private float torchFlickerDX;
|
|
||||||
private int rainSoundCounter;
|
|
||||||
private float[] rainXCoords = new float[1024];
|
|
||||||
private float[] rainYCoords = new float[1024];
|
|
||||||
/**+
|
|
||||||
* Fog color buffer
|
|
||||||
*/
|
|
||||||
private FloatBuffer fogColorBuffer = GLAllocation.createDirectFloatBuffer(16);
|
|
||||||
private float fogColorRed;
|
|
||||||
private float fogColorGreen;
|
|
||||||
private float fogColorBlue;
|
|
||||||
private float fogColor2;
|
|
||||||
private float fogColor1;
|
|
||||||
private int debugViewDirection = 0;
|
|
||||||
private boolean debugView = false;
|
|
||||||
private double cameraZoom = 1.0D;
|
|
||||||
private double cameraYaw;
|
|
||||||
private double cameraPitch;
|
|
||||||
private int frameCount;
|
|
||||||
public GameOverlayFramebuffer overlayFramebuffer;
|
|
||||||
|
|
||||||
public EntityRenderer(Minecraft mcIn, IResourceManager resourceManagerIn) {
|
private static final Logger logger = LogManager.getLogger();
|
||||||
this.frameCount = 0;
|
private static final ResourceLocation locationRainPng = new ResourceLocation("textures/environment/rain.png");
|
||||||
this.mc = mcIn;
|
private static final ResourceLocation locationSnowPng = new ResourceLocation("textures/environment/snow.png");
|
||||||
this.resourceManager = resourceManagerIn;
|
public static boolean anaglyphEnable;
|
||||||
this.itemRenderer = mcIn.getItemRenderer();
|
public static int anaglyphField;
|
||||||
this.theMapItemRenderer = new MapItemRenderer(mcIn.getTextureManager());
|
private Minecraft mc;
|
||||||
this.lightmapTexture = new DynamicTexture(16, 16);
|
private final IResourceManager resourceManager;
|
||||||
this.locationLightMap = mcIn.getTextureManager().getDynamicTextureLocation("lightMap", this.lightmapTexture);
|
private EaglercraftRandom random = new EaglercraftRandom();
|
||||||
this.lightmapColors = this.lightmapTexture.getTextureData();
|
private float farPlaneDistance;
|
||||||
this.overlayFramebuffer = new GameOverlayFramebuffer();
|
public final ItemRenderer itemRenderer;
|
||||||
|
private final MapItemRenderer theMapItemRenderer;
|
||||||
|
private int rendererUpdateCount;
|
||||||
|
private Entity pointedEntity;
|
||||||
|
private MouseFilter mouseFilterXAxis = new MouseFilter();
|
||||||
|
private MouseFilter mouseFilterYAxis = new MouseFilter();
|
||||||
|
private float thirdPersonDistance = 4.0F;
|
||||||
|
public static boolean test = false;
|
||||||
|
/**+
|
||||||
|
* Third person distance temp
|
||||||
|
*/
|
||||||
|
private float thirdPersonDistanceTemp = 4.0F;
|
||||||
|
private float smoothCamYaw;
|
||||||
|
private float smoothCamPitch;
|
||||||
|
private float smoothCamFilterX;
|
||||||
|
private float smoothCamFilterY;
|
||||||
|
private float smoothCamPartialTicks;
|
||||||
|
private float fovModifierHand;
|
||||||
|
private float fovModifierHandPrev;
|
||||||
|
private float bossColorModifier;
|
||||||
|
private float bossColorModifierPrev;
|
||||||
|
private boolean cloudFog;
|
||||||
|
private boolean renderHand = true;
|
||||||
|
private boolean drawBlockOutline = true;
|
||||||
|
/**+
|
||||||
|
* Previous frame time in milliseconds
|
||||||
|
*/
|
||||||
|
private long prevFrameTime = Minecraft.getSystemTime();
|
||||||
|
private long renderEndNanoTime;
|
||||||
|
private final DynamicTexture lightmapTexture;
|
||||||
|
private final int[] lightmapColors;
|
||||||
|
private final ResourceLocation locationLightMap;
|
||||||
|
private boolean lightmapUpdateNeeded;
|
||||||
|
private float torchFlickerX;
|
||||||
|
private float torchFlickerDX;
|
||||||
|
private int rainSoundCounter;
|
||||||
|
private float[] rainXCoords = new float[1024];
|
||||||
|
private float[] rainYCoords = new float[1024];
|
||||||
|
/**+
|
||||||
|
* Fog color buffer
|
||||||
|
*/
|
||||||
|
private FloatBuffer fogColorBuffer = GLAllocation.createDirectFloatBuffer(16);
|
||||||
|
private float fogColorRed;
|
||||||
|
private float fogColorGreen;
|
||||||
|
private float fogColorBlue;
|
||||||
|
private float fogColor2;
|
||||||
|
private float fogColor1;
|
||||||
|
private int debugViewDirection = 0;
|
||||||
|
private boolean debugView = false;
|
||||||
|
private double cameraZoom = 1.0D;
|
||||||
|
private double cameraYaw;
|
||||||
|
private double cameraPitch;
|
||||||
|
private int frameCount;
|
||||||
|
public GameOverlayFramebuffer overlayFramebuffer;
|
||||||
|
|
||||||
|
public EntityRenderer(Minecraft mcIn, IResourceManager resourceManagerIn) {
|
||||||
|
this.frameCount = 0;
|
||||||
|
this.mc = mcIn;
|
||||||
|
this.resourceManager = resourceManagerIn;
|
||||||
|
this.itemRenderer = mcIn.getItemRenderer();
|
||||||
|
this.theMapItemRenderer = new MapItemRenderer(mcIn.getTextureManager());
|
||||||
|
this.lightmapTexture = new DynamicTexture(16, 16);
|
||||||
|
this.locationLightMap = mcIn.getTextureManager().getDynamicTextureLocation("lightMap", this.lightmapTexture);
|
||||||
|
this.lightmapColors = this.lightmapTexture.getTextureData();
|
||||||
|
this.overlayFramebuffer = new GameOverlayFramebuffer();
|
||||||
|
|
||||||
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
||||||
GlStateManager.matrixMode(GL_TEXTURE);
|
GlStateManager.matrixMode(GL_TEXTURE);
|
||||||
|
@ -208,8 +207,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
|
|
||||||
public void func_181022_b() {}
|
public void func_181022_b() {}
|
||||||
|
|
||||||
public void switchUseShader() {
|
public void switchUseShader() {}
|
||||||
}
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* What shader to use when spectating this entity
|
* What shader to use when spectating this entity
|
||||||
|
@ -218,8 +216,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
|
|
||||||
public void activateNextShader() {}
|
public void activateNextShader() {}
|
||||||
|
|
||||||
private void loadShader(ResourceLocation resourceLocationIn) {
|
private void loadShader(ResourceLocation resourceLocationIn) {}
|
||||||
}
|
|
||||||
|
|
||||||
public void onResourceManagerReload(IResourceManager var1) {}
|
public void onResourceManagerReload(IResourceManager var1) {}
|
||||||
|
|
||||||
|
@ -853,67 +850,67 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endSection();
|
this.mc.mcProfiler.endSection();
|
||||||
if (!this.mc.skipRenderWorld) {
|
if (!this.mc.skipRenderWorld) {
|
||||||
anaglyphEnable = this.mc.gameSettings.anaglyph;
|
anaglyphEnable = this.mc.gameSettings.anaglyph;
|
||||||
final ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
final ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||||
int l = scaledresolution.getScaledWidth();
|
int l = scaledresolution.getScaledWidth();
|
||||||
int i1 = scaledresolution.getScaledHeight();
|
int i1 = scaledresolution.getScaledHeight();
|
||||||
final int j1 = Mouse.getX() * l / this.mc.displayWidth;
|
final int j1 = Mouse.getX() * l / this.mc.displayWidth;
|
||||||
final int k1 = i1 - Mouse.getY() * i1 / this.mc.displayHeight - 1;
|
final int k1 = i1 - Mouse.getY() * i1 / this.mc.displayHeight - 1;
|
||||||
int l1 = this.mc.gameSettings.limitFramerate;
|
int l1 = this.mc.gameSettings.limitFramerate;
|
||||||
if (this.mc.theWorld != null) {
|
if (this.mc.theWorld != null) {
|
||||||
this.mc.mcProfiler.startSection("level");
|
this.mc.mcProfiler.startSection("level");
|
||||||
int i = Math.min(Minecraft.getDebugFPS(), l1);
|
int i = Math.min(Minecraft.getDebugFPS(), l1);
|
||||||
i = Math.max(i, 60);
|
i = Math.max(i, 60);
|
||||||
long j = System.nanoTime() - parLong1;
|
long j = System.nanoTime() - parLong1;
|
||||||
long k = Math.max((long) (1000000000 / i / 4) - j, 0L);
|
long k = Math.max((long) (1000000000 / i / 4) - j, 0L);
|
||||||
this.renderWorld(parFloat1, System.nanoTime() + k);
|
this.renderWorld(parFloat1, System.nanoTime() + k);
|
||||||
this.renderEndNanoTime = System.nanoTime();
|
this.renderEndNanoTime = System.nanoTime();
|
||||||
this.mc.mcProfiler.endStartSection("gui");
|
this.mc.mcProfiler.endStartSection("gui");
|
||||||
if (!this.mc.gameSettings.hideGUI || this.mc.currentScreen != null) {
|
if (!this.mc.gameSettings.hideGUI || this.mc.currentScreen != null) {
|
||||||
GlStateManager.alphaFunc(GL_GREATER, 0.1F);
|
GlStateManager.alphaFunc(GL_GREATER, 0.1F);
|
||||||
long framebufferAge = this.overlayFramebuffer.getAge();
|
long framebufferAge = this.overlayFramebuffer.getAge();
|
||||||
if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
|
if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
|
||||||
this.overlayFramebuffer.beginRender(mc.displayWidth, mc.displayHeight);
|
this.overlayFramebuffer.beginRender(mc.displayWidth, mc.displayHeight);
|
||||||
GlStateManager.colorMask(true, true, true, true);
|
GlStateManager.colorMask(true, true, true, true);
|
||||||
GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
GlStateManager.enableOverlayFramebufferBlending();
|
GlStateManager.enableOverlayFramebufferBlending();
|
||||||
this.mc.ingameGUI.renderGameOverlay(parFloat1);
|
this.mc.ingameGUI.renderGameOverlay(parFloat1);
|
||||||
GlStateManager.disableOverlayFramebufferBlending();
|
GlStateManager.disableOverlayFramebufferBlending();
|
||||||
this.overlayFramebuffer.endRender();
|
this.overlayFramebuffer.endRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setupOverlayRendering();
|
this.setupOverlayRendering();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
if (Minecraft.isFancyGraphicsEnabled()) {
|
if (Minecraft.isFancyGraphicsEnabled()) {
|
||||||
this.mc.ingameGUI.renderVignette(parFloat1, l, i1);
|
this.mc.ingameGUI.renderVignette(parFloat1, l, i1);
|
||||||
}
|
}
|
||||||
this.mc.ingameGUI.renderGameOverlayCrosshairs(l, i1);
|
this.mc.ingameGUI.renderGameOverlayCrosshairs(l, i1);
|
||||||
GlStateManager.bindTexture(this.overlayFramebuffer.getTexture());
|
GlStateManager.bindTexture(this.overlayFramebuffer.getTexture());
|
||||||
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
GlStateManager.blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
GlStateManager.blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GlStateManager.disableAlpha();
|
GlStateManager.disableAlpha();
|
||||||
GlStateManager.disableDepth();
|
GlStateManager.disableDepth();
|
||||||
GlStateManager.depthMask(false);
|
GlStateManager.depthMask(false);
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||||
worldrenderer.pos(0.0D, (double) i1, -90.0D).tex(0.0D, 0.0D).endVertex();
|
worldrenderer.pos(0.0D, (double) i1, -90.0D).tex(0.0D, 0.0D).endVertex();
|
||||||
worldrenderer.pos((double) l, (double) i1, -90.0D).tex(1.0D, 0.0D).endVertex();
|
worldrenderer.pos((double) l, (double) i1, -90.0D).tex(1.0D, 0.0D).endVertex();
|
||||||
worldrenderer.pos((double) l, 0.0D, -90.0D).tex(1.0D, 1.0D).endVertex();
|
worldrenderer.pos((double) l, 0.0D, -90.0D).tex(1.0D, 1.0D).endVertex();
|
||||||
worldrenderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 1.0D).endVertex();
|
worldrenderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 1.0D).endVertex();
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GlStateManager.depthMask(true);
|
GlStateManager.depthMask(true);
|
||||||
GlStateManager.enableDepth();
|
GlStateManager.enableDepth();
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
if (this.mc.gameSettings.hudPlayer) { // give the player model HUD good fps
|
if (this.mc.gameSettings.hudPlayer) { // give the player model HUD good fps
|
||||||
this.mc.ingameGUI.drawEaglerPlayerOverlay(l - 3, 3, parFloat1);
|
this.mc.ingameGUI.drawEaglerPlayerOverlay(l - 3, 3, parFloat1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endSection();
|
this.mc.mcProfiler.endSection();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1097,11 +1094,12 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||||
RenderHelper.disableStandardItemLighting();
|
RenderHelper.disableStandardItemLighting();
|
||||||
this.mc.mcProfiler.endStartSection("terrain_setup");
|
this.mc.mcProfiler.endStartSection("terrain_setup");
|
||||||
new Thread(){
|
new Thread() {
|
||||||
public void run(){
|
public void run() {
|
||||||
renderglobal.setupTerrain(entity, (double) partialTicks, frustum, frameCount++, mc.thePlayer.isSpectator());
|
renderglobal.setupTerrain(entity, (double) partialTicks, frustum, frameCount++, mc.thePlayer.isSpectator());
|
||||||
}
|
}
|
||||||
}.start();
|
}
|
||||||
|
.start();
|
||||||
if (pass == 0 || pass == 2) {
|
if (pass == 0 || pass == 2) {
|
||||||
this.mc.mcProfiler.endStartSection("updatechunks");
|
this.mc.mcProfiler.endStartSection("updatechunks");
|
||||||
this.mc.renderGlobal.updateChunks(finishTimeNano);
|
this.mc.renderGlobal.updateChunks(finishTimeNano);
|
||||||
|
@ -1161,13 +1159,11 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
if (!this.debugView) {
|
if (!this.debugView) {
|
||||||
this.enableLightmap();
|
this.enableLightmap();
|
||||||
this.mc.mcProfiler.endStartSection("litParticles");
|
this.mc.mcProfiler.endStartSection("litParticles");
|
||||||
if(!W.noParticles().isEnabled())
|
if (!W.noParticles().isEnabled()) effectrenderer.renderLitParticles(entity, partialTicks);
|
||||||
effectrenderer.renderLitParticles(entity, partialTicks);
|
|
||||||
RenderHelper.disableStandardItemLighting();
|
RenderHelper.disableStandardItemLighting();
|
||||||
this.setupFog(0, partialTicks);
|
this.setupFog(0, partialTicks);
|
||||||
this.mc.mcProfiler.endStartSection("particles");
|
this.mc.mcProfiler.endStartSection("particles");
|
||||||
if (!W.noParticles().isEnabled())
|
if (!W.noParticles().isEnabled()) effectrenderer.renderParticles(entity, partialTicks);
|
||||||
effectrenderer.renderParticles(entity, partialTicks);
|
|
||||||
this.disableLightmap();
|
this.disableLightmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -621,8 +621,7 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
||||||
RenderChunk renderchunk2 = this.func_181562_a(blockpos, renderchunk3, enumfacing1);
|
RenderChunk renderchunk2 = this.func_181562_a(blockpos, renderchunk3, enumfacing1);
|
||||||
if (
|
if (
|
||||||
(
|
(
|
||||||
!flag1 ||
|
!flag1 || !renderglobal$containerlocalrenderinformation1.setFacing.contains(enumfacing1.getOpposite()) // TODO:
|
||||||
!renderglobal$containerlocalrenderinformation1.setFacing.contains(enumfacing1.getOpposite()) // TODO:
|
|
||||||
) &&
|
) &&
|
||||||
(!flag1 || enumfacing2 == null || renderchunk3.getCompiledChunk().isVisible(enumfacing2.getOpposite(), enumfacing1)) &&
|
(!flag1 || enumfacing2 == null || renderchunk3.getCompiledChunk().isVisible(enumfacing2.getOpposite(), enumfacing1)) &&
|
||||||
renderchunk2 != null &&
|
renderchunk2 != null &&
|
||||||
|
@ -1859,4 +1858,4 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
||||||
|
|
||||||
return "" + Minecraft.getDebugFPS() + "fps | C: " + j + "/" + i + ", E: " + this.countEntitiesRendered + "+" + k + ", " + renderDispatcher.getDebugInfo();
|
return "" + Minecraft.getDebugFPS() + "fps | C: " + j + "/" + i + ", E: " + this.countEntitiesRendered + "+" + k + ", " + renderDispatcher.getDebugInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,7 +296,6 @@ public abstract class Render<T extends Entity> {
|
||||||
public FontRenderer getFontRendererFromRenderManager() {
|
public FontRenderer getFontRendererFromRenderManager() {
|
||||||
return this.renderManager.getFontRenderer();
|
return this.renderManager.getFontRenderer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Renders an entity's name above its head
|
* Renders an entity's name above its head
|
||||||
|
@ -322,9 +321,9 @@ public abstract class Render<T extends Entity> {
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
byte b0 = 0;
|
byte b0 = 0;
|
||||||
|
|
||||||
if(entityIn instanceof AbstractClientPlayer){
|
if (entityIn instanceof AbstractClientPlayer) {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
||||||
Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 -12, -2, 10, 10, 10, 10, 10, 10);
|
Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 - 12, -2, 10, 10, 10, 10, 10, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str.equals("deadmau5")) {
|
if (str.equals("deadmau5")) {
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
package net.minecraft.client.settings;
|
package net.minecraft.client.settings;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
import dev.resent.Resent;
|
||||||
|
import dev.resent.module.base.ModManager;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
@ -8,16 +14,6 @@ import java.io.PrintWriter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
|
|
||||||
import dev.resent.Resent;
|
|
||||||
import dev.resent.module.base.ModManager;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
|
import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
|
import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
|
||||||
|
@ -38,6 +34,7 @@ import net.minecraft.entity.player.EnumPlayerModelParts;
|
||||||
import net.minecraft.network.play.client.C15PacketClientSettings;
|
import net.minecraft.network.play.client.C15PacketClientSettings;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.world.EnumDifficulty;
|
import net.minecraft.world.EnumDifficulty;
|
||||||
|
import org.json.JSONArray;
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||||
|
@ -1045,7 +1042,6 @@ public class GameSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
Resent.INSTANCE.load(astring);
|
Resent.INSTANCE.load(astring);
|
||||||
|
|
||||||
} catch (Exception var8) {
|
} catch (Exception var8) {
|
||||||
logger.warn("Skipping bad option: " + s);
|
logger.warn("Skipping bad option: " + s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
package net.minecraft.entity;
|
package net.minecraft.entity;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
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 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.Collection;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -849,7 +847,6 @@ public abstract class EntityLivingBase extends Entity {
|
||||||
* account.
|
* account.
|
||||||
*/
|
*/
|
||||||
private int getArmSwingAnimationEnd() {
|
private int getArmSwingAnimationEnd() {
|
||||||
|
|
||||||
return this.isPotionActive(Potion.digSpeed) ? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1 : (this.isPotionActive(Potion.digSlowdown) ? 6 + (1 + this.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : 6);
|
return this.isPotionActive(Potion.digSpeed) ? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1 : (this.isPotionActive(Potion.digSlowdown) ? 6 + (1 + this.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1452,7 +1449,6 @@ public abstract class EntityLivingBase extends Entity {
|
||||||
* interpolated look vector
|
* interpolated look vector
|
||||||
*/
|
*/
|
||||||
public Vec3 getLook(float f) {
|
public Vec3 getLook(float f) {
|
||||||
|
|
||||||
if (this instanceof EntityPlayerSP) {
|
if (this instanceof EntityPlayerSP) {
|
||||||
return super.getLook(f);
|
return super.getLook(f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package net.minecraft.entity.player;
|
package net.minecraft.entity.player;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
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.Resent;
|
import dev.resent.Resent;
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||||
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -73,8 +71,8 @@ import net.minecraft.util.FoodStats;
|
||||||
import net.minecraft.util.IChatComponent;
|
import net.minecraft.util.IChatComponent;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.util.Vec3;
|
|
||||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.EnumDifficulty;
|
import net.minecraft.world.EnumDifficulty;
|
||||||
import net.minecraft.world.IInteractionObject;
|
import net.minecraft.world.IInteractionObject;
|
||||||
import net.minecraft.world.LockCode;
|
import net.minecraft.world.LockCode;
|
||||||
|
@ -990,13 +988,11 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS
|
||||||
* Args: targetEntity
|
* Args: targetEntity
|
||||||
*/
|
*/
|
||||||
public void attackTargetEntityWithCurrentItem(Entity entity) {
|
public void attackTargetEntityWithCurrentItem(Entity entity) {
|
||||||
|
|
||||||
ModManager.reachDisplay.onAttack(entity);
|
ModManager.reachDisplay.onAttack(entity);
|
||||||
ModManager.comboCounter.onAttack(entity);
|
ModManager.comboCounter.onAttack(entity);
|
||||||
|
|
||||||
MovingObjectPosition hitResult = Minecraft.getMinecraft().objectMouseOver;
|
MovingObjectPosition hitResult = Minecraft.getMinecraft().objectMouseOver;
|
||||||
if (hitResult == null)
|
if (hitResult == null) return;
|
||||||
return;
|
|
||||||
if (hitResult.typeOfHit == MovingObjectType.ENTITY && ModManager.crystalOptimizer.isEnabled()) {
|
if (hitResult.typeOfHit == MovingObjectType.ENTITY && ModManager.crystalOptimizer.isEnabled()) {
|
||||||
MovingObjectPosition entityHitResult = hitResult;
|
MovingObjectPosition entityHitResult = hitResult;
|
||||||
Entity crystal = entityHitResult.entityHit;
|
Entity crystal = entityHitResult.entityHit;
|
||||||
|
@ -1004,7 +1000,7 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS
|
||||||
assert Minecraft.getMinecraft().thePlayer != null;
|
assert Minecraft.getMinecraft().thePlayer != null;
|
||||||
crystal.kill();
|
crystal.kill();
|
||||||
crystal.setDead();
|
crystal.setDead();
|
||||||
crystal.onKillEntity((EntityLivingBase)crystal);
|
crystal.onKillEntity((EntityLivingBase) crystal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,14 +47,14 @@ public class WorldProviderHell extends WorldProvider {
|
||||||
protected void generateLightBrightnessTable() {
|
protected void generateLightBrightnessTable() {
|
||||||
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)) {
|
||||||
float f = 0.1F;
|
float f = 0.1F;
|
||||||
|
|
||||||
for (int i = 0; i <= 15; ++i) {
|
for (int i = 0; i <= 15; ++i) {
|
||||||
float f1 = 1.0F - (float) i / 15.0F;
|
float f1 = 1.0F - (float) i / 15.0F;
|
||||||
this.lightBrightnessTable[i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f;
|
this.lightBrightnessTable[i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Returns 'true' if in the "main surface world", but 'false' if
|
* Returns 'true' if in the "main surface world", but 'false' if
|
||||||
|
|
Loading…
Reference in New Issue
Block a user