add fullbright and fix nametag logo freezing
|
@ -660,7 +660,7 @@ public abstract class GuiScreen extends Gui implements GuiYesNoCallback
|
|||
}
|
||||
else
|
||||
{
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/test5.jpg"), 0, 0, width, height);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.png"), 0, 0, width, height);
|
||||
//this.drawBackground(tint);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ import rip.athena.client.modules.impl.other.Settings;
|
|||
import rip.athena.client.socket.SocketClient;
|
||||
import shadersmod.client.Shaders;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public abstract class Render<T extends Entity>
|
||||
{
|
||||
private static final ResourceLocation shadowTextures = new ResourceLocation("textures/misc/shadow.png");
|
||||
|
@ -376,7 +378,53 @@ public abstract class Render<T extends Entity>
|
|||
|
||||
if (entityIn instanceof AbstractClientPlayer) {
|
||||
String username = ((AbstractClientPlayer) entityIn).getGameProfile().getId().toString();
|
||||
|
||||
if (Settings.socketLogo) {
|
||||
CompletableFuture<Boolean> isUserFuture = SocketClient.isUserAsync(username);
|
||||
isUserFuture.thenCompose(isUser -> {
|
||||
if (isUser && entityIn.ticksExisted > 20) {
|
||||
return SocketClient.getRankAsync(username);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture("");
|
||||
}
|
||||
}).thenAccept(rank -> {
|
||||
ResourceLocation rankTexture = null;
|
||||
switch (rank) {
|
||||
case "OWNER":
|
||||
case "MANAGER":
|
||||
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":
|
||||
case "MEDIA":
|
||||
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) -2, 11, 11, 11, 11, 11, 11);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*if (Settings.socketLogo) {
|
||||
if (SocketClient.isUser(username) && entityIn.ticksExisted > 20) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
|
||||
|
||||
|
@ -415,7 +463,7 @@ public abstract class Render<T extends Entity>
|
|||
Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 - 12, (int) -2, 11, 11, 11, 11, 11, 11);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -427,7 +475,7 @@ public abstract class Render<T extends Entity>
|
|||
if (entityIn instanceof AbstractClientPlayer) {
|
||||
String username = ((AbstractClientPlayer) entityIn).getGameProfile().getId().toString();
|
||||
|
||||
if (SocketClient.isUser(username) && Settings.socketLogo) {
|
||||
/*if (SocketClient.isUser(username) && Settings.socketLogo) {
|
||||
int i = fontrenderer.getStringWidth(str) / 2;
|
||||
|
||||
GlStateManager.disableTexture2D();
|
||||
|
@ -446,7 +494,7 @@ public abstract class Render<T extends Entity>
|
|||
GlStateManager.disableBlend();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
} else {*/
|
||||
int i = fontrenderer.getStringWidth(str) / 2;
|
||||
GlStateManager.disableTexture2D();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
|
@ -464,7 +512,7 @@ public abstract class Render<T extends Entity>
|
|||
GlStateManager.disableBlend();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
//}
|
||||
} else {
|
||||
int i = fontrenderer.getStringWidth(str) / 2;
|
||||
GlStateManager.disableTexture2D();
|
||||
|
|
|
@ -293,7 +293,7 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
|
|||
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.jpg"), 0, 0, width, height);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.png"), 0, 0, width, height);
|
||||
|
||||
int[] size = InputUtils.getWindowsSize();
|
||||
int startX = size[0] / 2;
|
||||
|
|
|
@ -118,7 +118,7 @@ public class GuiAccountManager extends GuiScreen {
|
|||
clickTimer.reset();
|
||||
}
|
||||
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.jpg"), 0, 0, sr.getScaledWidth(), sr.getScaledHeight());
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.png"), 0, 0, sr.getScaledWidth(), sr.getScaledHeight());
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public class GuiAltManager extends GuiScreen {
|
|||
int yOffset = (screenHeight - getTotalPanelsHeight()) / 2; // Calculate vertical offset to center the panels
|
||||
int width = screenWidth - (2 * xOffset);
|
||||
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.jpg"), 0, 0, (int) screenWidth, (int) screenHeight);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.png"), 0, 0, (int) screenWidth, (int) screenHeight);
|
||||
|
||||
RoundedUtils.drawGradientRound(xOffset + 15, yOffset - 1, width + 1, getTotalPanelsHeight() - 23, 6, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
|
||||
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package rip.athena.client.modules.impl.render;
|
||||
|
||||
import rip.athena.client.events.SubscribeEvent;
|
||||
import rip.athena.client.events.types.client.ClientTickEvent;
|
||||
import rip.athena.client.modules.Category;
|
||||
import rip.athena.client.modules.Module;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/26/2023
|
||||
*/
|
||||
public class Fullbright extends Module {
|
||||
|
||||
private float savedBrightness = 0F;
|
||||
|
||||
public Fullbright() {
|
||||
super("Fullbright", Category.RENDER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
savedBrightness = mc.gameSettings.gammaSetting;
|
||||
mc.gameSettings.gammaSetting = 1000;
|
||||
mc.gameSettings.saveOptions();
|
||||
mc.gameSettings.saveOfOptions();
|
||||
super.onEnable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
mc.gameSettings.gammaSetting = savedBrightness;
|
||||
mc.gameSettings.saveOptions();
|
||||
mc.gameSettings.saveOfOptions();
|
||||
super.onDisable();
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ import java.net.ServerSocket;
|
|||
import java.net.SocketException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
|
@ -45,10 +46,50 @@ public class SocketClient {
|
|||
return rankCache.get(username);
|
||||
}
|
||||
|
||||
Thread thread = new Thread(() -> {
|
||||
String rank = client.request("getRank", username).toString();
|
||||
rankCache.put(username, rank);
|
||||
cacheTime.put(username, System.currentTimeMillis());
|
||||
});
|
||||
|
||||
thread.start();
|
||||
|
||||
// Continue with other operations while the thread is executing
|
||||
|
||||
try {
|
||||
thread.join(); // Wait for the thread to finish executing
|
||||
} catch (InterruptedException e) {
|
||||
// Handle interrupted exception
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return rankCache.get(username);
|
||||
}
|
||||
|
||||
public static CompletableFuture<String> getRankAsync(String username) {
|
||||
if (rankCache.containsKey(username) && isCacheValid(username)) {
|
||||
return CompletableFuture.completedFuture(rankCache.get(username));
|
||||
}
|
||||
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
String rank = client.request("getRank", username).toString();
|
||||
rankCache.put(username, rank);
|
||||
cacheTime.put(username, System.currentTimeMillis());
|
||||
return rank;
|
||||
});
|
||||
}
|
||||
|
||||
public static CompletableFuture<Boolean> isUserAsync(String username) {
|
||||
if (userCache.containsKey(username)) {
|
||||
return CompletableFuture.completedFuture(userCache.get(username));
|
||||
}
|
||||
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
String[] args = client.request("isUser", username).toString().split(":");
|
||||
boolean isUser = args[0].equals("true");
|
||||
userCache.put(username, isUser);
|
||||
return isUser;
|
||||
});
|
||||
}
|
||||
|
||||
private static boolean isCacheValid(String username) {
|
||||
|
@ -62,12 +103,25 @@ public class SocketClient {
|
|||
return userCache.get(username);
|
||||
}
|
||||
|
||||
Thread thread = new Thread(() -> {
|
||||
String[] args = client.request("isUser", username).toString().split(":");
|
||||
boolean isUser = args[0].equals("true");
|
||||
userCache.put(username, isUser);
|
||||
return isUser;
|
||||
});
|
||||
|
||||
thread.start();
|
||||
|
||||
// Continue with other operations while the thread is executing
|
||||
|
||||
try {
|
||||
thread.join(); // Wait for the thread to finish executing
|
||||
} catch (InterruptedException e) {
|
||||
// Handle interrupted exception
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return userCache.get(username);
|
||||
}
|
||||
|
||||
public static String getCurrentUsername() {
|
||||
return currentUsername;
|
||||
|
|
After Width: | Height: | Size: 343 KiB |
After Width: | Height: | Size: 161 B |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 943 B |
After Width: | Height: | Size: 877 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 990 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 752 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 541 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 784 B |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 843 B |
After Width: | Height: | Size: 1019 B |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 913 B |
After Width: | Height: | Size: 712 B |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 626 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 956 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 989 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 694 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 900 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 945 B |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 936 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1020 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 618 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 751 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 919 B |