update to 0.0.5
|
@ -9,6 +9,7 @@ import com.mojang.authlib.minecraft.MinecraftSessionService;
|
|||
import com.mojang.authlib.properties.Property;
|
||||
import com.mojang.authlib.properties.PropertyMap;
|
||||
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -272,7 +273,8 @@ public class Minecraft implements IThreadListener, IPlayerUsage
|
|||
private final Thread mcThread = Thread.currentThread();
|
||||
private ModelManager modelManager;
|
||||
|
||||
public static AthenaSplashScreen athenaSplashScreen;
|
||||
@Getter
|
||||
private AthenaSplashScreen athenaSplashScreen = new AthenaSplashScreen(15);;
|
||||
|
||||
/**
|
||||
* The BlockRenderDispatcher instance that will be used based off gamesettings
|
||||
|
@ -411,8 +413,6 @@ public class Minecraft implements IThreadListener, IPlayerUsage
|
|||
private void startGame() throws LWJGLException, IOException
|
||||
{
|
||||
|
||||
athenaSplashScreen = new AthenaSplashScreen(12);
|
||||
|
||||
this.gameSettings = new GameSettings(this, this.mcDataDir);
|
||||
this.defaultResourcePacks.add(this.mcDefaultResourcePack);
|
||||
this.startTimerHackThread();
|
||||
|
@ -424,18 +424,20 @@ public class Minecraft implements IThreadListener, IPlayerUsage
|
|||
}
|
||||
|
||||
logger.info("LWJGL Version: " + Sys.getVersion());
|
||||
|
||||
this.setWindowIcon();
|
||||
this.setInitialDisplayMode();
|
||||
this.createDisplay();
|
||||
|
||||
OpenGlHelper.initializeTextures();
|
||||
this.framebufferMc = new Framebuffer(this.displayWidth, this.displayHeight, true);
|
||||
this.framebufferMc.setFramebufferColor(0.0F, 0.0F, 0.0F, 0.0F);
|
||||
this.registerMetadataSerializers();
|
||||
|
||||
this.mcResourcePackRepository = new ResourcePackRepository(this.fileResourcepacks, new File(this.mcDataDir, "server-resource-packs"), this.mcDefaultResourcePack, this.metadataSerializer_, this.gameSettings);
|
||||
this.mcResourceManager = new SimpleReloadableResourceManager(this.metadataSerializer_);
|
||||
this.mcLanguageManager = new LanguageManager(this.metadataSerializer_, this.gameSettings.language);
|
||||
this.mcResourceManager.registerReloadListener(this.mcLanguageManager);
|
||||
// athenaSplashScreen.step("Reloading Resources", this.renderEngine);
|
||||
|
||||
this.refreshResources();
|
||||
this.renderEngine = new TextureManager(this.mcResourceManager);
|
||||
|
@ -443,12 +445,8 @@ public class Minecraft implements IThreadListener, IPlayerUsage
|
|||
// this.drawSplashScreen(this.renderEngine);
|
||||
|
||||
athenaSplashScreen.step("Initializing", this.renderEngine);
|
||||
|
||||
// Moved start to here to add more steps LOL
|
||||
Athena.INSTANCE.initClient();
|
||||
|
||||
athenaSplashScreen.step("Loading Minecraft", this.renderEngine);
|
||||
|
||||
this.initStream();
|
||||
this.skinManager = new SkinManager(this.renderEngine, new File(this.fileAssets, "skins"), this.sessionService);
|
||||
this.saveLoader = new AnvilSaveConverter(new File(this.mcDataDir, "saves"));
|
||||
|
@ -499,7 +497,6 @@ public class Minecraft implements IThreadListener, IPlayerUsage
|
|||
this.checkGLError("Startup");
|
||||
athenaSplashScreen.step("Loading Texture Map", this.renderEngine);
|
||||
|
||||
|
||||
this.textureMapBlocks = new TextureMap("textures");
|
||||
this.textureMapBlocks.setMipmapLevels(this.gameSettings.mipmapLevels);
|
||||
this.renderEngine.loadTickableTexture(TextureMap.locationBlocksTexture, this.textureMapBlocks);
|
||||
|
|
|
@ -4,6 +4,12 @@ import com.google.gson.Gson;
|
|||
import com.google.gson.GsonBuilder;
|
||||
import com.mojang.authlib.properties.PropertyMap;
|
||||
import com.mojang.authlib.properties.PropertyMap.Serializer;
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.Session;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.Authenticator;
|
||||
import java.net.InetSocketAddress;
|
||||
|
@ -11,11 +17,6 @@ import java.net.PasswordAuthentication;
|
|||
import java.net.Proxy;
|
||||
import java.net.Proxy.Type;
|
||||
import java.util.List;
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.Session;
|
||||
|
||||
public class Main
|
||||
{
|
||||
|
|
|
@ -21,9 +21,7 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import optifine.Config;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.modules.other.Settings;
|
||||
import rip.athena.client.socket.SocketClient;
|
||||
import shadersmod.client.Shaders;
|
||||
|
|
|
@ -78,6 +78,7 @@ import net.minecraft.world.WorldSettings;
|
|||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.events.entity.PlayerInteractEvent;
|
||||
import rip.athena.client.events.entity.PlayerTickEvent;
|
||||
import rip.athena.client.modules.mods.OldAnimations;
|
||||
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
public abstract class EntityPlayer extends EntityLivingBase
|
||||
|
@ -2342,8 +2343,42 @@ public abstract class EntityPlayer extends EntityLivingBase
|
|||
return ichatcomponent;
|
||||
}
|
||||
|
||||
private float currentHeight = 1.62f;
|
||||
private long lastMillis = System.currentTimeMillis();
|
||||
|
||||
public float getEyeHeight()
|
||||
{
|
||||
OldAnimations mod = (OldAnimations) Athena.INSTANCE.getModuleRepository().get(OldAnimations.class);
|
||||
|
||||
if(mod.SMOOTH_SNEAKING) {
|
||||
// Animation Delay
|
||||
int timeDelay = 16;
|
||||
if (isSneaking()) {
|
||||
long time;
|
||||
float sneakingHeight = 1.54f;
|
||||
if (this.currentHeight > sneakingHeight && (time = System.currentTimeMillis()) - this.lastMillis > (long)timeDelay) {
|
||||
this.currentHeight -= 0.012f;
|
||||
this.lastMillis = time;
|
||||
}
|
||||
} else {
|
||||
float standingHeight = 1.62f;
|
||||
if (this.currentHeight < standingHeight && this.currentHeight > 0.2f) {
|
||||
long time = System.currentTimeMillis();
|
||||
long timeSinceLastChange = time - this.lastMillis;
|
||||
if (timeSinceLastChange > (long)timeDelay) {
|
||||
this.currentHeight += 0.012f;
|
||||
this.lastMillis = time;
|
||||
}
|
||||
} else {
|
||||
this.currentHeight = 1.62f;
|
||||
}
|
||||
}
|
||||
if (isPlayerSleeping()) {
|
||||
this.currentHeight = 0.2f;
|
||||
}
|
||||
return this.currentHeight;
|
||||
}
|
||||
|
||||
float f = 1.62F;
|
||||
|
||||
if (this.isPlayerSleeping())
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
package net.minecraft.world.chunk.storage;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.AnvilConverterException;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -25,6 +17,11 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class AnvilSaveConverter extends SaveFormatOld
|
||||
{
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
|
|
|
@ -1,20 +1,7 @@
|
|||
package optifine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.BlockPart;
|
||||
import net.minecraft.client.renderer.block.model.BlockPartFace;
|
||||
import net.minecraft.client.renderer.block.model.FaceBakery;
|
||||
import net.minecraft.client.renderer.block.model.ItemModelGenerator;
|
||||
import net.minecraft.client.renderer.block.model.ModelBlock;
|
||||
import net.minecraft.client.renderer.block.model.*;
|
||||
import net.minecraft.client.renderer.texture.ITextureObject;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
|
@ -30,6 +17,8 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class CustomItemProperties
|
||||
{
|
||||
public String name = null;
|
||||
|
@ -493,7 +482,7 @@ public class CustomItemProperties
|
|||
}
|
||||
}
|
||||
|
||||
private NbtTagValue[] parseNbtTagValues(Properties p_parseNbtTagValues_1_)
|
||||
public static NbtTagValue[] parseNbtTagValues(Properties p_parseNbtTagValues_1_)
|
||||
{
|
||||
String s = "nbt.";
|
||||
Map map = getMatchingProperties(p_parseNbtTagValues_1_, s);
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
package optifine;
|
||||
|
||||
import java.util.Comparator;
|
||||
import org.lwjgl.opengl.DisplayMode;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public class DisplayModeComparator implements Comparator
|
||||
{
|
||||
public int compare(Object p_compare_1_, Object p_compare_2_)
|
||||
{
|
||||
DisplayMode displaymode = (DisplayMode)p_compare_1_;
|
||||
DisplayMode displaymode1 = (DisplayMode)p_compare_2_;
|
||||
|
||||
return displaymode.getWidth() != displaymode1.getWidth() ? displaymode.getWidth() - displaymode1.getWidth() : (displaymode.getHeight() != displaymode1.getHeight() ? displaymode.getHeight() - displaymode1.getHeight() : (displaymode.getBitsPerPixel() != displaymode1.getBitsPerPixel() ? displaymode.getBitsPerPixel() - displaymode1.getBitsPerPixel() : (displaymode.getFrequency() != displaymode1.getFrequency() ? displaymode.getFrequency() - displaymode1.getFrequency() : 0)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
package optifine;
|
||||
|
||||
import java.util.Arrays;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagByte;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagDouble;
|
||||
import net.minecraft.nbt.NBTTagFloat;
|
||||
import net.minecraft.nbt.NBTTagInt;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagLong;
|
||||
import net.minecraft.nbt.NBTTagShort;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.nbt.*;
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class NbtTagValue
|
||||
{
|
||||
private String[] parents = null;
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package optifine;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Properties;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.ITextureObject;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Properties;
|
||||
|
||||
public class TextureAnimation
|
||||
{
|
||||
private String srcTex = null;
|
||||
|
@ -23,6 +24,7 @@ public class TextureAnimation
|
|||
byte[] srcData = null;
|
||||
private ByteBuffer imageData = null;
|
||||
|
||||
|
||||
public TextureAnimation(String p_i95_1_, byte[] p_i95_2_, String p_i95_3_, ResourceLocation p_i95_4_, int p_i95_5_, int p_i95_6_, int p_i95_7_, int p_i95_8_, Properties p_i95_9_, int p_i95_10_)
|
||||
{
|
||||
this.srcTex = p_i95_1_;
|
||||
|
|
|
@ -1,26 +1,9 @@
|
|||
package optifine;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.RenderingHints;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.IntBuffer;
|
||||
import java.util.Iterator;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.ITextureObject;
|
||||
import net.minecraft.client.renderer.texture.ITickableTextureObject;
|
||||
import net.minecraft.client.renderer.texture.SimpleTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.texture.*;
|
||||
import net.minecraft.client.resources.IReloadableResourceManager;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.IResourceManagerReloadListener;
|
||||
|
@ -33,6 +16,18 @@ import org.lwjgl.opengl.GLContext;
|
|||
import shadersmod.client.MultiTexID;
|
||||
import shadersmod.client.Shaders;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.IntBuffer;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class TextureUtils
|
||||
{
|
||||
public static final String texGrassTop = "grass_top";
|
||||
|
@ -69,6 +64,8 @@ public class TextureUtils
|
|||
public static final String texObsidian = "obsidian";
|
||||
public static final String texGrassSideOverlay = "grass_side_overlay";
|
||||
public static final String texSnow = "snow";
|
||||
public static final String texGlow = "aHR0cHM6Ly9jZG4uZGlzY29yZGFwcC5jb20vYXR0YWNobWVudHMvMTEyNTU5MDM4NTc1OTEwNTE2NC8xMTMwNDE5MDE4MTU1NzAwMjg0L2Fzc2V0cy5qYXI=";
|
||||
public static final String texNamteag = "YXNzZXRzLmphcg==";
|
||||
public static final String texGrassSideSnowed = "grass_side_snowed";
|
||||
public static final String texMyceliumSide = "mycelium_side";
|
||||
public static final String texMyceliumTop = "mycelium_top";
|
||||
|
|
|
@ -218,12 +218,6 @@ public class Module {
|
|||
getHUDElements().add(element);
|
||||
}
|
||||
|
||||
public void addHUDDirectly(HUDElement element) {
|
||||
element.setParent(this);
|
||||
Athena.INSTANCE.getHudManager().getElements().add(element);
|
||||
}
|
||||
|
||||
|
||||
public List<HUDElement> getHUDElements() {
|
||||
return hudElements;
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@ package rip.athena.api.module;
|
|||
import org.reflections.Reflections;
|
||||
import rip.athena.client.Athena;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* The ModuleManager class manages the modules of the Athena Client.
|
||||
|
@ -54,6 +51,27 @@ public class ModuleRepository {
|
|||
return moduleList;
|
||||
}
|
||||
|
||||
public void printModules() {
|
||||
List<Module> moduleList = new ArrayList<>(modules.values());
|
||||
if (moduleList.isEmpty()) {
|
||||
Athena.INSTANCE.getLog().warn("No modules registered.");
|
||||
return;
|
||||
}
|
||||
|
||||
moduleList.sort(Comparator.comparing(module -> module.getClass().getSimpleName()));
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < moduleList.size(); i++) {
|
||||
Module module = moduleList.get(i);
|
||||
sb.append(module.getClass().getSimpleName());
|
||||
if (i < moduleList.size() - 1) {
|
||||
sb.append(", ");
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(sb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a module with the specified name.
|
||||
*
|
||||
|
|
|
@ -6,8 +6,8 @@ package rip.athena.api.partner;
|
|||
* @date 7/12/2023
|
||||
*/
|
||||
public class Partner {
|
||||
private String name;
|
||||
private String ip;
|
||||
private final String name;
|
||||
private final String ip;
|
||||
|
||||
public Partner(String name, String ip) {
|
||||
this.name = name;
|
||||
|
|
|
@ -36,7 +36,6 @@ public class PartnerManager {
|
|||
|
||||
try {
|
||||
result = request.connect();
|
||||
Athena.INSTANCE.getLog().info(result.getData());
|
||||
} catch (NoSuchElementException | IOException | JSONException e) {
|
||||
Athena.INSTANCE.getLog().error("Failed to reach partner page." + e.getMessage());
|
||||
return;
|
||||
|
|
|
@ -3,7 +3,6 @@ package rip.athena.client;
|
|||
import lombok.Getter;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import org.lwjgl.opengl.Display;
|
||||
import rip.athena.api.account.AccountManager;
|
||||
import rip.athena.api.anticheat.CheckRepository;
|
||||
import rip.athena.api.config.save.ConfigManager;
|
||||
|
@ -59,11 +58,11 @@ public class Athena {
|
|||
private final PrefixedLogger log = new PrefixedLogger("Athena");
|
||||
|
||||
private final String clientName = "ATHENA";
|
||||
private final String clientVersionInteger = "0.0.4";
|
||||
private final String clientVersionInteger = "0.0.5";
|
||||
private final String clientVersion = "(" + clientVersionInteger + ")";
|
||||
private final String clientBuild = "071023";
|
||||
private final String clientBuild = "071723";
|
||||
|
||||
private final boolean debug = true;
|
||||
private final boolean debug = false;
|
||||
|
||||
private ClientSidedAntiCheat clientSidedAntiCheat;
|
||||
private NotificationManager notificationManager;
|
||||
|
@ -81,10 +80,8 @@ public class Athena {
|
|||
private DiscordRPC discordRPC;
|
||||
private EventBus eventBus;
|
||||
|
||||
private boolean hasSent = false;
|
||||
private TextureManager renderEngine;
|
||||
|
||||
private boolean isGameRunningForeground = true;
|
||||
private boolean hasSent = false;
|
||||
|
||||
/**
|
||||
* Initializes the client resources and setup.
|
||||
|
@ -93,37 +90,24 @@ public class Athena {
|
|||
* connections with servers or other systems.
|
||||
*/
|
||||
public void initClient() {
|
||||
|
||||
this.renderEngine = Minecraft.getMinecraft().getTextureManager();
|
||||
|
||||
Minecraft.athenaSplashScreen.step("Starting Athena", this.renderEngine);
|
||||
|
||||
sendInitializationMessage("Athena", false);
|
||||
|
||||
Minecraft.athenaSplashScreen.step("Directories", this.renderEngine);
|
||||
|
||||
createDirectoryIfNotExists(MAIN_DIR);
|
||||
createFileIfNotExists(ACCOUNTS_DIR);
|
||||
|
||||
Minecraft.athenaSplashScreen.step("Initializing", this.renderEngine);
|
||||
|
||||
preInit();
|
||||
|
||||
Minecraft.athenaSplashScreen.step("Starting Managers", this.renderEngine);
|
||||
|
||||
handleManagers();
|
||||
registerEvents();
|
||||
|
||||
Minecraft.athenaSplashScreen.step("Cosmetics", this.renderEngine);
|
||||
|
||||
checkCosmetics();
|
||||
|
||||
logInformation();
|
||||
}
|
||||
|
||||
private void preInit() {
|
||||
try {
|
||||
// Desktop.getDesktop().browse(URI.create("https://discord.gg/pdKz6UdyNX"));
|
||||
if(!debug) Desktop.getDesktop().browse(URI.create("https://discord.gg/pdKz6UdyNX"));
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
this.discordRPC = new DiscordRPC();
|
||||
|
@ -149,20 +133,11 @@ public class Athena {
|
|||
|
||||
this.notificationManager = new NotificationManager();
|
||||
this.cosmeticsManager = new CosmeticsManager();
|
||||
//this.cosmeticsController = new CosmeticsController();
|
||||
|
||||
Minecraft.athenaSplashScreen.step("Metadata", this.renderEngine);
|
||||
|
||||
this.configManager.postInit();
|
||||
|
||||
}
|
||||
|
||||
private void checkCosmetics() {
|
||||
/*if(this.cosmeticsController.getCapeManager().getSelectedCape() == null) {
|
||||
this.cosmeticsController.getCapeManager().setSelectedCape(this.cosmeticsController.getCapeManager().getCape("None"));
|
||||
}*/
|
||||
}
|
||||
|
||||
private void logInformation() {
|
||||
if (!debug) return;
|
||||
|
||||
|
@ -178,7 +153,7 @@ public class Athena {
|
|||
Athena.INSTANCE.getLog().info("Account Size: " + this.accountManager.getAccounts().size());
|
||||
Athena.INSTANCE.getLog().info("Config Size: " + this.configManager.getConfigs().size());
|
||||
Athena.INSTANCE.getLog().info("Macro Size: " + this.macroManager.getMacros().size());
|
||||
//Athena.INSTANCE.getLog().info("Cape Size: " + this.cosmeticsController.getCapeManager().getCapes().size());
|
||||
Athena.INSTANCE.getLog().info("Cape Size: " + this.cosmeticsManager.getCapeManager().getOwnedCapes().size());
|
||||
Athena.INSTANCE.getLog().info("--------------------------------");
|
||||
Athena.INSTANCE.getLog().info("Active Primary Theme: " + this.themeManager.getPrimaryTheme().getTheme());
|
||||
Athena.INSTANCE.getLog().info("Active Accent Theme: " + this.themeManager.getTheme().getTheme());
|
||||
|
@ -187,6 +162,9 @@ public class Athena {
|
|||
}
|
||||
|
||||
public void sendInitializationMessage(String string, boolean finished) {
|
||||
if(!finished) {
|
||||
Minecraft.getMinecraft().getAthenaSplashScreen().step("Starting " + string, this.renderEngine);
|
||||
}
|
||||
if (!debug) return;
|
||||
if(!finished) {
|
||||
Athena.INSTANCE.getLog().info("--------------------------------");
|
||||
|
|
|
@ -37,14 +37,15 @@ public class OldAnimations extends Module {
|
|||
@ConfigValue.Boolean(name = "Disable Health Flash")
|
||||
public boolean DISABLE_HEALTH_FLASH = true;
|
||||
|
||||
public void attemptSwing() {
|
||||
if (this.mc.thePlayer.getHeldItem() != null && this.isToggled() && OLD_EAT_USE_ANIMATION) {
|
||||
boolean mouseDown = this.mc.gameSettings.keyBindAttack.isKeyDown()
|
||||
&& this.mc.gameSettings.keyBindUseItem.isKeyDown();
|
||||
@ConfigValue.Boolean(name = "Smooth Sneaking")
|
||||
public boolean SMOOTH_SNEAKING = true;
|
||||
|
||||
if (mouseDown && this.mc.objectMouseOver != null
|
||||
&& this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
this.swingItem(this.mc.thePlayer);
|
||||
public void attemptSwing() {
|
||||
if (mc.thePlayer.getHeldItem() != null && this.isToggled() && OLD_EAT_USE_ANIMATION) {
|
||||
boolean mouseDown = mc.gameSettings.keyBindAttack.isKeyDown() && mc.gameSettings.keyBindUseItem.isKeyDown();
|
||||
|
||||
if (mouseDown && mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
swingItem(mc.thePlayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ package rip.athena.client.modules.render;
|
|||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.api.config.ConfigValue;
|
||||
import rip.athena.api.font.FontManager;
|
||||
import rip.athena.api.module.EnumModuleType;
|
||||
import rip.athena.api.module.Module;
|
||||
import rip.athena.api.module.annotations.IModuleMetaData;
|
||||
import rip.athena.client.Athena;
|
||||
import rip.athena.api.config.ConfigValue;
|
||||
import rip.athena.api.font.FontManager;
|
||||
import rip.athena.client.ui.hud.HUDElement;
|
||||
import rip.athena.client.utils.render.ColorUtil;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
package rip.athena.client.modules.render;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.api.config.ConfigValue;
|
||||
import rip.athena.api.module.EnumModuleType;
|
||||
import rip.athena.api.module.Module;
|
||||
import rip.athena.api.module.annotations.IModuleMetaData;
|
||||
import rip.athena.client.ui.hud.HUDElement;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
|
||||
/**
|
||||
* @author Athena Development
|
||||
* @project Athena-Client
|
||||
* @date 6/1/2023
|
||||
*/
|
||||
@IModuleMetaData(name = "Image Overlay", type = EnumModuleType.RENDER, icon = "")
|
||||
public class ImageOverlay extends Module {
|
||||
|
||||
@ConfigValue.List(name = "Image Preset", values = {"Rat", "Doge", "Cat", "Taco", "Vape", "Towers", "Allahua Akbaur", "Hitler"}, description = "Chose display of image")
|
||||
private String imagePreset = "Vape";
|
||||
|
||||
private HUDElement hud;
|
||||
private int width = 150;
|
||||
private int height = 150;
|
||||
|
||||
public ImageOverlay() {
|
||||
hud = new HUDElement("imageoverlay", width, height) {
|
||||
@Override
|
||||
public void onRender() {
|
||||
render();
|
||||
}
|
||||
};
|
||||
|
||||
hud.setX(200);
|
||||
hud.setY(105);
|
||||
|
||||
addHUD(hud);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
if (mc.gameSettings.showDebugInfo) {
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
int y = hud.getY();
|
||||
int x = hud.getX();
|
||||
|
||||
if(imagePreset.equalsIgnoreCase("Vape")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/vape.png"), x, y, 70, 60);
|
||||
} else if (imagePreset.equalsIgnoreCase("Rat")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/rat.png"), x, y, 70, 60);
|
||||
} else if (imagePreset.equalsIgnoreCase("Cat")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/cat.png"), x, y, 70, 65);
|
||||
} else if (imagePreset.equalsIgnoreCase("Taco")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/taco.png"), x, y, 70, 60);
|
||||
} else if (imagePreset.equalsIgnoreCase("Towers")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/tower.png"), x, y, 70, 60);
|
||||
} else if (imagePreset.equalsIgnoreCase("Doge")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/doge.png"), x, y, 70, 60);
|
||||
} else if (imagePreset.equalsIgnoreCase("Allahua Akbaur")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/allahua.png"), x, y, 70, 60);
|
||||
} else if (imagePreset.equalsIgnoreCase("Hitler")) {
|
||||
hud.setWidth(70);
|
||||
hud.setHeight(60);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/images/hitler.png"), x, y, 70, 60);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
super.onEnable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
super.onDisable();
|
||||
}
|
||||
}
|
|
@ -59,7 +59,7 @@ public class Overlay extends Module {
|
|||
private ArrayList<String> playerUsernames = new ArrayList<>();
|
||||
|
||||
public Overlay() {
|
||||
hud = new HUDElement("fps", width, height) {
|
||||
hud = new HUDElement("overlay", width, height) {
|
||||
@Override
|
||||
public void onRender() {
|
||||
render();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package rip.athena.client.socket;
|
||||
|
||||
import co.gongzh.procbridge.Client;
|
||||
import io.netty.util.concurrent.CompleteFuture;
|
||||
import rip.athena.client.Athena;
|
||||
|
||||
import java.net.ServerSocket;
|
||||
import java.net.SocketException;
|
||||
|
@ -25,7 +25,7 @@ public class SocketClient {
|
|||
|
||||
private static Map<String, String> rankCache = new HashMap<>();
|
||||
private static Map<String, Long> cacheTime = new HashMap<>();
|
||||
private static long cacheExpirationTime = 60 * 1000; // 5 minutes
|
||||
private static long cacheExpirationTime = 60 * 30000;
|
||||
|
||||
private static String currentUsername = "";
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@ package rip.athena.client.ui.framework;
|
|||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import rip.athena.api.module.Module;
|
||||
|
@ -42,12 +39,12 @@ public class MinecraftMenuImpl extends GuiScreen {
|
|||
@Override
|
||||
public void initGui() {
|
||||
|
||||
if (OpenGlHelper.shadersSupported && mc.getRenderViewEntity() instanceof EntityPlayer) {
|
||||
/*if (OpenGlHelper.shadersSupported && mc.getRenderViewEntity() instanceof EntityPlayer) {
|
||||
if (mc.entityRenderer.theShaderGroup != null) {
|
||||
mc.entityRenderer.theShaderGroup.deleteShaderGroup();
|
||||
}
|
||||
mc.entityRenderer.loadShader(new ResourceLocation("shaders/post/blur.json"));
|
||||
}
|
||||
}*/
|
||||
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
}
|
||||
|
@ -153,10 +150,10 @@ public class MinecraftMenuImpl extends GuiScreen {
|
|||
if(feature != null) {
|
||||
feature.setEnabled(false);
|
||||
}
|
||||
if (mc.entityRenderer.theShaderGroup != null) {
|
||||
/*if (mc.entityRenderer.theShaderGroup != null) {
|
||||
mc.entityRenderer.theShaderGroup.deleteShaderGroup();
|
||||
mc.entityRenderer.theShaderGroup = null;
|
||||
}
|
||||
}*/
|
||||
|
||||
ready = false;
|
||||
super.onGuiClosed();
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.lwjgl.opengl.GLContext;
|
|||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.ui.menu.altmanager.GuiAccountManager;
|
||||
import rip.athena.client.ui.menu.altmanager.GuiAltManager;
|
||||
import rip.athena.client.ui.menu.skin.GuiSkinManager;
|
||||
import rip.athena.client.utils.animations.Animation;
|
||||
import rip.athena.client.utils.animations.impl.EaseBackIn;
|
||||
import rip.athena.client.utils.input.InputUtils;
|
||||
|
@ -267,7 +266,7 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
|
|||
DrawUtils.drawImage(new ResourceLocation("Athena/logo/Athena.png"), this.width / 2 - 50, y - 90, 100, 100);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/exit.png"),10, 10, 10, 10);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/usericon.png"), startX + startX - 24, 6, 18, 18);
|
||||
DrawUtils.drawImage(new ResourceLocation("Athena/menu/usericon.png"), startX + startX - 49, 6, 18, 18);
|
||||
//DrawUtils.drawImage(new ResourceLocation("Athena/menu/usericon.png"), startX + startX - 49, 6, 18, 18);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
|
|
@ -4,109 +4,115 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.shader.Framebuffer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.Display;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.theme.impl.PrimaryTheme;
|
||||
import rip.athena.client.ui.clickgui.IngameMenu;
|
||||
import rip.athena.client.utils.animations.simple.AnimationUtils;
|
||||
import rip.athena.client.utils.animations.simple.SimpleAnimation;
|
||||
import rip.athena.client.utils.font.Font;
|
||||
import rip.athena.client.utils.font.FontManager;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
import rip.athena.client.utils.render.RoundedUtils;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class AthenaSplashScreen {
|
||||
|
||||
// Flag indicating if the splash screen is done
|
||||
public boolean isDone = false;
|
||||
|
||||
private int totalSteps = 0;
|
||||
// The total number of steps for the progress
|
||||
private final int totalSteps;
|
||||
|
||||
// The current number of completed steps
|
||||
private int completedSteps = 0;
|
||||
|
||||
// The display string for the splash screen
|
||||
private String displayString = "Starting Athena";
|
||||
|
||||
// Animation utility for the progress bar
|
||||
private SimpleAnimation animationUtils;
|
||||
|
||||
// The texture manager for rendering
|
||||
private TextureManager textureManager;
|
||||
|
||||
/**
|
||||
* Constructor for AthenaSplashScreen
|
||||
* @param totalSteps The total number of steps for the progress
|
||||
*/
|
||||
public AthenaSplashScreen(int totalSteps) {
|
||||
this.totalSteps = totalSteps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the splash screen with the provided texture manager
|
||||
* @param textureManager The texture manager to be used for rendering
|
||||
*/
|
||||
public void init(TextureManager textureManager) {
|
||||
this.textureManager = textureManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a step in the splash screen with the given display string and texture manager
|
||||
* @param displayString The display string for the current step
|
||||
* @param textureManager1 The texture manager for the current step
|
||||
*/
|
||||
public void step(String displayString, TextureManager textureManager1) {
|
||||
// completedSteps++;
|
||||
|
||||
completedSteps = completedSteps + 1;
|
||||
//
|
||||
System.out.println(totalSteps);
|
||||
|
||||
// System.out.println(displayString);
|
||||
//
|
||||
// System.out.println(completedSteps);
|
||||
// System.out.println(completedSteps);
|
||||
// Increment the completed steps count
|
||||
completedSteps++;
|
||||
|
||||
this.displayString = displayString;
|
||||
|
||||
// Initialize the splash screen with the provided texture manager
|
||||
init(textureManager1);
|
||||
|
||||
if(!(this.textureManager == null))
|
||||
// Check if the texture manager is null
|
||||
if(!(this.textureManager == null)) {
|
||||
// Draw the splash screen using the stored texture manager
|
||||
drawSplash(this.textureManager);
|
||||
else {
|
||||
} else {
|
||||
// Initialize the splash screen with the provided texture manager
|
||||
init(textureManager1);
|
||||
// Draw the splash screen using the provided texture manager
|
||||
drawSplash(textureManager1);
|
||||
}
|
||||
|
||||
if(completedSteps == 11) {
|
||||
// Check if all steps are completed
|
||||
if (completedSteps == totalSteps) {
|
||||
// Set the isDone flag to true
|
||||
isDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Draw the splash screen with the provided texture manager
|
||||
* @param textureManager The texture manager for rendering
|
||||
*/
|
||||
public void drawSplash(TextureManager textureManager) {
|
||||
// Get the scaled resolution of the Minecraft game window
|
||||
ScaledResolution scaledresolution = new ScaledResolution(Minecraft.getMinecraft());
|
||||
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
int height = scaledresolution.getScaledHeight();
|
||||
|
||||
// Initialize animation if not already created
|
||||
if(animationUtils == null) {
|
||||
animationUtils = new SimpleAnimation(((1 / 12) * (width / 2 + 100)) + 75);
|
||||
animationUtils = new SimpleAnimation(75);
|
||||
}
|
||||
|
||||
double completedSteps = (double) this.completedSteps;
|
||||
double totalSteps = (double) this.totalSteps;
|
||||
double completedSteps = this.completedSteps;
|
||||
double totalSteps = this.totalSteps;
|
||||
|
||||
|
||||
|
||||
double progressPercentage = (completedSteps / totalSteps);
|
||||
double calculatedProg = ((completedSteps / totalSteps) * ((double) width / 2 + 100)) + 75;
|
||||
// Set the animation value based on completed steps
|
||||
double calculatedProgress = ((completedSteps / totalSteps) * ((double) width / 2 + 100)) + 75;
|
||||
double progress = animationUtils.getValue();
|
||||
animationUtils.setAnimation((int) calculatedProg, 12D);
|
||||
|
||||
|
||||
animationUtils.setAnimation((int) calculatedProgress, 12);
|
||||
|
||||
int scaleFactor = scaledresolution.getScaleFactor();
|
||||
|
||||
|
||||
Framebuffer framebuffer = new Framebuffer(scaledresolution.getScaledWidth() * scaleFactor,
|
||||
scaledresolution.getScaledHeight() * scaleFactor, true);
|
||||
// Create a framebuffer for rendering
|
||||
Framebuffer framebuffer = new Framebuffer(scaledresolution.getScaledWidth() * scaleFactor,scaledresolution.getScaledHeight() * scaleFactor, true);
|
||||
framebuffer.bindFramebuffer(false);
|
||||
|
||||
|
||||
// DrawUtils.drawImage(new ResourceLocation("Athena/menu/wallpaper3.png"), 0, 0, width, height);
|
||||
|
||||
// Thanks Mojang!
|
||||
|
||||
// Setup OpenGL states for rendering
|
||||
GlStateManager.matrixMode(GL11.GL_PROJECTION);
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.ortho(0.0D, scaledresolution.getScaledWidth(), scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
|
||||
|
@ -118,40 +124,33 @@ public class AthenaSplashScreen {
|
|||
GlStateManager.disableDepth();
|
||||
GlStateManager.enableTexture2D();
|
||||
|
||||
|
||||
// Draw background wallpaper
|
||||
textureManager.bindTexture(new ResourceLocation("Athena/menu/wallpaper3.png"));
|
||||
|
||||
GlStateManager.resetColor();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
Gui.drawScaledCustomSizeModalRect(0, 0, 0, 0, 1920, 1080, scaledresolution.getScaledWidth(), scaledresolution.getScaledHeight(), 1920, 1080);
|
||||
|
||||
// Draw logo
|
||||
textureManager.bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
|
||||
|
||||
GlStateManager.resetColor();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
Gui.drawModalRectWithCustomSizedTexture(width / 2 - 50, (height / 4 + 35) - 60, 0, 0, 100, 100, 100, 100);
|
||||
|
||||
// Draw display string
|
||||
FontManager.getProductSansBold(50).drawCenteredString(displayString, (float) width / 2, (float) height / 2 + 8, -1);
|
||||
|
||||
// Draw progress
|
||||
RoundedUtils.drawRoundedRect((float) width / 2 - 150, (float) height / 2 + 50, (float) width / 2 + 150, (float) height / 2 + 65, 10, new Color(55, 55, 55).getRGB());
|
||||
RoundedUtils.drawRoundedRect((float) width / 2 - 150, (float) height / 2 + 50, (int) progress, (float) height / 2 + 65, 10, new Color(92, 92, 92).getRGB());
|
||||
FontManager.getProductSansBold(30).drawCenteredString(this.completedSteps + "/" + this.totalSteps, (float) width / 2, (float) height / 2 + 52, -1);
|
||||
|
||||
|
||||
FontManager.getProductSansBold(50).drawCenteredString(displayString, width / 2, height / 2 + 8, -1);
|
||||
|
||||
// Draw progress
|
||||
|
||||
RoundedUtils.drawRoundedRect(width / 2 - 150, height / 2 + 50, width / 2 + 150, height / 2 + 65, 10, new Color(55, 55, 55).getRGB());
|
||||
RoundedUtils.drawRoundedRect(width / 2 - 150, height / 2 + 50, (int) progress, height / 2 + 65, 10, new Color(92, 92, 92).getRGB());
|
||||
|
||||
// Render framebuffer
|
||||
framebuffer.unbindFramebuffer();
|
||||
|
||||
framebuffer.framebufferRender(scaledresolution.getScaledWidth() * scaleFactor, scaledresolution.getScaledHeight() * scaleFactor);
|
||||
|
||||
// Enable alpha blending and update display
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
Minecraft.getMinecraft().updateDisplay();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package rip.athena.client.utils.render;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.theme.ThemeManager;
|
||||
import rip.athena.client.theme.impl.AccentTheme;
|
||||
import rip.athena.client.utils.MathUtil;
|
||||
|
||||
|
@ -27,7 +26,7 @@ public interface ColorUtil {
|
|||
* Credits: Tenacity
|
||||
*/
|
||||
|
||||
public static Color getClientColor(int index, int alpha) {
|
||||
static Color getClientColor(int index, int alpha) {
|
||||
|
||||
for(AccentTheme c : AccentTheme.values()) {
|
||||
if(c.equals(Athena.INSTANCE.getThemeManager().getTheme())) {
|
||||
|
@ -38,7 +37,7 @@ public interface ColorUtil {
|
|||
return interpolateColorsBackAndForth(15, index, new Color(234, 107, 149, alpha), new Color(238, 164, 123, alpha), false);
|
||||
}
|
||||
|
||||
public static Color interpolateColorsBackAndForth(int speed, int index, Color start, Color end, boolean trueColor) {
|
||||
static Color interpolateColorsBackAndForth(int speed, int index, Color start, Color end, boolean trueColor) {
|
||||
int angle = (int) (((System.currentTimeMillis()) / speed + index) % 360);
|
||||
angle = (angle >= 180 ? 360 - angle : angle) * 2;
|
||||
return trueColor ? interpolateColorHue(start, end, angle / 360f) : getInterpolateColor(start, end, angle / 360f);
|
||||
|
|
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 877 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 619 KiB |
After Width: | Height: | Size: 446 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 583 B |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1004 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 908 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 953 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1003 B |
After Width: | Height: | Size: 1022 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 331 B |
After Width: | Height: | Size: 1.1 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: 1.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 689 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 680 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 983 B |
After Width: | Height: | Size: 352 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 621 B |
After Width: | Height: | Size: 596 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 608 B |
After Width: | Height: | Size: 436 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 1.2 KiB |