Direction mod
This commit is contained in:
parent
8a539233ac
commit
5755ed39f7
59679
javascript/classes.js
59679
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -7,19 +7,24 @@ import dev.resent.module.setting.BooleanSetting;
|
|||
import dev.resent.ui.Theme;
|
||||
import dev.resent.util.render.Color;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
@RenderModule(name = "Info", category = Category.HUD, x = 140, y = 50)
|
||||
@RenderModule(name = "Info", category = Category.HUD, x = 140, y = 50, hasSetting = true)
|
||||
public class Info extends RenderMod {
|
||||
|
||||
public Info(){
|
||||
addSetting(direction);
|
||||
}
|
||||
|
||||
public BooleanSetting direction = new BooleanSetting("Direction", "", true);
|
||||
public static int yes = 6;
|
||||
public static final String[] directionsF = new String[]{"\u00A79S\u00A7r", "\u00A72W\u00A7r", "\u00A74N\u00A7r", "\u00A76E\u00A7r"};
|
||||
|
||||
public int getWidth() {
|
||||
return mc.fontRendererObj.getStringWidth("X: -99999999 + ");
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return mc.fontRendererObj.FONT_HEIGHT * yes;
|
||||
return mc.fontRendererObj.FONT_HEIGHT * 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,19 +32,16 @@ public class Info extends RenderMod {
|
|||
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) {
|
||||
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(" 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());
|
||||
if (!direction.getValue()) yes = 6;
|
||||
//if (direction.getVtalue()) {
|
||||
// drawStringWithShadow(" Dir: " + Direction.directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||
|
||||
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(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName, this.x + 5, this.y + 44, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||
//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, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||
yes = 7;
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class TabGui extends RenderMod{
|
|||
|
||||
public void draw() {
|
||||
Gui.drawRect(x, y, x+70, y+3+Category.values().length*16, 0x90000000);
|
||||
RenderUtils.drawChromaRectangle(x, y+current*16, x+70, y+19f+current*16, 0.6f, 0xff900000);
|
||||
RenderUtils.drawChromaRectangle(x, y+current*16, x+70, y+18.5f+current*16, 0.6f, 0xff900000);
|
||||
|
||||
int offset = 0;
|
||||
for(Category c : Category.values()){
|
||||
|
@ -41,7 +41,7 @@ public class TabGui extends RenderMod{
|
|||
return;
|
||||
|
||||
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+19f+category.i*16, 0.6f, 0xff900000);
|
||||
RenderUtils.drawChromaRectangle(x+70, y+category.i*16, x+138, y+18.5f+category.i*16, 0.6f, 0xff900000);
|
||||
|
||||
offset = 0;
|
||||
for(Mod m : Resent.INSTANCE.modManager.modsInCategory(category)){
|
||||
|
|
Loading…
Reference in New Issue
Block a user