Fix info mod
This commit is contained in:
parent
43115ef1d4
commit
a0827e1826
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,30 +4,28 @@ import dev.resent.module.base.Category;
|
|||
import dev.resent.module.base.RenderModule;
|
||||
import dev.resent.setting.BooleanSetting;
|
||||
import dev.resent.util.render.Color;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.Direction;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.src.MathHelper;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
public class Info extends RenderModule{
|
||||
|
||||
public Info(){
|
||||
super("Info", Category.HUD, 4, 14, true);
|
||||
addSetting(direction);
|
||||
super("Info", Category.HUD, 4, 14);
|
||||
//addSetting(direction);
|
||||
}
|
||||
|
||||
public BooleanSetting direction = new BooleanSetting("Direction", "", true);
|
||||
public static int yes = 6;
|
||||
|
||||
public int getWidth(){ return Minecraft.getMinecraft().fontRenderer.getStringWidth("X: -99999999 + "); }
|
||||
public int getHeight() { return Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * yes; };
|
||||
public int getWidth(){ return mc.fontRendererObj.getStringWidth("X: -99999999 + "); }
|
||||
public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT * yes; };
|
||||
|
||||
@Override
|
||||
public void draw() {
|
||||
int px = (int) mc.thePlayer.posX;
|
||||
int py = (int) mc.thePlayer.posY;
|
||||
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) {
|
||||
Gui.drawRect(this.x, this.y, this.x+this.getWidth(), this.y+this.getHeight(), new Color(0, 0, 0, 200).getRGB());
|
||||
mc.fontRendererObj.drawStringWithShadow(" X: " + px, this.x+5, this.y + 14, -1);
|
||||
|
@ -35,12 +33,12 @@ public class Info extends RenderModule{
|
|||
mc.fontRendererObj.drawStringWithShadow(" Z: " + pz, this.x+5, this.y + 34, -1);
|
||||
if (!direction.getValue())
|
||||
yes = 6;
|
||||
if (direction.getValue()) {
|
||||
mc.fontRendererObj.drawStringWithShadow(" Dir: " + Direction.directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, -1);
|
||||
mc.fontRendererObj.drawStringWithShadow(" Biome: " + mc.theWorld.getBiomeGenForCoords(px, py), this.x+5, this.y+44, -1);
|
||||
//if (direction.getValue()) {
|
||||
// mc.fontRendererObj.drawStringWithShadow(" Dir: " + Direction.directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, -1);
|
||||
mc.fontRendererObj.drawStringWithShadow(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName, this.x+5, this.y+44, -1);
|
||||
//mc.fontRendererObj.drawStringWithShadow(" A: " + MathHelper.floor_double((double)mc.thePlayer.rotationYaw>360 || mc.thePlayer.rotationYaw<-360 ? mc.thePlayer.rotationYaw-360 : mc.thePlayer.rotationYaw) + "°", this.x + mc.fontRendererObj.getStringWidth(" D: N "), this.y + 44, -1);
|
||||
yes = 7;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class KeyBinding implements Comparable<KeyBinding> {
|
|||
private final int keyCodeDefault;
|
||||
private final String keyCategory;
|
||||
public int keyCode;
|
||||
private boolean pressed;
|
||||
public boolean pressed;
|
||||
private int pressTime;
|
||||
|
||||
public static void onTick(int keyCode) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user