mirror of
https://github.com/Athena-Operations/Athena-Client.git
synced 2024-11-10 04:01:32 +01:00
local
This commit is contained in:
commit
a11e1b06f9
@ -98,6 +98,27 @@ public class FontUtils
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean readBoolean(final Properties props, final String key, final boolean defVal) {
|
||||
final String s = props.getProperty(key);
|
||||
|
||||
if (s == null) {
|
||||
return defVal;
|
||||
} else {
|
||||
final String s1 = s.toLowerCase().trim();
|
||||
|
||||
if (!s1.equals("true") && !s1.equals("on")) {
|
||||
if (!s1.equals("false") && !s1.equals("off")) {
|
||||
Config.warn("Invalid value for " + key + ": " + s);
|
||||
return defVal;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ResourceLocation getHdFontLocation(ResourceLocation p_getHdFontLocation_0_)
|
||||
{
|
||||
if (!Config.isCustomFonts())
|
||||
|
@ -77,7 +77,7 @@ public class Athena {
|
||||
|
||||
|
||||
if(SocketClient.isClientRunning()) {
|
||||
JOptionPane.showMessageDialog(null, "If the client is currently running, please close it before proceeding. \nOtherwise, delete the 'client.lock' file in the '.minecraft/Athena' directory.");
|
||||
JOptionPane.showMessageDialog(null, "Port 1337 already in use.");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,7 @@ public enum Category {
|
||||
MACROS("MACROS", "Athena/gui/mods/cps.png"),
|
||||
WAYPOINTS("WAYPOINTS", "Athena/gui/menu/waypoints.png"),
|
||||
PROFILES("PROFILES", "Athena/gui/menu/profiles.png"),
|
||||
COSMETICS("COSMETICS", "Athena/gui/menu/cosmetics.png"),
|
||||
GROUPS("GROUPS", "Athena/gui/menu/groups.png");
|
||||
COSMETICS("COSMETICS", "Athena/gui/menu/cosmetics.png");
|
||||
|
||||
private String name;
|
||||
private String icon;
|
||||
|
@ -139,7 +139,7 @@ public class IngameMenu extends MinecraftMenuImpl implements DrawImpl {
|
||||
RoundedUtils.drawRoundedOutline(menu.getX(), menu.getY(), menu.getX() + menu.getWidth(), menu.getY() + menu.getHeight(), 54, 5, new Color(50, 50, 50, 255).getRGB());
|
||||
RoundedUtils.drawRoundedRect(menu.getX(), menu.getY(), menu.getX() + menu.getWidth(), menu.getY() + menu.getHeight(), 54, new Color(30, 30, 30, 255).getRGB());
|
||||
|
||||
FontManager.font1.drawString(Athena.INSTANCE.getClientName().toUpperCase(), menu.getX() + 60, menu.getY() + 20, MENU_HEADER_TEXT_COLOR);
|
||||
rip.athena.client.utils.font.FontManager.getNunito(30).drawString(Athena.INSTANCE.getClientName().toUpperCase(), menu.getX() + 60, menu.getY() + 20, MENU_HEADER_TEXT_COLOR);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/logo/Athena.png"), (int) (menu.getX() + FontManager.font1.getStringWidth(Athena.INSTANCE.getClientName().toUpperCase()) + 70), (int) (menu.getY() - 10 + FontManager.font1.getHeight(Athena.INSTANCE.getClientName().toUpperCase())), 30, 30);
|
||||
drawShadowDown(menu.getX(), menu.getY() + 58, menu.getWidth());
|
||||
|
||||
|
@ -34,7 +34,6 @@ public class PageManager {
|
||||
pages.put(Category.WAYPOINTS, new WaypointsPage(mc, menu, parent));
|
||||
pages.put(Category.PROFILES, new ProfilesPage(mc, menu, parent));
|
||||
pages.put(Category.COSMETICS, new CosmeticsPage(mc, menu, parent));
|
||||
pages.put(Category.GROUPS, new GroupsPage(mc, menu, parent));
|
||||
}
|
||||
|
||||
public Map<Category, Page> getPages() {
|
||||
|
@ -1,107 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.components.groups;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import rip.athena.client.gui.clickgui.components.profiles.ProfilesBase;
|
||||
import rip.athena.client.modules.impl.other.Settings;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupBase extends ProfilesBase {
|
||||
protected static int GREEN_COLOR = new Color(2, 222, 9, 255).getRGB();
|
||||
protected static int GRAY_COLOR = new Color(164, 164, 164, 255).getRGB();
|
||||
|
||||
protected String leader;
|
||||
protected int membersOnline;
|
||||
protected int totalMembers;
|
||||
|
||||
public GroupBase(String text, String leader, int membersOnline, int totalMembers, int x, int y, int width, int height) {
|
||||
super(text, x, y, width, height);
|
||||
|
||||
this.leader = leader;
|
||||
this.membersOnline = membersOnline;
|
||||
this.totalMembers = totalMembers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int mouseX = parent.getMouseX();
|
||||
int width = this.width;
|
||||
|
||||
int lineColor = getColor(DrawType.LINE, ButtonState.NORMAL);
|
||||
int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
|
||||
int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor);
|
||||
|
||||
drawHorizontalLine(x, y, width + 1, 1, lineColor);
|
||||
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
|
||||
drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
|
||||
drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor);
|
||||
|
||||
drawShadowUp(x, y, width + 1);
|
||||
drawShadowLeft(x, y, height + 1);
|
||||
drawShadowDown(x, y + height + 1, width + 1);
|
||||
drawShadowRight(x + width + 1, y, height + 1);
|
||||
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth(text) / 2, y + 30, textColor);
|
||||
|
||||
String text = "LEADER: ";
|
||||
int tWidth = getStringWidth(text);
|
||||
int yAdd = 50;
|
||||
int xOffset = 5;
|
||||
|
||||
drawText(text, x + xOffset, y + yAdd, textColor);
|
||||
drawText(leader, x + xOffset + tWidth, y + yAdd, GRAY_COLOR);
|
||||
|
||||
yAdd += 10;
|
||||
text = "MEMBERS ONLINE: ";
|
||||
tWidth = getStringWidth(text);
|
||||
drawText(text, x + xOffset, y + yAdd, textColor);
|
||||
drawText(membersOnline + "", x + xOffset + tWidth, y + yAdd, GREEN_COLOR);
|
||||
|
||||
yAdd += 10;
|
||||
text = "CURRENT MEMBERS: ";
|
||||
tWidth = getStringWidth(text);
|
||||
drawText(text, x + xOffset, y + yAdd, textColor);
|
||||
drawText(totalMembers + "", x + xOffset + tWidth, y + yAdd, GRAY_COLOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawText(String string, int x, int y, int color) {
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(string, x, y, color);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(string, x, y, color);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getStringWidth(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getHeight(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.components.groups;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.MenuComponent;
|
||||
import rip.athena.client.gui.framework.MenuPriority;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import rip.athena.client.gui.clickgui.IngameMenu;
|
||||
import rip.athena.client.modules.impl.other.Settings;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupListEntry extends MenuComponent {
|
||||
protected String text;
|
||||
|
||||
public GroupListEntry(String text, int x, int y, int width, int height) {
|
||||
super(x, y, width, height);
|
||||
this.text = text.toUpperCase();
|
||||
|
||||
setPriority(MenuPriority.LOW);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitColors() {
|
||||
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(255, 255, 255, IngameMenu.MENU_ALPHA));
|
||||
|
||||
setColor(DrawType.BACKGROUND, ButtonState.NORMAL, new Color(35, 35, 35, IngameMenu.MENU_ALPHA));
|
||||
|
||||
setColor(DrawType.LINE, ButtonState.NORMAL, new Color(48, 47, 49, IngameMenu.MENU_ALPHA));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int mouseX = parent.getMouseX();
|
||||
int width = this.width;
|
||||
|
||||
int lineColor = getColor(DrawType.LINE, ButtonState.NORMAL);
|
||||
int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
|
||||
int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor);
|
||||
|
||||
drawHorizontalLine(x, y, width + 1, 1, lineColor);
|
||||
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
|
||||
drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
|
||||
drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor);
|
||||
|
||||
drawShadowUp(x, y, width + 1);
|
||||
drawShadowLeft(x, y, height + 1);
|
||||
drawShadowDown(x, y + height + 1, width + 1);
|
||||
drawShadowRight(x + width + 1, y, height + 1);
|
||||
|
||||
drawText(text, x + 15, y + height / 2 - getStringHeight(text) / 2, textColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawText(String string, int x, int y, int color) {
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(string, x, y, color);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(string, x, y, color);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getStringWidth(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getHeight(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,104 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.components.groups;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.MenuComponent;
|
||||
import rip.athena.client.gui.framework.MenuPriority;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import rip.athena.client.gui.clickgui.IngameMenu;
|
||||
import rip.athena.client.modules.impl.other.Settings;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupListMiniEntry extends MenuComponent {
|
||||
protected String name;
|
||||
protected String value;
|
||||
|
||||
public GroupListMiniEntry(String name, String value, int x, int y, int width, int height) {
|
||||
super(x, y, width, height);
|
||||
this.name = name.toUpperCase();
|
||||
this.value = value.toUpperCase();
|
||||
|
||||
setPriority(MenuPriority.MEDIUM);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitColors() {
|
||||
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(255, 255, 255, IngameMenu.MENU_ALPHA));
|
||||
setColor(DrawType.TEXT, ButtonState.POPUP, new Color(112, 112, 113, IngameMenu.MENU_ALPHA));
|
||||
|
||||
setColor(DrawType.BACKGROUND, ButtonState.NORMAL, new Color(35, 35, 35, IngameMenu.MENU_ALPHA));
|
||||
setColor(DrawType.BACKGROUND, ButtonState.POPUP, new Color(17,17, 19, IngameMenu.MENU_ALPHA));
|
||||
|
||||
setColor(DrawType.LINE, ButtonState.NORMAL, new Color(75, 74, 76, IngameMenu.MENU_ALPHA));
|
||||
setColor(DrawType.LINE, ButtonState.POPUP, new Color(48, 48, 50, IngameMenu.MENU_ALPHA));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int mouseX = parent.getMouseX();
|
||||
int width = this.width;
|
||||
|
||||
int lineColor = getColor(DrawType.LINE, ButtonState.NORMAL);
|
||||
int lineValueColor = getColor(DrawType.LINE, ButtonState.POPUP);
|
||||
int textColor = getColor(DrawType.TEXT, ButtonState.POPUP);
|
||||
int valueTextColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
|
||||
int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
int valueBackgroundColor = getColor(DrawType.BACKGROUND, ButtonState.POPUP);
|
||||
|
||||
int userWidth = getStringWidth(name) + 9;
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, userWidth, height, backgroundColor);
|
||||
|
||||
drawHorizontalLine(x, y, userWidth + 1, 1, lineColor);
|
||||
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
|
||||
drawHorizontalLine(x, y + height, userWidth + 1, 1, lineColor);
|
||||
drawVerticalLine(x + userWidth, y + 1, height - 1, 1, lineColor);
|
||||
|
||||
drawText(name, x + userWidth / 2 - getStringWidth(name) / 2 + 2, y + height / 2 - getStringHeight(name) / 2, textColor);
|
||||
|
||||
int endPos = width - userWidth;
|
||||
|
||||
drawHorizontalLine(x + userWidth + 1, y, endPos, 1, lineValueColor);
|
||||
drawHorizontalLine(x + userWidth + 1, y + height, endPos, 1, lineValueColor);
|
||||
drawVerticalLine(x + endPos + userWidth, y + 1, height - 1, 1, lineValueColor);
|
||||
|
||||
drawText(value, x + userWidth + endPos / 2 - getStringWidth(value) / 2, y + height / 2 - getStringHeight(value) / 2, valueTextColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawText(String string, int x, int y, int color) {
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(string, x, y, color);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(string, x, y, color);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getStringWidth(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getHeight(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.components.groups;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import rip.athena.client.gui.framework.components.MenuButton;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import rip.athena.client.gui.clickgui.pages.groups.GroupSubTab;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupTextButton extends MenuButton {
|
||||
public GroupTextButton(GroupSubTab category, int x, int y) {
|
||||
super(category.getText(), x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitColors() {
|
||||
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(126, 126, 126, 255));
|
||||
setColor(DrawType.TEXT, ButtonState.ACTIVE, new Color(235, 235, 235, 255));
|
||||
setColor(DrawType.TEXT, ButtonState.HOVER, new Color(160, 160, 160, 255));
|
||||
setColor(DrawType.TEXT, ButtonState.HOVERACTIVE, new Color(180, 180, 180, 255));
|
||||
setColor(DrawType.TEXT, ButtonState.DISABLED, new Color(255, 255, 255, 255));
|
||||
|
||||
super.onInitColors();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int width = (this.width == -1 && this.height == -1) ? (getStringWidth(text) + minOffset * 2) : this.width;
|
||||
int height = (this.width == -1 && this.height == -1) ? (getStringHeight(text) + minOffset * 2) : this.height;
|
||||
|
||||
int backgroundColor = getColor(DrawType.BACKGROUND, lastState);
|
||||
int textColor = getColor(DrawType.TEXT, lastState);
|
||||
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, textColor);
|
||||
mouseDown = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.components.groups;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.MenuComponent;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import rip.athena.client.gui.clickgui.IngameMenu;
|
||||
import rip.athena.client.modules.impl.other.Settings;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupUserListHeader extends MenuComponent {
|
||||
protected String text;
|
||||
protected int amount;
|
||||
|
||||
public GroupUserListHeader(String text, int amount, int x, int y, int width, int height) {
|
||||
super(x, y, width, height);
|
||||
|
||||
this.text = text;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitColors() {
|
||||
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(255, 255, 255, IngameMenu.MENU_ALPHA));
|
||||
setColor(DrawType.TEXT, ButtonState.POPUP, new Color(98, 98, 99, IngameMenu.MENU_ALPHA));
|
||||
|
||||
setColor(DrawType.BACKGROUND, ButtonState.NORMAL, new Color(35, 35, 35, IngameMenu.MENU_ALPHA));
|
||||
|
||||
setColor(DrawType.LINE, ButtonState.NORMAL, new Color(15, 14, 16, IngameMenu.MENU_ALPHA));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
if(parent == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int mouseX = parent.getMouseX();
|
||||
|
||||
int lineColor = getColor(DrawType.LINE, ButtonState.NORMAL);
|
||||
int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
|
||||
int textUsersColor = getColor(DrawType.TEXT, ButtonState.POPUP);
|
||||
int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor);
|
||||
|
||||
drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
|
||||
|
||||
drawText(text, x + 30, y + height / 2 - getStringHeight(text) / 2, textColor);
|
||||
drawText(amount + "", x + width - 30, y + height / 2 - getStringHeight(amount + "") / 2, textUsersColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawText(String string, int x, int y, int color) {
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(string, x, y, color);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(string, x, y, color);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getStringWidth(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getHeight(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.components.groups;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.MenuComponent;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import rip.athena.client.gui.clickgui.IngameMenu;
|
||||
import rip.athena.client.modules.impl.other.Settings;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupUserListUser extends MenuComponent {
|
||||
protected ResourceLocation location;
|
||||
protected String name;
|
||||
protected String rank;
|
||||
protected boolean online;
|
||||
|
||||
public GroupUserListUser(ResourceLocation location, String name, String rank, boolean online, int x, int y, int width, int height) {
|
||||
super(x, y, width, height);
|
||||
|
||||
this.location = location;
|
||||
this.name = name;
|
||||
this.rank = rank + " | ";
|
||||
this.online = online;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitColors() {
|
||||
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(255, 255, 255, IngameMenu.MENU_ALPHA));
|
||||
setColor(DrawType.TEXT, ButtonState.POPUP, new Color(98, 98, 99, IngameMenu.MENU_ALPHA));
|
||||
|
||||
setColor(DrawType.BACKGROUND, ButtonState.NORMAL, new Color(164, 164, 164, IngameMenu.MENU_ALPHA));
|
||||
setColor(DrawType.BACKGROUND, ButtonState.POPUP, new Color(0, 250, 6, IngameMenu.MENU_ALPHA));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int mouseX = parent.getMouseX();
|
||||
int width = this.width;
|
||||
|
||||
int rankColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
|
||||
int textColor = getColor(DrawType.TEXT, ButtonState.POPUP);
|
||||
int color = online ? getColor(DrawType.BACKGROUND, ButtonState.POPUP) : getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
|
||||
drawImage(location, x + 10, y + 1, 20, 20);
|
||||
|
||||
drawText(rank, x + 40, y + height / 2 - getStringHeight(rank) / 2, rankColor);
|
||||
drawText(name, x + 40 + getStringWidth(rank), y + height / 2 - getStringHeight(name) / 2, textColor);
|
||||
|
||||
int roundX = x + width - 25;
|
||||
int roundY = y + height / 2 - 2;
|
||||
|
||||
DrawUtils.drawRoundedRect(roundX, roundY, roundX + 4, roundY + 4, 3, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawText(String string, int x, int y, int color) {
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(string, x, y, color);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(string, x, y, color);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getStringWidth(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getHeight(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,159 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.components.groups;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import rip.athena.client.gui.framework.MenuPriority;
|
||||
import rip.athena.client.gui.framework.components.MenuDropdown;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
import rip.athena.client.gui.framework.draw.DrawType;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupValueList extends MenuDropdown {
|
||||
protected int cursorWidth = 25;
|
||||
protected String id;
|
||||
|
||||
public GroupValueList(String id, String[] values, int x, int y, int height) {
|
||||
super(values, x, y);
|
||||
this.id = id;
|
||||
this.height = height;
|
||||
width += cursorWidth * 2;
|
||||
width += getStringWidth(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitColors() {
|
||||
super.onInitColors();
|
||||
|
||||
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(162, 162, 162, 255));
|
||||
setColor(DrawType.TEXT, ButtonState.HOVER, new Color(182, 182, 182, 255));
|
||||
|
||||
setColor(DrawType.BACKGROUND, ButtonState.NORMAL, new Color(35, 35, 35, 255));
|
||||
setColor(DrawType.BACKGROUND, ButtonState.HOVER, new Color(24, 24, 27, 255));
|
||||
|
||||
setColor(DrawType.LINE, ButtonState.NORMAL, new Color(46, 46, 48, 255));
|
||||
setColor(DrawType.LINE, ButtonState.HOVER, new Color(53, 53, 55, 255));
|
||||
setColor(DrawType.LINE, ButtonState.POPUP, new Color(120, 120, 120, 255));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreSort() {
|
||||
if(parent == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int width = this.width + textOffset;
|
||||
int mouseX = parent.getMouseX();
|
||||
int mouseY = parent.getMouseY();
|
||||
|
||||
ButtonState state = ButtonState.NORMAL;
|
||||
|
||||
if (!disabled) {
|
||||
boolean inRange = false;
|
||||
|
||||
if (mouseX >= x && mouseX <= x + width + arrowOffset - 1) {
|
||||
if (mouseY >= y && mouseY <= y + height + 1) {
|
||||
state = ButtonState.HOVER;
|
||||
|
||||
if(mouseDown) {
|
||||
if(mouseX < x + cursorWidth - 1) {
|
||||
if(index - 1 >= 0) {
|
||||
index--;
|
||||
} else {
|
||||
index = values.length - 1;
|
||||
}
|
||||
|
||||
onAction();
|
||||
} else if(mouseX > x + width - cursorWidth - 1) {
|
||||
if(index + 1 < values.length) {
|
||||
index++;
|
||||
} else {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
onAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
state = ButtonState.DISABLED;
|
||||
}
|
||||
|
||||
if(state == ButtonState.HOVER || state == ButtonState.HOVERACTIVE) {
|
||||
setPriority(MenuPriority.HIGH);
|
||||
} else {
|
||||
setPriority(MenuPriority.MEDIUM);
|
||||
}
|
||||
|
||||
lastState = state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
int x = this.getRenderX();
|
||||
int y = this.getRenderY();
|
||||
int width = this.width + textOffset + arrowOffset + 1;
|
||||
int height = this.height;
|
||||
|
||||
int popupColor = getColor(DrawType.LINE, ButtonState.POPUP);
|
||||
int backgroundColor = getColor(DrawType.BACKGROUND, lastState);
|
||||
int lineColor = getColor(DrawType.LINE, ButtonState.NORMAL);
|
||||
int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
|
||||
|
||||
drawHorizontalLine(x, y, width + 1, 1, lineColor);
|
||||
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
|
||||
drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
|
||||
drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor);
|
||||
|
||||
int mouseX = parent.getMouseX();
|
||||
int mouseY = parent.getMouseY();
|
||||
int defBg = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
int cache = backgroundColor;
|
||||
|
||||
if(mouseX > x + cursorWidth - 1) {
|
||||
backgroundColor = defBg;
|
||||
}
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, cursorWidth, height + 1, popupColor);
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + 1, y + 1, cursorWidth - 2, height - 1, backgroundColor);
|
||||
drawText("-", x + 3 + (cursorWidth / 2) - getStringWidth("-") / 2, y + height / 2 - getStringHeight("-") / 2, textColor);
|
||||
|
||||
if(mouseX < x + width - cursorWidth - 1) {
|
||||
backgroundColor = defBg;
|
||||
} else {
|
||||
backgroundColor = cache;
|
||||
}
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + width - cursorWidth, y, cursorWidth, height + 1, popupColor);
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + width - cursorWidth + 1, y + 1, cursorWidth - 2, height - 1, backgroundColor);
|
||||
drawText("+", x + width - cursorWidth + 3 + (cursorWidth / 2) - getStringWidth("+") / 2, y + height / 2 - getStringHeight("+") / 2, textColor);
|
||||
|
||||
String text = id + " | " + values[index].toUpperCase();
|
||||
drawText(text, x + width / 2 - getStringWidth(text) / 2, y + height / 2 - getStringHeight(text) / 2, textColor);
|
||||
|
||||
mouseDown = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawText(String text, int x, int y, int color) {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package rip.athena.client.gui.clickgui.components.macros;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.components.MenuButton;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
@ -70,7 +71,9 @@ public class FlipButton extends MenuButton {
|
||||
//drawVerticalLine(x, y + 1, height - 1, 1, linePopupColor);
|
||||
//drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
|
||||
//drawVerticalLine(x + width, y + 1, height - 1, 1, linePopupColor);
|
||||
|
||||
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
x += 10;
|
||||
width -= 20;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package rip.athena.client.gui.clickgui.components.macros;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.MenuComponent;
|
||||
import rip.athena.client.gui.framework.MenuPriority;
|
||||
@ -9,6 +10,7 @@ import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import rip.athena.client.gui.clickgui.IngameMenu;
|
||||
import rip.athena.client.modules.impl.other.Settings;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
import rip.athena.client.utils.render.RoundedUtils;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@ -65,8 +67,9 @@ public class MacroBase extends MenuComponent {
|
||||
int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor);
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
DrawUtils.drawRoundedRect(x, y, x + width, y + height, 4.0f, backgroundColor);
|
||||
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 12.0f, backgroundColor);
|
||||
|
||||
/*drawHorizontalLine(x, y, width + 1, 1, lineColor);
|
||||
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
|
||||
@ -80,10 +83,9 @@ public class MacroBase extends MenuComponent {
|
||||
|
||||
//drawHorizontalLine(x, y, textWidth + 1, 1, linePopupColor);
|
||||
//drawVerticalLine(x, y + 1, height - 1, 1, linePopupColor);
|
||||
//drawHorizontalLine(x, y + height, textWidth + 1, 1, linePopupColor);
|
||||
drawVerticalLine(x + textWidth, y + 1, height - 1, 1, linePopupColor);
|
||||
//drawHorizontalLine(x, y + height, textWidth +
|
||||
drawText(text, x + spacing, y + height / 2 - getStringHeight(text) / 2, -1);
|
||||
|
||||
drawText(text, x + spacing, y + height / 2 - getStringHeight(text) / 2, textColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,7 @@
|
||||
package rip.athena.client.gui.clickgui.components.macros;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.components.MenuButton;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
@ -57,6 +58,7 @@ public class MacroButton extends MenuButton {
|
||||
|
||||
int lineColor = getColor(DrawType.LINE, lastState);
|
||||
int textColor = getColor(DrawType.TEXT, lastState);
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
DrawUtils.drawRoundedRect(x, y, x + width, y + height, 4.0f, lineColor);
|
||||
DrawUtils.drawRoundedRect(x + 1, y + 1, x + width - 1, y + height - 1, 4.0f, new Color(35, 35, 35, 255).getRGB());
|
||||
|
@ -1,6 +1,7 @@
|
||||
package rip.athena.client.gui.clickgui.components.macros;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.TextPattern;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
@ -64,6 +65,8 @@ public class MacroSlimTextField extends SearchTextfield {
|
||||
int lineColor = getColor(DrawType.LINE, lastState);
|
||||
int textColor = getColor(DrawType.TEXT, lastState);
|
||||
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y + height - 3, width, 3, lineColor);
|
||||
|
||||
String textToDraw = text;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package rip.athena.client.gui.clickgui.components.macros;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.components.MenuButton;
|
||||
import rip.athena.client.gui.framework.draw.ButtonState;
|
||||
@ -59,6 +60,8 @@ public class SimpleTextButton extends MenuButton {
|
||||
int textColor = getColor(DrawType.TEXT, lastState);
|
||||
int linePopupColor = getColor(DrawType.LINE, ButtonState.POPUP);
|
||||
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor);
|
||||
DrawUtils.drawRoundedRect(x - 1, y - 1, x + width + 1, y + height + 1, 4.0f, lineColor);
|
||||
DrawUtils.drawRoundedRect(x, y, x + width, y + height, 4.0f, backgroundColor);
|
||||
|
@ -62,7 +62,7 @@ public class CategoryButton extends MenuButton {
|
||||
RoundedUtils.drawRoundedRect(x + 30, y, x + width - 20, y + height, 12, new Color(25,25,25,255).getRGB());
|
||||
}
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(text, x + 70, y + height / 2 - (getStringHeight(text) / 2), textColor);
|
||||
rip.athena.client.utils.font.FontManager.getNunito(20).drawString(text, x + 70, y + height / 2 - (getStringHeight(text) / 2) + 2, textColor);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2), textColor);
|
||||
}
|
||||
@ -84,7 +84,7 @@ public class CategoryButton extends MenuButton {
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getStringWidth(string);
|
||||
return (int) rip.athena.client.utils.font.FontManager.getNunito(20).width(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
@ -93,7 +93,7 @@ public class CategoryButton extends MenuButton {
|
||||
@Override
|
||||
public int getStringHeight(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getHeight(string);
|
||||
return (int) rip.athena.client.utils.font.FontManager.getNunito(20).height();
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public class FeatureText extends MenuLabel {
|
||||
@Override
|
||||
public void drawText(String text, int x, int y, int color) {
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(text, x, y, color);
|
||||
rip.athena.client.utils.font.FontManager.getNunito(30).drawString(text, x, y, color);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, color);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class ModCategoryButton extends MenuButton {
|
||||
}
|
||||
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, textColor);
|
||||
rip.athena.client.utils.font.FontManager.getProductSansRegular(20).drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, textColor);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, textColor);
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class ModCategoryButton extends MenuButton {
|
||||
@Override
|
||||
public int getStringWidth(String string) {
|
||||
if(Settings.customGuiFont) {
|
||||
return (int) FontManager.baloo17.getStringWidth(string);
|
||||
return (int) rip.athena.client.utils.font.FontManager.getProductSansRegular(20).width(string);
|
||||
} else {
|
||||
return Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import rip.athena.client.gui.framework.draw.DrawType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.Collections;
|
||||
@ -55,7 +56,7 @@ public class ModScrollPane extends MenuScrollPane {
|
||||
final int mouseX = parent.getMouseX();
|
||||
final int mouseY = parent.getMouseY();
|
||||
int height = this.height;
|
||||
|
||||
|
||||
Collections.sort(components, (a, b) -> Integer.compare(a.getPriority().getPriority(), b.getPriority().getPriority()));
|
||||
int maxY = 0;
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class ModuleBox extends MenuComponent {
|
||||
int defaultColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
|
||||
int drawColor = defaultColor;
|
||||
|
||||
GlStateManager.color(1, 1, 1);
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 26.0f, new Color(50,50,50,255).getRGB());
|
||||
RoundedUtils.drawRoundedRect(x + 1, y + 1, x + width - 1, y + height - 1, 26.0f, new Color(35,35,35,255).getRGB());
|
||||
@ -188,7 +188,8 @@ public class ModuleBox extends MenuComponent {
|
||||
|
||||
for (String line : lines) {
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo30.drawString(line, x + (float) width / 2 - FontManager.baloo30.getStringWidth(line) / 2, yPos, textColor);
|
||||
rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString(line, x + (float) width / 2 - rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width(line) / 2, yPos, textColor);
|
||||
//FontManager.baloo30.drawString(line, x + (float) width / 2 - FontManager.baloo30.getStringWidth(line) / 2, yPos, textColor);
|
||||
yPos += FontManager.baloo30.getHeight(line);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(line, (int) (x + (float) width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth(line) / 2), yPos, textColor);
|
||||
@ -213,7 +214,8 @@ public class ModuleBox extends MenuComponent {
|
||||
String text = module.isToggled() ? "ENABLED" : "DISABLED";
|
||||
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(text, x + (float) width / 2 - FontManager.baloo17.getStringWidth(text) / 2, y + height - 10 - 15, -1);
|
||||
rip.athena.client.utils.font.FontManager.getNunito(20).drawString(text, x + (float) width / 2 - FontManager.baloo17.getStringWidth(text) / 2, y + height - 10 - 15, -1);
|
||||
//FontManager.baloo17.drawString(text, x + (float) width / 2 - FontManager.baloo17.getStringWidth(text) / 2, y + height - 10 - 15, -1);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(text, (int) (x + (float) width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth(text) / 2), y + height - 10 - 15, -1);
|
||||
}
|
||||
@ -232,7 +234,7 @@ public class ModuleBox extends MenuComponent {
|
||||
drawShadowRight(x + width - 14 - 17 - 4 + 25, y + 14 - 4, 25);*/
|
||||
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + width - 14 - 17 - 4, y + 14 - 4, 25, 25, COG_BORDER);
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + width - 14 - 17 - 3, y + 14 - 3, 23, 23, drawColor);
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + width - 14 - 17 - 3, y + 14 - 3, 23, 23, drawColor);
|
||||
|
||||
drawImage(new ResourceLocation("Athena/gui/menu/settings.png"), x + width - 14 - 17, y + 14, 17, 17);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public class SearchTextfield extends MenuTextField {
|
||||
}
|
||||
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.baloo17.drawString(textToDraw, x + 10 + minOffset + xAdd, y + (float) height / 2 - (float) (int) FontManager.baloo17.getHeight(textToDraw) / 2, textColor);
|
||||
rip.athena.client.utils.font.FontManager.getNunito(20).drawString(textToDraw, x + 10 + minOffset + xAdd, y + 2 + (float) height / 2 - (float) (int) rip.athena.client.utils.font.FontManager.getNunito(20).height() / 2, textColor);
|
||||
} else {
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(textToDraw, x + 10 + minOffset + xAdd, (int) (y + (float) height / 2 - (float) (int) Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2), textColor);
|
||||
}
|
||||
|
@ -1,915 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.pages;
|
||||
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.Menu;
|
||||
import rip.athena.client.gui.framework.MenuComponent;
|
||||
import rip.athena.client.gui.framework.TextPattern;
|
||||
import rip.athena.client.gui.clickgui.IngameMenu;
|
||||
import rip.athena.client.gui.clickgui.Page;
|
||||
import rip.athena.client.gui.clickgui.components.cosmetics.CosmeticGenericButton;
|
||||
import rip.athena.client.gui.clickgui.components.groups.*;
|
||||
import rip.athena.client.gui.clickgui.components.macros.MacroButton;
|
||||
import rip.athena.client.gui.clickgui.components.macros.MacroTextfield;
|
||||
import rip.athena.client.gui.clickgui.components.mods.*;
|
||||
import rip.athena.client.gui.clickgui.pages.groups.GroupSubTab;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import rip.athena.client.modules.impl.other.Settings;
|
||||
import rip.athena.client.utils.render.AssetUtils;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public class GroupsPage extends Page {
|
||||
private final static int SUB_TAB_COLOR = new Color(35, 35, 35, 255).getRGB();
|
||||
|
||||
private final static ResourceLocation USER_ICON = AssetUtils.getResource("gui", "user.png");
|
||||
|
||||
private MacroTextfield nameNew;
|
||||
private MacroTextfield nameJoin;
|
||||
private MenuModColorPicker color;
|
||||
private MacroButton add;
|
||||
private MacroButton join;
|
||||
private ModScrollPane scrollPane;
|
||||
private ModScrollPane scrollPaneUsers;
|
||||
|
||||
private GroupTextButton settings;
|
||||
private GroupTextButton schematics;
|
||||
private GroupTextButton waypoints;
|
||||
private GroupTextButton admin;
|
||||
|
||||
//private GroupData currentGroup;
|
||||
|
||||
public GroupSubTab subTab;
|
||||
|
||||
public GroupsPage(Minecraft mc, Menu menu, IngameMenu parent) {
|
||||
super(mc, menu, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInit() {
|
||||
int width = 300;
|
||||
int x = menu.getWidth() - width + 20;
|
||||
int y = 59;
|
||||
|
||||
int compWidth = width - 6 - 20 * 2;
|
||||
|
||||
nameNew = new MacroTextfield(TextPattern.TEXT_AND_NUMBERS, x, y + 85, compWidth, 22, "...") ;
|
||||
nameJoin = new MacroTextfield(TextPattern.TEXT_AND_NUMBERS, x, y + 300, compWidth, 22, "...");
|
||||
|
||||
int acceptWidth = compWidth - 40;
|
||||
|
||||
add = new MacroButton("CREATE", x - 21 + width / 2 - acceptWidth / 2, y + 180, acceptWidth, 22, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
if(nameNew.getText().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//NetworkingClient.sendLine("CreateGroup", nameNew.getText(), color.getColor().getRGB() + "");
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
};
|
||||
|
||||
color = new MenuModColorPicker(x - 1, y + 145, compWidth + 6, 22, Color.WHITE.getRGB());
|
||||
|
||||
join = new MacroButton("JOIN", x - 21 + width / 2 - acceptWidth / 2, y + 340, acceptWidth, 20, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
if(nameJoin.getText().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//NetworkingClient.sendLine("JoinGroup", nameJoin.getText());
|
||||
|
||||
nameJoin.setText("");
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
};
|
||||
|
||||
int xPos = 165;
|
||||
int spacing = 20;
|
||||
|
||||
settings = new GroupTextButton(GroupSubTab.SETTINGS, xPos, y + 30 / 2 - getStringHeight(GroupSubTab.SETTINGS.getText()) / 2) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
subTab = GroupSubTab.SETTINGS;
|
||||
setupGroupView();
|
||||
}
|
||||
};
|
||||
|
||||
xPos += Minecraft.getMinecraft().fontRendererObj.getStringWidth(GroupSubTab.SETTINGS.getText()) + spacing;
|
||||
|
||||
schematics = new GroupTextButton(GroupSubTab.SCHEMATICS, xPos, y + 30 / 2 - getStringHeight(GroupSubTab.SCHEMATICS.getText()) / 2) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
subTab = GroupSubTab.SCHEMATICS;
|
||||
setupGroupView();
|
||||
}
|
||||
};
|
||||
|
||||
xPos += Minecraft.getMinecraft().fontRendererObj.getStringWidth(GroupSubTab.SCHEMATICS.getText()) + spacing;
|
||||
|
||||
waypoints = new GroupTextButton(GroupSubTab.WAYPOINTS, xPos, y + 30 / 2 - getStringHeight(GroupSubTab.WAYPOINTS.getText()) / 2) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
subTab = GroupSubTab.WAYPOINTS;
|
||||
setupGroupView();
|
||||
}
|
||||
};
|
||||
|
||||
xPos += Minecraft.getMinecraft().fontRendererObj.getStringWidth(GroupSubTab.WAYPOINTS.getText()) + spacing;
|
||||
|
||||
admin = new GroupTextButton(GroupSubTab.ADMIN, xPos, y + 30 / 2 - getStringHeight(GroupSubTab.ADMIN.getText()) / 2) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
subTab = GroupSubTab.ADMIN;
|
||||
setupGroupView();
|
||||
}
|
||||
};
|
||||
|
||||
scrollPane = new ModScrollPane(31, 150, menu.getWidth() - width - 31 * 2, menu.getHeight() - 151, false);
|
||||
scrollPaneUsers = new ModScrollPane(menu.getWidth() - width, 58 + 31, width - 1, menu.getHeight() - 58 - 31, false);
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
|
||||
public void setupGroupView() {
|
||||
scrollPane.setY(150);
|
||||
scrollPane.setHeight(menu.getHeight() - 151);
|
||||
|
||||
scrollPaneUsers.getComponents().clear();
|
||||
scrollPane.getComponents().clear();
|
||||
|
||||
if(menu.getComponents().contains(nameNew)) {
|
||||
menu.getComponents().remove(nameNew);
|
||||
menu.getComponents().remove(color);
|
||||
menu.getComponents().remove(nameJoin);
|
||||
menu.getComponents().remove(add);
|
||||
menu.getComponents().remove(join);
|
||||
}
|
||||
|
||||
if(!menu.getComponents().contains(settings)) {
|
||||
menu.addComponent(settings);
|
||||
menu.addComponent(schematics);
|
||||
menu.addComponent(waypoints);
|
||||
|
||||
/*if(currentGroup != null && currentGroup.getOwner().equals(mc.thePlayer.getUniqueID())) {
|
||||
menu.addComponent(admin);
|
||||
}*/
|
||||
}
|
||||
|
||||
for(MenuComponent component : menu.getComponents()) {
|
||||
if(component instanceof GroupTextButton) {
|
||||
GroupTextButton button = (GroupTextButton) component;
|
||||
button.setActive(button.getText().equalsIgnoreCase(subTab.getText()));
|
||||
}
|
||||
}
|
||||
|
||||
int y = 5;
|
||||
int online = 0;
|
||||
|
||||
/*for(UserInfo user : currentGroup.getUsers()) {
|
||||
if(user.getUUID().equals(currentGroup.getOwner())) {
|
||||
online++;
|
||||
}
|
||||
}*/
|
||||
|
||||
y += addHeader("ADMINS", online, y);
|
||||
|
||||
/*for(UserInfo user : currentGroup.getUsers()) {
|
||||
if(user.getUUID().equals(currentGroup.getOwner())) {
|
||||
y += addUser(user.getName(), "OWNER", user.isOnline(), y);
|
||||
}
|
||||
}*/
|
||||
|
||||
online = 0;
|
||||
|
||||
/*for(UserInfo user : currentGroup.getUsers()) {
|
||||
if(user.getUUID().equals(currentGroup.getOwner())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
online++;
|
||||
}*/
|
||||
|
||||
y += addHeader("MEMBERS", online, y);
|
||||
|
||||
/*for(UserInfo user : currentGroup.getUsers()) {
|
||||
if(user.getUUID().equals(currentGroup.getOwner())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
y += addUser(user.getName(), "MEMBER", user.isOnline(), y);
|
||||
}*/
|
||||
|
||||
switch(subTab) {
|
||||
case ADMIN:
|
||||
initAdminPage();
|
||||
break;
|
||||
|
||||
case SCHEMATICS:
|
||||
initSchematicsPage();
|
||||
break;
|
||||
|
||||
case SETTINGS:
|
||||
initSettingsPage();
|
||||
break;
|
||||
|
||||
case WAYPOINTS:
|
||||
initWaypointsPage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void initAdminPage() {
|
||||
int x = 5;
|
||||
int y = 5;
|
||||
int width = scrollPane.getWidth() - 10;
|
||||
int height = 25;
|
||||
int spacing = 10;
|
||||
|
||||
scrollPane.addComponent(new CosmeticGenericButton("CLICK TO COPY INVITE CODE", x, y, width, height, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
//IngameMenu.setClipboardString(currentGroup.getInviteCode());
|
||||
}
|
||||
});
|
||||
|
||||
y += height + spacing;
|
||||
|
||||
scrollPane.addComponent(new CosmeticGenericButton("REFRESH INVITE CODE", x, y, width, height, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
//NetworkingClient.sendLine("RefreshInviteCode", currentGroup.getId() + "");
|
||||
}
|
||||
});
|
||||
|
||||
y += height + spacing * 2;
|
||||
|
||||
scrollPane.addComponent(new FeatureText("DISCORD BOT", x, y));
|
||||
|
||||
y += spacing * 2;
|
||||
|
||||
scrollPane.addComponent(new CosmeticGenericButton("CLICK HERE TO INVITE THE BOT", x, y, width, height, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
if(Desktop.isDesktopSupported()) {
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URI("https://discord.com/oauth2/authorize?client_id=824093412084940881&scope=bot&permissions=3072"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (URISyntaxException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
y += spacing + height;
|
||||
|
||||
scrollPane.addComponent(new FeatureText("DISCORD CODE | CLICK BOX TO COPY", x, y));
|
||||
|
||||
y += spacing * 2;
|
||||
|
||||
scrollPane.addComponent(new CosmeticGenericButton("inv code"/*currentGroup.getInviteCode()*/, x, y, width, height, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
//IngameMenu.setClipboardString(currentGroup.GetDiscordUnique());
|
||||
}
|
||||
});
|
||||
|
||||
y += height + spacing * 2;
|
||||
|
||||
scrollPane.addComponent(new FeatureText("WALL CHECKER", x, y));
|
||||
|
||||
y += spacing * 2;
|
||||
|
||||
GroupValueList checkTime = new GroupValueList("CHECK TIME", new String[] {"check time"/*currentGroup.checktime*/ + "", "1", "0"}, x, y, height) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
if(getValue().equalsIgnoreCase("1")) {
|
||||
//currentGroup.checktime++;
|
||||
//NetworkingClient.sendLine("CheckTime", currentGroup.getId() + "", "0");
|
||||
} else if(getValue().equalsIgnoreCase("0")) {
|
||||
//currentGroup.checktime--;
|
||||
//NetworkingClient.sendLine("CheckTime", currentGroup.getId() + "", "1");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scrollPane.addComponent(checkTime);
|
||||
|
||||
GroupValueList checkDelay = new GroupValueList("CHECK DELAY", new String[] {"check delay"/*currentGroup.checkdelay*/ + "", "1", "0"}, x + 250, y, height) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
if(getValue().equalsIgnoreCase("1")) {
|
||||
//currentGroup.checkdelay++;
|
||||
//NetworkingClient.sendLine("CheckDelay", currentGroup.getId() + "", "0");
|
||||
} else if(getValue().equalsIgnoreCase("0")) {
|
||||
//currentGroup.checkdelay--;
|
||||
//NetworkingClient.sendLine("CheckDelay", currentGroup.getId() + "", "1");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scrollPane.addComponent(checkDelay);
|
||||
|
||||
scrollPane.addComponent(new CosmeticGenericButton("CHECK", width - 150, y, 150, height, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
//NetworkingClient.sendLine("WallChecker", currentGroup.getId() + "", currentGroup.wallChecker ? "0" : "1");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initSchematicsPage() {
|
||||
int x = 5;
|
||||
int y = 5;
|
||||
int width = scrollPane.getWidth() - 10;
|
||||
int height = 25;
|
||||
|
||||
/*for(SchemShareRequest schem : SchematicaList.getSchematics()) {
|
||||
scrollPane.addComponent(new GroupListEntry(schem.getName(), x, y, width, height));
|
||||
scrollPane.addComponent(new ProfilesBlueButton("LOAD", x + width - 180, y + 5, 80, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
schem.accept();
|
||||
}
|
||||
});
|
||||
|
||||
scrollPane.addComponent(new MacroButton("DELETE", x + width - 90, y + 5, 80, 15, false) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
NetworkingClient.sendLine("RemoveSchematica", schem.getId() + "");
|
||||
populateScrollPane();
|
||||
}
|
||||
});
|
||||
|
||||
y += height;
|
||||
}*/
|
||||
}
|
||||
|
||||
private void initWaypointsPage() {
|
||||
int x = 5;
|
||||
int y = 5;
|
||||
int width = scrollPane.getWidth() - 10;
|
||||
int height = 35;
|
||||
|
||||
/*for(WaypointMarker waypoint : WaypointList.getWaypoints()) {
|
||||
if(waypoint.getGroup() != currentGroup.getId()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
JSONObject obj = new JSONObject(waypoint.getMarker());
|
||||
String name = waypoint.getName();
|
||||
double xPos = obj.getDouble("x");
|
||||
double yPos = obj.getDouble("y");
|
||||
double zPos = obj.getDouble("z");
|
||||
|
||||
scrollPane.addComponent(new GroupListEntry(waypoint.getName(), x, y, width, height));
|
||||
|
||||
scrollPane.addComponent(new GroupListMiniEntry("X", (int)xPos + "", x + 150, y + 6, 90, 23));
|
||||
scrollPane.addComponent(new GroupListMiniEntry("Y", (int)yPos + "", x + 150 + 90 + 10, y + 6, 90, 23));
|
||||
scrollPane.addComponent(new GroupListMiniEntry("Z", (int)zPos + "", x + 150 + 90 * 2 + 10 * 2, y + 6, 90, 23));
|
||||
|
||||
scrollPane.addComponent(new MacroButton("DELETE", x + width - 90, y + 5, 80, 24, false) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
NetworkingClient.sendLine("RemoveWaypoint", waypoint.getId() + "");
|
||||
}
|
||||
});
|
||||
|
||||
y += height;
|
||||
}*/
|
||||
}
|
||||
|
||||
private void initSettingsPage() {
|
||||
/*GroupSetting settings = GroupList.getSettings(currentGroup.getName());
|
||||
|
||||
int xText = 15;
|
||||
int xCheckbox = 350;
|
||||
int y = 5;
|
||||
int ySpacing = 20;
|
||||
|
||||
//Ping
|
||||
MenuModCheckbox checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setPing(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isPing());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("PING", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Waypoints
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setWaypoints(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isWaypoints());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("WAYPOINTS", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Chat messages
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setChatMessages(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isChatMessages());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("CHAT MESSAGES", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Sign in noti
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setSignInNoti(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isSignInNoti());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("SIGN IN/SIGN OUT MESSAGES", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Highlight
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setHighlight(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isHighlight());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("HIGHLIGHT PLAYERS", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Hide
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setHideNametags(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isHideNametags());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("HIDE NAMETAGS", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Show locations
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setShowPlayerLoctions(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isShowPlayerLocations());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("SHOW PLAYER LOCATIONS", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Show mapwriter locations
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setMapWriterLocations(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isShowMapWriterLocations());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("SHOW MAPWRITER LOCATIONS", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Share schematics
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setShareSchem(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isShareSchem());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("SHARE SCHEMATICS", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Patchcrumbs
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setPatchcrumbs(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isPatchcrumbs());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("PATCHCRUMBS", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Share map data
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setShareMapData(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isShareMapData());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("SHARE MAP DATA", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Share map data
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setShareView(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.isShareView());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("SHARE TEAM VIEW", xText, y));
|
||||
|
||||
y += ySpacing;
|
||||
|
||||
//Wall checker
|
||||
checkbox = new MenuModCheckbox(xCheckbox, y, 15, 15) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
settings.setwallChecker(isChecked());
|
||||
}
|
||||
};
|
||||
|
||||
checkbox.setChecked(settings.iswallChecker());
|
||||
scrollPane.addComponent(checkbox);
|
||||
scrollPane.addComponent(new FeatureText("WALL CHECKER", xText, y));
|
||||
|
||||
scrollPane.addComponent(new FeatureText("CREATE WAYPOINT", xCheckbox + 15 + 30, 5));
|
||||
|
||||
MacroTextfield field = new MacroTextfield(TextPattern.TEXT_AND_NUMBERS, xCheckbox + 15 + 30, 25, 260, 20, "ENTER WAYPOINT NAME");
|
||||
|
||||
scrollPane.addComponent(field);
|
||||
|
||||
scrollPane.addComponent(new CosmeticGenericButton("CREATE", (xCheckbox + 15 + 30) + 55, 55, 150, 20, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
String text = field.getText();
|
||||
|
||||
JSONObject markerJSON = new JSONObject();
|
||||
markerJSON.put("x", mc.thePlayer.posX);
|
||||
markerJSON.put("y", mc.thePlayer.posY);
|
||||
markerJSON.put("z", mc.thePlayer.posZ);
|
||||
markerJSON.put("dimension", mc.thePlayer.dimension);
|
||||
markerJSON.put("server", NetworkUtils.getServer());
|
||||
|
||||
markerJSON.put("color", currentGroup.getColor());
|
||||
|
||||
NetworkingClient.sendLine("NewWaypoint", text, markerJSON.toString(), currentGroup.getId() + "");
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
});
|
||||
|
||||
scrollPane.addComponent(new FeatureText("SCHEMATICS", xCheckbox + 15 + 30, 100));
|
||||
|
||||
scrollPane.addComponent(new MacroButton("SAVE CURRENT SCHEMATIC", xCheckbox + 15 + 30, 120, 260, 20, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
|
||||
if(ClientProxy.schematic == null || ClientProxy.loadedFile == null) {
|
||||
Athena.INSTANCE.notificationManager.showNotification("You do not have a schematic loaded.", Color.RED);
|
||||
} else {
|
||||
SchematicaList.shareSchem(currentGroup.getId());
|
||||
}
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
});
|
||||
|
||||
scrollPane.addComponent(new MacroButton("SHARE CURRENT SCHEMATIC", xCheckbox + 15 + 30, 120 + 20 + 10, 260, 20, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
SchemShare.shareSchem(currentGroup.getId());
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
private int addUser(String user, String rank, boolean online, int y) {
|
||||
GroupUserListUser component = new GroupUserListUser(USER_ICON, user, rank, online, 5, y, scrollPaneUsers.getWidth() - 10, 20);
|
||||
scrollPaneUsers.addComponent(component);
|
||||
return component.getHeight();
|
||||
}
|
||||
|
||||
private int addHeader(String header, int amount, int y) {
|
||||
GroupUserListHeader component = new GroupUserListHeader(header, amount, 0, y, scrollPaneUsers.getWidth(), 40);
|
||||
scrollPaneUsers.addComponent(component);
|
||||
return component.getHeight();
|
||||
}
|
||||
|
||||
public void populateScrollPane() {
|
||||
if(scrollPane == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
scrollPaneUsers.getComponents().clear();
|
||||
scrollPane.getComponents().clear();
|
||||
|
||||
scrollPane.setY(110);
|
||||
scrollPane.setHeight(menu.getHeight() - 111);
|
||||
|
||||
if(!menu.getComponents().contains(nameNew)) {
|
||||
menu.addComponent(nameNew);
|
||||
menu.addComponent(color);
|
||||
menu.addComponent(nameJoin);
|
||||
menu.addComponent(add);
|
||||
menu.addComponent(join);
|
||||
}
|
||||
|
||||
if(menu.getComponents().contains(settings)) {
|
||||
menu.getComponents().remove(settings);
|
||||
menu.getComponents().remove(schematics);
|
||||
menu.getComponents().remove(waypoints);
|
||||
|
||||
if(menu.getComponents().contains(admin)) {
|
||||
menu.getComponents().remove(admin);
|
||||
}
|
||||
}
|
||||
|
||||
/*if(currentGroup != null) {
|
||||
setupGroupView();
|
||||
return;
|
||||
}*/
|
||||
|
||||
int spacing = 15;
|
||||
int height = 110;
|
||||
|
||||
int defaultX = spacing;
|
||||
|
||||
int y = spacing;
|
||||
int x = spacing;
|
||||
|
||||
int width = 190;
|
||||
|
||||
int maxWidth = scrollPane.getWidth() - spacing * 2;
|
||||
|
||||
int innerSpacing = 5;
|
||||
int innerWidth = width - innerSpacing * 2;
|
||||
int buttonHeight = 20;
|
||||
|
||||
int exitButtonSize = 18;
|
||||
|
||||
/*for(GroupData group : GroupList.getGroups()) {
|
||||
String groupLeader = "";
|
||||
int membersOnline = 0;
|
||||
int membersTotal = 0;
|
||||
|
||||
for(UserInfo user : group.getUsers()) {
|
||||
if(user.getUUID().equals(group.getOwner())) {
|
||||
groupLeader = user.getName();
|
||||
}
|
||||
|
||||
if(user.isOnline()) {
|
||||
membersOnline++;
|
||||
}
|
||||
|
||||
membersTotal++;
|
||||
}
|
||||
|
||||
scrollPane.addComponent(new GroupBase(group.getName(), groupLeader, membersOnline, membersTotal, x, y, width, height));
|
||||
|
||||
scrollPane.addComponent(new SimpleTextButton("X", x + innerWidth - exitButtonSize + innerSpacing, y + innerSpacing, exitButtonSize, exitButtonSize, false) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
if(group.getOwner().equals(mc.thePlayer.getUniqueID())) {
|
||||
NetworkingClient.sendLine("DeleteGroup", group.getId() + "");
|
||||
} else {
|
||||
NetworkingClient.sendLine("GroupLeave", group.getId() + "");
|
||||
}
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
});
|
||||
|
||||
scrollPane.addComponent(new MacroButton("OPEN PANEL", x + innerSpacing, y + height - innerSpacing * 2 - spacing, innerWidth, buttonHeight, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
currentGroup = group;
|
||||
subTab = GroupSubTab.SETTINGS;
|
||||
|
||||
setupGroupView();
|
||||
}
|
||||
});
|
||||
|
||||
x += spacing + width;
|
||||
|
||||
if(x + spacing + width > maxWidth) {
|
||||
x = defaultX;
|
||||
y += height + spacing;
|
||||
}
|
||||
}*/
|
||||
|
||||
/*for(Request group : GroupList.getIngoingRequests()) {
|
||||
scrollPane.addComponent(new ProfilesBase(group.getLabel() + " - Invite", x, y, width, height));
|
||||
|
||||
scrollPane.addComponent(new MacroButton("ACCEPT", x + innerSpacing, y + height - buttonHeight - innerSpacing * 3 - spacing, innerWidth, buttonHeight, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
NetworkingClient.sendLine("AcceptGroupRequest", group.getId() + "");
|
||||
}
|
||||
});
|
||||
|
||||
scrollPane.addComponent(new MacroButton("DECLINE", x + innerSpacing, y + height - innerSpacing * 2 - spacing, innerWidth, buttonHeight, false) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
setActive(false);
|
||||
|
||||
NetworkingClient.sendLine("DeclineGroupRequest", group.getId() + "");
|
||||
}
|
||||
});
|
||||
|
||||
x += spacing + width;
|
||||
|
||||
if(x + spacing + width > maxWidth) {
|
||||
x = defaultX;
|
||||
y += height + spacing;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onRender() {
|
||||
int width = 300;
|
||||
int x = menu.getX() + menu.getWidth() - width + 20;
|
||||
int y = menu.getY() + 59;
|
||||
int height = 32;
|
||||
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(27, 27, 27, 225).getRGB());
|
||||
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.vision16.drawString("WAYPOINTS", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
} else {
|
||||
mc.fontRendererObj.drawString("WAYPOINTS", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
}
|
||||
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, menu.getHeight() - 58, MacrosPage.MENU_SIDE_BG_COLOR);
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, height + 1, ModCategoryButton.MAIN_COLOR);
|
||||
drawShadowDown(menu.getX() + menu.getWidth() - width, y + height, width);
|
||||
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX(), menu.getY() + 58, menu.getWidth() - width, height + 1, SUB_TAB_COLOR);
|
||||
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, menu.getHeight() - 58, MacrosPage.MENU_SIDE_BG_COLOR);
|
||||
|
||||
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, height + 1, ModCategoryButton.MAIN_COLOR);
|
||||
//drawShadowDown(menu.getX(), y - 1, menu.getWidth());
|
||||
|
||||
//if(currentGroup == null) {
|
||||
//Minecraft.getMinecraft().fontRendererObj.drawString("YOUR GROUPS", menu.getX() + (menu.getWidth() - width) / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth("YOUR GROUPS") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
||||
//drawShadowDown(menu.getX() + menu.getWidth() - width, y + height, width);
|
||||
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("CREATE A GROUP", menu.getX() + menu.getWidth() - width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth("CREATE A GROUP") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
||||
y += 60;
|
||||
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("GROUP NAME", x, y, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
||||
y += 65;
|
||||
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("COLOR", x, y, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
||||
y += 100;
|
||||
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, y, width, height + 1, ModCategoryButton.MAIN_COLOR);
|
||||
drawShadowDown(menu.getX() + menu.getWidth() - width, y + height, width);
|
||||
drawShadowUp(menu.getX() + menu.getWidth() - width, y, width);
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("JOIN A GROUP", menu.getX() + menu.getWidth() - width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth("JOIN A GROUP") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
||||
y += 50;
|
||||
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("GROUP JOIN ID", x, y, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
//} else {
|
||||
//Minecraft.getMinecraft().fontRendererObj.drawString(subTab.getText(), menu.getX() + 31, menu.getY() + 110, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
//drawHorizontalLine(menu.getX() + 31, menu.getY() + 140, menu.getWidth() - width - 31 * 2, 3, IngameMenu.MENU_LINE_COLOR);
|
||||
|
||||
//Minecraft.getMinecraft().fontRendererObj.drawString("USERS", menu.getX() + menu.getWidth() - width + (width / 2) - Minecraft.getMinecraft().fontRendererObj.getStringWidth("USERS") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.getStringHeight("USERS") / 2, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
//}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
//currentGroup = null;
|
||||
|
||||
menu.addComponent(nameNew);
|
||||
menu.addComponent(color);
|
||||
menu.addComponent(nameJoin);
|
||||
menu.addComponent(add);
|
||||
menu.addComponent(join);
|
||||
menu.addComponent(scrollPane);
|
||||
menu.addComponent(scrollPaneUsers);
|
||||
|
||||
menu.addComponent(settings);
|
||||
menu.addComponent(schematics);
|
||||
menu.addComponent(waypoints);
|
||||
|
||||
/*if(currentGroup != null && currentGroup.getOwner().equals(mc.thePlayer.getUniqueID())) {
|
||||
menu.addComponent(admin);
|
||||
}*/
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnload() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package rip.athena.client.gui.clickgui.pages;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.font.FontManager;
|
||||
import rip.athena.client.gui.framework.Menu;
|
||||
@ -88,7 +89,7 @@ public class MacrosPage extends Page {
|
||||
}
|
||||
};
|
||||
|
||||
scrollPane = new ModScrollPane(31, 140, menu.getWidth() - width - 31 * 2, menu.getHeight() - 141, false);
|
||||
scrollPane = new ModScrollPane(220, 140, menu.getWidth() - width - 131, menu.getHeight() - 141, false);
|
||||
|
||||
populateScrollPane();
|
||||
}
|
||||
@ -105,9 +106,9 @@ public class MacrosPage extends Page {
|
||||
int width = scrollPane.getWidth() - spacing * 2;
|
||||
|
||||
for(Macro macro : Athena.INSTANCE.getMacroManager().getMacros()) {
|
||||
scrollPane.addComponent(new MacroBase(macro.getName(), x, y, width, height));
|
||||
|
||||
MacroSlimTextField field = new MacroSlimTextField(TextPattern.NONE, x + 160 + spacing, y, (width - 280 - spacing * 4 - 90), height - 5) {
|
||||
scrollPane.addComponent(new MacroBase(macro.getName(), x, y, width - 90, height));
|
||||
|
||||
MacroSlimTextField field = new MacroSlimTextField(TextPattern.NONE, x + 80 + spacing, y, (width - 320 - spacing * 4 - 90), height - 5) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
macro.setCommand(getText());
|
||||
@ -120,7 +121,7 @@ public class MacrosPage extends Page {
|
||||
|
||||
int keybindWidth = (width - 189 - spacing * 4 - 90) / 2;
|
||||
|
||||
MenuModKeybind keybindElement = new MenuModKeybind(x + 220 + spacing + keybindWidth + spacing, y + 5, keybindWidth - 20, height - 10) {
|
||||
MenuModKeybind keybindElement = new MenuModKeybind(x + spacing + keybindWidth + spacing + 100, y + 5, keybindWidth - 20, height - 10) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
macro.setKey(getBind());
|
||||
@ -129,7 +130,7 @@ public class MacrosPage extends Page {
|
||||
keybindElement.setBind(macro.getKey());
|
||||
scrollPane.addComponent(keybindElement);
|
||||
|
||||
FlipButton flipButton = new FlipButton(width - spacing - 80, y, 90 - 10, height) {
|
||||
FlipButton flipButton = new FlipButton(width - spacing - 180, y, 90 - 10, height) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
macro.setEnabled(isActive());
|
||||
@ -140,7 +141,7 @@ public class MacrosPage extends Page {
|
||||
|
||||
scrollPane.addComponent(flipButton);
|
||||
|
||||
scrollPane.addComponent(new SimpleTextButton("X", width - spacing, y + 5, 20, 20, true) {
|
||||
scrollPane.addComponent(new SimpleTextButton("X", width - spacing - 90, y + 5, 20, 20, true) {
|
||||
@Override
|
||||
public void onAction() {
|
||||
Athena.INSTANCE.getMacroManager().getMacros().remove(macro);
|
||||
@ -159,7 +160,9 @@ public class MacrosPage extends Page {
|
||||
int y = menu.getY() + 59;
|
||||
int height = 32;
|
||||
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(27, 27, 27, 225).getRGB());
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(32, 32, 32, 225).getRGB());
|
||||
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.vision16.drawString("MACROS", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
@ -69,8 +69,9 @@ public class ModsPage extends Page {
|
||||
public void onRender() {
|
||||
int y = menu.getY() + 59;
|
||||
int height = 32;
|
||||
GlStateManager.color(1,1,1);
|
||||
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(27, 27, 27, 225).getRGB());
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(32, 32, 32, 225).getRGB());
|
||||
|
||||
y += 50;
|
||||
|
||||
@ -85,8 +86,8 @@ public class ModsPage extends Page {
|
||||
|
||||
if (modCategory != null) {
|
||||
if (Settings.customGuiFont) {
|
||||
FontManager.vision16.drawString(activeModule != null ? activeModule.getName().toUpperCase() : modCategory.getText(), menu.getX() + 255, menu.getY() + 20, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
FontManager.baloo17.drawString("Configure build-in client mods", menu.getX() + 255, menu.getY() + 35, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString(activeModule != null ? activeModule.getName().toUpperCase() : modCategory.getText(), menu.getX() + 255, menu.getY() + 20, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
rip.athena.client.utils.font.FontManager.getProductSansRegular(20).drawString("Configure build-in client mods", menu.getX() + 255, menu.getY() + 35, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
} else {
|
||||
mc.fontRendererObj.drawString(activeModule != null ? "SETTINGS | " : modCategory.getText(), menu.getX() + 255, menu.getY() + 25, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
}
|
||||
@ -97,7 +98,7 @@ public class ModsPage extends Page {
|
||||
if (Settings.customGuiFont) {
|
||||
//FontManager.vision16.drawString(text, menu.getX() + 255, menu.getY() + 25, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
} else {
|
||||
mc.fontRendererObj.drawString(text, menu.getX() + 255 + offset, menu.getY() + 80, MENU_HEADER_TEXT_COLOR_MOD);
|
||||
//mc.fontRendererObj.drawString(text, menu.getX() + 255 + offset, menu.getY() + 80, MENU_HEADER_TEXT_COLOR_MOD);
|
||||
}
|
||||
drawShadowUp(menu.getX() + 255, menu.getY() + 110 + 25 + 2, menu.getWidth() - 286);
|
||||
drawShadowLeft(menu.getX() + 255 + 2, menu.getY() + 110 + 25, menu.getHeight() - 110 - 50 - 5);
|
||||
@ -116,7 +117,7 @@ public class ModsPage extends Page {
|
||||
}
|
||||
}
|
||||
|
||||
drawHorizontalLine(menu.getX() + 255, menu.getY() + 110, menu.getWidth() - 255 - 31, 3, IngameMenu.MENU_LINE_COLOR);
|
||||
drawHorizontalLine(menu.getX() + 255, menu.getY() + 110, menu.getWidth() - 255 - 31, 3, new Color(32, 32, 32, 225).getRGB());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ public class ProfilesPage extends Page {
|
||||
int y = menu.getY() + 59;
|
||||
int height = 32;
|
||||
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(27, 27, 27, 225).getRGB());
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(32, 32, 32, 225).getRGB());
|
||||
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.vision16.drawString("PROFILES", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
@ -284,7 +284,7 @@ public class SettingsPage extends Page {
|
||||
int y = menu.getY() + 59;
|
||||
int height = 32;
|
||||
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(27, 27, 27, 225).getRGB());
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(32, 32, 32, 225).getRGB());
|
||||
|
||||
/*rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX(), menu.getY() + 58, width, menu.getHeight() - 58, MacrosPage.MENU_SIDE_BG_COLOR);
|
||||
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX(), menu.getY() + 58, width, height + 1, ModCategoryButton.MAIN_COLOR);
|
||||
|
@ -203,7 +203,7 @@ public class WaypointsPage extends Page {
|
||||
int y = menu.getY() + 59;
|
||||
int height = 32;
|
||||
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(27, 27, 27, 225).getRGB());
|
||||
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(32, 32, 32, 225).getRGB());
|
||||
|
||||
if(Settings.customGuiFont) {
|
||||
FontManager.vision16.drawString("WAYPOINTS", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
|
||||
|
@ -1,21 +0,0 @@
|
||||
package rip.athena.client.gui.clickgui.pages.groups;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/2/2023
|
||||
*/
|
||||
|
||||
public enum GroupSubTab {
|
||||
SETTINGS("SETTINGS"), SCHEMATICS("SCHEMATICS"), WAYPOINTS("WAYPOINTS"), ADMIN("ADMIN");
|
||||
|
||||
String text;
|
||||
|
||||
GroupSubTab(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
}
|
@ -97,7 +97,8 @@ public class FPSMod extends Module {
|
||||
} else if(isUsingWaveChroma) {
|
||||
DrawUtils.drawCustomFontChromaString(FontManager.baloo17, string, (int) (posX), (int) posY + 1, false, true);
|
||||
} else {
|
||||
FontManager.baloo17.drawString(string,(int) (posX), (int)posY + 1, color.getRGB());
|
||||
rip.athena.client.utils.font.FontManager.getPoppinsRegular(20).drawString(string,(int) (posX), (int)posY + 3, color.getRGB());
|
||||
//FontManager.baloo17.drawString(string,(int) (posX), (int)posY + 1, color.getRGB());
|
||||
}
|
||||
} else {
|
||||
hud.setWidth(mc.fontRendererObj.getStringWidth(string) + 16);
|
||||
|
17
src/main/java/rip/athena/client/utils/font/Font.java
Normal file
17
src/main/java/rip/athena/client/utils/font/Font.java
Normal file
@ -0,0 +1,17 @@
|
||||
package rip.athena.client.utils.font;
|
||||
|
||||
public abstract class Font {
|
||||
public abstract int drawString(String text, double x, double y, int color, boolean dropShadow);
|
||||
|
||||
public abstract int drawString(final String text, final double x, final double y, final int color);
|
||||
|
||||
public abstract int drawStringWithShadow(final String text, final double x, final double y, final int color);
|
||||
|
||||
public abstract int width(String text);
|
||||
|
||||
public abstract int drawCenteredString(final String text, final double x, final double y, final int color);
|
||||
|
||||
public abstract int drawRightString(final String text, final double x, final double y, final int color);
|
||||
|
||||
public abstract float height();
|
||||
}
|
198
src/main/java/rip/athena/client/utils/font/FontManager.java
Normal file
198
src/main/java/rip/athena/client/utils/font/FontManager.java
Normal file
@ -0,0 +1,198 @@
|
||||
package rip.athena.client.utils.font;
|
||||
|
||||
import rip.athena.client.utils.font.impl.athena.FontRenderer;
|
||||
import rip.athena.client.utils.font.impl.athena.FontUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class FontManager {
|
||||
|
||||
// FOR ANYONE WHO VISITS THIS CLASS: CREATE A HASHMAP FOR EACH FONT AND BASICALLY COPY THE GIVEN METHOD
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> INTERNATIONAL = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> MONTSERRAT_MAP = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> ROBOTO_MAP = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> LIGHT_MAP = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> NUNITO = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> NUNITO_BOLD = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> MUSEO_SANS = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> NUNITO_LIGHT_MAP = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> POPPINS_BOLD = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> POPPINS_SEMI_BOLD = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> POPPINS_MEDIUM = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> POPPINS_REGULAR = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> POPPINS_LIGHT = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> QUICKSAND_MAP_MEDIUM = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> QUICKSAND_MAP_LIGHT = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> TAHOMA_BOLD = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> TAHOMA = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> ICONS_1 = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> ICONS_2 = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> ICONS_3 = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> DREAMSCAPE = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> DREAMSCAPE_NO_AA = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> SOMATIC = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> BIKO = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> MONTSERRAT_HAIRLINE = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> PRODUCT_SANS_BOLD = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> PRODUCT_SANS_REGULAR = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> PRODUCT_SANS_MEDIUM = new HashMap<>();
|
||||
private static final HashMap<Integer, FontRenderer> PRODUCT_SANS_LIGHT = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> SF_UI_PRO = new HashMap<>();
|
||||
|
||||
private static final HashMap<Integer, FontRenderer> HACK = new HashMap<>();
|
||||
|
||||
// COPY THIS METHOD FOR EACH METHOD AND REPLACE FONTNAME WITH THE USED FONT FILE NAME
|
||||
public static Font getMontserratMedium(final int size) {
|
||||
return get(MONTSERRAT_MAP, size, "Montserrat-Medium", true, true);
|
||||
}
|
||||
|
||||
public static Font getMontserratHairline(final int size) {
|
||||
return get(MONTSERRAT_HAIRLINE, size, "Montserrat-Hairline", true, true);
|
||||
}
|
||||
|
||||
public static Font getInternational(int size) {
|
||||
return get(INTERNATIONAL, size, "NotoSans-Regular", true, true, false, true);
|
||||
}
|
||||
|
||||
public static Font getRobotoLight(final int size) {
|
||||
return get(ROBOTO_MAP, size, "Roboto-Light", true, true);
|
||||
}
|
||||
|
||||
public static Font getLight(final int size) {
|
||||
return get(LIGHT_MAP, size, "Light", true, true);
|
||||
}
|
||||
|
||||
public static Font getSFUIPro(final int size) {
|
||||
return get(SF_UI_PRO, size, "SF-UI-Pro", true, true);
|
||||
}
|
||||
|
||||
public static Font getPoppinsBold(final int size) {
|
||||
return get(POPPINS_BOLD, size, "Poppins-Bold", true, true);
|
||||
}
|
||||
|
||||
public static Font getPoppinsSemiBold(final int size) {
|
||||
return get(POPPINS_SEMI_BOLD, size, "Poppins-SemiBold", true, true);
|
||||
}
|
||||
|
||||
public static Font getPoppinsMedium(final int size) {
|
||||
return get(POPPINS_MEDIUM, size, "Poppins-Medium", true, true);
|
||||
}
|
||||
|
||||
public static Font getPoppinsRegular(final int size) {
|
||||
return get(POPPINS_REGULAR, size, "Poppins-Regular", true, true);
|
||||
}
|
||||
|
||||
public static Font getPoppinsLight(final int size) {
|
||||
return get(POPPINS_LIGHT, size, "Poppins-Light", true, true);
|
||||
}
|
||||
|
||||
public static Font getNunito(final int size) {
|
||||
return get(PRODUCT_SANS_REGULAR, size, "product_sans_regular", true, true);
|
||||
}
|
||||
|
||||
public static Font getNunitoBold(final int size) {
|
||||
return get(PRODUCT_SANS_BOLD, size, "product_sans_bold", true, true);
|
||||
}
|
||||
|
||||
public static Font getMuseo(final int size) {
|
||||
return get(MUSEO_SANS, size, "MuseoSans_900", true, true);
|
||||
}
|
||||
|
||||
public static Font getNunitoLight(final int size) {
|
||||
return get(PRODUCT_SANS_LIGHT, size, "product_sans_light", true, true);
|
||||
}
|
||||
|
||||
public static Font getQuicksandMedium(final int size) {
|
||||
return get(QUICKSAND_MAP_MEDIUM, size, "Quicksand-Medium", true, true);
|
||||
}
|
||||
|
||||
public static Font getQuicksandLight(final int size) {
|
||||
return get(QUICKSAND_MAP_LIGHT, size, "Quicksand-Light", true, true);
|
||||
}
|
||||
|
||||
public static Font getTahomaBold(final int size) {
|
||||
return get(TAHOMA_BOLD, size, "TahomaBold", true, true);
|
||||
}
|
||||
|
||||
public static Font getTahoma(final int size) {
|
||||
return get(TAHOMA, size, "Tahoma", true, true);
|
||||
}
|
||||
|
||||
public static Font getDreamscape(final int size) {
|
||||
return get(DREAMSCAPE, size, "Dreamscape", true, true);
|
||||
}
|
||||
|
||||
public static Font getSomatic(final int size) {
|
||||
return get(SOMATIC, size, "Somatic-Rounded", true, true);
|
||||
}
|
||||
|
||||
public static Font getDreamscapeNoAA(final int size) {
|
||||
return get(DREAMSCAPE_NO_AA, size, "Dreamscape", true, false);
|
||||
}
|
||||
|
||||
public static Font getIconsOne(final int size) {
|
||||
return get(ICONS_1, size, "Icon-1", true, true);
|
||||
}
|
||||
|
||||
public static Font getIconsThree(final int size) {
|
||||
return get(ICONS_3, size, "Icon-3", true, true);
|
||||
}
|
||||
|
||||
public static Font getIconsTwo(final int size) {
|
||||
return get(ICONS_2, size, "Icon-2", true, true);
|
||||
}
|
||||
|
||||
public static Font getBiko(final int size) {
|
||||
return get(BIKO, size, "Biko_Regular", true, true);
|
||||
}
|
||||
|
||||
public static Font getProductSansBold(final int size) {
|
||||
return get(PRODUCT_SANS_BOLD, size, "product_sans_bold", true, true);
|
||||
}
|
||||
|
||||
public static Font getProductSansRegular(final int size) {
|
||||
return get(PRODUCT_SANS_REGULAR, size, "product_sans_regular", true, true);
|
||||
}
|
||||
|
||||
public static Font getProductSansMedium(final int size) {
|
||||
return get(PRODUCT_SANS_MEDIUM, size, "product_sans_medium", true, true);
|
||||
}
|
||||
|
||||
public static Font getProductSansLight(final int size) {
|
||||
return get(PRODUCT_SANS_LIGHT, size, "product_sans_light", true, true);
|
||||
}
|
||||
|
||||
public static Font getHack(final int size) {
|
||||
return get(HACK, size, "Hack-Regular", true, true);
|
||||
}
|
||||
|
||||
private static Font get(HashMap<Integer, rip.athena.client.utils.font.impl.athena.FontRenderer> map, int size, String name, boolean fractionalMetrics, boolean AA) {
|
||||
return get(map, size, name, fractionalMetrics, AA, false, false);
|
||||
}
|
||||
|
||||
private static Font get(HashMap<Integer, rip.athena.client.utils.font.impl.athena.FontRenderer> map, int size, String name, boolean fractionalMetrics, boolean AA, boolean otf, boolean international) {
|
||||
if (!map.containsKey(size)) {
|
||||
final java.awt.Font font = FontUtil.getResource("Athena/gui/font/" + name + (otf ? ".otf" : ".ttf"), size);
|
||||
|
||||
if (font != null) {
|
||||
map.put(size, new rip.athena.client.utils.font.impl.athena.FontRenderer(font, fractionalMetrics, AA, international));
|
||||
}
|
||||
}
|
||||
|
||||
return map.get(size);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package rip.athena.client.utils.font.impl.athena;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class FontCharacter {
|
||||
|
||||
private final int texture;
|
||||
private final float width;
|
||||
private final float height;
|
||||
|
||||
public void render(final float x, final float y) {
|
||||
GlStateManager.bindTexture(texture);
|
||||
GL11.glBegin(GL11.GL_QUADS);
|
||||
GL11.glTexCoord2f(0, 0);
|
||||
GL11.glVertex2f(x, y);
|
||||
GL11.glTexCoord2f(0, 1);
|
||||
GL11.glVertex2f(x, y + height);
|
||||
GL11.glTexCoord2f(1, 1);
|
||||
GL11.glVertex2f(x + width, y + height);
|
||||
GL11.glTexCoord2f(1, 0);
|
||||
GL11.glVertex2f(x + width, y);
|
||||
GL11.glEnd();
|
||||
}
|
||||
}
|
@ -0,0 +1,291 @@
|
||||
package rip.athena.client.utils.font.impl.athena;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.client.utils.font.FontManager;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.font.FontRenderContext;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @author Patrick, Hazsi
|
||||
* @since 11/03/2021
|
||||
*/
|
||||
public class FontRenderer extends rip.athena.client.utils.font.Font {
|
||||
|
||||
private static final String ALPHABET = "ABCDEFGHOKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
private static final String COLOR_CODE_CHARACTERS = "0123456789abcdefklmnor";
|
||||
private static final Color TRANSPARENT_COLOR = new Color(255, 255, 255, 0);
|
||||
private static final float SCALE = 0.5f;
|
||||
private static final float SCALE_INVERSE = 1 / SCALE;
|
||||
private static final char COLOR_INVOKER = '\247';
|
||||
private static final int[] COLOR_CODES = new int[32];
|
||||
private static final int LATIN_MAX_AMOUNT = 256;
|
||||
private static final int INTERNATIONAL_MAX_AMOUNT = 65535;
|
||||
private static final int MARGIN_WIDTH = 4;
|
||||
private static final int MASK = 0xFF;
|
||||
|
||||
private final Font font;
|
||||
private final boolean fractionalMetrics;
|
||||
private final float fontHeight;
|
||||
private final FontCharacter[] defaultCharacters = new FontCharacter[LATIN_MAX_AMOUNT];
|
||||
private final FontCharacter[] internationalCharacters = new FontCharacter[INTERNATIONAL_MAX_AMOUNT];
|
||||
private final FontCharacter[] boldCharacters = new FontCharacter[LATIN_MAX_AMOUNT];
|
||||
private boolean antialiasing = true, international = false;
|
||||
|
||||
public FontRenderer(Font font, boolean fractionalMetrics, boolean antialiasing, boolean international) {
|
||||
this.antialiasing = antialiasing;
|
||||
this.font = font;
|
||||
this.fractionalMetrics = fractionalMetrics;
|
||||
this.fontHeight = (float) (font.getStringBounds(ALPHABET, new FontRenderContext(new AffineTransform(), antialiasing, fractionalMetrics)).getHeight() / 2);
|
||||
this.fillCharacters(this.defaultCharacters, Font.PLAIN);
|
||||
this.fillCharacters(this.boldCharacters, Font.BOLD);
|
||||
this.international = international;
|
||||
|
||||
if (this.international) {
|
||||
this.fillCharacters(this.internationalCharacters, Font.PLAIN);
|
||||
}
|
||||
}
|
||||
|
||||
public FontRenderer(final Font font, final boolean fractionalMetrics, final boolean antialiasing) {
|
||||
this.antialiasing = antialiasing;
|
||||
this.font = font;
|
||||
this.fractionalMetrics = fractionalMetrics;
|
||||
this.fontHeight = (float) (font.getStringBounds(ALPHABET, new FontRenderContext(new AffineTransform(), antialiasing, fractionalMetrics)).getHeight() / 2);
|
||||
this.fillCharacters(this.defaultCharacters, Font.PLAIN);
|
||||
this.fillCharacters(this.boldCharacters, Font.BOLD);
|
||||
}
|
||||
|
||||
public FontRenderer(final Font font, final boolean fractionalMetrics) {
|
||||
this.font = font;
|
||||
this.fractionalMetrics = fractionalMetrics;
|
||||
this.fontHeight = (float) (font.getStringBounds(ALPHABET, new FontRenderContext(new AffineTransform(), true, fractionalMetrics)).getHeight() / 2);
|
||||
this.fillCharacters(this.defaultCharacters, Font.PLAIN);
|
||||
this.fillCharacters(this.boldCharacters, Font.BOLD);
|
||||
}
|
||||
|
||||
public static void calculateColorCodes() {
|
||||
for (int i = 0; i < 32; ++i) {
|
||||
final int amplifier = (i >> 3 & 1) * 85;
|
||||
int red = (i >> 2 & 1) * 170 + amplifier;
|
||||
int green = (i >> 1 & 1) * 170 + amplifier;
|
||||
int blue = (i & 1) * 170 + amplifier;
|
||||
if (i == 6) {
|
||||
red += 85;
|
||||
}
|
||||
if (i >= 16) {
|
||||
red /= 4;
|
||||
green /= 4;
|
||||
blue /= 4;
|
||||
}
|
||||
COLOR_CODES[i] = (red & 255) << 16 | (green & 255) << 8 | blue & 255;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate a given {@link FontCharacter} array. The process of instantiating a FontCharacter calculates the
|
||||
* height and width of the character, as well as uploading the texture to OpenGL and storing the OpenGL texture
|
||||
* ID for rendering later. This process must be run for every character before it is rendered, as is done in this
|
||||
* method.
|
||||
*
|
||||
* @param characters A reference to a FontCharacter array to populate
|
||||
* @param style The font style to use, as defined in {@link Font}. Acceptable values are 0 = PLAIN, 1 = BOLD,
|
||||
* 2 = ITALIC.
|
||||
*/
|
||||
public void fillCharacters(final FontCharacter[] characters, final int style) {
|
||||
final Font font = this.font.deriveFont(style);
|
||||
final BufferedImage fontImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
|
||||
final Graphics2D fontGraphics = (Graphics2D) fontImage.getGraphics();
|
||||
final FontMetrics fontMetrics = fontGraphics.getFontMetrics(font);
|
||||
|
||||
for (int i = 0; i < characters.length; ++i) {
|
||||
final char character = (char) i;
|
||||
final Rectangle2D charRectangle = fontMetrics.getStringBounds(character + "", fontGraphics);
|
||||
|
||||
// Draw the character. This is cached into an OpenGL texture so that this process doesn't need to
|
||||
// be repeated on every frame that the character is later rendered on.
|
||||
final BufferedImage charImage = new BufferedImage(MathHelper.ceiling_float_int(
|
||||
(float) charRectangle.getWidth()) + MARGIN_WIDTH * 2, MathHelper.ceiling_float_int(
|
||||
(float) charRectangle.getHeight()), BufferedImage.TYPE_INT_ARGB);
|
||||
|
||||
final Graphics2D charGraphics = (Graphics2D) charImage.getGraphics();
|
||||
charGraphics.setFont(font);
|
||||
|
||||
// Calculate the width and height of the character
|
||||
final int width = charImage.getWidth();
|
||||
final int height = charImage.getHeight();
|
||||
charGraphics.setColor(TRANSPARENT_COLOR);
|
||||
charGraphics.fillRect(0, 0, width, height);
|
||||
setRenderHints(charGraphics);
|
||||
charGraphics.drawString(character + "", MARGIN_WIDTH, font.getSize());
|
||||
|
||||
// Generate a new OpenGL texture, and pass it along to uploadTexture() with the image of the character so
|
||||
// that it can be stored as a complete OpenGL texture for later use
|
||||
final int charTexture = GL11.glGenTextures();
|
||||
uploadTexture(charTexture, charImage, width, height);
|
||||
|
||||
// Store the completed character back into the provided character array
|
||||
characters[i] = new FontCharacter(charTexture, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRenderHints(final Graphics2D graphics) {
|
||||
graphics.setColor(Color.WHITE);
|
||||
if (antialiasing) {
|
||||
graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
}
|
||||
graphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
||||
graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fractionalMetrics ? RenderingHints.VALUE_FRACTIONALMETRICS_ON : RenderingHints.VALUE_FRACTIONALMETRICS_OFF);
|
||||
}
|
||||
|
||||
public void uploadTexture(final int texture, final BufferedImage image, final int width, final int height) {
|
||||
final int[] pixels = image.getRGB(0, 0, width, height, new int[width * height], 0, width);
|
||||
final ByteBuffer byteBuffer = BufferUtils.createByteBuffer(width * height * MARGIN_WIDTH);
|
||||
for (int y = 0; y < height; ++y) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
final int pixel = pixels[x + y * width];
|
||||
byteBuffer.put((byte) ((pixel >> 16) & MASK));
|
||||
byteBuffer.put((byte) ((pixel >> 8) & MASK));
|
||||
byteBuffer.put((byte) (pixel & MASK));
|
||||
byteBuffer.put((byte) ((pixel >> 24) & MASK));
|
||||
}
|
||||
}
|
||||
byteBuffer.flip();
|
||||
GlStateManager.bindTexture(texture);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width, height, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, byteBuffer);
|
||||
}
|
||||
|
||||
public int drawString(final String text, final double x, final double y, final int color) {
|
||||
return drawString(text, x, y, color, false);
|
||||
}
|
||||
|
||||
public int drawCenteredString(final String text, final double x, final double y, final int color) {
|
||||
return drawString(text, x - (width(text) >> 1), y, color, false); // whoever bitshifted this instead of diving by 2 is a fucking nerd and virgin
|
||||
}
|
||||
|
||||
public int drawRightString(String text, double x, double y, int color) {
|
||||
return drawString(text, x - (width(text)), y, color, false);
|
||||
}
|
||||
|
||||
public int drawStringWithShadow(final String text, final double x, final double y, final int color) {
|
||||
drawString(text, x + 0.25, y + 0.25, color, true);
|
||||
return drawString(text, x, y, color, false);
|
||||
}
|
||||
|
||||
public void drawCenteredStringWithShadow(final String text, final float x, final float y, final int color) {
|
||||
drawString(text, x - (width(text) >> 1) + 0.25, y + 0.25, new Color(color, true).getRGB(), true);
|
||||
drawString(text, x - (width(text) >> 1), y, color, false);
|
||||
}
|
||||
|
||||
public int drawString(String text, double x, double y, final int color, final boolean shadow) {
|
||||
|
||||
if (!this.international && this.requiresInternationalFont(text)) {
|
||||
return FontManager.getInternational(this.font.getSize() - 1).drawString(text, x, y, color);
|
||||
}
|
||||
|
||||
final FontCharacter[] characterSet = this.international ? internationalCharacters : defaultCharacters;
|
||||
|
||||
double givenX = x;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glScalef(SCALE, SCALE, SCALE);
|
||||
|
||||
x -= MARGIN_WIDTH / SCALE_INVERSE;
|
||||
y -= MARGIN_WIDTH / SCALE_INVERSE;
|
||||
x *= SCALE_INVERSE;
|
||||
y *= SCALE_INVERSE;
|
||||
y -= fontHeight / 5;
|
||||
|
||||
final double startX = x;
|
||||
|
||||
final int length = text.length();
|
||||
DrawUtils.glColor(shadow ? 50 : color);
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
final char character = text.charAt(i);
|
||||
|
||||
try {
|
||||
if (character == '\n') {
|
||||
x = startX;
|
||||
y += height() * 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
final FontCharacter fontCharacter = characterSet[character];
|
||||
fontCharacter.render((float) x, (float) y);
|
||||
x += fontCharacter.getWidth() - MARGIN_WIDTH * 2;
|
||||
} catch (Exception exception) {
|
||||
System.out.println("Character \"" + character + "\" was out of bounds " +
|
||||
"(" + ((int) character) + " out of bounds for " + characterSet.length + ")");
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GlStateManager.bindTexture(0);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
return (int) (x - givenX);
|
||||
}
|
||||
|
||||
public int width(String text) {
|
||||
if (!this.international && this.requiresInternationalFont(text)) {
|
||||
return FontManager.getInternational(this.font.getSize()).width(text);
|
||||
}
|
||||
|
||||
final FontCharacter[] characterSet = this.international ? internationalCharacters : defaultCharacters;
|
||||
final int length = text.length();
|
||||
char previousCharacter = '.';
|
||||
int width = 0;
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
final char character = text.charAt(i);
|
||||
// if (previousCharacter != COLOR_INVOKER) {
|
||||
// if (character == COLOR_INVOKER) {
|
||||
// final int index = COLOR_CODE_CHARACTERS.indexOf(text.toLowerCase().charAt(i + 1));
|
||||
// if (index < 16 || index == 21) {
|
||||
// characterSet = defaultCharacters;
|
||||
// } else if (index == 17) {
|
||||
// characterSet = boldCharacters;
|
||||
// }
|
||||
// } else if (characterSet.length > character) {
|
||||
// width += characterSet[character].getWidth() - MARGIN_WIDTH * 2;
|
||||
// }
|
||||
// }
|
||||
width += characterSet[character].getWidth() - MARGIN_WIDTH * 2;
|
||||
|
||||
previousCharacter = character;
|
||||
}
|
||||
|
||||
return width / 2;
|
||||
}
|
||||
|
||||
public float height() {
|
||||
return fontHeight;
|
||||
}
|
||||
|
||||
private boolean requiresInternationalFont(String text) {
|
||||
int highest = 0;
|
||||
|
||||
for (int i = 0; i < text.length(); i++) {
|
||||
if (text.charAt(i) > highest) highest = text.charAt(i);
|
||||
}
|
||||
|
||||
return highest >= 256;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package rip.athena.client.utils.font.impl.athena;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
|
||||
public class FontUtil {
|
||||
|
||||
private static final IResourceManager RESOURCE_MANAGER = Minecraft.getMinecraft().getResourceManager();
|
||||
|
||||
/**
|
||||
* Method which gets a font by a resource name
|
||||
*
|
||||
* @param resource resource name
|
||||
* @param size font size
|
||||
* @return font by resource
|
||||
*/
|
||||
public static Font getResource(final String resource, final int size) {
|
||||
try {
|
||||
return Font.createFont(Font.TRUETYPE_FONT, RESOURCE_MANAGER.getResource(new ResourceLocation(resource)).getInputStream()).deriveFont((float) size);
|
||||
} catch (final FontFormatException | IOException ignored) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,943 @@
|
||||
package rip.athena.client.utils.font.impl.minecraft;
|
||||
|
||||
import com.ibm.icu.text.ArabicShaping;
|
||||
import com.ibm.icu.text.ArabicShapingException;
|
||||
import com.ibm.icu.text.Bidi;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureUtil;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.IResourceManagerReloadListener;
|
||||
import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import optifine.Config;
|
||||
import optifine.CustomColors;
|
||||
import optifine.FontUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.client.utils.font.Font;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
|
||||
public class FontRenderer extends Font implements IResourceManagerReloadListener {
|
||||
private static final ResourceLocation[] unicodePageLocations = new ResourceLocation[256];
|
||||
|
||||
/**
|
||||
* Array of width of all the characters in default.png
|
||||
*/
|
||||
private final int[] charWidth = new int[256];
|
||||
|
||||
/**
|
||||
* the height in pixels of default text
|
||||
*/
|
||||
public static int FONT_HEIGHT = 9;
|
||||
public Random fontRandom = new Random();
|
||||
|
||||
/**
|
||||
* Array of the start/end column (in upper/lower nibble) for every glyph in the /font directory.
|
||||
*/
|
||||
private final byte[] glyphWidth = new byte[65536];
|
||||
|
||||
/**
|
||||
* Array of RGB triplets defining the 16 standard chat colors followed by 16 darker version of the same colors for
|
||||
* drop shadows.
|
||||
*/
|
||||
private final int[] colorCode = new int[32];
|
||||
private ResourceLocation locationFontTexture;
|
||||
|
||||
/**
|
||||
* The RenderEngine used to load and setup glyph textures.
|
||||
*/
|
||||
private final TextureManager renderEngine;
|
||||
|
||||
/**
|
||||
* Current X coordinate at which to draw the next character.
|
||||
*/
|
||||
private float posX;
|
||||
|
||||
/**
|
||||
* Current Y coordinate at which to draw the next character.
|
||||
*/
|
||||
private float posY;
|
||||
|
||||
/**
|
||||
* If true, strings should be rendered with Unicode fonts instead of the default.png font
|
||||
*/
|
||||
private boolean unicodeFlag;
|
||||
|
||||
/**
|
||||
* If true, the Unicode Bidirectional Algorithm should be run before rendering any string.
|
||||
*/
|
||||
private boolean bidiFlag;
|
||||
|
||||
/**
|
||||
* Used to specify new red value for the current color.
|
||||
*/
|
||||
private float red;
|
||||
|
||||
/**
|
||||
* Used to specify new blue value for the current color.
|
||||
*/
|
||||
private float blue;
|
||||
|
||||
/**
|
||||
* Used to specify new green value for the current color.
|
||||
*/
|
||||
private float green;
|
||||
|
||||
/**
|
||||
* Used to specify new alpha value for the current color.
|
||||
*/
|
||||
private float alpha;
|
||||
|
||||
/**
|
||||
* Text color of the currently rendering string.
|
||||
*/
|
||||
private int textColor;
|
||||
|
||||
/**
|
||||
* Set if the "k" style (random) is active in currently rendering string
|
||||
*/
|
||||
private boolean randomStyle;
|
||||
|
||||
/**
|
||||
* Set if the "l" style (bold) is active in currently rendering string
|
||||
*/
|
||||
private boolean boldStyle;
|
||||
|
||||
/**
|
||||
* Set if the "o" style (italic) is active in currently rendering string
|
||||
*/
|
||||
private boolean italicStyle;
|
||||
|
||||
/**
|
||||
* Set if the "n" style (underlined) is active in currently rendering string
|
||||
*/
|
||||
private boolean underlineStyle;
|
||||
|
||||
/**
|
||||
* Set if the "m" style (strikethrough) is active in currently rendering string
|
||||
*/
|
||||
private boolean strikethroughStyle;
|
||||
public GameSettings gameSettings;
|
||||
public ResourceLocation locationFontTextureBase;
|
||||
public float offsetBold = 1.0F;
|
||||
private final float[] charWidthFloat = new float[256];
|
||||
private boolean blend = false;
|
||||
//private final GlBlendState oldBlendState = new GlBlendState();
|
||||
|
||||
public FontRenderer(final GameSettings gameSettingsIn, final ResourceLocation location, final TextureManager textureManagerIn, final boolean unicode) {
|
||||
this.gameSettings = gameSettingsIn;
|
||||
this.locationFontTextureBase = location;
|
||||
this.locationFontTexture = location;
|
||||
this.renderEngine = textureManagerIn;
|
||||
this.unicodeFlag = unicode;
|
||||
this.locationFontTexture = FontUtils.getHdFontLocation(this.locationFontTextureBase);
|
||||
this.bindTexture(this.locationFontTexture);
|
||||
|
||||
for (int i = 0; i < 32; ++i) {
|
||||
final int j = (i >> 3 & 1) * 85;
|
||||
int k = (i >> 2 & 1) * 170 + j;
|
||||
int l = (i >> 1 & 1) * 170 + j;
|
||||
int i1 = (i & 1) * 170 + j;
|
||||
|
||||
if (i == 6) {
|
||||
k += 85;
|
||||
}
|
||||
|
||||
if (gameSettingsIn.anaglyph) {
|
||||
final int j1 = (k * 30 + l * 59 + i1 * 11) / 100;
|
||||
final int k1 = (k * 30 + l * 70) / 100;
|
||||
final int l1 = (k * 30 + i1 * 70) / 100;
|
||||
k = j1;
|
||||
l = k1;
|
||||
i1 = l1;
|
||||
}
|
||||
|
||||
if (i >= 16) {
|
||||
k /= 4;
|
||||
l /= 4;
|
||||
i1 /= 4;
|
||||
}
|
||||
|
||||
this.colorCode[i] = (k & 255) << 16 | (l & 255) << 8 | i1 & 255;
|
||||
}
|
||||
|
||||
this.readGlyphSizes();
|
||||
}
|
||||
|
||||
public void onResourceManagerReload(final IResourceManager resourceManager) {
|
||||
this.locationFontTexture = FontUtils.getHdFontLocation(this.locationFontTextureBase);
|
||||
|
||||
for (int i = 0; i < unicodePageLocations.length; ++i) {
|
||||
unicodePageLocations[i] = null;
|
||||
}
|
||||
|
||||
this.readFontTexture();
|
||||
this.readGlyphSizes();
|
||||
}
|
||||
|
||||
private void readFontTexture() {
|
||||
final BufferedImage bufferedimage;
|
||||
|
||||
try {
|
||||
bufferedimage = TextureUtil.readBufferedImage(this.getResourceInputStream(this.locationFontTexture));
|
||||
} catch (final IOException ioexception1) {
|
||||
throw new RuntimeException(ioexception1);
|
||||
}
|
||||
|
||||
final Properties properties = FontUtils.readFontProperties(this.locationFontTexture);
|
||||
this.blend = FontUtils.readBoolean(properties, "blend", false);
|
||||
final int i = bufferedimage.getWidth();
|
||||
final int j = bufferedimage.getHeight();
|
||||
final int k = i / 16;
|
||||
final int l = j / 16;
|
||||
final float f = (float) i / 128.0F;
|
||||
final float f1 = Config.limit(f, 1.0F, 2.0F);
|
||||
this.offsetBold = 1.0F / f1;
|
||||
final float f2 = FontUtils.readFloat(properties, "offsetBold", -1.0F);
|
||||
|
||||
if (f2 >= 0.0F) {
|
||||
this.offsetBold = f2;
|
||||
}
|
||||
|
||||
final int[] aint = new int[i * j];
|
||||
bufferedimage.getRGB(0, 0, i, j, aint, 0, i);
|
||||
|
||||
for (int i1 = 0; i1 < 256; ++i1) {
|
||||
final int j1 = i1 % 16;
|
||||
final int k1 = i1 / 16;
|
||||
int l1 = 0;
|
||||
|
||||
for (l1 = k - 1; l1 >= 0; --l1) {
|
||||
final int i2 = j1 * k + l1;
|
||||
boolean flag = true;
|
||||
|
||||
for (int j2 = 0; j2 < l && flag; ++j2) {
|
||||
final int k2 = (k1 * l + j2) * i;
|
||||
final int l2 = aint[i2 + k2];
|
||||
final int i3 = l2 >> 24 & 255;
|
||||
|
||||
if (i3 > 16) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!flag) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i1 == 65) {
|
||||
i1 = i1;
|
||||
}
|
||||
|
||||
if (i1 == 32) {
|
||||
if (k <= 8) {
|
||||
l1 = (int) (2.0F * f);
|
||||
} else {
|
||||
l1 = (int) (1.5F * f);
|
||||
}
|
||||
}
|
||||
|
||||
this.charWidthFloat[i1] = (float) (l1 + 1) / f + 1.0F;
|
||||
}
|
||||
|
||||
FontUtils.readCustomCharWidths(properties, this.charWidthFloat);
|
||||
|
||||
for (int j3 = 0; j3 < this.charWidth.length; ++j3) {
|
||||
this.charWidth[j3] = Math.round(this.charWidthFloat[j3]);
|
||||
}
|
||||
}
|
||||
|
||||
private void readGlyphSizes() {
|
||||
InputStream inputstream = null;
|
||||
|
||||
try {
|
||||
inputstream = this.getResourceInputStream(new ResourceLocation("font/glyph_sizes.bin"));
|
||||
inputstream.read(this.glyphWidth);
|
||||
} catch (final IOException ioexception) {
|
||||
throw new RuntimeException(ioexception);
|
||||
} finally {
|
||||
IOUtils.closeQuietly(inputstream);
|
||||
}
|
||||
}
|
||||
|
||||
private float func_181559_a(final char p_181559_1_, final boolean p_181559_2_) {
|
||||
if (p_181559_1_ != 32 && p_181559_1_ != 160) {
|
||||
final int i = "\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".indexOf(p_181559_1_);
|
||||
return i != -1 && !this.unicodeFlag ? this.renderDefaultChar(i, p_181559_2_) : this.renderUnicodeChar(p_181559_1_, p_181559_2_);
|
||||
} else {
|
||||
return !this.unicodeFlag ? this.charWidthFloat[p_181559_1_] : 4.0F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a single character with the default.png font at current (posX,posY) location...
|
||||
*/
|
||||
private float renderDefaultChar(final int p_78266_1_, final boolean p_78266_2_) {
|
||||
final int i = p_78266_1_ % 16 * 8;
|
||||
final int j = p_78266_1_ / 16 * 8;
|
||||
final int k = p_78266_2_ ? 1 : 0;
|
||||
this.bindTexture(this.locationFontTexture);
|
||||
final float f = this.charWidthFloat[p_78266_1_];
|
||||
final float f1 = 7.99F;
|
||||
GL11.glBegin(GL11.GL_TRIANGLE_STRIP);
|
||||
GL11.glTexCoord2f((float) i / 128.0F, (float) j / 128.0F);
|
||||
GL11.glVertex3f(this.posX + (float) k, this.posY, 0.0F);
|
||||
GL11.glTexCoord2f((float) i / 128.0F, ((float) j + 7.99F) / 128.0F);
|
||||
GL11.glVertex3f(this.posX - (float) k, this.posY + 7.99F, 0.0F);
|
||||
GL11.glTexCoord2f(((float) i + f1 - 1.0F) / 128.0F, (float) j / 128.0F);
|
||||
GL11.glVertex3f(this.posX + f1 - 1.0F + (float) k, this.posY, 0.0F);
|
||||
GL11.glTexCoord2f(((float) i + f1 - 1.0F) / 128.0F, ((float) j + 7.99F) / 128.0F);
|
||||
GL11.glVertex3f(this.posX + f1 - 1.0F - (float) k, this.posY + 7.99F, 0.0F);
|
||||
GL11.glEnd();
|
||||
return f;
|
||||
}
|
||||
|
||||
private ResourceLocation getUnicodePageLocation(final int p_111271_1_) {
|
||||
if (unicodePageLocations[p_111271_1_] == null) {
|
||||
unicodePageLocations[p_111271_1_] = new ResourceLocation(String.format("textures/font/unicode_page_%02x.png", Integer.valueOf(p_111271_1_)));
|
||||
unicodePageLocations[p_111271_1_] = FontUtils.getHdFontLocation(unicodePageLocations[p_111271_1_]);
|
||||
}
|
||||
|
||||
return unicodePageLocations[p_111271_1_];
|
||||
}
|
||||
|
||||
/**
|
||||
* Load one of the /font/glyph_XX.png into a new GL texture and store the texture ID in glyphTextureName array.
|
||||
*/
|
||||
private void loadGlyphTexture(final int p_78257_1_) {
|
||||
this.bindTexture(this.getUnicodePageLocation(p_78257_1_));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a single Unicode character at current (posX,posY) location using one of the /font/glyph_XX.png files...
|
||||
*/
|
||||
private float renderUnicodeChar(final char p_78277_1_, final boolean p_78277_2_) {
|
||||
if (this.glyphWidth[p_78277_1_] == 0) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
final int i = p_78277_1_ / 256;
|
||||
this.loadGlyphTexture(i);
|
||||
final int j = this.glyphWidth[p_78277_1_] >>> 4;
|
||||
final int k = this.glyphWidth[p_78277_1_] & 15;
|
||||
final float f = (float) j;
|
||||
final float f1 = (float) (k + 1);
|
||||
final float f2 = (float) (p_78277_1_ % 16 * 16) + f;
|
||||
final float f3 = (float) ((p_78277_1_ & 255) / 16 * 16);
|
||||
final float f4 = f1 - f - 0.02F;
|
||||
final float f5 = p_78277_2_ ? 1.0F : 0.0F;
|
||||
GL11.glBegin(GL11.GL_TRIANGLE_STRIP);
|
||||
GL11.glTexCoord2f(f2 / 256.0F, f3 / 256.0F);
|
||||
GL11.glVertex3f(this.posX + f5, this.posY, 0.0F);
|
||||
GL11.glTexCoord2f(f2 / 256.0F, (f3 + 15.98F) / 256.0F);
|
||||
GL11.glVertex3f(this.posX - f5, this.posY + 7.99F, 0.0F);
|
||||
GL11.glTexCoord2f((f2 + f4) / 256.0F, f3 / 256.0F);
|
||||
GL11.glVertex3f(this.posX + f4 / 2.0F + f5, this.posY, 0.0F);
|
||||
GL11.glTexCoord2f((f2 + f4) / 256.0F, (f3 + 15.98F) / 256.0F);
|
||||
GL11.glVertex3f(this.posX + f4 / 2.0F - f5, this.posY + 7.99F, 0.0F);
|
||||
GL11.glEnd();
|
||||
return (f1 - f) / 2.0F + 1.0F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the specified string with a shadow.
|
||||
*/
|
||||
public int drawStringWithShadow(final String text, final double x, final double y, final int color) {
|
||||
return this.drawString(text, x, y, color, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the specified string.
|
||||
*/
|
||||
public int drawString(final String text, final double x, final double y, final int color) {
|
||||
return this.drawString(text, x, y, color, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the specified string.
|
||||
*/
|
||||
public int drawString(String text, double x, double y, int color, boolean dropShadow) {
|
||||
y -= 1;
|
||||
this.enableAlpha();
|
||||
|
||||
if (this.blend) {
|
||||
//GlStateManager.getBlendState(this.oldBlendState);
|
||||
//GlStateManager.enableBlend();
|
||||
//GlStateManager.blendFunc(770, 771);
|
||||
}
|
||||
|
||||
this.resetStyles();
|
||||
int i;
|
||||
|
||||
if (dropShadow) {
|
||||
i = this.renderString(text, (float) x + 1.0F, (float) y + 1.0F, color, true);
|
||||
i = Math.max(i, this.renderString(text, (float) x, (float) y, color, false));
|
||||
} else {
|
||||
i = this.renderString(text, (float) x, (float) y, color, false);
|
||||
}
|
||||
|
||||
if (this.blend) {
|
||||
//GlStateManager.setBlendState(this.oldBlendState);
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering.
|
||||
*/
|
||||
private String bidiReorder(final String p_147647_1_) {
|
||||
try {
|
||||
final Bidi bidi = new Bidi((new ArabicShaping(8)).shape(p_147647_1_), 127);
|
||||
bidi.setReorderingMode(0);
|
||||
return bidi.writeReordered(2);
|
||||
} catch (final ArabicShapingException var3) {
|
||||
return p_147647_1_;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset all style flag fields in the class to false; called at the start of string rendering
|
||||
*/
|
||||
private void resetStyles() {
|
||||
this.randomStyle = false;
|
||||
this.boldStyle = false;
|
||||
this.italicStyle = false;
|
||||
this.underlineStyle = false;
|
||||
this.strikethroughStyle = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a single line string at the current (posX,posY) and update posX
|
||||
*/
|
||||
private void renderStringAtPos(final String p_78255_1_, final boolean p_78255_2_) {
|
||||
for (int i = 0; i < p_78255_1_.length(); ++i) {
|
||||
char c0 = p_78255_1_.charAt(i);
|
||||
|
||||
if (c0 == 167 && i + 1 < p_78255_1_.length()) {
|
||||
int l = "0123456789abcdefklmnor".indexOf(p_78255_1_.toLowerCase(Locale.ENGLISH).charAt(i + 1));
|
||||
|
||||
if (l < 16) {
|
||||
this.randomStyle = false;
|
||||
this.boldStyle = false;
|
||||
this.strikethroughStyle = false;
|
||||
this.underlineStyle = false;
|
||||
this.italicStyle = false;
|
||||
|
||||
if (l < 0) {
|
||||
l = 15;
|
||||
}
|
||||
|
||||
if (p_78255_2_) {
|
||||
l += 16;
|
||||
}
|
||||
|
||||
int i1 = this.colorCode[l];
|
||||
|
||||
if (Config.isCustomColors()) {
|
||||
i1 = CustomColors.getTextColor(l, i1);
|
||||
}
|
||||
|
||||
this.textColor = i1;
|
||||
this.setColor((float) (i1 >> 16) / 255.0F, (float) (i1 >> 8 & 255) / 255.0F, (float) (i1 & 255) / 255.0F, this.alpha);
|
||||
} else if (l == 17) {
|
||||
this.boldStyle = true;
|
||||
} else if (l == 21) {
|
||||
this.randomStyle = false;
|
||||
this.boldStyle = false;
|
||||
this.strikethroughStyle = false;
|
||||
this.underlineStyle = false;
|
||||
this.italicStyle = false;
|
||||
this.setColor(this.red, this.blue, this.green, this.alpha);
|
||||
}
|
||||
|
||||
++i;
|
||||
} else {
|
||||
|
||||
final float f1 = !this.unicodeFlag ? this.offsetBold : 0.5F;
|
||||
final boolean flag = (c0 == 0 || this.unicodeFlag) && p_78255_2_;
|
||||
|
||||
if (flag) {
|
||||
this.posX -= f1;
|
||||
this.posY -= f1;
|
||||
}
|
||||
|
||||
float f = this.func_181559_a(c0, this.italicStyle);
|
||||
|
||||
if (flag) {
|
||||
this.posX += f1;
|
||||
this.posY += f1;
|
||||
}
|
||||
|
||||
if (this.boldStyle) {
|
||||
this.posX += f1;
|
||||
|
||||
if (flag) {
|
||||
this.posX -= f1;
|
||||
this.posY -= f1;
|
||||
}
|
||||
|
||||
this.func_181559_a(c0, this.italicStyle);
|
||||
this.posX -= f1;
|
||||
|
||||
if (flag) {
|
||||
this.posX += f1;
|
||||
this.posY += f1;
|
||||
}
|
||||
|
||||
f += f1;
|
||||
}
|
||||
|
||||
this.doDraw(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void doDraw(final float p_doDraw_1_) {
|
||||
|
||||
if (this.underlineStyle) {
|
||||
final Tessellator tessellator1 = Tessellator.getInstance();
|
||||
final WorldRenderer worldrenderer1 = tessellator1.getWorldRenderer();
|
||||
GlStateManager.disableTexture2D();
|
||||
worldrenderer1.begin(7, DefaultVertexFormats.POSITION);
|
||||
final int i = this.underlineStyle ? -1 : 0;
|
||||
worldrenderer1.pos(this.posX + (float) i, this.posY + (float) this.FONT_HEIGHT, 0.0D).endVertex();
|
||||
worldrenderer1.pos(this.posX + p_doDraw_1_, this.posY + (float) this.FONT_HEIGHT, 0.0D).endVertex();
|
||||
worldrenderer1.pos(this.posX + p_doDraw_1_, this.posY + (float) this.FONT_HEIGHT - 1.0F, 0.0D).endVertex();
|
||||
worldrenderer1.pos(this.posX + (float) i, this.posY + (float) this.FONT_HEIGHT - 1.0F, 0.0D).endVertex();
|
||||
tessellator1.draw();
|
||||
GlStateManager.enableTexture2D();
|
||||
}
|
||||
|
||||
this.posX += p_doDraw_1_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render string either left or right aligned depending on bidiFlag
|
||||
*/
|
||||
private int renderStringAligned(final String text, int x, final int y, final int p_78274_4_, final int color, final boolean dropShadow) {
|
||||
if (this.bidiFlag) {
|
||||
final int i = this.width(this.bidiReorder(text));
|
||||
x = x + p_78274_4_ - i;
|
||||
}
|
||||
|
||||
return this.renderString(text, (float) x, (float) y, color, dropShadow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render single line string by setting GL color, current (posX,posY), and calling renderStringAtPos()
|
||||
*/
|
||||
private int renderString(String text, final float x, final float y, int color, final boolean dropShadow) {
|
||||
if (text == null) {
|
||||
return 0;
|
||||
} else {
|
||||
if (this.bidiFlag) {
|
||||
text = this.bidiReorder(text);
|
||||
}
|
||||
|
||||
if ((color & -67108864) == 0) {
|
||||
color |= -16777216;
|
||||
}
|
||||
|
||||
if (dropShadow) {
|
||||
color = (color & 16579836) >> 2 | color & -16777216;
|
||||
}
|
||||
|
||||
this.red = (float) (color >> 16 & 255) / 255.0F;
|
||||
this.blue = (float) (color >> 8 & 255) / 255.0F;
|
||||
this.green = (float) (color & 255) / 255.0F;
|
||||
this.alpha = (float) (color >> 24 & 255) / 255.0F;
|
||||
this.setColor(this.red, this.blue, this.green, this.alpha);
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.renderStringAtPos(text, dropShadow);
|
||||
return (int) this.posX;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of this string. Equivalent of FontMetrics.stringWidth(String s).
|
||||
*/
|
||||
public int width(String text) {
|
||||
if (text == null) {
|
||||
return 0;
|
||||
} else {
|
||||
float f = 0.0F;
|
||||
boolean flag = false;
|
||||
|
||||
for (int i = 0; i < text.length(); ++i) {
|
||||
char c0 = text.charAt(i);
|
||||
float f1 = this.getCharWidthFloat(c0);
|
||||
|
||||
if (f1 < 0.0F && i < text.length() - 1) {
|
||||
++i;
|
||||
c0 = text.charAt(i);
|
||||
|
||||
if (c0 != 108 && c0 != 76) {
|
||||
if (c0 == 114 || c0 == 82) {
|
||||
flag = false;
|
||||
}
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
f1 = 0.0F;
|
||||
}
|
||||
|
||||
f += f1;
|
||||
|
||||
if (flag && f1 > 0.0F) {
|
||||
f += this.unicodeFlag ? 1.0F : this.offsetBold;
|
||||
}
|
||||
}
|
||||
|
||||
return Math.round(f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drawCenteredString(String text, double x, double y, int color) {
|
||||
return drawString(text, x - (width(text) >> 1), y, color, false); // whoever bitshifted this instead of diving by 2 is a fucking nerd and virgin
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drawRightString(String text, double x, double y, int color) {
|
||||
return drawString(text, x - (width(text)), y, color, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float height() {
|
||||
return FONT_HEIGHT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of this character as rendered.
|
||||
*/
|
||||
public int getCharWidth(final char character) {
|
||||
return Math.round(this.getCharWidthFloat(character));
|
||||
}
|
||||
|
||||
private float getCharWidthFloat(final char p_getCharWidthFloat_1_) {
|
||||
if (p_getCharWidthFloat_1_ == 167) {
|
||||
return -1.0F;
|
||||
} else if (p_getCharWidthFloat_1_ != 32 && p_getCharWidthFloat_1_ != 160) {
|
||||
final int i = "\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".indexOf(p_getCharWidthFloat_1_);
|
||||
|
||||
if (p_getCharWidthFloat_1_ > 0 && i != -1 && !this.unicodeFlag) {
|
||||
return this.charWidthFloat[i];
|
||||
} else if (this.glyphWidth[p_getCharWidthFloat_1_] != 0) {
|
||||
int j = this.glyphWidth[p_getCharWidthFloat_1_] >>> 4;
|
||||
int k = this.glyphWidth[p_getCharWidthFloat_1_] & 15;
|
||||
|
||||
if (k > 7) {
|
||||
k = 15;
|
||||
j = 0;
|
||||
}
|
||||
|
||||
++k;
|
||||
return (float) ((k - j) / 2 + 1);
|
||||
} else {
|
||||
return 0.0F;
|
||||
}
|
||||
} else {
|
||||
return this.charWidthFloat[32];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims a string to fit a specified Width.
|
||||
*/
|
||||
public String trimStringToWidth(final String text, final int width) {
|
||||
return this.trimStringToWidth(text, width, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims a string to a specified width, and will reverse it if par3 is set.
|
||||
*/
|
||||
public String trimStringToWidth(final String text, final int width, final boolean reverse) {
|
||||
final StringBuilder stringbuilder = new StringBuilder();
|
||||
float f = 0.0F;
|
||||
final int i = reverse ? text.length() - 1 : 0;
|
||||
final int j = reverse ? -1 : 1;
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
|
||||
for (int k = i; k >= 0 && k < text.length() && f < (float) width; k += j) {
|
||||
final char c0 = text.charAt(k);
|
||||
final float f1 = this.getCharWidthFloat(c0);
|
||||
|
||||
if (flag) {
|
||||
flag = false;
|
||||
|
||||
if (c0 != 108 && c0 != 76) {
|
||||
if (c0 == 114 || c0 == 82) {
|
||||
flag1 = false;
|
||||
}
|
||||
} else {
|
||||
flag1 = true;
|
||||
}
|
||||
} else if (f1 < 0.0F) {
|
||||
flag = true;
|
||||
} else {
|
||||
f += f1;
|
||||
|
||||
if (flag1) {
|
||||
++f;
|
||||
}
|
||||
}
|
||||
|
||||
if (f > (float) width) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (reverse) {
|
||||
stringbuilder.insert(0, c0);
|
||||
} else {
|
||||
stringbuilder.append(c0);
|
||||
}
|
||||
}
|
||||
|
||||
return stringbuilder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all newline characters from the end of the string
|
||||
*/
|
||||
private String trimStringNewline(String text) {
|
||||
while (text != null && text.endsWith("\n")) {
|
||||
text = text.substring(0, text.length() - 1);
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits and draws a String with wordwrap (maximum length is parameter k)
|
||||
*/
|
||||
public void drawSplitString(String str, final int x, final int y, final int wrapWidth, final int textColor) {
|
||||
if (this.blend) {
|
||||
//GlStateManager.getBlendState(this.oldBlendState);
|
||||
//GlStateManager.enableBlend();
|
||||
//GlStateManager.blendFunc(770, 771);
|
||||
}
|
||||
|
||||
this.resetStyles();
|
||||
this.textColor = textColor;
|
||||
str = this.trimStringNewline(str);
|
||||
this.renderSplitString(str, x, y, wrapWidth, false);
|
||||
|
||||
if (this.blend) {
|
||||
//GlStateManager.setBlendState(this.oldBlendState);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform actual work of rendering a multi-line string with wordwrap and with darker drop shadow color if flag is
|
||||
* set
|
||||
*/
|
||||
private void renderSplitString(final String str, final int x, int y, final int wrapWidth, final boolean addShadow) {
|
||||
for (final String s : this.listFormattedStringToWidth(str, wrapWidth)) {
|
||||
this.renderStringAligned(s, x, y, wrapWidth, this.textColor, addShadow);
|
||||
y += this.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the wordwrapped String (maximum length is parameter k)
|
||||
*/
|
||||
public int splitStringWidth(final String p_78267_1_, final int p_78267_2_) {
|
||||
return this.FONT_HEIGHT * this.listFormattedStringToWidth(p_78267_1_, p_78267_2_).size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set unicodeFlag controlling whether strings should be rendered with Unicode fonts instead of the default.png
|
||||
* font.
|
||||
*/
|
||||
public void setUnicodeFlag(final boolean unicodeFlagIn) {
|
||||
this.unicodeFlag = unicodeFlagIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get unicodeFlag controlling whether strings should be rendered with Unicode fonts instead of the default.png
|
||||
* font.
|
||||
*/
|
||||
public boolean getUnicodeFlag() {
|
||||
return this.unicodeFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set bidiFlag to control if the Unicode Bidirectional Algorithm should be run before rendering any string.
|
||||
*/
|
||||
public void setBidiFlag(final boolean bidiFlagIn) {
|
||||
this.bidiFlag = bidiFlagIn;
|
||||
}
|
||||
|
||||
public List<String> listFormattedStringToWidth(final String str, final int wrapWidth) {
|
||||
return Arrays.asList(this.wrapFormattedStringToWidth(str, wrapWidth).split("\n"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts newline and formatting into a string to wrap it within the specified width.
|
||||
*/
|
||||
String wrapFormattedStringToWidth(final String str, final int wrapWidth) {
|
||||
if (str.length() <= 1) {
|
||||
return str;
|
||||
} else {
|
||||
final int i = this.sizeStringToWidth(str, wrapWidth);
|
||||
|
||||
if (str.length() <= i) {
|
||||
return str;
|
||||
} else {
|
||||
final String s = str.substring(0, i);
|
||||
final char c0 = str.charAt(i);
|
||||
final boolean flag = c0 == 32 || c0 == 10;
|
||||
final String s1 = getFormatFromString(s) + str.substring(i + (flag ? 1 : 0));
|
||||
return s + "\n" + this.wrapFormattedStringToWidth(s1, wrapWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines how many characters from the string will fit into the specified width.
|
||||
*/
|
||||
private int sizeStringToWidth(final String str, final int wrapWidth) {
|
||||
final int i = str.length();
|
||||
float f = 0.0F;
|
||||
int j = 0;
|
||||
int k = -1;
|
||||
|
||||
for (boolean flag = false; j < i; ++j) {
|
||||
final char c0 = str.charAt(j);
|
||||
|
||||
switch (c0) {
|
||||
case '\n':
|
||||
--j;
|
||||
break;
|
||||
|
||||
case ' ':
|
||||
k = j;
|
||||
|
||||
default:
|
||||
f += (float) this.getCharWidth(c0);
|
||||
|
||||
if (flag) {
|
||||
++f;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case '\u00a7':
|
||||
if (j < i - 1) {
|
||||
++j;
|
||||
final char c1 = str.charAt(j);
|
||||
|
||||
if (c1 != 108 && c1 != 76) {
|
||||
if (c1 == 114 || c1 == 82 || isFormatColor(c1)) {
|
||||
flag = false;
|
||||
}
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (c0 == 10) {
|
||||
++j;
|
||||
k = j;
|
||||
break;
|
||||
}
|
||||
|
||||
if (Math.round(f) > wrapWidth) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return j != i && k != -1 && k < j ? k : j;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the char code is a hexadecimal character, used to set colour.
|
||||
*/
|
||||
private static boolean isFormatColor(final char colorChar) {
|
||||
return colorChar >= 48 && colorChar <= 57 || colorChar >= 97 && colorChar <= 102 || colorChar >= 65 && colorChar <= 70;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the char code is O-K...lLrRk-o... used to set special formatting.
|
||||
*/
|
||||
private static boolean isFormatSpecial(final char formatChar) {
|
||||
return formatChar >= 107 && formatChar <= 111 || formatChar >= 75 && formatChar <= 79 || formatChar == 114 || formatChar == 82;
|
||||
}
|
||||
|
||||
/**
|
||||
* Digests a string for nonprinting formatting characters then returns a string containing only that formatting.
|
||||
*/
|
||||
public static String getFormatFromString(final String text) {
|
||||
String s = "";
|
||||
int i = -1;
|
||||
final int j = text.length();
|
||||
|
||||
while ((i = text.indexOf(167, i + 1)) != -1) {
|
||||
if (i < j - 1) {
|
||||
final char c0 = text.charAt(i + 1);
|
||||
|
||||
if (isFormatColor(c0)) {
|
||||
s = "\u00a7" + c0;
|
||||
} else if (isFormatSpecial(c0)) {
|
||||
s = s + "\u00a7" + c0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bidiFlag that controls if the Unicode Bidirectional Algorithm should be run before rendering any string
|
||||
*/
|
||||
public boolean getBidiFlag() {
|
||||
return this.bidiFlag;
|
||||
}
|
||||
|
||||
public int getColorCode(final char character) {
|
||||
final int i = "0123456789abcdef".indexOf(character);
|
||||
|
||||
if (i >= 0 && i < this.colorCode.length) {
|
||||
int j = this.colorCode[i];
|
||||
|
||||
if (Config.isCustomColors()) {
|
||||
j = CustomColors.getTextColor(i, j);
|
||||
}
|
||||
|
||||
return j;
|
||||
} else {
|
||||
return 16777215;
|
||||
}
|
||||
}
|
||||
|
||||
protected void setColor(final float p_setColor_1_, final float p_setColor_2_, final float p_setColor_3_, final float p_setColor_4_) {
|
||||
GlStateManager.color(p_setColor_1_, p_setColor_2_, p_setColor_3_, p_setColor_4_);
|
||||
}
|
||||
|
||||
protected void enableAlpha() {
|
||||
GlStateManager.enableAlpha();
|
||||
}
|
||||
|
||||
protected void bindTexture(final ResourceLocation p_bindTexture_1_) {
|
||||
this.renderEngine.bindTexture(p_bindTexture_1_);
|
||||
}
|
||||
|
||||
protected InputStream getResourceInputStream(final ResourceLocation p_getResourceInputStream_1_) throws IOException {
|
||||
return Minecraft.getMinecraft().getResourceManager().getResource(p_getResourceInputStream_1_).getInputStream();
|
||||
}
|
||||
}
|
@ -113,15 +113,26 @@ public enum DrawUtils {
|
||||
GL11.glColor4f((float) f1, (float) f2, (float) f3, (float) f);
|
||||
}
|
||||
|
||||
public static void glColor(final int hex) {
|
||||
final float a = (hex >> 24 & 0xFF) / 255.0F;
|
||||
final float r = (hex >> 16 & 0xFF) / 255.0F;
|
||||
final float g = (hex >> 8 & 0xFF) / 255.0F;
|
||||
final float b = (hex & 0xFF) / 255.0F;
|
||||
GL11.glColor4f(r, g, b, a);
|
||||
}
|
||||
|
||||
public static void drawImage(ResourceLocation image, int x, int y, int width, int height) {
|
||||
GlStateManager.enableAlpha();
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(770, 771);
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.0F);
|
||||
color(-1);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(image);
|
||||
GlStateManager.color(1, 1, 1);
|
||||
Gui.drawModalRectWithCustomSizedTexture(x, y, 0.0F, 0.0F, width, height, width, height);
|
||||
Gui.drawModalRectWithCustomSizedTexture(x, y, 0, 0, width, height, width, height);
|
||||
GlStateManager.resetColor();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
public static int reAlpha(int color, float alpha) {
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Icon-1.ttf
Normal file
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Icon-1.ttf
Normal file
Binary file not shown.
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Icon-2.ttf
Normal file
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Icon-2.ttf
Normal file
Binary file not shown.
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Icon-3.ttf
Normal file
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Icon-3.ttf
Normal file
Binary file not shown.
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Light.ttf
Normal file
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Light.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Tahoma.ttf
Normal file
BIN
src/main/resources/assets/minecraft/Athena/gui/font/Tahoma.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
100
workspace/crash-reports/crash-2023-06-07_16.39.42-client.txt
Normal file
100
workspace/crash-reports/crash-2023-06-07_16.39.42-client.txt
Normal file
@ -0,0 +1,100 @@
|
||||
---- Minecraft Crash Report ----
|
||||
// This doesn't make any sense!
|
||||
|
||||
Time: 6/7/23 4:39 PM
|
||||
Description: Rendering screen
|
||||
|
||||
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:193)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1431)
|
||||
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1151)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:430)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
|
||||
A detailed walkthrough of the error, its code path and all known details is as follows:
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
-- Head --
|
||||
Stacktrace:
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:193)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
|
||||
-- Screen render details --
|
||||
Details:
|
||||
Screen name: rip.athena.client.gui.clickgui.IngameMenu
|
||||
Mouse location: Scaled: (480, 252). Absolute: (960, 504)
|
||||
Screen size: Scaled: (960, 505). Absolute: (1920, 1009). Scale factor of 2
|
||||
|
||||
-- Affected level --
|
||||
Details:
|
||||
Level name: MpServer
|
||||
All players: 1 total; [EntityPlayerSP['Player143'/23, l='MpServer', x=352.64, y=90.00, z=1158.17]]
|
||||
Chunk stats: MultiplayerChunkCache: 35, 35
|
||||
Level seed: 0
|
||||
Level generator: ID 02 - largeBiomes, ver 0. Features enabled: false
|
||||
Level generator options:
|
||||
Level spawn location: 5.00,64.00,557.00 - World: (5,64,557), Chunk: (at 5,4,13 in 0,34; contains blocks 0,0,544 to 15,255,559), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
|
||||
Level time: 218188 game time, 218188 day time
|
||||
Level dimension: 0
|
||||
Level storage version: 0x00000 - Unknown?
|
||||
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
|
||||
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
|
||||
Forced entities: 11 total; [EntityItem['item.item.rottenFlesh'/4546, l='MpServer', x=324.41, y=71.00, z=1195.81], EntityItem['item.item.arrow'/4548, l='MpServer', x=319.47, y=72.00, z=1180.91], EntityItem['item.item.arrow'/4549, l='MpServer', x=319.00, y=72.00, z=1179.94], EntityItem['item.item.arrow'/4613, l='MpServer', x=320.84, y=80.00, z=1148.88], EntityWitch['Witch'/6223, l='MpServer', x=304.50, y=28.00, z=1117.50], EntityZombie['Zombie'/6896, l='MpServer', x=349.50, y=24.00, z=1109.50], EntityMinecartChest['container.minecart'/4977, l='MpServer', x=305.50, y=24.06, z=1110.50], EntityZombie['Zombie'/6897, l='MpServer', x=346.59, y=24.00, z=1113.44], EntityPlayerSP['Player143'/23, l='MpServer', x=352.64, y=90.00, z=1158.17], EntityItem['item.item.arrow'/6264, l='MpServer', x=394.91, y=68.00, z=1176.94], EntityMinecartChest['container.minecart'/28, l='MpServer', x=306.50, y=28.06, z=1123.50]]
|
||||
Retry entities: 0 total; []
|
||||
Server brand: vanilla
|
||||
Server type: Integrated singleplayer server
|
||||
Stacktrace:
|
||||
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:401)
|
||||
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2791)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:451)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
-- System Details --
|
||||
Details:
|
||||
Minecraft Version: 1.8.8
|
||||
Operating System: Windows 10 (amd64) version 10.0
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
Java Version: 1.8.0_202, Oracle Corporation
|
||||
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
|
||||
Memory: 127047864 bytes (121 MB) / 1017643008 bytes (970 MB) up to 3801088000 bytes (3625 MB)
|
||||
JVM Flags: 0 total;
|
||||
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 99
|
||||
Launched Version: mcp
|
||||
LWJGL: 2.9.4
|
||||
OpenGL: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 GL version 4.6.0 NVIDIA 532.03, NVIDIA Corporation
|
||||
GL Caps: Using GL 1.3 multitexturing.
|
||||
Using GL 1.3 texture combiners.
|
||||
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
|
||||
Shaders are available because OpenGL 2.1 is supported.
|
||||
VBOs are available because OpenGL 1.5 is supported.
|
||||
|
||||
Using VBOs: Yes
|
||||
Is Modded: Very likely; Jar signature invalidated
|
||||
Type: Client (map_client.txt)
|
||||
Resource Packs: ! §bPotfast 5kay.zip
|
||||
Current Language: English (US)
|
||||
Profiler Position: N/A (disabled)
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
OptiFine Version: OptiFine_1.8.8_HD_U_H8
|
||||
Render Distance Chunks: 2
|
||||
Mipmaps: 0
|
||||
Anisotropic Filtering: 1
|
||||
Antialiasing: 0
|
||||
Multitexture: false
|
||||
Shaders: null
|
||||
OpenGlVersion: 4.6.0 NVIDIA 532.03
|
||||
OpenGlRenderer: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
|
||||
OpenGlVendor: NVIDIA Corporation
|
||||
CpuCount: 12
|
100
workspace/crash-reports/crash-2023-06-07_16.51.46-client.txt
Normal file
100
workspace/crash-reports/crash-2023-06-07_16.51.46-client.txt
Normal file
@ -0,0 +1,100 @@
|
||||
---- Minecraft Crash Report ----
|
||||
// Hey, that tickles! Hehehe!
|
||||
|
||||
Time: 6/7/23 4:51 PM
|
||||
Description: Rendering screen
|
||||
|
||||
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:193)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1431)
|
||||
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1151)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:430)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
|
||||
A detailed walkthrough of the error, its code path and all known details is as follows:
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
-- Head --
|
||||
Stacktrace:
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:193)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
|
||||
-- Screen render details --
|
||||
Details:
|
||||
Screen name: rip.athena.client.gui.clickgui.IngameMenu
|
||||
Mouse location: Scaled: (480, 252). Absolute: (960, 504)
|
||||
Screen size: Scaled: (960, 505). Absolute: (1920, 1009). Scale factor of 2
|
||||
|
||||
-- Affected level --
|
||||
Details:
|
||||
Level name: MpServer
|
||||
All players: 1 total; [EntityPlayerSP['Player123'/23, l='MpServer', x=349.85, y=91.73, z=1154.55]]
|
||||
Chunk stats: MultiplayerChunkCache: 30, 30
|
||||
Level seed: 0
|
||||
Level generator: ID 02 - largeBiomes, ver 0. Features enabled: false
|
||||
Level generator options:
|
||||
Level spawn location: 5.00,64.00,557.00 - World: (5,64,557), Chunk: (at 5,4,13 in 0,34; contains blocks 0,0,544 to 15,255,559), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
|
||||
Level time: 231229 game time, 231229 day time
|
||||
Level dimension: 0
|
||||
Level storage version: 0x00000 - Unknown?
|
||||
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
|
||||
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
|
||||
Forced entities: 6 total; [EntityZombie['Zombie'/3969, l='MpServer', x=319.50, y=72.00, z=1192.50], EntityPlayerSP['Player123'/23, l='MpServer', x=349.85, y=91.73, z=1154.55], EntitySkeleton['Skeleton'/3976, l='MpServer', x=357.35, y=73.00, z=1125.77], EntityMinecartChest['container.minecart'/26, l='MpServer', x=306.50, y=28.06, z=1123.50], EntitySkeleton['Skeleton'/4058, l='MpServer', x=331.44, y=73.00, z=1130.13], EntityCreeper['Creeper'/3964, l='MpServer', x=318.50, y=72.00, z=1191.50]]
|
||||
Retry entities: 0 total; []
|
||||
Server brand: vanilla
|
||||
Server type: Integrated singleplayer server
|
||||
Stacktrace:
|
||||
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:401)
|
||||
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2791)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:451)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
-- System Details --
|
||||
Details:
|
||||
Minecraft Version: 1.8.8
|
||||
Operating System: Windows 10 (amd64) version 10.0
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
Java Version: 1.8.0_202, Oracle Corporation
|
||||
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
|
||||
Memory: 138369448 bytes (131 MB) / 1030750208 bytes (983 MB) up to 3801088000 bytes (3625 MB)
|
||||
JVM Flags: 0 total;
|
||||
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 99
|
||||
Launched Version: mcp
|
||||
LWJGL: 2.9.4
|
||||
OpenGL: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 GL version 4.6.0 NVIDIA 532.03, NVIDIA Corporation
|
||||
GL Caps: Using GL 1.3 multitexturing.
|
||||
Using GL 1.3 texture combiners.
|
||||
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
|
||||
Shaders are available because OpenGL 2.1 is supported.
|
||||
VBOs are available because OpenGL 1.5 is supported.
|
||||
|
||||
Using VBOs: Yes
|
||||
Is Modded: Very likely; Jar signature invalidated
|
||||
Type: Client (map_client.txt)
|
||||
Resource Packs: ! §bPotfast 5kay.zip
|
||||
Current Language: English (US)
|
||||
Profiler Position: N/A (disabled)
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
OptiFine Version: OptiFine_1.8.8_HD_U_H8
|
||||
Render Distance Chunks: 2
|
||||
Mipmaps: 0
|
||||
Anisotropic Filtering: 1
|
||||
Antialiasing: 0
|
||||
Multitexture: false
|
||||
Shaders: null
|
||||
OpenGlVersion: 4.6.0 NVIDIA 532.03
|
||||
OpenGlRenderer: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
|
||||
OpenGlVendor: NVIDIA Corporation
|
||||
CpuCount: 12
|
100
workspace/crash-reports/crash-2023-06-07_16.52.09-client.txt
Normal file
100
workspace/crash-reports/crash-2023-06-07_16.52.09-client.txt
Normal file
@ -0,0 +1,100 @@
|
||||
---- Minecraft Crash Report ----
|
||||
// Daisy, daisy...
|
||||
|
||||
Time: 6/7/23 4:52 PM
|
||||
Description: Rendering screen
|
||||
|
||||
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:193)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1431)
|
||||
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1151)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:430)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
|
||||
A detailed walkthrough of the error, its code path and all known details is as follows:
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
-- Head --
|
||||
Stacktrace:
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:193)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
|
||||
-- Screen render details --
|
||||
Details:
|
||||
Screen name: rip.athena.client.gui.clickgui.IngameMenu
|
||||
Mouse location: Scaled: (279, 235). Absolute: (559, 538)
|
||||
Screen size: Scaled: (960, 505). Absolute: (1920, 1009). Scale factor of 2
|
||||
|
||||
-- Affected level --
|
||||
Details:
|
||||
Level name: MpServer
|
||||
All players: 1 total; [EntityPlayerSP['Player113'/23, l='MpServer', x=349.85, y=91.73, z=1154.55]]
|
||||
Chunk stats: MultiplayerChunkCache: 25, 25
|
||||
Level seed: 0
|
||||
Level generator: ID 02 - largeBiomes, ver 0. Features enabled: false
|
||||
Level generator options:
|
||||
Level spawn location: 5.00,64.00,557.00 - World: (5,64,557), Chunk: (at 5,4,13 in 0,34; contains blocks 0,0,544 to 15,255,559), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
|
||||
Level time: 231262 game time, 231262 day time
|
||||
Level dimension: 0
|
||||
Level storage version: 0x00000 - Unknown?
|
||||
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
|
||||
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
|
||||
Forced entities: 7 total; [EntitySkeleton['Skeleton'/32, l='MpServer', x=331.44, y=73.00, z=1130.13], EntitySkeleton['Skeleton'/34, l='MpServer', x=357.41, y=73.00, z=1125.13], EntitySkeleton['Skeleton'/73, l='MpServer', x=335.50, y=75.00, z=1131.50], EntityPlayerSP['Player113'/23, l='MpServer', x=349.85, y=91.73, z=1154.55], EntityMinecartChest['container.minecart'/29, l='MpServer', x=306.50, y=28.06, z=1123.50], EntityCreeper['Creeper'/30, l='MpServer', x=318.50, y=72.00, z=1191.50], EntityZombie['Zombie'/31, l='MpServer', x=319.50, y=72.00, z=1192.50]]
|
||||
Retry entities: 0 total; []
|
||||
Server brand: vanilla
|
||||
Server type: Integrated singleplayer server
|
||||
Stacktrace:
|
||||
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:401)
|
||||
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2791)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:451)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
-- System Details --
|
||||
Details:
|
||||
Minecraft Version: 1.8.8
|
||||
Operating System: Windows 10 (amd64) version 10.0
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
Java Version: 1.8.0_202, Oracle Corporation
|
||||
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
|
||||
Memory: 225865432 bytes (215 MB) / 869793792 bytes (829 MB) up to 3801088000 bytes (3625 MB)
|
||||
JVM Flags: 0 total;
|
||||
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 99
|
||||
Launched Version: mcp
|
||||
LWJGL: 2.9.4
|
||||
OpenGL: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 GL version 4.6.0 NVIDIA 532.03, NVIDIA Corporation
|
||||
GL Caps: Using GL 1.3 multitexturing.
|
||||
Using GL 1.3 texture combiners.
|
||||
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
|
||||
Shaders are available because OpenGL 2.1 is supported.
|
||||
VBOs are available because OpenGL 1.5 is supported.
|
||||
|
||||
Using VBOs: Yes
|
||||
Is Modded: Very likely; Jar signature invalidated
|
||||
Type: Client (map_client.txt)
|
||||
Resource Packs: ! §bPotfast 5kay.zip
|
||||
Current Language: English (US)
|
||||
Profiler Position: N/A (disabled)
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
OptiFine Version: OptiFine_1.8.8_HD_U_H8
|
||||
Render Distance Chunks: 2
|
||||
Mipmaps: 0
|
||||
Anisotropic Filtering: 1
|
||||
Antialiasing: 0
|
||||
Multitexture: false
|
||||
Shaders: null
|
||||
OpenGlVersion: 4.6.0 NVIDIA 532.03
|
||||
OpenGlRenderer: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
|
||||
OpenGlVendor: NVIDIA Corporation
|
||||
CpuCount: 12
|
100
workspace/crash-reports/crash-2023-06-07_16.54.00-client.txt
Normal file
100
workspace/crash-reports/crash-2023-06-07_16.54.00-client.txt
Normal file
@ -0,0 +1,100 @@
|
||||
---- Minecraft Crash Report ----
|
||||
// Uh... Did I do that?
|
||||
|
||||
Time: 6/7/23 4:54 PM
|
||||
Description: Rendering screen
|
||||
|
||||
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:194)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1431)
|
||||
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1151)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:430)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
|
||||
A detailed walkthrough of the error, its code path and all known details is as follows:
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
-- Head --
|
||||
Stacktrace:
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:194)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
|
||||
-- Screen render details --
|
||||
Details:
|
||||
Screen name: rip.athena.client.gui.clickgui.IngameMenu
|
||||
Mouse location: Scaled: (480, 252). Absolute: (960, 504)
|
||||
Screen size: Scaled: (960, 505). Absolute: (1920, 1009). Scale factor of 2
|
||||
|
||||
-- Affected level --
|
||||
Details:
|
||||
Level name: MpServer
|
||||
All players: 1 total; [EntityPlayerSP['Player439'/23, l='MpServer', x=341.15, y=78.00, z=1150.05]]
|
||||
Chunk stats: MultiplayerChunkCache: 30, 30
|
||||
Level seed: 0
|
||||
Level generator: ID 02 - largeBiomes, ver 0. Features enabled: false
|
||||
Level generator options:
|
||||
Level spawn location: 5.00,64.00,557.00 - World: (5,64,557), Chunk: (at 5,4,13 in 0,34; contains blocks 0,0,544 to 15,255,559), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
|
||||
Level time: 233055 game time, 233055 day time
|
||||
Level dimension: 0
|
||||
Level storage version: 0x00000 - Unknown?
|
||||
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
|
||||
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
|
||||
Forced entities: 9 total; [EntitySkeleton['Skeleton'/32, l='MpServer', x=322.16, y=72.00, z=1133.47], EntitySkeleton['Skeleton'/33, l='MpServer', x=345.16, y=67.00, z=1129.56], EntitySkeleton['Skeleton'/35, l='MpServer', x=331.45, y=73.00, z=1128.26], EntitySkeleton['Skeleton'/76, l='MpServer', x=351.16, y=77.00, z=1136.47], EntitySkeleton['Skeleton'/77, l='MpServer', x=337.16, y=74.00, z=1129.47], EntityMinecartChest['container.minecart'/26, l='MpServer', x=305.50, y=24.06, z=1110.88], EntitySkeleton['Skeleton'/507, l='MpServer', x=321.50, y=72.00, z=1192.50], EntityMinecartChest['container.minecart'/28, l='MpServer', x=306.50, y=28.06, z=1123.50], EntityPlayerSP['Player439'/23, l='MpServer', x=341.15, y=78.00, z=1150.05]]
|
||||
Retry entities: 0 total; []
|
||||
Server brand: vanilla
|
||||
Server type: Integrated singleplayer server
|
||||
Stacktrace:
|
||||
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:401)
|
||||
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2791)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:451)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
-- System Details --
|
||||
Details:
|
||||
Minecraft Version: 1.8.8
|
||||
Operating System: Windows 10 (amd64) version 10.0
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
Java Version: 1.8.0_202, Oracle Corporation
|
||||
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
|
||||
Memory: 772751968 bytes (736 MB) / 1058537472 bytes (1009 MB) up to 3801088000 bytes (3625 MB)
|
||||
JVM Flags: 0 total;
|
||||
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 99
|
||||
Launched Version: mcp
|
||||
LWJGL: 2.9.4
|
||||
OpenGL: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 GL version 4.6.0 NVIDIA 532.03, NVIDIA Corporation
|
||||
GL Caps: Using GL 1.3 multitexturing.
|
||||
Using GL 1.3 texture combiners.
|
||||
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
|
||||
Shaders are available because OpenGL 2.1 is supported.
|
||||
VBOs are available because OpenGL 1.5 is supported.
|
||||
|
||||
Using VBOs: Yes
|
||||
Is Modded: Very likely; Jar signature invalidated
|
||||
Type: Client (map_client.txt)
|
||||
Resource Packs: ! §bPotfast 5kay.zip
|
||||
Current Language: English (US)
|
||||
Profiler Position: N/A (disabled)
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
OptiFine Version: OptiFine_1.8.8_HD_U_H8
|
||||
Render Distance Chunks: 2
|
||||
Mipmaps: 0
|
||||
Anisotropic Filtering: 1
|
||||
Antialiasing: 0
|
||||
Multitexture: false
|
||||
Shaders: null
|
||||
OpenGlVersion: 4.6.0 NVIDIA 532.03
|
||||
OpenGlRenderer: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
|
||||
OpenGlVendor: NVIDIA Corporation
|
||||
CpuCount: 12
|
100
workspace/crash-reports/crash-2023-06-07_16.56.10-client.txt
Normal file
100
workspace/crash-reports/crash-2023-06-07_16.56.10-client.txt
Normal file
@ -0,0 +1,100 @@
|
||||
---- Minecraft Crash Report ----
|
||||
// Uh... Did I do that?
|
||||
|
||||
Time: 6/7/23 4:56 PM
|
||||
Description: Rendering screen
|
||||
|
||||
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:194)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1431)
|
||||
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1151)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:430)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
|
||||
A detailed walkthrough of the error, its code path and all known details is as follows:
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
-- Head --
|
||||
Stacktrace:
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:194)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
|
||||
-- Screen render details --
|
||||
Details:
|
||||
Screen name: rip.athena.client.gui.clickgui.IngameMenu
|
||||
Mouse location: Scaled: (480, 252). Absolute: (960, 504)
|
||||
Screen size: Scaled: (960, 505). Absolute: (1920, 1009). Scale factor of 2
|
||||
|
||||
-- Affected level --
|
||||
Details:
|
||||
Level name: MpServer
|
||||
All players: 1 total; [EntityPlayerSP['Player654'/23, l='MpServer', x=341.15, y=78.00, z=1150.05]]
|
||||
Chunk stats: MultiplayerChunkCache: 25, 25
|
||||
Level seed: 0
|
||||
Level generator: ID 02 - largeBiomes, ver 0. Features enabled: false
|
||||
Level generator options:
|
||||
Level spawn location: 5.00,64.00,557.00 - World: (5,64,557), Chunk: (at 5,4,13 in 0,34; contains blocks 0,0,544 to 15,255,559), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
|
||||
Level time: 235147 game time, 235147 day time
|
||||
Level dimension: 0
|
||||
Level storage version: 0x00000 - Unknown?
|
||||
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
|
||||
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
|
||||
Forced entities: 11 total; [EntitySkeleton['Skeleton'/32, l='MpServer', x=340.66, y=77.00, z=1150.91], EntitySkeleton['Skeleton'/33, l='MpServer', x=331.56, y=73.00, z=1130.06], EntityZombie['Zombie'/481, l='MpServer', x=383.50, y=70.00, z=1144.50], EntityWitch['Witch'/612, l='MpServer', x=304.50, y=28.00, z=1117.50], EntitySkeleton['Skeleton'/37, l='MpServer', x=349.09, y=69.00, z=1114.47], EntityBat['Bat'/455, l='MpServer', x=381.47, y=27.00, z=1101.59], EntityPlayerSP['Player654'/23, l='MpServer', x=341.15, y=78.00, z=1150.05], EntitySkeleton['Skeleton'/25, l='MpServer', x=349.50, y=79.00, z=1139.06], EntitySkeleton['Skeleton'/602, l='MpServer', x=379.75, y=28.00, z=1107.41], EntityMinecartChest['container.minecart'/27, l='MpServer', x=305.50, y=24.06, z=1110.88], EntityMinecartChest['container.minecart'/28, l='MpServer', x=306.50, y=28.06, z=1123.50]]
|
||||
Retry entities: 0 total; []
|
||||
Server brand: vanilla
|
||||
Server type: Integrated singleplayer server
|
||||
Stacktrace:
|
||||
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:401)
|
||||
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2791)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:451)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
-- System Details --
|
||||
Details:
|
||||
Minecraft Version: 1.8.8
|
||||
Operating System: Windows 10 (amd64) version 10.0
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
Java Version: 1.8.0_202, Oracle Corporation
|
||||
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
|
||||
Memory: 500371256 bytes (477 MB) / 896532480 bytes (855 MB) up to 3801088000 bytes (3625 MB)
|
||||
JVM Flags: 0 total;
|
||||
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 99
|
||||
Launched Version: mcp
|
||||
LWJGL: 2.9.4
|
||||
OpenGL: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 GL version 4.6.0 NVIDIA 532.03, NVIDIA Corporation
|
||||
GL Caps: Using GL 1.3 multitexturing.
|
||||
Using GL 1.3 texture combiners.
|
||||
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
|
||||
Shaders are available because OpenGL 2.1 is supported.
|
||||
VBOs are available because OpenGL 1.5 is supported.
|
||||
|
||||
Using VBOs: Yes
|
||||
Is Modded: Very likely; Jar signature invalidated
|
||||
Type: Client (map_client.txt)
|
||||
Resource Packs: ! §bPotfast 5kay.zip
|
||||
Current Language: English (US)
|
||||
Profiler Position: N/A (disabled)
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
OptiFine Version: OptiFine_1.8.8_HD_U_H8
|
||||
Render Distance Chunks: 2
|
||||
Mipmaps: 0
|
||||
Anisotropic Filtering: 1
|
||||
Antialiasing: 0
|
||||
Multitexture: false
|
||||
Shaders: null
|
||||
OpenGlVersion: 4.6.0 NVIDIA 532.03
|
||||
OpenGlRenderer: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
|
||||
OpenGlVendor: NVIDIA Corporation
|
||||
CpuCount: 12
|
100
workspace/crash-reports/crash-2023-06-07_16.58.33-client.txt
Normal file
100
workspace/crash-reports/crash-2023-06-07_16.58.33-client.txt
Normal file
@ -0,0 +1,100 @@
|
||||
---- Minecraft Crash Report ----
|
||||
// This doesn't make any sense!
|
||||
|
||||
Time: 6/7/23 4:58 PM
|
||||
Description: Rendering screen
|
||||
|
||||
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:194)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1431)
|
||||
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1151)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:430)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
|
||||
A detailed walkthrough of the error, its code path and all known details is as follows:
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
-- Head --
|
||||
Stacktrace:
|
||||
at java.lang.String.substring(String.java:1967)
|
||||
at rip.athena.client.gui.clickgui.components.macros.MacroSlimTextField.onRender(MacroSlimTextField.java:109)
|
||||
at rip.athena.client.gui.clickgui.components.mods.ModScrollPane.onRender(ModScrollPane.java:194)
|
||||
at rip.athena.client.gui.framework.Menu.onRender(Menu.java:88)
|
||||
at rip.athena.client.gui.framework.MinecraftMenuImpl.drawScreen(MinecraftMenuImpl.java:56)
|
||||
at rip.athena.client.gui.clickgui.IngameMenu.drawScreen(IngameMenu.java:152)
|
||||
|
||||
-- Screen render details --
|
||||
Details:
|
||||
Screen name: rip.athena.client.gui.clickgui.IngameMenu
|
||||
Mouse location: Scaled: (296, 229). Absolute: (593, 550)
|
||||
Screen size: Scaled: (960, 505). Absolute: (1920, 1009). Scale factor of 2
|
||||
|
||||
-- Affected level --
|
||||
Details:
|
||||
Level name: MpServer
|
||||
All players: 1 total; [EntityPlayerSP['Player286'/23, l='MpServer', x=341.15, y=78.00, z=1150.05]]
|
||||
Chunk stats: MultiplayerChunkCache: 25, 25
|
||||
Level seed: 0
|
||||
Level generator: ID 02 - largeBiomes, ver 0. Features enabled: false
|
||||
Level generator options:
|
||||
Level spawn location: 5.00,64.00,557.00 - World: (5,64,557), Chunk: (at 5,4,13 in 0,34; contains blocks 0,0,544 to 15,255,559), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
|
||||
Level time: 235207 game time, 235207 day time
|
||||
Level dimension: 0
|
||||
Level storage version: 0x00000 - Unknown?
|
||||
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
|
||||
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
|
||||
Forced entities: 10 total; [EntitySkeleton['Skeleton'/36, l='MpServer', x=331.56, y=73.00, z=1130.06], EntitySkeleton['Skeleton'/38, l='MpServer', x=349.09, y=69.00, z=1114.47], EntitySkeleton['Skeleton'/24, l='MpServer', x=340.66, y=77.00, z=1150.91], EntitySkeleton['Skeleton'/25, l='MpServer', x=350.09, y=77.00, z=1136.28], EntitySkeleton['Skeleton'/41, l='MpServer', x=379.88, y=28.00, z=1107.38], EntityZombie['Zombie'/42, l='MpServer', x=383.50, y=70.00, z=1144.50], EntityPlayerSP['Player286'/23, l='MpServer', x=341.15, y=78.00, z=1150.05], EntityMinecartChest['container.minecart'/29, l='MpServer', x=305.50, y=24.06, z=1110.88], EntityWitch['Witch'/30, l='MpServer', x=304.50, y=28.00, z=1117.50], EntityMinecartChest['container.minecart'/31, l='MpServer', x=306.50, y=28.06, z=1123.50]]
|
||||
Retry entities: 0 total; []
|
||||
Server brand: vanilla
|
||||
Server type: Integrated singleplayer server
|
||||
Stacktrace:
|
||||
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:401)
|
||||
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2791)
|
||||
at net.minecraft.client.Minecraft.run(Minecraft.java:451)
|
||||
at net.minecraft.client.main.Main.main(Main.java:113)
|
||||
at Start.main(Start.java:11)
|
||||
|
||||
-- System Details --
|
||||
Details:
|
||||
Minecraft Version: 1.8.8
|
||||
Operating System: Windows 10 (amd64) version 10.0
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
Java Version: 1.8.0_202, Oracle Corporation
|
||||
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
|
||||
Memory: 548503656 bytes (523 MB) / 828899328 bytes (790 MB) up to 3801088000 bytes (3625 MB)
|
||||
JVM Flags: 0 total;
|
||||
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 99
|
||||
Launched Version: mcp
|
||||
LWJGL: 2.9.4
|
||||
OpenGL: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 GL version 4.6.0 NVIDIA 532.03, NVIDIA Corporation
|
||||
GL Caps: Using GL 1.3 multitexturing.
|
||||
Using GL 1.3 texture combiners.
|
||||
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
|
||||
Shaders are available because OpenGL 2.1 is supported.
|
||||
VBOs are available because OpenGL 1.5 is supported.
|
||||
|
||||
Using VBOs: Yes
|
||||
Is Modded: Very likely; Jar signature invalidated
|
||||
Type: Client (map_client.txt)
|
||||
Resource Packs: ! §bPotfast 5kay.zip
|
||||
Current Language: English (US)
|
||||
Profiler Position: N/A (disabled)
|
||||
CPU: 12x AMD Ryzen 5 5600X 6-Core Processor
|
||||
OptiFine Version: OptiFine_1.8.8_HD_U_H8
|
||||
Render Distance Chunks: 2
|
||||
Mipmaps: 0
|
||||
Anisotropic Filtering: 1
|
||||
Antialiasing: 0
|
||||
Multitexture: false
|
||||
Shaders: null
|
||||
OpenGlVersion: 4.6.0 NVIDIA 532.03
|
||||
OpenGlRenderer: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
|
||||
OpenGlVendor: NVIDIA Corporation
|
||||
CpuCount: 12
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user