diff --git a/README.md b/README.md
index c0b82b3..53b9c0d 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,30 @@
+
+[](https://discord.gg/AdFEggFXfW)
+
# Infinity Loop Client

-~~Everything is CUSTOM!!~~
+## Info:
+- Minecraft version: forge 1.12.2
+- Client version: v6.9.4.20
+- Default ClickGui keybind - **"P"**
+- Default prefix - **"."**
+
+## Showcase:
+
+ Images
+
+ 
+
+ 
+
+
+
+## A couple of words to say:
-### **Very good client**
+- This is oyvey paste, meme mod was made by me(**Kuro_Here**).
+- 90% code is from other opensrc mod.
+- Don't expect too much from this mod.
-only make render module!
\ No newline at end of file
+`fck u guys`
diff --git a/build.gradle b/build.gradle
index 8ca7feb..38a9ccf 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,50 +1,50 @@
buildscript {
repositories {
+ mavenCentral()
jcenter()
- maven { url = "https://files.minecraftforge.net/maven" }
- maven { url = "https://repo.spongepowered.org/maven" }
+ maven {
+ name = "lukflug"
+ url = "https://lukflug.github.io/maven/"
+ }
+ maven {
+ name = 'forge'
+ url = 'https://files.minecraftforge.net/maven'
+ }
+ maven {
+ name = 'SpongePowered'
+ url = 'https://repo.spongepowered.org/repository/maven-public'
+ }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
- classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3'
- classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: "${kotlin_version}"
+ classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
+ classpath 'com.peterabeles.gversion:com.peterabeles.gversion.gradle.plugin:1.5.0'
}
}
-apply plugin: 'kotlin'
+
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'com.github.johnrengelman.shadow'
+apply plugin: 'com.peterabeles.gversion'
apply plugin: 'java'
compileJava.options.encoding = 'UTF-8'
version project.modVersion
group project.modGroup //http://maven.apache.org/guides/mini/guide-naming-conventions.html
-archivesBaseName = "loop"
+archivesBaseName = "infinityloop"
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
-compileKotlin {
- kotlinOptions {
- jvmTarget = "1.8"
- }
-}
-
-compileTestKotlin {
- kotlinOptions {
- jvmTarget = "1.8"
- }
-}
-
minecraft {
- version = '1.12.2-14.23.5.2847'
+ version = project.forgeVersion
runDir = 'run'
- mappings = 'stable_39'
- coreMod = 'com.me.infinity.loop.mixin.LoopMixinLoader'
+ mappings = project.mcpVersion
+ coreMod = 'infinityloop.mixin.LoopMixinLoader'
makeObfSourceJar = false
}
@@ -85,14 +85,6 @@ dependencies {
compile 'com.github.ionar2:Alpine:1.9f'
compile 'club.minnced:java-discord-rpc:2.0.2'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
-
- compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version
- compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk7", version: kotlin_version
- compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: kotlin_version
- compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: kotlin_version
-
- compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-core", version: coroutines_version
- compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-jdk8", version: coroutines_version
}
processResources {
@@ -115,13 +107,7 @@ shadowJar {
include(dependency('club.minnced:java-discord-rpc'))
include(dependency('com.googlecode.json-simple:json-simple:1.1.1'))
include(dependency('org.spongepowered:mixin'))
- include(dependency("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"))
- include(dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"))
- include(dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"))
- include(dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"))
include(dependency("org.jetbrains:annotations:${annotations_version}"))
- include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}"))
- include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}"))
}
exclude 'dummyThing'
exclude 'LICENSE.txt'
@@ -130,7 +116,7 @@ shadowJar {
mixin {
defaultObfuscationEnv searge
- add sourceSets.main, 'mixins.loop.refmap.json'
+ add sourceSets.main, 'mixins.infinityloop.refmap.json'
}
@@ -144,11 +130,11 @@ reobf {
jar {
manifest {
attributes(
- 'MixinConfigs': 'mixins.loop.json',
+ 'MixinConfigs': 'mixins.infinityloop.json',
'tweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'TweakOrder': 0,
'FMLCorePluginContainsFMLMod': 'true',
- 'FMLCorePlugin': 'com.me.infinity.loop.mixin.LoopMixinLoader',
+ 'FMLCorePlugin': 'infinityloop.mixin.LoopMixinLoader',
'ForceLoadAsMod': 'true',
'FMLAT': 'loop_at.cfg'
)
diff --git a/src/main/java/com/me/infinity/loop/event/Event.java b/src/main/java/com/me/infinity/loop/event/Event.java
deleted file mode 100644
index e06b875..0000000
--- a/src/main/java/com/me/infinity/loop/event/Event.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.me.infinity.loop.event;
-
-public abstract class Event
- extends net.minecraftforge.fml.common.eventhandler.Event {
- private boolean cancelled;
- private Stage stage;
-
- public Event() {
- }
-
- public Event(Stage stage) {
- this.stage = stage;
- }
-
- public Stage getStage() {
- return this.stage;
- }
-
- public boolean isCancelled() {
- return this.cancelled;
- }
-
- public void setCancelled(final boolean cancel) {
- this.cancelled = cancel;
- }
-
- public boolean isPre() {
- return this.stage == Stage.PRE;
- }
-
- public boolean isPost() {
- return this.stage == Stage.POST;
- }
-
- public static enum Stage {
- PRE,
- POST
-
- }
-
-}
-
diff --git a/src/main/java/com/me/infinity/loop/event/events/network/EventDeath.java b/src/main/java/com/me/infinity/loop/event/events/network/EventDeath.java
deleted file mode 100644
index ac81c03..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/network/EventDeath.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.me.infinity.loop.event.events.network;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.entity.player.EntityPlayer;
-
-public class EventDeath
- extends Event {
- public EntityPlayer player;
-
- public EventDeath(EntityPlayer player) {
- this.player = player;
- }
-}
-
diff --git a/src/main/java/com/me/infinity/loop/event/events/network/EventPacket.java b/src/main/java/com/me/infinity/loop/event/events/network/EventPacket.java
deleted file mode 100644
index e23d75f..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/network/EventPacket.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.me.infinity.loop.event.events.network;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.network.Packet;
-
-public class EventPacket
- extends Event {
- public Packet packet;
-
- public EventPacket(Event.Stage stage, Packet packet) {
- super(stage);
- this.packet = packet;
- }
- public void setPacket(final Packet packet) {
- this.packet = packet;
- }
-
-
- public Packet getPacket() {
- return this.packet;
- }
-
- public static class Receive
- extends EventPacket {
- public Receive(Event.Stage stage, Packet packet) {
- super(stage, packet);
- }
- }
-
- public static class Send
- extends EventPacket {
- public Send(Event.Stage stage, Packet packet) {
- super(stage, packet);
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/me/infinity/loop/event/events/network/EventReceivePacket.java b/src/main/java/com/me/infinity/loop/event/events/network/EventReceivePacket.java
deleted file mode 100644
index 8feff99..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/network/EventReceivePacket.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.me.infinity.loop.event.events.network;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.network.Packet;
-
-public class EventReceivePacket
- extends Event {
- private Packet packet;
-
- public EventReceivePacket(Packet packet) {
- this.packet = packet;
- }
-
- public Packet getPacket() {
- return this.packet;
- }
-
- public void setPacket(Packet packet) {
- this.packet = packet;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/network/StepEvent.java b/src/main/java/com/me/infinity/loop/event/events/network/StepEvent.java
deleted file mode 100644
index a208ad2..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/network/StepEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.me.infinity.loop.event.events.network;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.entity.Entity;
-import net.minecraftforge.fml.common.eventhandler.Cancelable;
-
-@Cancelable
-public class StepEvent
- extends Event {
- private final Entity entity;
- private float height;
-
- public StepEvent(Stage stage, Entity entity) {
- super(stage);
- this.entity = entity;
- this.height = entity.stepHeight;
- }
-
- public Entity getEntity() {
- return this.entity;
- }
-
- public float getHeight() {
- return this.height;
- }
-
- public void setHeight(float height) {
- this.height = height;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/player/EventEntityMove.java b/src/main/java/com/me/infinity/loop/event/events/player/EventEntityMove.java
deleted file mode 100644
index 21e54c7..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/player/EventEntityMove.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.me.infinity.loop.event.events.player;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.util.math.Vec3d;
-import net.minecraftforge.fml.common.eventhandler.Event;
-
-public class EventEntityMove extends Event {
- private Entity ctx;
- private Vec3d from;
-
- public EventEntityMove(Entity ctx, Vec3d from) {
- this.ctx = ctx;
- this.from = from;
- }
-
- public Vec3d from() {
- return this.from;
- }
-
- public Entity ctx() {
- return this.ctx;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/player/EventKey.java b/src/main/java/com/me/infinity/loop/event/events/player/EventKey.java
deleted file mode 100644
index b296e19..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/player/EventKey.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.me.infinity.loop.event.events.player;
-
-import com.me.infinity.loop.event.Event;
-
-public class EventKey
- extends Event {
- public boolean info;
- public boolean pressed;
-
- public EventKey(boolean info, boolean pressed) {
- this.info = info;
- this.pressed = pressed;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/player/EventMotionUpdate.java b/src/main/java/com/me/infinity/loop/event/events/player/EventMotionUpdate.java
deleted file mode 100644
index 5b38578..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/player/EventMotionUpdate.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.me.infinity.loop.event.events.player;
-
-import com.me.infinity.loop.event.Event;
-
-public class EventMotionUpdate
- extends Event {
- public EventMotionUpdate(Stage stage) {
- super(stage);
- }
-}
-
diff --git a/src/main/java/com/me/infinity/loop/event/events/player/EventPlayerMove.java b/src/main/java/com/me/infinity/loop/event/events/player/EventPlayerMove.java
deleted file mode 100644
index eae1def..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/player/EventPlayerMove.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.me.infinity.loop.event.events.player;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.entity.MoverType;
-
-public class EventPlayerMove extends Event {
- public MoverType type;
- public double x;
- public double y;
- public double z;
-
- public EventPlayerMove(MoverType type, double x, double y, double z) {
- this.type = type;
- this.x = x;
- this.y = y;
- this.z = z;
- }
-
- public void setType(final MoverType type) {
- this.type = type;
- }
-
- public void setX(final double x) {
- this.x = x;
- }
-
- public void setY(final double y) {
- this.y = y;
- }
-
- public void setZ(final double z) {
- this.z = z;
- }
-
- public MoverType getType() {
- return this.type;
- }
-
- public double getX() {
- return this.x;
- }
-
- public double getY() {
- return this.y;
- }
-
- public double getZ() {
- return this.z;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/me/infinity/loop/event/events/player/EventPlayerUpdate.java b/src/main/java/com/me/infinity/loop/event/events/player/EventPlayerUpdate.java
deleted file mode 100644
index ebe9f33..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/player/EventPlayerUpdate.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.me.infinity.loop.event.events.player;
-
-
-import com.me.infinity.loop.event.Event;
-public class EventPlayerUpdate
- extends Event {
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/player/TransformFirstPersonEvent.java b/src/main/java/com/me/infinity/loop/event/events/player/TransformFirstPersonEvent.java
deleted file mode 100644
index e2f57dc..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/player/TransformFirstPersonEvent.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.me.infinity.loop.event.events.player;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.util.EnumHandSide;
-
-public class TransformFirstPersonEvent extends Event
-{
- private final EnumHandSide enumHandSide;
-
- public TransformFirstPersonEvent(final Stage stage, final EnumHandSide enumHandSide) {
- super(stage);
- this.enumHandSide = enumHandSide;
- }
-
- public EnumHandSide getEnumHandSide() {
- return this.enumHandSide;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/render/EventBlockRender.java b/src/main/java/com/me/infinity/loop/event/events/render/EventBlockRender.java
deleted file mode 100644
index 3dd8b18..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/render/EventBlockRender.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.me.infinity.loop.event.events.render;
-
-import net.minecraft.block.Block;
-import net.minecraft.util.math.BlockPos;
-import net.minecraftforge.fml.common.eventhandler.Cancelable;
-import net.minecraftforge.fml.common.eventhandler.Event;
-
-@Cancelable
-public class EventBlockRender extends Event {
- private Block block;
- private BlockPos pos;
-
- public EventBlockRender(Block block, BlockPos pos) {
- this.block = block;
- this.pos = pos;
- }
-
- public Block getBlock() {
- return block;
- }
-
- public BlockPos getPos() {
- return pos;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/render/PerspectiveEvent.java b/src/main/java/com/me/infinity/loop/event/events/render/PerspectiveEvent.java
deleted file mode 100644
index ea226fb..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/render/PerspectiveEvent.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.me.infinity.loop.event.events.render;
-
-import com.me.infinity.loop.event.Event;
-
-public class PerspectiveEvent extends Event
-{
- private float aspect;
-
- public PerspectiveEvent(final float aspect) {
- this.aspect = aspect;
- }
-
- public float getAspect() {
- return this.aspect;
- }
-
- public void setAspect(final float aspect) {
- this.aspect = aspect;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/render/PreRenderEvent.java b/src/main/java/com/me/infinity/loop/event/events/render/PreRenderEvent.java
deleted file mode 100644
index 9538251..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/render/PreRenderEvent.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.me.infinity.loop.event.events.render;
-
-import net.minecraftforge.fml.common.eventhandler.Event;
-
-public class PreRenderEvent extends Event {
-
-
- private final float partialTicks;
-
- public PreRenderEvent(float partialTicks) {
- this.partialTicks = partialTicks;
- }
-
- public float getPartialTicks() {
- return this.partialTicks;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/render/RenderEvent.java b/src/main/java/com/me/infinity/loop/event/events/render/RenderEvent.java
deleted file mode 100644
index a42ac9b..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/render/RenderEvent.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.me.infinity.loop.event.events.render;
-
-import com.me.infinity.loop.event.Event;
-
-public class RenderEvent extends Event {
-
- private final float partialTicks;
-
- public RenderEvent(float partialTicks) {
- super();
- this.partialTicks = partialTicks;
- }
-
- public float getPartialTicks() {
- return this.partialTicks;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/world/DrawBlockDamageEvent.java b/src/main/java/com/me/infinity/loop/event/events/world/DrawBlockDamageEvent.java
deleted file mode 100644
index bdbfeb3..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/world/DrawBlockDamageEvent.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.me.infinity.loop.event.events.world;
-
-import com.me.infinity.loop.event.Event;
-
-public class DrawBlockDamageEvent extends Event {
- //What do you expect to find here?
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/world/EventBlock.java b/src/main/java/com/me/infinity/loop/event/events/world/EventBlock.java
deleted file mode 100644
index 6aaf48d..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/world/EventBlock.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.me.infinity.loop.event.events.world;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.math.BlockPos;
-
-public class EventBlock
- extends Event {
- public BlockPos pos;
- public EnumFacing facing;
-
- public EventBlock(BlockPos pos, EnumFacing facing) {
- this.pos = pos;
- this.facing = facing;
- }
-
- public BlockPos getPos() {
- return this.pos;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/event/events/world/EventClickBlock.java b/src/main/java/com/me/infinity/loop/event/events/world/EventClickBlock.java
deleted file mode 100644
index 7206f67..0000000
--- a/src/main/java/com/me/infinity/loop/event/events/world/EventClickBlock.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.me.infinity.loop.event.events.world;
-
-import com.me.infinity.loop.event.Event;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.math.BlockPos;
-
-public class EventClickBlock
- extends Event {
- public BlockPos pos;
- public EnumFacing facing;
-
- public EventClickBlock(BlockPos pos, EnumFacing facing) {
- this.pos = pos;
- this.facing = facing;
- }
-
- public BlockPos getPos() {
- return this.pos;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/features/command/commands/SearchCommand.java b/src/main/java/com/me/infinity/loop/features/command/commands/SearchCommand.java
deleted file mode 100644
index 13d0872..0000000
--- a/src/main/java/com/me/infinity/loop/features/command/commands/SearchCommand.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.me.infinity.loop.features.command.commands;
-
-import com.me.infinity.loop.features.command.Command;
-import com.me.infinity.loop.features.modules.render.Search;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.Block;
-import net.minecraft.util.ResourceLocation;
-
-public class SearchCommand extends Command {
-
- public SearchCommand() {
- super("search");
- }
-
- @Override
- public void execute(String[] commands) {
- if (commands.length == 1) {
- if (Search.defaultBlocks.isEmpty()) {
- sendMessage("Search list empty");
- } else {
- String f = "Search list: ";
- for (Block name : Search.defaultBlocks) {
- try {
- f = f + name.getRegistryName() + ", ";
- } catch (Exception exception) {
- }
- }
- sendMessage(f);
- }
- return;
- }
- if (commands.length == 2) {
- if ("reset".equals(commands[0])) {
- Search.defaultBlocks.clear();
- sendMessage("Search got reset.");
- mc.renderGlobal.loadRenderers();
- return;
- }
- return;
- }
-
- if (commands.length >= 2) {
- switch (commands[0]) {
- case "add": {
- Search.defaultBlocks.add(getRegisteredBlock(commands[1]));
- sendMessage(ChatFormatting.GREEN + commands[1] + " added to search");
- mc.renderGlobal.loadRenderers();
- return;
- }
- case "del": {
- Search.defaultBlocks.remove(getRegisteredBlock(commands[1]));
- sendMessage(ChatFormatting.RED + commands[1] + " removed from search");
- mc.renderGlobal.loadRenderers();
- return;
- }
- }
- sendMessage("Unknown Command, try search add/del ");
- }
-
- }
-
- private static Block getRegisteredBlock(String blockName) {
- return (Block)Block.REGISTRY.getObject(new ResourceLocation(blockName));
- }
-}
-
diff --git a/src/main/java/com/me/infinity/loop/features/command/commands/loginCommand.java b/src/main/java/com/me/infinity/loop/features/command/commands/loginCommand.java
deleted file mode 100644
index d6731cd..0000000
--- a/src/main/java/com/me/infinity/loop/features/command/commands/loginCommand.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.me.infinity.loop.features.command.commands;
-
-import com.me.infinity.loop.features.command.Command;
-import com.me.infinity.loop.util.utils.Util;
-import net.minecraft.client.Minecraft;
-import net.minecraft.util.Session;
-
-import java.lang.reflect.Field;
-
-public class loginCommand extends Command {
-
- public loginCommand() {
- super("login");
- }
-
- @Override
- public void execute(String[] var1) {
- try {
- login(var1[0]);
- Command.sendMessage("\n" + "Account changed to: " + Util.mc.getSession().getUsername());
- }
- catch (Exception exception) {
- Command.sendMessage("Usage: .login nick");
- }
- }
-
-
- public static void login(String string) {
- try {
- Field field = Minecraft.class.getDeclaredField("field_71449_j"); //session
- field.setAccessible(true);
- Field field2 = Field.class.getDeclaredField("modifiers");
- field2.setAccessible(true);
- field2.setInt(field, field.getModifiers() & 0xFFFFFFEF);
- field.set(Util.mc, new Session(string, "", "", "mojang"));
- }
- catch (Exception exception) {
- Command.sendMessage("Wrong name! " + exception);
- }
- }
-
-}
diff --git a/src/main/java/com/me/infinity/loop/features/csgui/CSClickGui.java b/src/main/java/com/me/infinity/loop/features/csgui/CSClickGui.java
deleted file mode 100644
index 1d1a464..0000000
--- a/src/main/java/com/me/infinity/loop/features/csgui/CSClickGui.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package com.me.infinity.loop.features.csgui;
-
-import com.me.infinity.loop.InfinityLoop;
-import com.me.infinity.loop.features.Feature;
-import com.me.infinity.loop.features.gui.components.Component;
-import com.me.infinity.loop.features.gui.components.items.Item;
-import com.me.infinity.loop.features.gui.components.items.buttons.ModuleButton;
-import com.me.infinity.loop.features.modules.Module;
-import com.me.infinity.loop.features.modules.ModuleCategory;
-import com.me.infinity.loop.features.modules.client.CSGui;
-import com.me.infinity.loop.util.utils.renders.ColorUtil;
-import com.me.infinity.loop.util.utils.renders.RenderUtil;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.gui.ScaledResolution;
-import org.lwjgl.input.Mouse;
-
-import java.awt.*;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Comparator;
-
-public class CSClickGui
- extends GuiScreen {
- private static CSClickGui INSTANCE;
- private int color;
- public boolean drag;
- private int x;
- private int y;
- private int x2;
- private int y2;
-
- static {
- INSTANCE = new CSClickGui();
- }
-
- private final ArrayList components = new ArrayList();
-
- public CSClickGui() {
- this.setInstance();
- this.load();
- }
-
- public static CSClickGui getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new CSClickGui();
- }
- return INSTANCE;
- }
-
- public static CSClickGui getCSGui() {
- return CSClickGui.getInstance();
- }
-
- private void setInstance() {
- INSTANCE = this;
- }
-
- private void load() {
- int x = -85;
- for (final ModuleCategory category : InfinityLoop.moduleManager.getCategories()) {
- this.components.add(new Component(category.getName(), x += 92, 27, true) {
-
- @Override
- public void setupItems() {
- InfinityLoop.moduleManager.getModulesByCategory(category).forEach(module -> {
- if (!module.hidden) {
- this.addButton(new ModuleButton(module));
- }
- });
- }
- });
- }
- this.components.forEach(components -> components.getItems().sort(Comparator.comparing(Feature::getName)));
- }
-
- public void updateModule(final Module module) {
- for (final Component component : this.components) {
- for (final Item item : component.getItems()) {
- if (item instanceof ModuleButton) {
- final ModuleButton button = (ModuleButton) item;
- final Module mod = button.getModule();
- if (module != null && module.equals(mod)) {
- button.initSettings();
- break;
- }
- }
- }
- }
- }
-
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- this.checkMouseWheel();
- final ScaledResolution sr = new ScaledResolution(this.mc);
- if (CSGui.getInstance().background.getValue()) {
- if (CSGui.getInstance().dark.getValue()) {
- this.drawDefaultBackground();
- }
- if (CSGui.getInstance().gradiant.getValue()) {
- this.drawGradientRect(0, 0, sr.getScaledWidth(), sr.getScaledHeight() + CSGui.getInstance().gradiantHeight.getValue(), 0, new Color(CSGui.getInstance().red.getValue(), CSGui.getInstance().green.getValue(), CSGui.getInstance().blue.getValue(), CSGui.getInstance().hoverAlpha.getValue() / 2).getRGB());
- if (CSGui.getInstance().gradiant.getValue() || CSGui.getInstance().rainbow.getValue()) {
- this.drawGradientRect(0, 0, sr.getScaledWidth(), sr.getScaledHeight() + CSGui.getInstance().gradiantHeight.getValue().intValue(), 0, (CSGui.getInstance()).rainbow.getValue().booleanValue() ? (((CSGui.getInstance()).rainbowModeA.getValue() == CSGui.rainbowModeArray.Up) ? ColorUtil.rainbow((CSGui.getInstance()).rainbowHue.getValue().intValue()).getRGB() : ColorUtil.rainbow((CSGui.getInstance()).rainbowHue.getValue().intValue(), CSGui.getInstance().hoverAlpha.getValue()).getRGB()) : this.color);
- }
- }
- if (CSGui.getInstance().blur.getValue()) {
- RenderUtil.drawBlurryRect(0, 0, sr.getScaledWidth(), sr.getScaledHeight(), CSGui.getInstance().blurAmount.getValue(), CSGui.getInstance().blurSize.getValue());
- }
- }
- this.components.forEach(components -> components.drawScreen(mouseX, mouseY, partialTicks));
- }
-
- public void mouseClicked(int mouseX, int mouseY, int clickedButton) {
- this.components.forEach(components -> components.mouseClicked(mouseX, mouseY, clickedButton));
- }
-
- public void mouseReleased(int mouseX, int mouseY, int releaseButton) {
- this.components.forEach(components -> components.mouseReleased(mouseX, mouseY, releaseButton));
- }
-
- public boolean doesGuiPauseGame() {
- return false;
- }
-
- public final ArrayList getComponents() {
- return this.components;
- }
-
- public void checkMouseWheel() {
- int dWheel = Mouse.getDWheel();
- if (dWheel < 0) {
- this.components.forEach(component -> component.setY(component.getY() - 10));
- } else if (dWheel > 0) {
- this.components.forEach(component -> component.setY(component.getY() + 10));
- }
- }
-
- public int getTextOffset() {
- return -6;
- }
-
- public Component getComponentByName(String name) {
- for (Component component : this.components) {
- if (!component.getName().equalsIgnoreCase(name)) continue;
- return component;
- }
- return null;
- }
-
- public void keyTyped(char typedChar, int keyCode) throws IOException {
- super.keyTyped(typedChar, keyCode);
- this.components.forEach(component -> component.onKeyTyped(typedChar, keyCode));
- }
-
- static {
- CSClickGui.INSTANCE = new CSClickGui();
- }
-}
-
-
diff --git a/src/main/java/com/me/infinity/loop/features/csgui/components/CSComponent.java b/src/main/java/com/me/infinity/loop/features/csgui/components/CSComponent.java
deleted file mode 100644
index acfbe11..0000000
--- a/src/main/java/com/me/infinity/loop/features/csgui/components/CSComponent.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package com.me.infinity.loop.features.csgui.components;
-
-import com.me.infinity.loop.InfinityLoop;
-import com.me.infinity.loop.features.Feature;
-import com.me.infinity.loop.features.csgui.CSClickGui;
-import com.me.infinity.loop.features.gui.components.items.Item;
-import com.me.infinity.loop.features.gui.components.items.buttons.Button;
-import com.me.infinity.loop.features.modules.client.CSGui;
-import com.me.infinity.loop.features.modules.client.Colors;
-import com.me.infinity.loop.util.utils.renders.ColorUtil;
-import com.me.infinity.loop.util.utils.renders.RenderUtil;
-import net.minecraft.client.audio.PositionedSoundRecord;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.init.SoundEvents;
-
-import java.awt.*;
-import java.util.ArrayList;
-
-public class CSComponent
- extends Feature {
- public static int[] counter1 = new int[]{1};
- private final ArrayList- items = new ArrayList();
- public boolean drag;
- private int x;
- private int y;
- private int x2;
- private int y2;
- private int width;
- private int height;
- private boolean open;
- private boolean hidden = false;
-
-
- public CSComponent(String name, int x, int y, boolean open) {
- super(name);
- this.x = x;
- this.y = y;
- this.width = 88;
- this.height = 18;
- this.open = open;
- this.setupItems();
- }
-
- public void setupItems() {
- }
-
- private void drag(int mouseX, int mouseY) {
- if (!this.drag) {
- return;
- }
- this.x = this.x2 + mouseX;
- this.y = this.y2 + mouseY;
- }
-
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- this.drag(mouseX, mouseY);
- float totalItemHeight = this.open ? this.getTotalItemHeight() - 2.0f : 0.0f;
- int color = ColorUtil.toARGB(CSGui.getInstance().topRed.getValue(), CSGui.getInstance().topGreen.getValue(), CSGui.getInstance().topBlue.getValue(), 255);
- Gui.drawRect(this.x, this.y + height + 2, this.x + this.width, this.y + this.height - 6, new Color(0xFFFFFF).getRGB());
- Gui.drawRect(this.x, this.y - 1, this.x + this.width, this.y + this.height - 7, Colors.getInstance().rainbow.getValue() ? ColorUtil.rainbow(Colors.getInstance().rainbowHue.getValue()).getRGB() : color);
- Gui.drawRect(this.x, this.y + height - 5, this.x + this.width, this.y + this.height - 6, new Color(0xFFFFFF).getRGB());
- InfinityLoop.textManager.drawStringWithShadow(this.getName(), (float) this.x + 3.0f, (float) this.y - 4.0f - (float) CSClickGui.getCSGui().getTextOffset(), -1);
- if (this.open) {
- RenderUtil.drawRect(this.x, (float) this.y + 12.5f, this.x + this.width, (float) (this.y + this.height) + totalItemHeight, 0x77000000);
- float y = (float) (this.getY() + this.getHeight()) - 3.0f;
- for (Item item : this.getItems()) {
- CSComponent.counter1[0] = counter1[0] + 1;
- if (item.isHidden()) continue;
- item.setLocation((float) this.x + 2.0f, y);
- item.setWidth(this.getWidth() - 4);
- item.drawScreen(mouseX, mouseY, partialTicks);
- y += (float) item.getHeight() + 1.5f;
- }
- }
- }
-
- public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
- if (mouseButton == 0 && this.isHovering(mouseX, mouseY)) {
- this.x2 = this.x - mouseX;
- this.y2 = this.y - mouseY;
- CSClickGui.getCSGui().getComponents().forEach(component -> {
- if (component.drag) {
- component.drag = false;
- }
- });
- this.drag = true;
- return;
- }
- if (mouseButton == 1 && this.isHovering(mouseX, mouseY)) {
- this.open = !this.open;
- mc.getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0f));
- return;
- }
- if (!this.open) {
- return;
- }
- this.getItems().forEach(item -> item.mouseClicked(mouseX, mouseY, mouseButton));
- }
-
- public void mouseReleased(int mouseX, int mouseY, int releaseButton) {
- if (releaseButton == 0) {
- this.drag = false;
- }
- if (!this.open) {
- return;
- }
- this.getItems().forEach(item -> item.mouseReleased(mouseX, mouseY, releaseButton));
- }
-
- public void onKeyTyped(char typedChar, int keyCode) {
- if (!this.open) {
- return;
- }
- this.getItems().forEach(item -> item.onKeyTyped(typedChar, keyCode));
- }
-
- public void addButton(Button button) {
- this.items.add(button);
- }
-
- public int getX() {
- return this.x;
- }
-
- public void setX(int x) {
- this.x = x;
- }
-
- public int getY() {
- return this.y;
- }
-
- public void setY(int y) {
- this.y = y;
- }
-
- public int getWidth() {
- return this.width;
- }
-
- public void setWidth(int width) {
- this.width = width;
- }
-
- public int getHeight() {
- return this.height;
- }
-
- public void setHeight(int height) {
- this.height = height;
- }
-
- public boolean isHidden() {
- return this.hidden;
- }
-
- public void setHidden(boolean hidden) {
- this.hidden = hidden;
- }
-
- public boolean isOpen() {
- return this.open;
- }
-
- public final ArrayList
- getItems() {
- return this.items;
- }
-
- private boolean isHovering(int mouseX, int mouseY) {
- return mouseX >= this.getX() && mouseX <= this.getX() + this.getWidth() && mouseY >= this.getY() && mouseY <= this.getY() + this.getHeight() - (this.open ? 2 : 0);
- }
-
- private float getTotalItemHeight() {
- float height = 0.0f;
- for (Item item : this.getItems()) {
- height += (float) item.getHeight() + 1.5f;
- }
- return height;
- }
- }
diff --git a/src/main/java/com/me/infinity/loop/features/csgui/components/items/Item.java b/src/main/java/com/me/infinity/loop/features/csgui/components/items/Item.java
deleted file mode 100644
index e1ac38b..0000000
--- a/src/main/java/com/me/infinity/loop/features/csgui/components/items/Item.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package com.me.infinity.loop.features.csgui.components.items;
-
-public class Item {
-}
diff --git a/src/main/java/com/me/infinity/loop/features/csgui/components/items/buttons/ColorPicker.java b/src/main/java/com/me/infinity/loop/features/csgui/components/items/buttons/ColorPicker.java
deleted file mode 100644
index 7e21a60..0000000
--- a/src/main/java/com/me/infinity/loop/features/csgui/components/items/buttons/ColorPicker.java
+++ /dev/null
@@ -1,248 +0,0 @@
-package com.me.infinity.loop.features.csgui.components.items.buttons;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.GuiScreen;
-import org.lwjgl.input.Keyboard;
-import org.lwjgl.opengl.GL11;
-
-import java.awt.*;
-import java.io.IOException;
-
-public class ColorPicker extends GuiScreen {
-
- private final float[] color;
- private boolean pickingColor;
- private boolean pickingHue;
- private boolean pickingAlpha;
- private int pickerX, pickerY, pickerWidth, pickerHeight;
- private int hueSliderX, hueSliderY, hueSliderWidth, hueSliderHeight;
- private int alphaSliderX, alphaSliderY, alphaSliderWidth, alphaSliderHeight;
- private float rainbowSpeed = 20.0f;
- private boolean rainbowState = false;
-
- public ColorPicker() {
- this.color = new float[] {0.4f, 1.0f, 1.0f, 1.0f};
- this.pickingColor = false;
- }
-
- @Override
- public void initGui() {
- this.pickerWidth = 120;
- this.pickerHeight = 100;
- this.pickerX = this.width / 2 - pickerWidth/2;
- this.pickerY = this.height / 2 - pickerHeight/2;
- this.hueSliderX = pickerX;
- this.hueSliderY = pickerY + pickerHeight + 6;
- this.hueSliderWidth = pickerWidth;
- this.hueSliderHeight = 10;
- this.alphaSliderX = pickerX + pickerWidth + 6;
- this.alphaSliderY = pickerY;
- this.alphaSliderWidth = 10;
- this.alphaSliderHeight = pickerHeight;
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- if (this.rainbowState) {
- double rainbowState = Math.ceil((System.currentTimeMillis() + 200) / 20.0);
- rainbowState %= 360.0;
- this.color[0] = (float) (rainbowState / 360.0);
- }
- this.drawDefaultBackground();
- if (this.pickingHue) {
- if (this.hueSliderWidth > this.hueSliderHeight) {
- float restrictedX = (float) Math.min(Math.max(hueSliderX, mouseX), hueSliderX + hueSliderWidth);
- this.color[0] = (restrictedX - (float) hueSliderX) / hueSliderWidth;
- } else {
- float restrictedY = (float) Math.min(Math.max(hueSliderY, mouseY), hueSliderY + hueSliderHeight);
- this.color[0] = (restrictedY - (float) hueSliderY) / hueSliderHeight;
- }
- }
- if (this.pickingAlpha) {
- if (this.alphaSliderWidth > this.alphaSliderHeight) {
- float restrictedX = (float) Math.min(Math.max(alphaSliderX, mouseX), alphaSliderX + alphaSliderWidth);
- this.color[3] = 1 - (restrictedX - (float) alphaSliderX) / alphaSliderWidth;
- } else {
- float restrictedY = (float) Math.min(Math.max(alphaSliderY, mouseY), alphaSliderY + alphaSliderHeight);
- this.color[3] = 1 - (restrictedY - (float) alphaSliderY) / alphaSliderHeight;
- }
- }
- if (this.pickingColor) {
- float restrictedX = (float) Math.min(Math.max(pickerX, mouseX), pickerX + pickerWidth);
- float restrictedY = (float) Math.min(Math.max(pickerY, mouseY), pickerY + pickerHeight);
- this.color[1] = (restrictedX - (float) pickerX) / pickerWidth;
- this.color[2] = 1 - (restrictedY - (float) pickerY) / pickerHeight;
- }
- int selectedX = pickerX + pickerWidth + 6;
- int selectedY = pickerY + pickerHeight + 6;
- int selectedWidth = 10;
- int selectedHeight = 10;
- Gui.drawRect(pickerX - 2, pickerY - 2, pickerX + pickerWidth + 2, pickerY + pickerHeight + 2, 0xFC000000);
- Gui.drawRect(hueSliderX - 2, hueSliderY - 2, hueSliderX + hueSliderWidth + 2, hueSliderY + hueSliderHeight + 2, 0xFC000000);
- Gui.drawRect(alphaSliderX - 2, alphaSliderY - 2, alphaSliderX + alphaSliderWidth + 2, alphaSliderY + alphaSliderHeight + 2, 0xFC000000);
- int selectedColor = Color.HSBtoRGB(this.color[0], 1.0f, 1.0f);
- float selectedRed = (selectedColor >> 16 & 0xFF) / 255.0f;
- float selectedGreen = (selectedColor >> 8 & 0xFF) / 255.0f;
- float selectedBlue = (selectedColor & 0xFF) / 255.0f;
- this.drawPickerBase(pickerX, pickerY, pickerWidth, pickerHeight, selectedRed, selectedGreen, selectedBlue, this.color[3]);
- this.drawHueSlider(hueSliderX, hueSliderY, hueSliderWidth, hueSliderHeight, this.color[0]);
- this.drawAlphaSlider(alphaSliderX, alphaSliderY, alphaSliderWidth, alphaSliderHeight, selectedRed, selectedGreen, selectedBlue, this.color[3]);
- final int selectedColorFinal = alpha(new Color(Color.HSBtoRGB(this.color[0], this.color[1], this.color[2])), this.color[3]);
- Gui.drawRect(selectedX - 2, selectedY - 2, selectedX + selectedWidth + 2, selectedY + selectedHeight + 2, 0xFC000000);
- Gui.drawRect(selectedX, selectedY, selectedX + selectedWidth, selectedY + selectedHeight, selectedColorFinal);
- {
- final int cursorX = (int) (pickerX + color[1]*pickerWidth);
- final int cursorY = (int) ((pickerY + pickerHeight) - color[2]*pickerHeight);
- Gui.drawRect(cursorX - 2, cursorY - 2, cursorX + 2, cursorY + 2, -1);
- }
-// for (int i = 1; i < pickerHeight/10; i++) {
-// Gui.drawRect(selectedX - 2, pickerY + i * 14, selectedX + 12, pickerY + i * 14, 0xFC000000);
-// }
- }
-
- final int alpha(Color color, float alpha) {
- final float red = (float) color.getRed() / 255;
- final float green = (float) color.getGreen() / 255;
- final float blue = (float) color.getBlue() / 255;
- return new Color(red, green, blue, alpha).getRGB();
- }
-
- @Override
- protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
- this.pickingColor = check(pickerX, pickerY, pickerX + pickerWidth, pickerY + pickerHeight, mouseX, mouseY);
- this.pickingHue = check(hueSliderX, hueSliderY, hueSliderX + hueSliderWidth, hueSliderY + hueSliderHeight, mouseX, mouseY);
- this.pickingAlpha = check(alphaSliderX, alphaSliderY, alphaSliderX + alphaSliderWidth, alphaSliderY + alphaSliderHeight, mouseX, mouseY);
- }
-
- @Override
- protected void mouseReleased(int mouseX, int mouseY, int state) {
- this.pickingColor = this.pickingHue = this.pickingAlpha = false;
- }
-
- private void drawHueSlider(int x, int y, int width, int height, float hue) {
- int step = 0;
- if (height > width) {
- Gui.drawRect(x, y, x + width, y + 4, 0xFFFF0000);
- y += 4;
- for (int colorIndex = 0; colorIndex < 6; colorIndex++) {
- int previousStep = Color.HSBtoRGB((float) step/6, 1.0f, 1.0f);
- int nextStep = Color.HSBtoRGB((float) (step+1)/6, 1.0f, 1.0f);
- this.drawGradientRect(x, y + step * (height/6), x + width, y + (step+1) * (height/6), previousStep, nextStep);
- step++;
- }
- final int sliderMinY = (int) (y + (height*hue)) - 4;
- Gui.drawRect(x, sliderMinY - 1, x+width, sliderMinY + 1, -1);
- } else {
- for (int colorIndex = 0; colorIndex < 6; colorIndex++) {
- int previousStep = Color.HSBtoRGB((float) step/6, 1.0f, 1.0f);
- int nextStep = Color.HSBtoRGB((float) (step+1)/6, 1.0f, 1.0f);
- this.gradient(x + step * (width/6), y, x + (step+1) * (width/6), y + height, previousStep, nextStep, true);
- step++;
- }
- final int sliderMinX = (int) (x + (width*hue));
- Gui.drawRect(sliderMinX - 1, y, sliderMinX + 1, y + height, -1);
- }
- }
-
- private void drawAlphaSlider(int x, int y, int width, int height, float red, float green, float blue, float alpha) {
- boolean left = true;
- int checkerBoardSquareSize = width/2;
- for (int squareIndex = -checkerBoardSquareSize; squareIndex < height; squareIndex += checkerBoardSquareSize) {
- if (!left) {
- Gui.drawRect(x, y + squareIndex, x + width, y + squareIndex + checkerBoardSquareSize, 0xFFFFFFFF);
- Gui.drawRect(x + checkerBoardSquareSize, y + squareIndex, x + width, y + squareIndex + checkerBoardSquareSize, 0xFF909090);
- if (squareIndex < height - checkerBoardSquareSize) {
- int minY = y + squareIndex + checkerBoardSquareSize;
- int maxY = Math.min(y + height, y + squareIndex + checkerBoardSquareSize*2);
- Gui.drawRect(x, minY, x + width, maxY, 0xFF909090);
- Gui.drawRect(x + checkerBoardSquareSize, minY, x + width, maxY, 0xFFFFFFFF);
- }
- }
- left = !left;
- }
- this.gradient(x, y, x + width, y + height, new Color(red, green, blue, alpha).getRGB(), 0, false);
- final int sliderMinY = (int) (y + height - (height*alpha));
- Gui.drawRect(x, sliderMinY - 1, x+width, sliderMinY + 1, -1);
- }
-
- private void drawPickerBase(int pickerX, int pickerY, int pickerWidth, int pickerHeight, float red, float green, float blue, float alpha) {
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glDisable(GL11.GL_TEXTURE_2D);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GL11.glShadeModel(GL11.GL_SMOOTH);
- GL11.glBegin(GL11.GL_POLYGON);
- {
- GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
- GL11.glVertex2f(pickerX, pickerY);
- GL11.glVertex2f(pickerX, pickerY + pickerHeight);
- GL11.glColor4f(red, green, blue, alpha);
- GL11.glVertex2f(pickerX + pickerWidth, pickerY + pickerHeight);
- GL11.glVertex2f(pickerX + pickerWidth, pickerY);
- }
- GL11.glEnd();
- GL11.glDisable(GL11.GL_ALPHA_TEST);
- GL11.glBegin(GL11.GL_POLYGON);
- {
- GL11.glColor4f(0.0f, 0.0f, 0.0f, 0.0f);
- GL11.glVertex2f(pickerX, pickerY);
- GL11.glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
- GL11.glVertex2f(pickerX, pickerY + pickerHeight);
- GL11.glVertex2f(pickerX + pickerWidth, pickerY + pickerHeight);
- GL11.glColor4f(0.0f, 0.0f, 0.0f, 0.0f);
- GL11.glVertex2f(pickerX + pickerWidth, pickerY);
- }
- GL11.glEnd();
- GL11.glEnable(GL11.GL_ALPHA_TEST);
- GL11.glShadeModel(GL11.GL_FLAT);
- GL11.glEnable(GL11.GL_TEXTURE_2D);
- GL11.glDisable(GL11.GL_BLEND);
- }
-
- protected void gradient(int minX, int minY, int maxX, int maxY, int startColor, int endColor, boolean left) {
- if (left) {
-
- final float startA = (startColor >> 24 & 0xFF) / 255.0f;
- final float startR = (startColor >> 16 & 0xFF) / 255.0f;
- final float startG= (startColor >> 8 & 0xFF) / 255.0f;
- final float startB = (startColor & 0xFF) / 255.0f;
-
- final float endA = (endColor >> 24 & 0xFF) / 255.0f;
- final float endR = (endColor >> 16 & 0xFF) / 255.0f;
- final float endG = (endColor >> 8 & 0xFF) / 255.0f;
- final float endB = (endColor & 0xFF) / 255.0f;
-
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glDisable(GL11.GL_TEXTURE_2D);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GL11.glShadeModel(GL11.GL_SMOOTH);
- GL11.glBegin(GL11.GL_POLYGON);
- {
- GL11.glColor4f(startR, startG, startB, startA);
- GL11.glVertex2f(minX, minY);
- GL11.glVertex2f(minX, maxY);
- GL11.glColor4f(endR, endG, endB, endA);
- GL11.glVertex2f(maxX, maxY);
- GL11.glVertex2f(maxX, minY);
- }
- GL11.glEnd();
- GL11.glShadeModel(GL11.GL_FLAT);
- GL11.glEnable(GL11.GL_TEXTURE_2D);
- GL11.glDisable(GL11.GL_BLEND);
- } else drawGradientRect(minX, minY, maxX, maxY, startColor, endColor);
- }
-
- protected boolean check(int minX, int minY, int maxX, int maxY, int curX, int curY) {
- return curX >= minX && curY >= minY && curX < maxX && curY < maxY;
- }
-
- @Override
- protected void keyTyped(char typedChar, int keyCode) throws IOException {
- super.keyTyped(typedChar, keyCode);
- if (keyCode == Keyboard.KEY_R) {
- this.rainbowState = !this.rainbowState;
- }
- if (keyCode == Keyboard.KEY_LEFT) {
- this.rainbowSpeed -= 0.1;
- } else if (keyCode == Keyboard.KEY_RIGHT) this.rainbowSpeed += 0.1;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/features/gui/components/items/buttons/EnumButton.java b/src/main/java/com/me/infinity/loop/features/gui/components/items/buttons/EnumButton.java
deleted file mode 100644
index 7f1f7ed..0000000
--- a/src/main/java/com/me/infinity/loop/features/gui/components/items/buttons/EnumButton.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.me.infinity.loop.features.gui.components.items.buttons;
-
-import com.me.infinity.loop.InfinityLoop;
-import com.me.infinity.loop.features.modules.client.ClickGui.ClickGui;
-import com.me.infinity.loop.features.setting.Setting;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import com.me.infinity.loop.features.gui.InfinityLoopGui;
-import com.me.infinity.loop.util.utils.renders.RenderUtil;
-import net.minecraft.client.audio.PositionedSoundRecord;
-import net.minecraft.init.SoundEvents;
-
-public class EnumButton
- extends Button {
- public Setting setting;
-
- public EnumButton(Setting setting) {
- super(setting.getName());
- this.setting = setting;
- this.width = 15;
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- RenderUtil.drawRect(this.x, this.y, this.x + (float) this.width + 7.4f, this.y + (float) this.height - 0.5f, this.getState() ? (!this.isHovering(mouseX, mouseY) ? InfinityLoop.colorManager.getColorWithAlpha(InfinityLoop.moduleManager.getModuleByClass(ClickGui.class).hoverAlpha.getValue()) : InfinityLoop.colorManager.getColorWithAlpha(InfinityLoop.moduleManager.getModuleByClass(ClickGui.class).alpha.getValue())) : (!this.isHovering(mouseX, mouseY) ? 0x11555555 : -2007673515));
- InfinityLoop.textManager.drawStringWithShadow(this.setting.getName() + " " + ChatFormatting.GRAY + (this.setting.currentEnumName().equalsIgnoreCase("ABC") ? "ABC" : this.setting.currentEnumName()), this.x + 2.3f, this.y - 1.7f - (float) InfinityLoopGui.getClickGui().getTextOffset(), this.getState() ? -1 : -5592406);
- //RenderUtil.drawRect(this.x, this.y, this.x - 2.0f, this.y + (float) this.height - 0.5f, -1);
- }
-
- @Override
- public void update() {
- this.setHidden(!this.setting.isVisible());
- }
-
- @Override
- public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
- super.mouseClicked(mouseX, mouseY, mouseButton);
- if (this.isHovering(mouseX, mouseY)) {
- mc.getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0f));
- }
- }
-
- @Override
- public int getHeight() {
- return 14;
- }
-
- @Override
- public void toggle() {
- this.setting.increaseEnum();
- }
-
- @Override
- public boolean getState() {
- return true;
- }
-}
-
diff --git a/src/main/java/com/me/infinity/loop/features/gui/components/items/buttons/Slider.java b/src/main/java/com/me/infinity/loop/features/gui/components/items/buttons/Slider.java
deleted file mode 100644
index 2c8a6d3..0000000
--- a/src/main/java/com/me/infinity/loop/features/gui/components/items/buttons/Slider.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.me.infinity.loop.features.gui.components.items.buttons;
-
-import com.me.infinity.loop.InfinityLoop;
-import com.me.infinity.loop.features.modules.client.ClickGui.ClickGui;
-import com.me.infinity.loop.features.setting.Setting;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import com.me.infinity.loop.features.gui.InfinityLoopGui;
-import com.me.infinity.loop.features.gui.components.Component;
-import com.me.infinity.loop.util.utils.renders.RenderUtil;
-import org.lwjgl.input.Mouse;
-
-import java.awt.*;
-
-public class Slider
- extends Button {
- private final Number min;
- private final Number max;
- private final int difference;
- public Setting setting;
-
- public Slider(Setting setting) {
- super(setting.getName());
- this.setting = setting;
- this.min = (Number) setting.getMin();
- this.max = (Number) setting.getMax();
- this.difference = this.max.intValue() - this.min.intValue();
- this.width = 15;
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- this.dragSetting(mouseX, mouseY);
- RenderUtil.drawRect(this.x, this.y + 5.0f, this.x + (float) this.width + 7.4f, this.y + (float) this.height - 1.5f, !this.isHovering(mouseX, mouseY) ? new Color(0xC0282828, true).getRGB() : new Color(0xB51E1E1E, true).getRGB());
- RenderUtil.drawRect(this.x, this.y + 5.0f, ((Number) this.setting.getValue()).floatValue() <= this.min.floatValue() ? this.x : this.x + ((float) this.width + 7.4f) * this.partialMultiplier(), this.y + (float) this.height - 1.5f, !this.isHovering(mouseX, mouseY) ? InfinityLoop.colorManager.getColorWithAlpha(InfinityLoop.moduleManager.getModuleByClass(ClickGui.class).hoverAlpha.getValue()) : InfinityLoop.colorManager.getColorWithAlpha(InfinityLoop.moduleManager.getModuleByClass(ClickGui.class).alpha.getValue()));
- InfinityLoop.textManager.drawStringWithShadow(this.getName() + " " + ChatFormatting.GRAY + (this.setting.getValue() instanceof Float ? this.setting.getValue() : Double.valueOf(((Number) this.setting.getValue()).doubleValue())), (x + 4), (float) (y + 4), -1);
- }
-
- @Override
- public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
- super.mouseClicked(mouseX, mouseY, mouseButton);
- if (this.isHovering(mouseX, mouseY)) {
- this.setSettingFromX(mouseX);
- }
- }
-
- @Override
- public boolean isHovering(int mouseX, int mouseY) {
- for (Component component : InfinityLoopGui.getClickGui().getComponents()) {
- if (!component.drag) continue;
- return false;
- }
- return (float) mouseX >= this.getX() && (float) mouseX <= this.getX() + (float) this.getWidth() + 8.0f && (float) mouseY >= this.getY() && (float) mouseY <= this.getY() + (float) this.height;
- }
-
- @Override
- public void update() {
- this.setHidden(!this.setting.isVisible());
- }
-
- private void dragSetting(int mouseX, int mouseY) {
- if (this.isHovering(mouseX, mouseY) && Mouse.isButtonDown(0)) {
- this.setSettingFromX(mouseX);
- }
- }
-
- @Override
- public int getHeight() {
- return 14;
- }
-
- private void setSettingFromX(int mouseX) {
- float percent = ((float) mouseX - this.x) / ((float) this.width + 7.4f);
- if (this.setting.getValue() instanceof Double) {
- double result = (Double) this.setting.getMin() + (double) ((float) this.difference * percent);
- this.setting.setValue((double) Math.round(10.0 * result) / 10.0);
- } else if (this.setting.getValue() instanceof Float) {
- float result = ((Float) this.setting.getMin()).floatValue() + (float) this.difference * percent;
- this.setting.setValue(Float.valueOf((float) Math.round(10.0f * result) / 10.0f));
- } else if (this.setting.getValue() instanceof Integer) {
- this.setting.setValue((Integer) this.setting.getMin() + (int) ((float) this.difference * percent));
- }
- }
-
- private float middle() {
- return this.max.floatValue() - this.min.floatValue();
- }
-
- private float part() {
- return ((Number) this.setting.getValue()).floatValue() - this.min.floatValue();
- }
-
- private float partialMultiplier() {
- return this.part() / this.middle();
- }
-}
-
diff --git a/src/main/java/com/me/infinity/loop/features/modules/ModuleCategory.java b/src/main/java/com/me/infinity/loop/features/modules/ModuleCategory.java
deleted file mode 100644
index 7e3aca4..0000000
--- a/src/main/java/com/me/infinity/loop/features/modules/ModuleCategory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.me.infinity.loop.features.modules;
-
-public enum ModuleCategory {
- COMBAT("Combat"),
- MISC("Misc"),
- RENDER("Render"),
- MOVEMENT("Movement"),
- PLAYER("Player"),
- CLIENT("Client"),
- TEST("Test");
-
- public String name;
-
- ModuleCategory(String name) {
- this.name = name;
- }
-
- public String getName() {
- return this.name;
- }
-}
diff --git a/src/main/java/com/me/infinity/loop/features/modules/client/CSGui.java b/src/main/java/com/me/infinity/loop/features/modules/client/CSGui.java
deleted file mode 100644
index 5d8008e..0000000
--- a/src/main/java/com/me/infinity/loop/features/modules/client/CSGui.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.me.infinity.loop.features.modules.client;
-
-import com.me.infinity.loop.InfinityLoop;
-import com.me.infinity.loop.event.events.client.ClientEvent;
-import com.me.infinity.loop.features.modules.ModuleCategory;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import com.me.infinity.loop.features.command.Command;
-import com.me.infinity.loop.features.csgui.CSClickGui;
-import com.me.infinity.loop.features.modules.Module;
-import com.me.infinity.loop.features.setting.Setting;
-import net.minecraft.client.settings.GameSettings;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-
-public class CSGui
- extends Module {
- private static CSGui INSTANCE = new CSGui();
- public Setting prefix = this.register(new Setting<>("Prefix", "."));
- public Setting description= this.register(new Setting("Description", true));
- public Setting bindText = register(new Setting("ShowBind",false));
- public Setting openCloseChange = register(new Setting("Open/Close",true));
- public Setting moduleButton = register(new Setting("Buttons: ", " ", v -> !this.openCloseChange.getValue()).setRenderName(true));
- public Setting open = register(new Setting("Open: ", "+", v -> this.openCloseChange.getValue()).setRenderName(true));
- public Setting close = register(new Setting("Close: ", "-", v -> this.openCloseChange.getValue()).setRenderName(true));
- public Setting background= this.register(new Setting("Background", true));
- public Setting blur = this.register(new Setting("Blur", false, v -> this.background.getValue()));
- public Setting blurAmount = this.register(new Setting<>("BlurAmount", 2, 0, 20, v -> this.background.getValue()));
- public Setting blurSize = this.register(new Setting<>("BlurSize", 0, 0, 20, v -> this.background.getValue()));
- public Setting dark = this.register(new Setting("Dark", false, v -> this.background.getValue()));
- public Setting gradiant = this.register(new Setting("Gradiant", false, v -> this.background.getValue()));
- public Setting gradiantHeight = this.register(new Setting("GradiantHeight", 0, 0, 255, v -> this.background.getValue()));
- public Setting customFov = this.register(new Setting("CustomFov", false));
- public Setting fov = this.register(new Setting<>("Fov", Float.valueOf(150.0f), Float.valueOf(-180.0f), Float.valueOf(180.0f)));
- public Setting colorSync = this.register(new Setting<>("ColorSync", false));
- public Setting red = this.register(new Setting<>("Red", 230, 0, 255));
- public Setting green = this.register(new Setting<>("Green", 0, 0, 255));
- public Setting blue = this.register(new Setting<>("Blue", 0, 0, 255));
- public Setting hoverAlpha = this.register(new Setting<>("Alpha", 170, 0, 255));
- public Setting topRed = this.register(new Setting<>("SecondRed", 230, 0, 255));
- public Setting topGreen = this.register(new Setting<>("SecondGreen", 0, 0, 255));
- public Setting topBlue = this.register(new Setting<>("SecondBlue", 0, 0, 255));
- public Setting alpha = this.register(new Setting<>("HoverAlpha", 240, 0, 255));
- public Setting rainbow = this.register(new Setting<>("Rainbow", false));
- public Setting rainbowModeHud = this.register(new Setting