mirror of
https://github.com/Athena-Operations/Athena-Client.git
synced 2024-11-10 04:01:32 +01:00
Fixed freelook and added screenshot uploader
This commit is contained in:
parent
0ca1a271d8
commit
0a2c9cd526
@ -2,14 +2,6 @@ package net.minecraft.client.renderer;
|
||||
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.Callable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBed;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -51,31 +43,12 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.server.integrated.IntegratedServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EntitySelectors;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MouseFilter;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import optifine.Config;
|
||||
import optifine.CustomColors;
|
||||
import optifine.Lagometer;
|
||||
import optifine.RandomMobs;
|
||||
import optifine.Reflector;
|
||||
import optifine.ReflectorForge;
|
||||
import optifine.TextureUtils;
|
||||
|
||||
import optifine.*;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.lwjgl.input.Mouse;
|
||||
@ -91,6 +64,15 @@ import rip.athena.client.modules.mods.*;
|
||||
import shadersmod.client.Shaders;
|
||||
import shadersmod.client.ShadersRender;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public class EntityRenderer implements IResourceManagerReloadListener
|
||||
{
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
@ -842,6 +824,11 @@ public class EntityRenderer implements IResourceManagerReloadListener
|
||||
float f7 = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;
|
||||
float f8 = 0.0F;
|
||||
|
||||
if(mod.isToggled()) {
|
||||
f6 = mod.getCameraYaw() + 180;
|
||||
f7 = mod.getCameraPitch();
|
||||
}
|
||||
|
||||
if (entity instanceof EntityAnimal)
|
||||
{
|
||||
EntityAnimal entityanimal = (EntityAnimal)entity;
|
||||
|
@ -87,7 +87,10 @@ public class ClickEvent
|
||||
RUN_COMMAND("run_command", true),
|
||||
TWITCH_USER_INFO("twitch_user_info", false),
|
||||
SUGGEST_COMMAND("suggest_command", true),
|
||||
CHANGE_PAGE("change_page", true);
|
||||
CHANGE_PAGE("change_page", true),
|
||||
DELETE_FILE("delete_file", false),
|
||||
COPY_URL("copy_url", false),
|
||||
LINK("link", false);
|
||||
|
||||
private static final Map<String, ClickEvent.Action> nameMapping = Maps.<String, ClickEvent.Action>newHashMap();
|
||||
private final boolean allowedInChat;
|
||||
|
@ -1,12 +1,5 @@
|
||||
package net.minecraft.util;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.nio.IntBuffer;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import javax.imageio.ImageIO;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.texture.TextureUtil;
|
||||
@ -17,6 +10,18 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.modules.other.ScreenshotUploader;
|
||||
import rip.athena.client.utils.module.AsyncScreenshot;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.nio.IntBuffer;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ScreenShotHelper
|
||||
{
|
||||
@ -46,21 +51,18 @@ public class ScreenShotHelper
|
||||
*/
|
||||
public static IChatComponent saveScreenshot(File gameDirectory, String screenshotName, int width, int height, Framebuffer buffer)
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
File file1 = new File(gameDirectory, "screenshots");
|
||||
file1.mkdir();
|
||||
|
||||
if (OpenGlHelper.isFramebufferEnabled())
|
||||
{
|
||||
if (OpenGlHelper.isFramebufferEnabled()) {
|
||||
width = buffer.framebufferTextureWidth;
|
||||
height = buffer.framebufferTextureHeight;
|
||||
}
|
||||
|
||||
int i = width * height;
|
||||
|
||||
if (pixelBuffer == null || pixelBuffer.capacity() < i)
|
||||
{
|
||||
if (pixelBuffer == null || pixelBuffer.capacity() < i) {
|
||||
pixelBuffer = BufferUtils.createIntBuffer(i);
|
||||
pixelValues = new int[i];
|
||||
}
|
||||
@ -69,55 +71,59 @@ public class ScreenShotHelper
|
||||
GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1);
|
||||
pixelBuffer.clear();
|
||||
|
||||
if (OpenGlHelper.isFramebufferEnabled())
|
||||
{
|
||||
if (OpenGlHelper.isFramebufferEnabled()) {
|
||||
GlStateManager.bindTexture(buffer.framebufferTexture);
|
||||
GL11.glGetTexImage(GL11.GL_TEXTURE_2D, 0, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer)pixelBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glReadPixels(0, 0, width, height, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer)pixelBuffer);
|
||||
GL11.glGetTexImage(GL11.GL_TEXTURE_2D, 0, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer) pixelBuffer);
|
||||
} else {
|
||||
GL11.glReadPixels(0, 0, width, height, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer) pixelBuffer);
|
||||
}
|
||||
|
||||
pixelBuffer.get(pixelValues);
|
||||
TextureUtil.processPixelValues(pixelValues, width, height);
|
||||
BufferedImage bufferedimage = null;
|
||||
|
||||
if (OpenGlHelper.isFramebufferEnabled())
|
||||
{
|
||||
bufferedimage = new BufferedImage(buffer.framebufferWidth, buffer.framebufferHeight, 1);
|
||||
int j = buffer.framebufferTextureHeight - buffer.framebufferHeight;
|
||||
if (Athena.INSTANCE.getModuleRepository().get(ScreenshotUploader.class).isToggled()) {
|
||||
CompletableFuture.runAsync(new AsyncScreenshot(width, height, pixelValues, buffer, file1));
|
||||
return new ChatComponentText("Taking a screenshot... please wait a few!");
|
||||
} else {
|
||||
|
||||
for (int k = j; k < buffer.framebufferTextureHeight; ++k)
|
||||
TextureUtil.processPixelValues(pixelValues, width, height);
|
||||
BufferedImage bufferedimage = null;
|
||||
|
||||
if (OpenGlHelper.isFramebufferEnabled())
|
||||
{
|
||||
for (int l = 0; l < buffer.framebufferWidth; ++l)
|
||||
bufferedimage = new BufferedImage(buffer.framebufferWidth, buffer.framebufferHeight, 1);
|
||||
int j = buffer.framebufferTextureHeight - buffer.framebufferHeight;
|
||||
|
||||
for (int k = j; k < buffer.framebufferTextureHeight; ++k)
|
||||
{
|
||||
bufferedimage.setRGB(l, k - j, pixelValues[k * buffer.framebufferTextureWidth + l]);
|
||||
for (int l = 0; l < buffer.framebufferWidth; ++l)
|
||||
{
|
||||
bufferedimage.setRGB(l, k - j, pixelValues[k * buffer.framebufferTextureWidth + l]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bufferedimage = new BufferedImage(width, height, 1);
|
||||
bufferedimage.setRGB(0, 0, width, height, pixelValues, 0, width);
|
||||
}
|
||||
else
|
||||
{
|
||||
bufferedimage = new BufferedImage(width, height, 1);
|
||||
bufferedimage.setRGB(0, 0, width, height, pixelValues, 0, width);
|
||||
}
|
||||
|
||||
File file2;
|
||||
File file2;
|
||||
|
||||
if (screenshotName == null)
|
||||
{
|
||||
file2 = getTimestampedPNGFileForDirectory(file1);
|
||||
}
|
||||
else
|
||||
{
|
||||
file2 = new File(file1, screenshotName);
|
||||
}
|
||||
if (screenshotName == null)
|
||||
{
|
||||
file2 = getTimestampedPNGFileForDirectory(file1);
|
||||
}
|
||||
else
|
||||
{
|
||||
file2 = new File(file1, screenshotName);
|
||||
}
|
||||
|
||||
ImageIO.write(bufferedimage, "png", (File)file2);
|
||||
IChatComponent ichatcomponent = new ChatComponentText(file2.getName());
|
||||
ichatcomponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, file2.getAbsolutePath()));
|
||||
ichatcomponent.getChatStyle().setUnderlined(Boolean.valueOf(true));
|
||||
return new ChatComponentTranslation("screenshot.success", new Object[] {ichatcomponent});
|
||||
ImageIO.write(bufferedimage, "png", (File)file2);
|
||||
IChatComponent ichatcomponent = new ChatComponentText(file2.getName());
|
||||
ichatcomponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, file2.getAbsolutePath()));
|
||||
ichatcomponent.getChatStyle().setUnderlined(Boolean.valueOf(true));
|
||||
return new ChatComponentTranslation("screenshot.success", new Object[] {ichatcomponent});
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
@ -107,6 +107,8 @@ public class Freelook extends Module {
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
perspectiveToggled = false;
|
||||
mc.gameSettings.thirdPersonView = previousPerspective;
|
||||
super.onDisable();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package rip.athena.client.modules.other;
|
||||
|
||||
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;
|
||||
|
||||
@IModuleMetaData(name = "Screenshot Uploader", type = EnumModuleType.OTHER, icon = "")
|
||||
public class ScreenshotUploader extends Module {
|
||||
|
||||
@ConfigValue.Boolean(name = "Link")
|
||||
public boolean link = true;
|
||||
|
||||
@ConfigValue.Boolean(name = "Open")
|
||||
public boolean open = true;
|
||||
|
||||
@ConfigValue.Boolean(name = "Delete")
|
||||
public boolean delete = true;
|
||||
|
||||
@ConfigValue.Boolean(name = "Copy")
|
||||
public boolean copy = true;
|
||||
}
|
@ -11,7 +11,7 @@ import rip.athena.api.event.SubscribeEvent;
|
||||
import rip.athena.client.events.input.MouseDownEvent;
|
||||
import rip.athena.api.font.FontManager;
|
||||
import rip.athena.client.ui.hud.HUDElement;
|
||||
import rip.athena.client.utils.ClickCounter;
|
||||
import rip.athena.client.utils.module.ClickCounter;
|
||||
import rip.athena.client.utils.render.ColorUtil;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
import rip.athena.client.utils.render.RoundedUtils;
|
||||
|
@ -8,7 +8,7 @@ import rip.athena.api.module.annotations.IModuleMetaData;
|
||||
import rip.athena.api.event.SubscribeEvent;
|
||||
import rip.athena.client.events.input.MouseDownEvent;
|
||||
import rip.athena.client.ui.hud.HUDElement;
|
||||
import rip.athena.client.utils.ClickCounter;
|
||||
import rip.athena.client.utils.module.ClickCounter;
|
||||
import rip.athena.client.utils.render.DrawUtils;
|
||||
|
||||
import java.awt.*;
|
||||
|
@ -123,7 +123,7 @@ public class DiscordRPC {
|
||||
activity = new Activity();
|
||||
|
||||
// General information
|
||||
activity.setDetails("Release: " + Athena.INSTANCE.getClientName());
|
||||
activity.setDetails("Release: " + Athena.INSTANCE.getClientName() + " v" + Athena.INSTANCE.getClientVersion());
|
||||
|
||||
// Setting a start time causes an "elapsed" field to appear
|
||||
activity.timestamps().setStart(Instant.now());
|
||||
|
@ -0,0 +1,191 @@
|
||||
package rip.athena.client.utils.module;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.shader.Framebuffer;
|
||||
import net.minecraft.event.ClickEvent;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import org.json.JSONObject;
|
||||
import rip.athena.client.Athena;
|
||||
import rip.athena.client.modules.other.ScreenshotUploader;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Base64;
|
||||
import java.util.Date;
|
||||
|
||||
public class AsyncScreenshot implements Runnable {
|
||||
|
||||
private final int width;
|
||||
private final int height;
|
||||
private final int[] pixelValues;
|
||||
|
||||
private final Framebuffer framebuffer;
|
||||
private static BufferedImage image;
|
||||
|
||||
private final File screenshotDirectory;
|
||||
private static File screenshot;
|
||||
|
||||
public AsyncScreenshot(final int width, final int height, final int[] pixelValues, final Framebuffer framebuffer, final File screenshotDirectory) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.pixelValues = pixelValues;
|
||||
this.framebuffer = framebuffer;
|
||||
this.screenshotDirectory = screenshotDirectory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
processPixelValues(this.pixelValues, this.width, this.height);
|
||||
screenshot = getTimestampedPNGFileForDirectory(screenshotDirectory);
|
||||
|
||||
try {
|
||||
if(OpenGlHelper.isFramebufferEnabled()) {
|
||||
image = new BufferedImage(this.framebuffer.framebufferWidth, this.framebuffer.framebufferHeight, 1);
|
||||
int heightSize;
|
||||
for(int tHeight = heightSize = this.framebuffer.framebufferTextureHeight - this.framebuffer.framebufferHeight; tHeight < this.framebuffer.framebufferTextureHeight; ++tHeight) {
|
||||
for(int widthSize = 0; widthSize < this.framebuffer.framebufferWidth; ++widthSize) {
|
||||
image.setRGB(widthSize, tHeight - heightSize, this.pixelValues[tHeight * this.framebuffer.framebufferTextureWidth + widthSize]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
(image = new BufferedImage(this.width, this.height, 1)).setRGB(0, 0, this.width, this.height, this.pixelValues, 0, this.width);
|
||||
}
|
||||
|
||||
ImageIO.write(image, "png", screenshot);
|
||||
|
||||
URL url = new URL("https://api.imgur.com/3/image");
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
try {
|
||||
ImageIO.write(image, "png", byteArrayOutputStream);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
String clientID = "";
|
||||
|
||||
String data = "";
|
||||
data = URLEncoder.encode("image", "UTF-8") + "=" + URLEncoder.encode(Base64.getEncoder().encodeToString(byteArrayOutputStream.toByteArray()), "UTF-8");
|
||||
|
||||
connection.setDoOutput(true);
|
||||
connection.setDoInput(true);
|
||||
connection.setRequestMethod("POST");
|
||||
connection.setRequestProperty("Authorization", "Client-ID" + clientID);
|
||||
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
||||
connection.connect();
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
|
||||
writer.write(data);
|
||||
writer.flush();
|
||||
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
stringBuilder.append(line).append("\n");
|
||||
}
|
||||
writer.close();
|
||||
reader.close();
|
||||
|
||||
sendChatMessage(stringBuilder.toString(), screenshot);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("screenshot.failure", e.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
private void sendChatMessage(final String string, File file) throws IOException {
|
||||
ScreenshotUploader mod = (ScreenshotUploader) Athena.INSTANCE.getModuleRepository().get(ScreenshotUploader.class);
|
||||
|
||||
if(mod.isToggled()) {
|
||||
JSONObject json = new JSONObject(string);
|
||||
boolean success = json.getBoolean("success");
|
||||
Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(""));
|
||||
|
||||
IChatComponent toSend = new ChatComponentText("");
|
||||
IChatComponent iChatCopy = new ChatComponentText("COPY ");
|
||||
IChatComponent iChatLink = new ChatComponentText("LINK ");
|
||||
|
||||
if(success) {
|
||||
String link = json.getJSONObject("data").getString("link");
|
||||
iChatLink.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.LINK, link));
|
||||
iChatLink.getChatStyle().setColor(EnumChatFormatting.GREEN);
|
||||
iChatLink.getChatStyle().setBold(true);
|
||||
|
||||
iChatCopy.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.COPY_URL, link));
|
||||
iChatCopy.getChatStyle().setColor(EnumChatFormatting.YELLOW);
|
||||
iChatCopy.getChatStyle().setBold(true);
|
||||
}
|
||||
|
||||
IChatComponent iChatDelete = new ChatComponentText("DELETE ");
|
||||
iChatDelete.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.DELETE_FILE, file.getAbsolutePath()));
|
||||
iChatDelete.getChatStyle().setColor(EnumChatFormatting.RED);
|
||||
iChatDelete.getChatStyle().setBold(true);
|
||||
|
||||
IChatComponent iChatOpen = new ChatComponentText("OPEN ");
|
||||
iChatOpen.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, screenshot.getCanonicalPath()));
|
||||
iChatOpen.getChatStyle().setColor(EnumChatFormatting.BLUE);
|
||||
iChatOpen.getChatStyle().setBold(true);
|
||||
|
||||
if(mod.open) {
|
||||
toSend.appendSibling(iChatOpen);
|
||||
}
|
||||
|
||||
if(mod.delete) {
|
||||
toSend.appendSibling(iChatDelete);
|
||||
}
|
||||
|
||||
if(mod.copy) {
|
||||
toSend.appendSibling(iChatCopy);
|
||||
}
|
||||
|
||||
if(mod.link) {
|
||||
toSend.appendSibling(iChatLink);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(toSend);
|
||||
} else {
|
||||
IChatComponent iChatComponent = new ChatComponentText(file.getName());
|
||||
iChatComponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, file.getAbsolutePath()));
|
||||
iChatComponent.getChatStyle().setUnderlined(true);
|
||||
|
||||
Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("screenshot.success", iChatComponent));
|
||||
}
|
||||
}
|
||||
|
||||
public static void processPixelValues(final int[] pixels, final int displayWidth, final int displayHeight) {
|
||||
final int[] xValues = new int[displayWidth];
|
||||
for(int yValues = displayHeight / 2, val = 0; val < yValues; ++val) {
|
||||
System.arraycopy(pixels, val * displayWidth, xValues, 0, displayWidth);
|
||||
System.arraycopy(pixels, (displayHeight - 1 - val) * displayWidth, pixels, val * displayWidth, displayWidth);
|
||||
System.arraycopy(xValues, 0, pixels, (displayHeight - 1 - val) * displayWidth, displayWidth);
|
||||
}
|
||||
}
|
||||
|
||||
private static File getTimestampedPNGFileForDirectory(File gameDirectory)
|
||||
{
|
||||
final String dateFormatting = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date());
|
||||
int screenshotCount = 1;
|
||||
File screenshot;
|
||||
|
||||
while(true) {
|
||||
screenshot = new File(gameDirectory, dateFormatting + ((screenshotCount == 1) ? "" : ("_" + screenshotCount)) + ".png");
|
||||
if(!screenshot.exists()) {
|
||||
break;
|
||||
}
|
||||
screenshotCount++;
|
||||
}
|
||||
|
||||
return screenshot;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package rip.athena.client.utils;
|
||||
package rip.athena.client.utils.module;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
File diff suppressed because it is too large
Load Diff
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.
@ -27,30 +27,6 @@
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Crosshair": {
|
||||
"settings": {
|
||||
"Draw color": {
|
||||
"red": 255,
|
||||
"green": 0,
|
||||
"blue": 0,
|
||||
"alpha": 255
|
||||
},
|
||||
"Brush size": 2,
|
||||
"Rainbow color": false,
|
||||
"Delete mode": false
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Fullbright": {
|
||||
"settings": {},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"CPS": {
|
||||
"settings": {
|
||||
"Transparency": 255,
|
||||
@ -93,6 +69,30 @@
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Fullbright": {
|
||||
"settings": {},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Crosshair": {
|
||||
"settings": {
|
||||
"Draw color": {
|
||||
"red": 255,
|
||||
"green": 0,
|
||||
"blue": 0,
|
||||
"alpha": 255
|
||||
},
|
||||
"Brush size": 2,
|
||||
"Rainbow color": false,
|
||||
"Delete mode": false
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"FPS": {
|
||||
"settings": {
|
||||
"Transparency": 255,
|
||||
@ -147,38 +147,6 @@
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Clock": {
|
||||
"settings": {
|
||||
"Transparency": 255,
|
||||
"Static Chroma": false,
|
||||
"Background": true,
|
||||
"Custom Font": false,
|
||||
"Wave Chroma": false,
|
||||
"Color": {
|
||||
"red": 255,
|
||||
"green": 255,
|
||||
"blue": 255,
|
||||
"alpha": 255
|
||||
},
|
||||
"Background Color": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0,
|
||||
"alpha": 150
|
||||
},
|
||||
"Display Mode": "Circle",
|
||||
"Clock Format": "yyyy/MM/dd HH:mm:ss"
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {"time": {
|
||||
"visible": true,
|
||||
"x": 1,
|
||||
"y": 190,
|
||||
"scale": 1
|
||||
}},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Custom Text": {
|
||||
"settings": {
|
||||
"Transparency": 255,
|
||||
@ -211,6 +179,38 @@
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Clock": {
|
||||
"settings": {
|
||||
"Transparency": 255,
|
||||
"Static Chroma": false,
|
||||
"Background": true,
|
||||
"Custom Font": false,
|
||||
"Wave Chroma": false,
|
||||
"Color": {
|
||||
"red": 255,
|
||||
"green": 255,
|
||||
"blue": 255,
|
||||
"alpha": 255
|
||||
},
|
||||
"Background Color": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0,
|
||||
"alpha": 150
|
||||
},
|
||||
"Display Mode": "Circle",
|
||||
"Clock Format": "yyyy/MM/dd HH:mm:ss"
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {"time": {
|
||||
"visible": true,
|
||||
"x": 1,
|
||||
"y": 190,
|
||||
"scale": 1
|
||||
}},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Aim Trainer": {
|
||||
"settings": {
|
||||
"Speed": 1.6,
|
||||
@ -455,8 +455,8 @@
|
||||
"theme": "MOONLIGHT",
|
||||
"Freelook": {
|
||||
"settings": {
|
||||
"Perspective Key": 0,
|
||||
"Require Hold": false
|
||||
"Perspective Key": 56,
|
||||
"Require Hold": true
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
@ -476,6 +476,18 @@
|
||||
"key": 19,
|
||||
"enabled": true
|
||||
}],
|
||||
"Screenshot Uploader": {
|
||||
"settings": {
|
||||
"Delete": true,
|
||||
"Copy": true,
|
||||
"Link": true,
|
||||
"Open": true
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": true
|
||||
},
|
||||
"Coordinates": {
|
||||
"settings": {
|
||||
"Show Compass": true,
|
||||
@ -680,44 +692,6 @@
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Reach Display": {
|
||||
"settings": {
|
||||
"Transparency": 255,
|
||||
"Static Chroma": false,
|
||||
"Background": true,
|
||||
"Custom Font": false,
|
||||
"Wave Chroma": false,
|
||||
"Background Color": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0,
|
||||
"alpha": 150
|
||||
},
|
||||
"Color": {
|
||||
"red": 255,
|
||||
"green": 255,
|
||||
"blue": 255,
|
||||
"alpha": 255
|
||||
},
|
||||
"Display Mode": "Circle"
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {"reachdisplay": {
|
||||
"visible": true,
|
||||
"x": 1,
|
||||
"y": 175,
|
||||
"scale": 1
|
||||
}},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Mouse Delay Fix": {
|
||||
"settings": {},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Test Module": {
|
||||
"settings": {
|
||||
"Color 2": {
|
||||
@ -768,6 +742,44 @@
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Mouse Delay Fix": {
|
||||
"settings": {},
|
||||
"bind": 0,
|
||||
"hud": {},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Reach Display": {
|
||||
"settings": {
|
||||
"Transparency": 255,
|
||||
"Static Chroma": false,
|
||||
"Background": true,
|
||||
"Custom Font": false,
|
||||
"Wave Chroma": false,
|
||||
"Background Color": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0,
|
||||
"alpha": 150
|
||||
},
|
||||
"Color": {
|
||||
"red": 255,
|
||||
"green": 255,
|
||||
"blue": 255,
|
||||
"alpha": 255
|
||||
},
|
||||
"Display Mode": "Circle"
|
||||
},
|
||||
"bind": 0,
|
||||
"hud": {"reachdisplay": {
|
||||
"visible": true,
|
||||
"x": 1,
|
||||
"y": 175,
|
||||
"scale": 1
|
||||
}},
|
||||
"bindtype": "Toggle",
|
||||
"enabled": false
|
||||
},
|
||||
"Motion Blur": {
|
||||
"settings": {"Amount": 1},
|
||||
"bind": 0,
|
||||
|
@ -1 +1 @@
|
||||
[{"name":"etert","uuid":"a12f6b57-b314-305d-a4de-14e5b61e7068","expiresOn":"2023-08-02 23:35:17 +0200"},{"name":"ziue","uuid":"ae330cf9-3749-3ca0-ba31-8447e2a2786f","expiresOn":"2023-08-01 16:58:31 +0200"},{"name":"Player831","uuid":"7daaf105-640b-34bc-83e6-6c045d1c9591","expiresOn":"2023-08-02 17:44:01 +0200"},{"name":"ziue","uuid":"74e89738-6c9e-4f59-83ef-d365849e6049","expiresOn":"2023-08-01 19:27:12 +0200"},{"name":"Player995","uuid":"93bfa0b6-cc14-3c0c-8efa-0bcc48245274","expiresOn":"2023-08-02 16:21:08 +0200"},{"name":"Player119","uuid":"8fbcb74c-bd8d-3181-a022-3c858a10477d","expiresOn":"2023-08-02 10:47:11 +0200"},{"name":"Player665","uuid":"5daba5f8-966b-3165-8089-02aaa9b1e740","expiresOn":"2023-08-02 11:22:29 +0200"},{"name":"Player311","uuid":"d4625839-68ff-34de-8208-19f0e474753e","expiresOn":"2023-08-02 16:20:03 +0200"},{"name":"Player504","uuid":"eb08048d-a3b9-3008-984c-fcc8bb7d8893","expiresOn":"2023-08-02 10:04:23 +0200"}]
|
||||
[{"name":"etert","uuid":"a12f6b57-b314-305d-a4de-14e5b61e7068","expiresOn":"2023-08-03 12:44:46 +0200"},{"name":"Player119","uuid":"8fbcb74c-bd8d-3181-a022-3c858a10477d","expiresOn":"2023-08-02 10:47:11 +0200"},{"name":"ziue","uuid":"ae330cf9-3749-3ca0-ba31-8447e2a2786f","expiresOn":"2023-08-01 16:58:31 +0200"},{"name":"Player995","uuid":"93bfa0b6-cc14-3c0c-8efa-0bcc48245274","expiresOn":"2023-08-02 16:21:08 +0200"},{"name":"Player504","uuid":"eb08048d-a3b9-3008-984c-fcc8bb7d8893","expiresOn":"2023-08-02 10:04:23 +0200"},{"name":"Player665","uuid":"5daba5f8-966b-3165-8089-02aaa9b1e740","expiresOn":"2023-08-02 11:22:29 +0200"},{"name":"Player831","uuid":"7daaf105-640b-34bc-83e6-6c045d1c9591","expiresOn":"2023-08-02 17:44:01 +0200"},{"name":"ziue","uuid":"74e89738-6c9e-4f59-83ef-d365849e6049","expiresOn":"2023-08-01 19:27:12 +0200"},{"name":"Player311","uuid":"d4625839-68ff-34de-8208-19f0e474753e","expiresOn":"2023-08-02 16:20:03 +0200"}]
|
Loading…
Reference in New Issue
Block a user