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) {
String username = ((AbstractClientPlayer) entityIn).getGameProfile().getId().toString();
if(str.contains(Minecraft.getMinecraft().thePlayer.getName())) {
if (SocketClient.isUser(username) && entityIn.ticksExisted > 20) {
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
if (SocketClient.isUser(username) && entityIn.ticksExisted > 20) {
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
String rank = SocketClient.getRank(username).toString();
ResourceLocation rankTexture = null;
switch (rank) {
case "OWNER":
rankTexture = new ResourceLocation("Athena/ranks/owner.png");
break;
case "DEVELOPER":
rankTexture = new ResourceLocation("Athena/ranks/developer.png");
break;
case "ADMIN":
rankTexture = new ResourceLocation("Athena/ranks/admin.png");
break;
case "MOD":
rankTexture = new ResourceLocation("Athena/ranks/mod.png");
break;
case "PREMIUM":
rankTexture = new ResourceLocation("Athena/ranks/premium.png");
break;
case "USER":
rankTexture = new ResourceLocation("Athena/ranks/user.png");
break;
default:
break;
}
String rank = SocketClient.getRank(username).toString();
ResourceLocation rankTexture = null;
switch (rank) {
case "OWNER":
rankTexture = new ResourceLocation("Athena/ranks/owner.png");
break;
case "DEVELOPER":
rankTexture = new ResourceLocation("Athena/ranks/developer.png");
break;
case "ADMIN":
rankTexture = new ResourceLocation("Athena/ranks/admin.png");
break;
case "MOD":
rankTexture = new ResourceLocation("Athena/ranks/mod.png");
break;
case "PARTNER":
rankTexture = new ResourceLocation("Athena/ranks/partner.png");
break;
case "PREMIUM":
rankTexture = new ResourceLocation("Athena/ranks/premium.png");
break;
case "USER":
rankTexture = new ResourceLocation("Athena/ranks/user.png");
break;
default:
break;
}
if (rankTexture != null) {
Minecraft.getMinecraft().getTextureManager().bindTexture(rankTexture);
Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 - 12, (int) -1.5, 10, 10, 10, 10, 10, 10);
}
if (rankTexture != null) {
Minecraft.getMinecraft().getTextureManager().bindTexture(rankTexture);
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 {
private Minecraft mc = Minecraft.getMinecraft();
private ArrayList<Account> accounts = new ArrayList<>();
public boolean isFirstLogin = false;
@ -75,7 +74,6 @@ public class AccountManager {
}
for (String s : lines) {
String[] args = s.split(":");
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");
WebRequest request = new WebRequest(PROFILES_URL, "POST", ContentType.MULTIPART_FORM, false);
String boundary = "WebKitFormBoundaryYDPG5KWy5y4yolEf";
request.setBoundary(boundary);

View File

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

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