fix nametag icon

This commit is contained in:
The Biggest skiddd 2023-06-13 22:24:35 +02:00
parent a64670492e
commit 6b1be056dc
328 changed files with 5438 additions and 8484 deletions

View File

@ -375,39 +375,40 @@ public abstract class Render<T extends Entity>
if (entityIn instanceof AbstractClientPlayer) { if (entityIn instanceof AbstractClientPlayer) {
String username = ((AbstractClientPlayer) entityIn).getGameProfile().getId().toString(); String username = ((AbstractClientPlayer) entityIn).getGameProfile().getId().toString();
if(str.contains(Minecraft.getMinecraft().thePlayer.getName())) { if (SocketClient.isUser(username) && entityIn.ticksExisted > 20) {
if (SocketClient.isUser(username) && entityIn.ticksExisted > 20) { Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
String rank = SocketClient.getRank(username).toString(); String rank = SocketClient.getRank(username).toString();
ResourceLocation rankTexture = null; ResourceLocation rankTexture = null;
switch (rank) { switch (rank) {
case "OWNER": case "OWNER":
rankTexture = new ResourceLocation("Athena/ranks/owner.png"); rankTexture = new ResourceLocation("Athena/ranks/owner.png");
break; break;
case "DEVELOPER": case "DEVELOPER":
rankTexture = new ResourceLocation("Athena/ranks/developer.png"); rankTexture = new ResourceLocation("Athena/ranks/developer.png");
break; break;
case "ADMIN": case "ADMIN":
rankTexture = new ResourceLocation("Athena/ranks/admin.png"); rankTexture = new ResourceLocation("Athena/ranks/admin.png");
break; break;
case "MOD": case "MOD":
rankTexture = new ResourceLocation("Athena/ranks/mod.png"); rankTexture = new ResourceLocation("Athena/ranks/mod.png");
break; break;
case "PREMIUM": case "PARTNER":
rankTexture = new ResourceLocation("Athena/ranks/premium.png"); rankTexture = new ResourceLocation("Athena/ranks/partner.png");
break; break;
case "USER": case "PREMIUM":
rankTexture = new ResourceLocation("Athena/ranks/user.png"); rankTexture = new ResourceLocation("Athena/ranks/premium.png");
break; break;
default: case "USER":
break; rankTexture = new ResourceLocation("Athena/ranks/user.png");
} break;
default:
break;
}
if (rankTexture != null) { if (rankTexture != null) {
Minecraft.getMinecraft().getTextureManager().bindTexture(rankTexture); Minecraft.getMinecraft().getTextureManager().bindTexture(rankTexture);
Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 - 12, (int) -1.5, 10, 10, 10, 10, 10, 10); Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 - 12, (int) -2, 11, 11, 11, 11, 11, 11);
}
} }
} }
} }

View File

@ -22,7 +22,6 @@ import java.util.ArrayList;
public class AccountManager { public class AccountManager {
private Minecraft mc = Minecraft.getMinecraft(); private Minecraft mc = Minecraft.getMinecraft();
private ArrayList<Account> accounts = new ArrayList<>(); private ArrayList<Account> accounts = new ArrayList<>();
public boolean isFirstLogin = false; public boolean isFirstLogin = false;
@ -75,7 +74,6 @@ public class AccountManager {
} }
for (String s : lines) { for (String s : lines) {
String[] args = s.split(":"); String[] args = s.split(":");
if (s.toLowerCase().startsWith("account:")) { if (s.toLowerCase().startsWith("account:")) {

View File

@ -164,7 +164,6 @@ public class ProfilesPage extends Page {
String code = URLEncoder.encode(RandomStringUtils.randomAlphabetic(12).toLowerCase(), "UTF-8"); String code = URLEncoder.encode(RandomStringUtils.randomAlphabetic(12).toLowerCase(), "UTF-8");
WebRequest request = new WebRequest(PROFILES_URL, "POST", ContentType.MULTIPART_FORM, false); WebRequest request = new WebRequest(PROFILES_URL, "POST", ContentType.MULTIPART_FORM, false);
String boundary = "WebKitFormBoundaryYDPG5KWy5y4yolEf"; String boundary = "WebKitFormBoundaryYDPG5KWy5y4yolEf";
request.setBoundary(boundary); request.setBoundary(boundary);

View File

@ -57,18 +57,15 @@ public class SocketClient {
return currentTime - lastCacheTime <= cacheExpirationTime; return currentTime - lastCacheTime <= cacheExpirationTime;
} }
public static boolean isUser(String uuid) { public static boolean isUser(String username) {
if (userCache.containsKey(uuid)) { if (userCache.containsKey(username)) {
return userCache.get(uuid); return userCache.get(username);
} }
// Replace this code block with MySQL query String[] args = client.request("isUser", username).toString().split(":");
String payload = uuid; boolean isUser = args[0].equals("true");
String isUser = (String) client.request("isUser", payload); userCache.put(username, isUser);
return isUser;
boolean result = Boolean.parseBoolean(isUser);
userCache.put(uuid, result);
return result;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Some files were not shown because too many files have changed in this diff Show More