diff --git a/.forgejo/workflows/build-client.yml b/.forgejo/workflows/build-client.yml index 494a5ef..9565c8c 100644 --- a/.forgejo/workflows/build-client.yml +++ b/.forgejo/workflows/build-client.yml @@ -25,7 +25,9 @@ jobs: - name: Initialize Gradle uses: https://github.com/gradle/actions/setup-gradle@v3 - name: Build - run: ./gradlew Client:build + run: | + bash scripts/gen_hash.sh + ./gradlew Client:build - name: Obfuscate Broadway if: github.ref == 'refs/heads/release' run: | diff --git a/Client/build.gradle b/Client/build.gradle index 1a414b7..0236d84 100644 --- a/Client/build.gradle +++ b/Client/build.gradle @@ -45,7 +45,7 @@ minecraft { runs { client { workingDirectory project.file('run') - jvmArgs = ["-Dfml.coreMods.load=com.baseband.client.DevStub", "-Xmx700M"] + jvmArgs = ["-Dfml.coreMods.load=de.com.baseband.client.DevStub", "-Xmx700M"] args = ["--userType", "mojang", "--username", "qukn", "--accessToken", "eyJraWQiOiJhYzg0YSIsImFsZyI6IkhTMjU2In0.eyJ4dWlkIjoiMjUzNTQyNTU0MzA3NTkyNSIsImFnZyI6IkFkdWx0Iiwic3ViIjoiNGU0YmNlN2UtZDBkZi00MjM3LWFhNTUtMjZmZTVhNjY3ZmQ4IiwiYXV0aCI6IlhCT1giLCJucyI6ImRlZmF1bHQiLCJyb2xlcyI6W10sImlzcyI6ImF1dGhlbnRpY2F0aW9uIiwiZmxhZ3MiOlsidHdvZmFjdG9yYXV0aCIsIm1zYW1pZ3JhdGlvbl9zdGFnZTQiLCJvcmRlcnNfMjAyMiIsIm11bHRpcGxheWVyIl0sInByb2ZpbGVzIjp7Im1jIjoiODZhMzJmY2UtYTk0Ni00MzY2LWI0YTAtMDk3YTI5MDcyZTU0In0sInBsYXRmb3JtIjoiUENfTEFVTkNIRVIiLCJuYmYiOjE3MTY1NTc3MzQsImV4cCI6MTcxNjY0NDEzNCwiaWF0IjoxNzE2NTU3NzM0fQ.Bt1AahWJrQqv8iJe8JH4T2IczdKzDjPnN-z7YLpcpFw", "--uuid", "86a32fcea9464366b4a0097a29072e54"] property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' @@ -135,7 +135,7 @@ jar { 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker', 'TweakOrder': '0', 'FMLCorePluginContainsFMLMod': 'true', - 'FMLCorePlugin': 'com.baseband.client.DevStub', + 'FMLCorePlugin': 'de.com.baseband.client.DevStub', 'ForceLoadAsMod': 'true' ) @@ -148,8 +148,8 @@ tasks.register('releaseJar', Jar) { dependsOn "reobfJar" from(zipTree(jar.archiveFile)) { - exclude 'com/baseband/client/DevStub.class' - exclude 'com/baseband/client/DevStub.java' + exclude 'de/com/baseband/client/DevStub.class' + exclude 'de/com/baseband/client/DevStub.java' exclude 'org/spongepowered/**' exclude 'META-INF/**' exclude 'mcmod.info' diff --git a/Client/proguard/proguard.cfg b/Client/proguard/proguard.cfg index b1bdf80..39229a7 100644 --- a/Client/proguard/proguard.cfg +++ b/Client/proguard/proguard.cfg @@ -11,23 +11,23 @@ -obfuscationdictionary dictionary.txt -classobfuscationdictionary dictionary.txt -packageobfuscationdictionary dictionary.txt --repackageclasses com.baseband.prod +-repackageclasses de.com.baseband.prod -keepattributes * -ignorewarnings #-overloadaggressively # keep things meant to exist in prod --keep class com.baseband.prod.** { *; } --keep class com.baseband.client.mixin.** { *; } --keep class com.baseband.client.DevStub { +-keep class de.com.baseband.prod.** { *; } +-keep class de.com.baseband.client.mixin.** { *; } +-keep class de.com.baseband.launcher.DevStub { public ; } --keep class com.baseband.launcher.Tweaker { +-keep class de.com.baseband.launcher.Tweaker { public ; } # jna --keep class !com.baseband.**,!de.tudbut.security { *; } +-keep class !de.com.baseband.**,!de.tudbut.security { *; } # Also keep - Enumerations. Keep the special static methods that are required in # enumeration classes. diff --git a/Client/src/main/java/com/baseband/client/event/Event.java b/Client/src/main/java/com/baseband/client/event/Event.java deleted file mode 100644 index d2e5a2f..0000000 --- a/Client/src/main/java/com/baseband/client/event/Event.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.baseband.client.event; - -public class Event { - -} diff --git a/Client/src/main/java/com/baseband/client/feature/render/Freecam.java b/Client/src/main/java/com/baseband/client/feature/render/Freecam.java deleted file mode 100644 index e5ce129..0000000 --- a/Client/src/main/java/com/baseband/client/feature/render/Freecam.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.baseband.client.feature.render; - -import com.baseband.client.event.events.PlayerDestroyEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Render; -import com.baseband.client.util.interact.FreecamPlayer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.GameType; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import org.lwjgl.opengl.GL11; - -import java.util.Objects; - -import static com.baseband.client.util.render.RenderAdapter.*; - -@Render -public class Freecam extends Feature { - - GameType type; - - @Override - public boolean displayOnClickGUI() { - return true; - } - - public void onEnable() { - if(notIngame()) { - toggle(); - return; - } - - EntityPlayer player = new FreecamPlayer(mc.player, mc.world); - mc.world.spawnEntity(player); - mc.renderChunksMany = false; - mc.setRenderViewEntity(player); - } - - public void onPlayerDestroy(PlayerDestroyEvent event) { - toggle(); - } - - @Override - public String toString() { - return "Freecam"; - } - - @Override - public void onDisable() { - if(notIngame()) { - return; - } - mc.world.removeEntity(Objects.requireNonNull(mc.getRenderViewEntity())); - mc.setRenderViewEntity(mc.player); - mc.renderChunksMany = true; - } - - @SubscribeEvent - public void onRender(RenderWorldLastEvent event) { - - if(notIngame()) - return; - - Entity main = mc.player; - Entity e = mc.getRenderViewEntity(); - assert e != null; - Vec3d p = e.getPositionEyes(event.getPartialTicks()).add(0, -e.getEyeHeight(), 0); - Vec3d pos = main.getPositionVector(); - float entityHalfed = main.width / 2 + 0.01f; - float entityHeight = main.height + 0.01f; - - ready(); - translate(-p.x, -p.y, -p.z); - color(0x80ff0000); - depth(false); - begin(GL11.GL_QUADS); - - // bottom - put(pos.x - entityHalfed, pos.y - 0.01, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y - 0.01, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y - 0.01, pos.z - entityHalfed); - put(pos.x - entityHalfed, pos.y - 0.01, pos.z - entityHalfed); - - next(); - - // top - put(pos.x - entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); - put(pos.x - entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); - - next(); - - // z - - put(pos.x - entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); - put(pos.x + entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); - put(pos.x + entityHalfed, pos.y - 0.01, pos.z - entityHalfed); - put(pos.x - entityHalfed, pos.y - 0.01, pos.z - entityHalfed); - - next(); - - // z + - put(pos.x - entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y - 0.01, pos.z + entityHalfed); - put(pos.x - entityHalfed, pos.y - 0.01, pos.z + entityHalfed); - - next(); - - // x - - put(pos.x - entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); - put(pos.x - entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); - put(pos.x - entityHalfed, pos.y - 0.01, pos.z + entityHalfed); - put(pos.x - entityHalfed, pos.y - 0.01, pos.z - entityHalfed); - - next(); - - // y + - put(pos.x + entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); - put(pos.x + entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y - 0.01, pos.z + entityHalfed); - put(pos.x + entityHalfed, pos.y - 0.01, pos.z - entityHalfed); - - end(); - } -} diff --git a/Client/src/main/java/com/baseband/client/util/type/FeatureAction.java b/Client/src/main/java/com/baseband/client/util/type/FeatureAction.java deleted file mode 100644 index a54c033..0000000 --- a/Client/src/main/java/com/baseband/client/util/type/FeatureAction.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.baseband.client.util.type; - -import com.baseband.client.feature.Feature; - -public interface FeatureAction { - void run(T feature); -} diff --git a/Client/src/main/java/com/baseband/prod/LoadHandler.java b/Client/src/main/java/com/baseband/prod/LoadHandler.java deleted file mode 100644 index 01c758d..0000000 --- a/Client/src/main/java/com/baseband/prod/LoadHandler.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.baseband.prod; - -import com.baseband.client.BaseBand; - -public class LoadHandler { - - public static void loaded() { - try { - Class.forName("com.baseband.launcher.Tweaker").getDeclaredMethod("loaded", Class.class).invoke(null, BaseBand.class); - } catch (Exception e) { - throw new RuntimeException(e); - } - } -} diff --git a/Client/src/main/java/com/baseband/client/BaseBand.java b/Client/src/main/java/de/com/baseband/client/BaseBand.java similarity index 69% rename from Client/src/main/java/com/baseband/client/BaseBand.java rename to Client/src/main/java/de/com/baseband/client/BaseBand.java index 9de4d41..58d9ba1 100644 --- a/Client/src/main/java/com/baseband/client/BaseBand.java +++ b/Client/src/main/java/de/com/baseband/client/BaseBand.java @@ -1,15 +1,17 @@ -package com.baseband.client; +package de.com.baseband.client; -import com.baseband.client.event.Event; -import com.baseband.client.event.EventManager; -import com.baseband.client.event.FMLEventHandler; -import com.baseband.client.event.remote.RemoteEvent; -import com.baseband.client.event.remote.RemoteEventManager; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.registry.Configuration; -import com.baseband.client.registry.Updater; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.event.Event; +import de.com.baseband.client.event.EventManager; +import de.com.baseband.client.event.FMLEventHandler; +import de.com.baseband.client.event.remote.RemoteEvent; +import de.com.baseband.client.event.remote.RemoteEventManager; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.feature.render.HUD; +import de.com.baseband.client.registry.Configuration; +import de.com.baseband.client.registry.Updater; +import de.com.baseband.client.util.interact.Chat; import de.tudbut.tools.Lock; import hint.Mobf; import net.minecraft.client.Minecraft; @@ -43,14 +45,6 @@ public class BaseBand { } catch (Exception ignored) {} } - public static T publish(T event) { - if(event instanceof RemoteEvent) - remoteEventManager.publish((RemoteEvent) event); - else - eventManager.publish(event); - return event; - } - public static void onInit() { LOGGER.info("Initializing..."); String[] banned = {"0836f9ee-4c5d-45e4-b39c-954880199acb", "18f87992-6459-43b8-8d26-6a4c74bee7ec", "f84e53c5-9143-4934-860c-ea44c9ad0e9f"}; @@ -100,4 +94,30 @@ public class BaseBand { } + public static T publish(T event) { + if(event instanceof RemoteEvent) + remoteEventManager.publish((RemoteEvent) event); + else + eventManager.publish(event); + return event; + } + + public static void notify(String text) { + Client c = Features.getFeature(Client.class); + if(Features.isFeatureEnabled(HUD.class) && c.notificationDest != Client.NotificationDest.Chat) { + HUD.notifs.add(new HUD.Notification(text)); + if(c.notificationDest == Client.NotificationDest.Both) + Chat.print(text); + else + LOGGER.info(text); + } else + Chat.print(text); + } + + public static void notifyAll(String text) { + if(Features.isFeatureEnabled(HUD.class)) { + HUD.notifs.add(new HUD.Notification(text)); + } + Chat.print(text); + } } diff --git a/Client/src/main/java/com/baseband/client/DevStub.java b/Client/src/main/java/de/com/baseband/client/DevStub.java similarity index 94% rename from Client/src/main/java/com/baseband/client/DevStub.java rename to Client/src/main/java/de/com/baseband/client/DevStub.java index 5c17167..bf1a276 100644 --- a/Client/src/main/java/com/baseband/client/DevStub.java +++ b/Client/src/main/java/de/com/baseband/client/DevStub.java @@ -1,9 +1,8 @@ -package com.baseband.client; +package de.com.baseband.client; import net.minecraftforge.common.ForgeVersion; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; -import net.minecraftforge.fml.relauncher.FMLInjectionData; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/Client/src/main/java/com/baseband/client/Setup.java b/Client/src/main/java/de/com/baseband/client/Setup.java similarity index 81% rename from Client/src/main/java/com/baseband/client/Setup.java rename to Client/src/main/java/de/com/baseband/client/Setup.java index 60f5ce9..da48be3 100644 --- a/Client/src/main/java/com/baseband/client/Setup.java +++ b/Client/src/main/java/de/com/baseband/client/Setup.java @@ -1,13 +1,13 @@ -package com.baseband.client; +package de.com.baseband.client; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.chat.*; -import com.baseband.client.feature.client.*; -import com.baseband.client.feature.combat.AutoTotem; -import com.baseband.client.feature.command.*; -import com.baseband.client.feature.movement.*; -import com.baseband.client.feature.render.*; -import com.baseband.client.feature.world.*; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.chat.*; +import de.com.baseband.client.feature.client.*; +import de.com.baseband.client.feature.combat.AutoTotem; +import de.com.baseband.client.feature.command.*; +import de.com.baseband.client.feature.movement.*; +import de.com.baseband.client.feature.render.*; +import de.com.baseband.client.feature.world.*; /** * @author TudbuT diff --git a/Client/src/main/java/com/baseband/client/event/CancellableEvent.java b/Client/src/main/java/de/com/baseband/client/event/CancellableEvent.java similarity index 86% rename from Client/src/main/java/com/baseband/client/event/CancellableEvent.java rename to Client/src/main/java/de/com/baseband/client/event/CancellableEvent.java index 5a81ab5..5e11532 100644 --- a/Client/src/main/java/com/baseband/client/event/CancellableEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/CancellableEvent.java @@ -1,4 +1,4 @@ -package com.baseband.client.event; +package de.com.baseband.client.event; public class CancellableEvent extends Event { boolean cancelled = false; diff --git a/Client/src/main/java/de/com/baseband/client/event/Event.java b/Client/src/main/java/de/com/baseband/client/event/Event.java new file mode 100644 index 0000000..bf90ec2 --- /dev/null +++ b/Client/src/main/java/de/com/baseband/client/event/Event.java @@ -0,0 +1,5 @@ +package de.com.baseband.client.event; + +public class Event { + +} diff --git a/Client/src/main/java/com/baseband/client/event/EventManager.java b/Client/src/main/java/de/com/baseband/client/event/EventManager.java similarity index 98% rename from Client/src/main/java/com/baseband/client/event/EventManager.java rename to Client/src/main/java/de/com/baseband/client/event/EventManager.java index 83ac26a..876a840 100644 --- a/Client/src/main/java/com/baseband/client/event/EventManager.java +++ b/Client/src/main/java/de/com/baseband/client/event/EventManager.java @@ -1,4 +1,4 @@ -package com.baseband.client.event; +package de.com.baseband.client.event; import java.lang.reflect.Method; import java.util.List; diff --git a/Client/src/main/java/com/baseband/client/event/FMLEventHandler.java b/Client/src/main/java/de/com/baseband/client/event/FMLEventHandler.java similarity index 71% rename from Client/src/main/java/com/baseband/client/event/FMLEventHandler.java rename to Client/src/main/java/de/com/baseband/client/event/FMLEventHandler.java index b6aa0be..a1e0528 100644 --- a/Client/src/main/java/com/baseband/client/event/FMLEventHandler.java +++ b/Client/src/main/java/de/com/baseband/client/event/FMLEventHandler.java @@ -1,11 +1,12 @@ -package com.baseband.client.event; +package de.com.baseband.client.event; -import com.baseband.client.BaseBand; -import com.baseband.client.Setup; -import com.baseband.client.event.events.PlayerDestroyEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.client.Client; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.Setup; +import de.com.baseband.client.event.events.PlayerDestroyEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.util.interact.Chat; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; @@ -14,10 +15,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import java.util.Arrays; -import static com.baseband.client.BaseBand.LOGGER; -import static com.baseband.client.feature.Features.features; -import static com.baseband.client.BaseBand.mc; - //forge mod loader more like fuck my life this shit BLOWS public class FMLEventHandler { @@ -31,14 +28,14 @@ public class FMLEventHandler { Chat.history(event.getMessage()); String[] cmd = event.getMessage().substring(prefix.length()).split(" "); String[] args = Arrays.copyOfRange(cmd, 1, cmd.length); - for (Feature feature : features) { + for (Feature feature : Features.features) { if (feature.toString().equalsIgnoreCase(cmd[0])) { try { feature.onCommand(args); return; } catch (Exception e) { - LOGGER.error("Error executing command {}", event.getMessage()); - LOGGER.error((Object) "The error: ", e); + BaseBand.LOGGER.error("Error executing command {}", event.getMessage()); + BaseBand.LOGGER.error((Object) "The error: ", e); Chat.print("Error executing this command. Please send your latest.log to the " + setup.Name + " developers."); } } @@ -56,7 +53,7 @@ public class FMLEventHandler { @SubscribeEvent public void tick(TickEvent.ClientTickEvent event) { BaseBand.remoteEventManager.onTick(); - if(mc.world == null || mc.player == null) { + if(BaseBand.mc.world == null || BaseBand.mc.player == null) { if(playerLastTick != null) { BaseBand.publish(new PlayerDestroyEvent(playerLastTick)); } @@ -65,9 +62,9 @@ public class FMLEventHandler { } if(event.phase != TickEvent.Phase.END) return; - playerLastTick = mc.player; + playerLastTick = BaseBand.mc.player; KeyManager.updateKeyBinds(); - for(Feature feature : features) { + for(Feature feature : Features.features) { feature.onEveryTick(); if(feature.enabled) { feature.onTick(); diff --git a/Client/src/main/java/com/baseband/client/event/KeyManager.java b/Client/src/main/java/de/com/baseband/client/event/KeyManager.java similarity index 80% rename from Client/src/main/java/com/baseband/client/event/KeyManager.java rename to Client/src/main/java/de/com/baseband/client/event/KeyManager.java index 5d50da4..a82c635 100644 --- a/Client/src/main/java/com/baseband/client/event/KeyManager.java +++ b/Client/src/main/java/de/com/baseband/client/event/KeyManager.java @@ -1,6 +1,6 @@ -package com.baseband.client.event; +package de.com.baseband.client.event; -import com.baseband.client.util.type.KeyBind; +import de.com.baseband.client.util.type.KeyBind; import java.util.ArrayList; diff --git a/Client/src/main/java/com/baseband/client/event/Priority.java b/Client/src/main/java/de/com/baseband/client/event/Priority.java similarity index 82% rename from Client/src/main/java/com/baseband/client/event/Priority.java rename to Client/src/main/java/de/com/baseband/client/event/Priority.java index b1a05ba..c41fa14 100644 --- a/Client/src/main/java/com/baseband/client/event/Priority.java +++ b/Client/src/main/java/de/com/baseband/client/event/Priority.java @@ -1,4 +1,4 @@ -package com.baseband.client.event; +package de.com.baseband.client.event; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Client/src/main/java/com/baseband/client/event/events/BaritoneEvent.java b/Client/src/main/java/de/com/baseband/client/event/events/BaritoneEvent.java similarity index 68% rename from Client/src/main/java/com/baseband/client/event/events/BaritoneEvent.java rename to Client/src/main/java/de/com/baseband/client/event/events/BaritoneEvent.java index 8df1931..c207362 100644 --- a/Client/src/main/java/com/baseband/client/event/events/BaritoneEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/events/BaritoneEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.events; +package de.com.baseband.client.event.events; -import com.baseband.client.event.CancellableEvent; +import de.com.baseband.client.event.CancellableEvent; public class BaritoneEvent extends CancellableEvent { String reason; diff --git a/Client/src/main/java/com/baseband/client/event/events/DamageBlockEvent.java b/Client/src/main/java/de/com/baseband/client/event/events/DamageBlockEvent.java similarity index 87% rename from Client/src/main/java/com/baseband/client/event/events/DamageBlockEvent.java rename to Client/src/main/java/de/com/baseband/client/event/events/DamageBlockEvent.java index 61570d0..e68ae91 100644 --- a/Client/src/main/java/com/baseband/client/event/events/DamageBlockEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/events/DamageBlockEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.events; +package de.com.baseband.client.event.events; -import com.baseband.client.event.CancellableEvent; +import de.com.baseband.client.event.CancellableEvent; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; diff --git a/Client/src/main/java/com/baseband/client/event/events/MotionUpdateEvent.java b/Client/src/main/java/de/com/baseband/client/event/events/MotionUpdateEvent.java similarity index 65% rename from Client/src/main/java/com/baseband/client/event/events/MotionUpdateEvent.java rename to Client/src/main/java/de/com/baseband/client/event/events/MotionUpdateEvent.java index f65f94c..8346867 100644 --- a/Client/src/main/java/com/baseband/client/event/events/MotionUpdateEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/events/MotionUpdateEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.events; +package de.com.baseband.client.event.events; -import com.baseband.client.event.Event; +import de.com.baseband.client.event.Event; public class MotionUpdateEvent extends Event { public static class Pre extends MotionUpdateEvent {} diff --git a/Client/src/main/java/com/baseband/client/event/events/MoveEvent.java b/Client/src/main/java/de/com/baseband/client/event/events/MoveEvent.java similarity index 78% rename from Client/src/main/java/com/baseband/client/event/events/MoveEvent.java rename to Client/src/main/java/de/com/baseband/client/event/events/MoveEvent.java index 327ab48..e0e9ce8 100644 --- a/Client/src/main/java/com/baseband/client/event/events/MoveEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/events/MoveEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.events; +package de.com.baseband.client.event.events; -import com.baseband.client.event.CancellableEvent; +import de.com.baseband.client.event.CancellableEvent; import net.minecraft.entity.MoverType; public class MoveEvent extends CancellableEvent { diff --git a/Client/src/main/java/com/baseband/client/event/events/PacketEvent.java b/Client/src/main/java/de/com/baseband/client/event/events/PacketEvent.java similarity index 84% rename from Client/src/main/java/com/baseband/client/event/events/PacketEvent.java rename to Client/src/main/java/de/com/baseband/client/event/events/PacketEvent.java index c026304..d238951 100644 --- a/Client/src/main/java/com/baseband/client/event/events/PacketEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/events/PacketEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.events; +package de.com.baseband.client.event.events; -import com.baseband.client.event.CancellableEvent; +import de.com.baseband.client.event.CancellableEvent; import net.minecraft.network.Packet; public abstract class PacketEvent extends CancellableEvent { diff --git a/Client/src/main/java/com/baseband/client/event/events/PlayerDestroyEvent.java b/Client/src/main/java/de/com/baseband/client/event/events/PlayerDestroyEvent.java similarity index 75% rename from Client/src/main/java/com/baseband/client/event/events/PlayerDestroyEvent.java rename to Client/src/main/java/de/com/baseband/client/event/events/PlayerDestroyEvent.java index 1999342..1660084 100644 --- a/Client/src/main/java/com/baseband/client/event/events/PlayerDestroyEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/events/PlayerDestroyEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.events; +package de.com.baseband.client.event.events; -import com.baseband.client.event.Event; +import de.com.baseband.client.event.Event; import net.minecraft.client.entity.EntityPlayerSP; public class PlayerDestroyEvent extends Event { diff --git a/Client/src/main/java/com/baseband/client/event/events/SelectEvent.java b/Client/src/main/java/de/com/baseband/client/event/events/SelectEvent.java similarity index 63% rename from Client/src/main/java/com/baseband/client/event/events/SelectEvent.java rename to Client/src/main/java/de/com/baseband/client/event/events/SelectEvent.java index 2ff1378..28bd27a 100644 --- a/Client/src/main/java/com/baseband/client/event/events/SelectEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/events/SelectEvent.java @@ -1,16 +1,14 @@ -package com.baseband.client.event.events; +package de.com.baseband.client.event.events; -import com.baseband.client.BaseBand; -import com.baseband.client.event.remote.RemoteEvent; -import com.baseband.client.event.remote.RemoteEventManager; -import com.baseband.client.util.interact.BlockUtils; -import com.baseband.client.util.type.Selection; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.remote.RemoteEvent; +import de.com.baseband.client.event.remote.RemoteEventManager; +import de.com.baseband.client.util.interact.BlockUtils; +import de.com.baseband.client.util.type.Selection; import de.tudbut.obj.Save; import java.util.Arrays; -import static com.baseband.client.BaseBand.LOGGER; - public class SelectEvent extends RemoteEvent { @Save public Selection selection; @@ -25,7 +23,7 @@ public class SelectEvent extends RemoteEvent { if(BaseBand.remoteEventManager.isConnected()) { RemoteEventManager manager = BaseBand.remoteEventManager; Selection[] splitSelection = BlockUtils.splitSelection1D(selection, manager.getPeers()); - LOGGER.info("Split selection: {}", Arrays.toString(splitSelection)); + BaseBand.LOGGER.info("Split selection: {}", Arrays.toString(splitSelection)); if(splitSelection.length > manager.getID()) return splitSelection[manager.getID()]; else return null; diff --git a/Client/src/main/java/com/baseband/client/event/remote/RemoteEvent.java b/Client/src/main/java/de/com/baseband/client/event/remote/RemoteEvent.java similarity index 62% rename from Client/src/main/java/com/baseband/client/event/remote/RemoteEvent.java rename to Client/src/main/java/de/com/baseband/client/event/remote/RemoteEvent.java index 375c11e..3b3c17d 100644 --- a/Client/src/main/java/com/baseband/client/event/remote/RemoteEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/remote/RemoteEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.remote; +package de.com.baseband.client.event.remote; -import com.baseband.client.event.Event; +import de.com.baseband.client.event.Event; // any event which might be useful to others and can be serialized (@Save) should extend RemoteEvent public class RemoteEvent extends Event { diff --git a/Client/src/main/java/com/baseband/client/event/remote/RemoteEventManager.java b/Client/src/main/java/de/com/baseband/client/event/remote/RemoteEventManager.java similarity index 87% rename from Client/src/main/java/com/baseband/client/event/remote/RemoteEventManager.java rename to Client/src/main/java/de/com/baseband/client/event/remote/RemoteEventManager.java index 1d2c48a..000bf2f 100644 --- a/Client/src/main/java/com/baseband/client/event/remote/RemoteEventManager.java +++ b/Client/src/main/java/de/com/baseband/client/event/remote/RemoteEventManager.java @@ -1,11 +1,9 @@ -package com.baseband.client.event.remote; +package de.com.baseband.client.event.remote; -import com.baseband.client.BaseBand; -import com.baseband.client.Setup; -import com.baseband.client.event.remote.events.RemoteInitEvent; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.client.AltControl; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.remote.events.RemoteInitEvent; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.client.AltControl; import de.tudbut.io.TypedInputStream; import de.tudbut.io.TypedOutputStream; import de.tudbut.parsing.JSON; @@ -23,7 +21,7 @@ import java.util.LinkedList; import java.util.Queue; public class RemoteEventManager { - private final Setup Setup = com.baseband.client.Setup.get(); + private final de.com.baseband.client.Setup Setup = de.com.baseband.client.Setup.get(); public Socket head = null; public final ArrayList clients = new ArrayList<>(); @@ -40,14 +38,14 @@ public class RemoteEventManager { try { head = new Socket(ip, Setup.Port); initClient(); - Chat.notify("[Remote] Started as client."); + BaseBand.notify("[Remote] Started as client."); } catch (IOException ex) { try { server = new ServerSocket(Setup.Port); initServer(); - Chat.notify("[Remote] Started as server."); + BaseBand.notify("[Remote] Started as server."); } catch (IOException e) { - Chat.notify("[Remote] Failed to start."); + BaseBand.notify("[Remote] Failed to start."); } } } @@ -103,7 +101,7 @@ public class RemoteEventManager { s.setSoTimeout(1); clients.add(s); publish(new RemoteInitEvent(clients.size() + 1)); - Chat.notify("[Remote] Client connected."); + BaseBand.notify("[Remote] Client connected."); } else { s.close(); } @@ -146,7 +144,7 @@ public class RemoteEventManager { } private void disconnectClient(int i) throws IOException { - Chat.notify("[Remote] A peer disconnected."); + BaseBand.notify("[Remote] A peer disconnected."); clients.remove(i).close(); publish(new RemoteInitEvent(clients.size() + 1)); } @@ -161,12 +159,12 @@ public class RemoteEventManager { o.write('B'); o.flush(); if(!(i.read() == 'B' && i.read() == 'B')) { - Chat.notify("[Remote] Unable to connect."); + BaseBand.notify("[Remote] Unable to connect."); end(); return; } head.setSoTimeout(1); - Chat.notify("[Remote] Connected."); + BaseBand.notify("[Remote] Connected."); while(head != null) { while(!toSend.isEmpty()) { String stringEvent = JSON.write((TCN)ConfigSaverTCN2.write(toSend.poll(), false, false)); @@ -177,7 +175,7 @@ public class RemoteEventManager { try { head.setSoTimeout(1); if ((id = i.read()) == -1) { - Chat.notify("[Remote] Connection ended."); + BaseBand.notify("[Remote] Connection ended."); end(); return; } @@ -187,7 +185,7 @@ public class RemoteEventManager { } catch (InterruptedIOException ignored) {} } } catch (IOException | JSON.JSONFormatException | ClassNotFoundException e) { - Chat.notify("[Remote] Connection ended."); + BaseBand.notify("[Remote] Connection ended."); end(); } } @@ -207,7 +205,7 @@ public class RemoteEventManager { RemoteEvent event = toProcess.poll(); if(event instanceof RemoteInitEvent) { peers = ((RemoteInitEvent) event).peers; - Chat.notify("[Remote] Peers connected: " + peers + "."); + BaseBand.notify("[Remote] Peers connected: " + peers + "."); } else { BaseBand.eventManager.publish(event); diff --git a/Client/src/main/java/com/baseband/client/event/remote/events/RemoteConfigEvent.java b/Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteConfigEvent.java similarity index 58% rename from Client/src/main/java/com/baseband/client/event/remote/events/RemoteConfigEvent.java rename to Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteConfigEvent.java index b5f48a8..bd9e8c7 100644 --- a/Client/src/main/java/com/baseband/client/event/remote/events/RemoteConfigEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteConfigEvent.java @@ -1,7 +1,7 @@ -package com.baseband.client.event.remote.events; +package de.com.baseband.client.event.remote.events; -import com.baseband.client.event.remote.RemoteEvent; -import com.baseband.client.registry.Configuration; +import de.com.baseband.client.event.remote.RemoteEvent; +import de.com.baseband.client.registry.Configuration; import de.tudbut.obj.Save; import de.tudbut.parsing.TCN; diff --git a/Client/src/main/java/com/baseband/client/event/remote/events/RemoteInitEvent.java b/Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteInitEvent.java similarity index 63% rename from Client/src/main/java/com/baseband/client/event/remote/events/RemoteInitEvent.java rename to Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteInitEvent.java index 877684c..6aebfb2 100644 --- a/Client/src/main/java/com/baseband/client/event/remote/events/RemoteInitEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteInitEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.remote.events; +package de.com.baseband.client.event.remote.events; -import com.baseband.client.event.remote.RemoteEvent; +import de.com.baseband.client.event.remote.RemoteEvent; import de.tudbut.obj.Save; public class RemoteInitEvent extends RemoteEvent { diff --git a/Client/src/main/java/com/baseband/client/event/remote/events/RemoteSendMessageEvent.java b/Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteSendMessageEvent.java similarity index 66% rename from Client/src/main/java/com/baseband/client/event/remote/events/RemoteSendMessageEvent.java rename to Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteSendMessageEvent.java index 0d99140..7aef741 100644 --- a/Client/src/main/java/com/baseband/client/event/remote/events/RemoteSendMessageEvent.java +++ b/Client/src/main/java/de/com/baseband/client/event/remote/events/RemoteSendMessageEvent.java @@ -1,6 +1,6 @@ -package com.baseband.client.event.remote.events; +package de.com.baseband.client.event.remote.events; -import com.baseband.client.event.remote.RemoteEvent; +import de.com.baseband.client.event.remote.RemoteEvent; import de.tudbut.obj.Save; public class RemoteSendMessageEvent extends RemoteEvent { diff --git a/Client/src/main/java/com/baseband/client/feature/Category.java b/Client/src/main/java/de/com/baseband/client/feature/Category.java similarity index 84% rename from Client/src/main/java/com/baseband/client/feature/Category.java rename to Client/src/main/java/de/com/baseband/client/feature/Category.java index 94bb253..fcf3535 100644 --- a/Client/src/main/java/com/baseband/client/feature/Category.java +++ b/Client/src/main/java/de/com/baseband/client/feature/Category.java @@ -1,10 +1,10 @@ -package com.baseband.client.feature; +package de.com.baseband.client.feature; -import com.baseband.client.feature.category.*; -import com.baseband.client.registry.ConfigHandle; -import com.baseband.client.registry.Configuration; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.feature.category.*; +import de.com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.registry.Configuration; +import de.com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.util.adapt.Marker; import java.lang.annotation.Annotation; diff --git a/Client/src/main/java/com/baseband/client/feature/Feature.java b/Client/src/main/java/de/com/baseband/client/feature/Feature.java similarity index 90% rename from Client/src/main/java/com/baseband/client/feature/Feature.java rename to Client/src/main/java/de/com/baseband/client/feature/Feature.java index b3fae9e..ab688d7 100644 --- a/Client/src/main/java/com/baseband/client/feature/Feature.java +++ b/Client/src/main/java/de/com/baseband/client/feature/Feature.java @@ -1,19 +1,17 @@ -package com.baseband.client.feature; +package de.com.baseband.client.feature; -import com.baseband.client.BaseBand; -import com.baseband.client.Setup; -import com.baseband.client.feature.category.Command; -import com.baseband.client.gui.lib.component.*; -import com.baseband.client.registry.AnyGate; -import com.baseband.client.registry.ConfigHandle; -import com.baseband.client.registry.Configuration; -import com.baseband.client.registry.SetCommand; -import com.baseband.client.registry.annotation.*; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; -import com.baseband.client.util.type.KeyBind; -import com.baseband.client.event.KeyManager; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.KeyManager; +import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.gui.lib.component.*; +import de.com.baseband.client.registry.AnyGate; +import de.com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.registry.Configuration; +import de.com.baseband.client.registry.SetCommand; +import de.com.baseband.client.registry.annotation.*; +import de.com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.type.KeyBind; import net.minecraft.client.Minecraft; import net.minecraftforge.common.MinecraftForge; @@ -32,7 +30,7 @@ public abstract class Feature extends ToggleButton implements SetCommand { private static final int MARKER_PREFIX = -1024; public static final int M_ENABLED = MARKER_PREFIX + 1; - protected Setup Setup; + protected de.com.baseband.client.Setup Setup; protected Minecraft mc; @@ -82,18 +80,18 @@ public abstract class Feature extends ToggleButton implements SetCommand { if(enabled) { BaseBand.eventManager.subscribe(this); MinecraftForge.EVENT_BUS.register(this); - Chat.notify("§l" + this + "§a enabled§r."); + BaseBand.notify("§l" + this + "§a enabled§r."); onEnable(); } else { BaseBand.eventManager.unsubscribe(this); MinecraftForge.EVENT_BUS.unregister(this); - Chat.notify("§l" + this + "§c disabled§r."); + BaseBand.notify("§l" + this + "§c disabled§r."); onDisable(); } } public final void register(Minecraft mc) { - Setup = com.baseband.client.Setup.get(); + Setup = de.com.baseband.client.Setup.get(); this.mc = mc; this.text = toString(); @@ -127,7 +125,7 @@ public abstract class Feature extends ToggleButton implements SetCommand { String keyBindConfig = keyBindString + " Key"; KeyBind keyBind = new KeyBind(null, () -> { btn.click(0, 0, 0); - Chat.notify("Toggled " + config.value() + " in " + this + " " + (btn.green ? "§aon" : "§coff")); + BaseBand.notify("Toggled " + config.value() + " in " + this + " " + (btn.green ? "§aon" : "§coff")); }, gate); subComponents.add(new KeyButton(keyBindString, settings, keyBindConfig).gate(AnyGate.get(f, this, null, keyBound.allowChangeGate())).hover(description)); Configuration.registerUpdater(settings.linkWith(keyBind, KeyBind.KEY_FIELD).name(keyBindConfig)); diff --git a/Client/src/main/java/com/baseband/client/feature/Features.java b/Client/src/main/java/de/com/baseband/client/feature/Features.java similarity index 92% rename from Client/src/main/java/com/baseband/client/feature/Features.java rename to Client/src/main/java/de/com/baseband/client/feature/Features.java index 2834157..d16901b 100644 --- a/Client/src/main/java/com/baseband/client/feature/Features.java +++ b/Client/src/main/java/de/com/baseband/client/feature/Features.java @@ -1,8 +1,8 @@ -package com.baseband.client.feature; +package de.com.baseband.client.feature; -import com.baseband.client.BaseBand; -import com.baseband.client.Setup; -import com.baseband.client.util.type.FeatureAction; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.Setup; +import de.com.baseband.client.util.type.FeatureAction; import javax.annotation.Nonnull; import java.util.ArrayList; diff --git a/Client/src/main/java/com/baseband/client/feature/category/Chat.java b/Client/src/main/java/de/com/baseband/client/feature/category/Chat.java similarity index 83% rename from Client/src/main/java/com/baseband/client/feature/category/Chat.java rename to Client/src/main/java/de/com/baseband/client/feature/category/Chat.java index 43cc4b9..d300312 100644 --- a/Client/src/main/java/com/baseband/client/feature/category/Chat.java +++ b/Client/src/main/java/de/com/baseband/client/feature/category/Chat.java @@ -1,4 +1,4 @@ -package com.baseband.client.feature.category; +package de.com.baseband.client.feature.category; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/feature/category/ClientCategory.java b/Client/src/main/java/de/com/baseband/client/feature/category/ClientCategory.java similarity index 84% rename from Client/src/main/java/com/baseband/client/feature/category/ClientCategory.java rename to Client/src/main/java/de/com/baseband/client/feature/category/ClientCategory.java index 764f035..593c98f 100644 --- a/Client/src/main/java/com/baseband/client/feature/category/ClientCategory.java +++ b/Client/src/main/java/de/com/baseband/client/feature/category/ClientCategory.java @@ -1,4 +1,4 @@ -package com.baseband.client.feature.category; +package de.com.baseband.client.feature.category; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/feature/category/Combat.java b/Client/src/main/java/de/com/baseband/client/feature/category/Combat.java similarity index 83% rename from Client/src/main/java/com/baseband/client/feature/category/Combat.java rename to Client/src/main/java/de/com/baseband/client/feature/category/Combat.java index 910a996..83b8e50 100644 --- a/Client/src/main/java/com/baseband/client/feature/category/Combat.java +++ b/Client/src/main/java/de/com/baseband/client/feature/category/Combat.java @@ -1,4 +1,4 @@ -package com.baseband.client.feature.category; +package de.com.baseband.client.feature.category; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/feature/category/Command.java b/Client/src/main/java/de/com/baseband/client/feature/category/Command.java similarity index 83% rename from Client/src/main/java/com/baseband/client/feature/category/Command.java rename to Client/src/main/java/de/com/baseband/client/feature/category/Command.java index 7d4f822..39f156d 100644 --- a/Client/src/main/java/com/baseband/client/feature/category/Command.java +++ b/Client/src/main/java/de/com/baseband/client/feature/category/Command.java @@ -1,4 +1,4 @@ -package com.baseband.client.feature.category; +package de.com.baseband.client.feature.category; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/feature/category/Movement.java b/Client/src/main/java/de/com/baseband/client/feature/category/Movement.java similarity index 83% rename from Client/src/main/java/com/baseband/client/feature/category/Movement.java rename to Client/src/main/java/de/com/baseband/client/feature/category/Movement.java index 4885393..cda90b2 100644 --- a/Client/src/main/java/com/baseband/client/feature/category/Movement.java +++ b/Client/src/main/java/de/com/baseband/client/feature/category/Movement.java @@ -1,4 +1,4 @@ -package com.baseband.client.feature.category; +package de.com.baseband.client.feature.category; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/feature/category/Render.java b/Client/src/main/java/de/com/baseband/client/feature/category/Render.java similarity index 83% rename from Client/src/main/java/com/baseband/client/feature/category/Render.java rename to Client/src/main/java/de/com/baseband/client/feature/category/Render.java index 3c8bbce..34659ba 100644 --- a/Client/src/main/java/com/baseband/client/feature/category/Render.java +++ b/Client/src/main/java/de/com/baseband/client/feature/category/Render.java @@ -1,4 +1,4 @@ -package com.baseband.client.feature.category; +package de.com.baseband.client.feature.category; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/feature/category/World.java b/Client/src/main/java/de/com/baseband/client/feature/category/World.java similarity index 83% rename from Client/src/main/java/com/baseband/client/feature/category/World.java rename to Client/src/main/java/de/com/baseband/client/feature/category/World.java index 235725f..871db86 100644 --- a/Client/src/main/java/com/baseband/client/feature/category/World.java +++ b/Client/src/main/java/de/com/baseband/client/feature/category/World.java @@ -1,4 +1,4 @@ -package com.baseband.client.feature.category; +package de.com.baseband.client.feature.category; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/feature/chat/ChatAppend.java b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatAppend.java similarity index 78% rename from Client/src/main/java/com/baseband/client/feature/chat/ChatAppend.java rename to Client/src/main/java/de/com/baseband/client/feature/chat/ChatAppend.java index 706a446..577105a 100644 --- a/Client/src/main/java/com/baseband/client/feature/chat/ChatAppend.java +++ b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatAppend.java @@ -1,14 +1,13 @@ -package com.baseband.client.feature.chat; +package de.com.baseband.client.feature.chat; -import com.baseband.client.feature.Feature; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.util.adapt.Marker; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -@com.baseband.client.feature.category.Chat +@de.com.baseband.client.feature.category.Chat public class ChatAppend extends Feature { @Override @@ -41,8 +40,8 @@ public class ChatAppend extends Feature { if(message.matches("\\W.*")) return; - Chat.history(message); - Chat.send(applyWatermark((custom ? (customUnicodeToggle ? toUnicode(customWatermark) : customWatermark) : toUnicode("baseband")), message), false); + de.com.baseband.client.util.interact.Chat.history(message); + de.com.baseband.client.util.interact.Chat.send(applyWatermark((custom ? (customUnicodeToggle ? toUnicode(customWatermark) : customWatermark) : toUnicode("baseband")), message), false); event.setCanceled(true); } diff --git a/Client/src/main/java/com/baseband/client/feature/chat/ChatCrypt.java b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatCrypt.java similarity index 89% rename from Client/src/main/java/com/baseband/client/feature/chat/ChatCrypt.java rename to Client/src/main/java/de/com/baseband/client/feature/chat/ChatCrypt.java index 3b78bb8..074115e 100644 --- a/Client/src/main/java/com/baseband/client/feature/chat/ChatCrypt.java +++ b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatCrypt.java @@ -1,15 +1,16 @@ -package com.baseband.client.feature.chat; +package de.com.baseband.client.feature.chat; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.render.HUD; -import com.baseband.client.mixin.mixins.ICPacketChat; -import com.baseband.client.registry.annotation.*; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; -import com.baseband.client.util.misc.SBE; -import com.baseband.client.util.misc.Trypt; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.render.HUD; +import de.com.baseband.client.mixin.mixins.ICPacketChat; +import de.com.baseband.client.registry.annotation.*; +import de.com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.interact.Chat; +import de.com.baseband.client.util.misc.SBE; +import de.com.baseband.client.util.misc.Trypt; import de.tudbut.tools.Hasher; import net.minecraft.network.play.client.CPacketChatMessage; import net.minecraft.network.play.server.SPacketChat; @@ -22,10 +23,7 @@ import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; -import static com.baseband.client.BaseBand.RANDOM; -import static com.baseband.client.BaseBand.LOGGER; - -@com.baseband.client.feature.category.Chat +@de.com.baseband.client.feature.category.Chat public class ChatCrypt extends Feature { @Override public String toString() { @@ -50,7 +48,7 @@ public class ChatCrypt extends Feature { @Config("Channel") @Description("Used to distinguish between different groups of people using ChatCrypt (otherwise you get garbage in chat).") @Range("0..128") - public int channel = RANDOM.nextInt(128); + public int channel = BaseBand.RANDOM.nextInt(128); @Config("Use SBE algorithm") @Description("Trypt will look more random and has 256 possible encodings for the same message, meaning repetition is harder to see.\n" + @@ -97,7 +95,7 @@ public class ChatCrypt extends Feature { @MultiGate(and = {2, 3}) public void resetTrypt() { trypt = null; - Chat.notifyAll("§c§lChat>§a Trypt instance reset."); + BaseBand.notifyAll("§c§lChat>§a Trypt instance reset."); } @Config("Password") @@ -111,7 +109,7 @@ public class ChatCrypt extends Feature { public void onEnable() { if(password.isEmpty() || password.equalsIgnoreCase("CLICK HERE")) { toggle(); - Chat.notify("[ChatCrypt] Set a Password first! (set ID Password)"); + BaseBand.notify("[ChatCrypt] Set a Password first! (set ID Password)"); } } @@ -150,12 +148,12 @@ public class ChatCrypt extends Feature { boolean isOurs = message.equals(sentEncrypted); - LOGGER.info("decrypt: {}", message); + BaseBand.LOGGER.info("decrypt: {}", message); byte[] original = recoverBytes(message); if(!useSBE && decryptNoKeep(original).equals("CC:keep") && allowCCKeep) { keepTrypt = true; trypt = null; - Chat.notify("§dChat>§a Enabled and synchronized Trypt keep (initiated by " + username + ")."); + BaseBand.notify("§dChat>§a Enabled and synchronized Trypt keep (initiated by " + username + ")."); e.setCancelled(true); return; } @@ -164,10 +162,10 @@ public class ChatCrypt extends Feature { if(!useSBE && keepTrypt && (!isOurs || !sentOriginal.equals(message))) { // we must re-encrypt anything we get, unless it is from ourselves, to make sure our key stays up-to-date if(Arrays.equals(trypt.encryptChunk(message.getBytes(StandardCharsets.UTF_8), original[0]), original)) { - LOGGER.debug("Successfully kept Trypt key up-to-date."); + BaseBand.LOGGER.debug("Successfully kept Trypt key up-to-date."); } else { - Chat.notifyAll("§d§lChat>§c Unable to keep Trypt key up-to-date. Disabled keep." + (allowCCKeep ? " (Enable and sync by sending CC:keep)" : "")); + BaseBand.notifyAll("§d§lChat>§c Unable to keep Trypt key up-to-date. Disabled keep." + (allowCCKeep ? " (Enable and sync by sending CC:keep)" : "")); keepTrypt = false; } } diff --git a/Client/src/main/java/com/baseband/client/feature/chat/ChatExtras.java b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatExtras.java similarity index 76% rename from Client/src/main/java/com/baseband/client/feature/chat/ChatExtras.java rename to Client/src/main/java/de/com/baseband/client/feature/chat/ChatExtras.java index 40febf9..4cc750d 100644 --- a/Client/src/main/java/com/baseband/client/feature/chat/ChatExtras.java +++ b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatExtras.java @@ -1,14 +1,14 @@ -package com.baseband.client.feature.chat; +package de.com.baseband.client.feature.chat; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.registry.annotation.Trigger; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.registry.annotation.Trigger; +import de.com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.util.adapt.Marker; import net.minecraft.client.gui.ChatLine; import net.minecraft.client.gui.GuiNewChat; import net.minecraft.network.play.server.SPacketChat; @@ -18,7 +18,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -@com.baseband.client.feature.category.Chat +@de.com.baseband.client.feature.category.Chat public class ChatExtras extends Feature { @@ -61,7 +61,7 @@ public class ChatExtras extends Feature { chatLines.remove(i--); } mc.ingameGUI.getChatGUI().refreshChat(); - Chat.notify("Cleared chat of DMs"); + BaseBand.notify("Cleared chat of DMs"); } @@ -71,7 +71,7 @@ public class ChatExtras extends Feature { Pattern pattern = Pattern.compile("[^\t\r\n\\x20-\\x7E]+", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(message); if (matcher.find()) { - Chat.print("Unicode filtered!"); + de.com.baseband.client.util.interact.Chat.print("Unicode filtered!"); event.setCancelled(true); if (notifyOnPopLag) { mc.ingameGUI.getChatGUI().printChatMessage(new TextComponentString(message.replaceAll(pattern.pattern(), ""))); @@ -86,7 +86,7 @@ public class ChatExtras extends Feature { if (text.contains("jndi") || text.contains("ldap")) { text = text.replace("jndi", ""); text = text.replace("ldap", ""); - Chat.print("Log4Shell Prevented, Sterilized Message:\n" + text); + de.com.baseband.client.util.interact.Chat.print("Log4Shell Prevented, Sterilized Message:\n" + text); event.setCancelled(true); } } diff --git a/Client/src/main/java/com/baseband/client/feature/chat/ChatFilter.java b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatFilter.java similarity index 91% rename from Client/src/main/java/com/baseband/client/feature/chat/ChatFilter.java rename to Client/src/main/java/de/com/baseband/client/feature/chat/ChatFilter.java index 44f5726..6020c42 100644 --- a/Client/src/main/java/com/baseband/client/feature/chat/ChatFilter.java +++ b/Client/src/main/java/de/com/baseband/client/feature/chat/ChatFilter.java @@ -1,10 +1,10 @@ -package com.baseband.client.feature.chat; +package de.com.baseband.client.feature.chat; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.util.adapt.FieldFinder; import net.minecraft.network.play.server.SPacketChat; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; @@ -12,9 +12,7 @@ import net.minecraft.util.text.TextComponentString; import java.util.regex.Matcher; import java.util.regex.Pattern; -import static com.baseband.client.BaseBand.LOGGER; - -@com.baseband.client.feature.category.Chat +@de.com.baseband.client.feature.category.Chat public class ChatFilter extends Feature { public enum Mode { @@ -105,9 +103,9 @@ public class ChatFilter extends Feature { } if(changed) { - LOGGER.info("Original message: {}", packet.getChatComponent().getUnformattedText()); + BaseBand.LOGGER.info("Original message: {}", packet.getChatComponent().getUnformattedText()); if (mode == Mode.Block) { - Chat.print("Message filtered."); + de.com.baseband.client.util.interact.Chat.print("Message filtered."); event.setCancelled(true); return; } diff --git a/Client/src/main/java/com/baseband/client/feature/chat/ISeeYou.java b/Client/src/main/java/de/com/baseband/client/feature/chat/ISeeYou.java similarity index 78% rename from Client/src/main/java/com/baseband/client/feature/chat/ISeeYou.java rename to Client/src/main/java/de/com/baseband/client/feature/chat/ISeeYou.java index 393f150..88f5c7c 100644 --- a/Client/src/main/java/com/baseband/client/feature/chat/ISeeYou.java +++ b/Client/src/main/java/de/com/baseband/client/feature/chat/ISeeYou.java @@ -1,13 +1,12 @@ -package com.baseband.client.feature.chat; +package de.com.baseband.client.feature.chat; -import com.baseband.client.feature.Feature; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.feature.Feature; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import java.util.ArrayList; -@com.baseband.client.feature.category.Chat +@de.com.baseband.client.feature.category.Chat public class ISeeYou extends Feature { private final ArrayList names = new ArrayList<>(); @@ -31,8 +30,8 @@ public class ISeeYou extends Feature { try { for (final Entity entity : mc.world.loadedEntityList) if (entity instanceof EntityPlayer && !entity.getName().equalsIgnoreCase(mc.player.getName())) newnames.add(entity.getName()); if (!names.equals(newnames)) { - for (final String name : newnames) if (!names.contains(name)) Chat.print("[ISeeYou] I locally see "+name); - for (final String name : names) if (!newnames.contains(name)) Chat.print("[ISeeYou] I no longer locally see "+name); + for (final String name : newnames) if (!names.contains(name)) de.com.baseband.client.util.interact.Chat.print("[ISeeYou] I locally see "+name); + for (final String name : names) if (!newnames.contains(name)) de.com.baseband.client.util.interact.Chat.print("[ISeeYou] I no longer locally see "+name); names.clear(); names.addAll(newnames); } diff --git a/Client/src/main/java/com/baseband/client/feature/chat/TPAccept.java b/Client/src/main/java/de/com/baseband/client/feature/chat/TPAccept.java similarity index 76% rename from Client/src/main/java/com/baseband/client/feature/chat/TPAccept.java rename to Client/src/main/java/de/com/baseband/client/feature/chat/TPAccept.java index f9a48ac..4295997 100644 --- a/Client/src/main/java/com/baseband/client/feature/chat/TPAccept.java +++ b/Client/src/main/java/de/com/baseband/client/feature/chat/TPAccept.java @@ -1,15 +1,15 @@ -package com.baseband.client.feature.chat; +package de.com.baseband.client.feature.chat; -import com.baseband.client.event.events.PlayerDestroyEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.registry.PlayerDB; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.event.events.PlayerDestroyEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.registry.PlayerDB; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.util.interact.Chat; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -@com.baseband.client.feature.category.Chat +@de.com.baseband.client.feature.category.Chat @Description("Accepts TPA-Requests automatically") public class TPAccept extends Feature { diff --git a/Client/src/main/java/com/baseband/client/feature/client/AltControl.java b/Client/src/main/java/de/com/baseband/client/feature/client/AltControl.java similarity index 61% rename from Client/src/main/java/com/baseband/client/feature/client/AltControl.java rename to Client/src/main/java/de/com/baseband/client/feature/client/AltControl.java index 4653f12..a902221 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/AltControl.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/AltControl.java @@ -1,19 +1,19 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; -import com.baseband.client.BaseBand; -import com.baseband.client.event.remote.events.RemoteConfigEvent; -import com.baseband.client.event.remote.events.RemoteSendMessageEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.feature.render.ClickGUI; -import com.baseband.client.registry.Configuration; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.registry.annotation.Trigger; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.remote.events.RemoteConfigEvent; +import de.com.baseband.client.event.remote.events.RemoteSendMessageEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.feature.render.ClickGUI; +import de.com.baseband.client.registry.Configuration; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.registry.annotation.Trigger; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.interact.Chat; @ClientCategory public class AltControl extends Feature { @@ -45,12 +45,12 @@ public class AltControl extends Feature { } public void onRemoteSendChat(RemoteSendMessageEvent event) { - Chat.notify("[AltControl] Received a message to send."); + BaseBand.notify("[AltControl] Received a message to send."); Chat.simulateSend(event.message, false); } public void onConfig(RemoteConfigEvent event) { - Chat.notify("[AltControl] Received a config."); + BaseBand.notify("[AltControl] Received a config."); String ip = this.ip; boolean gui = Features.isFeatureEnabled(ClickGUI.class); diff --git a/Client/src/main/java/com/baseband/client/feature/client/AutoReconnect.java b/Client/src/main/java/de/com/baseband/client/feature/client/AutoReconnect.java similarity index 88% rename from Client/src/main/java/com/baseband/client/feature/client/AutoReconnect.java rename to Client/src/main/java/de/com/baseband/client/feature/client/AutoReconnect.java index d26fa11..e2da689 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/AutoReconnect.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/AutoReconnect.java @@ -1,10 +1,10 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Range; -import com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Range; +import de.com.baseband.client.util.adapt.FieldFinder; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiDisconnected; diff --git a/Client/src/main/java/com/baseband/client/feature/client/Baritone.java b/Client/src/main/java/de/com/baseband/client/feature/client/Baritone.java similarity index 75% rename from Client/src/main/java/com/baseband/client/feature/client/Baritone.java rename to Client/src/main/java/de/com/baseband/client/feature/client/Baritone.java index 867d09e..335987a 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/Baritone.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/Baritone.java @@ -1,14 +1,14 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; import baritone.api.process.IBaritoneProcess; import baritone.api.selection.ISelectionManager; import baritone.api.utils.BetterBlockPos; -import com.baseband.client.event.events.SelectEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.util.baritone.BaritoneManager; -import com.baseband.client.util.baritone.BaritonePresenceManager; -import com.baseband.client.util.type.Selection; +import de.com.baseband.client.event.events.SelectEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.util.baritone.BaritoneManager; +import de.com.baseband.client.util.baritone.BaritonePresenceManager; +import de.com.baseband.client.util.type.Selection; @ClientCategory public class Baritone extends Feature { diff --git a/Client/src/main/java/com/baseband/client/feature/client/Client.java b/Client/src/main/java/de/com/baseband/client/feature/client/Client.java similarity index 74% rename from Client/src/main/java/com/baseband/client/feature/client/Client.java rename to Client/src/main/java/de/com/baseband/client/feature/client/Client.java index da68b54..428948f 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/Client.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/Client.java @@ -1,19 +1,19 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; -import com.baseband.client.BaseBand; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.event.events.PlayerDestroyEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.gui.GuiTheme; -import com.baseband.client.registry.Configuration; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.KeyBound; -import com.baseband.client.registry.annotation.Trigger; -import com.baseband.client.util.interact.Chat; -import com.baseband.client.util.interact.RotationManager; -import com.baseband.client.util.interact.ServerDataManager; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.event.events.PlayerDestroyEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.gui.GuiTheme; +import de.com.baseband.client.registry.Configuration; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.KeyBound; +import de.com.baseband.client.registry.annotation.Trigger; +import de.com.baseband.client.util.interact.Chat; +import de.com.baseband.client.util.interact.RotationManager; +import de.com.baseband.client.util.interact.ServerDataManager; import net.minecraft.entity.EntityLivingBase; import net.minecraft.network.Packet; import net.minecraft.network.play.server.SPacketPlayerPosLook; @@ -40,7 +40,7 @@ public class Client extends Feature { public void clearTargets() { entityTarget = null; playerTarget = null; - Chat.notify("§aCleared all targets."); + BaseBand.notify("§aCleared all targets."); } @Config("ScreenshotUpload") @@ -57,7 +57,7 @@ public class Client extends Feature { @Trigger("Save config") public void saveConfig() { Configuration.save(); - Chat.notify("Config saved to disk"); + BaseBand.notify("Config saved to disk"); } @@ -116,7 +116,7 @@ public class Client extends Feature { ServerDataManager.onTimePacket(); } if(packet instanceof SPacketPlayerPosLook && lagNotify) { //TODO: if packetfly then ignore - Chat.notify("[LagNotify] §cLagback!"); + BaseBand.notify("[LagNotify] §cLagback!"); } } diff --git a/Client/src/main/java/com/baseband/client/feature/client/MidClick.java b/Client/src/main/java/de/com/baseband/client/feature/client/MidClick.java similarity index 72% rename from Client/src/main/java/com/baseband/client/feature/client/MidClick.java rename to Client/src/main/java/de/com/baseband/client/feature/client/MidClick.java index 533c2f5..046b873 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/MidClick.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/MidClick.java @@ -1,10 +1,11 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.registry.PlayerDB; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.registry.PlayerDB; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.util.interact.Chat; import de.tudbut.parsing.TCN; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -25,19 +26,19 @@ public class MidClick extends Feature { TCN player = Objects.requireNonNull(PlayerDB.player(p.getGameProfile().getId(), p.getGameProfile().getName())); player.set("isTarget", player.getBoolean("isTarget") != Boolean.TRUE); if(player.getBoolean("isTarget")) { - com.baseband.client.feature.client.Client.playerTarget = p; - Chat.notify("§cNow targeting " + p.getName()); + Client.playerTarget = p; + BaseBand.notify("§cNow targeting " + p.getName()); } else { - Chat.notify("§a§lNo longer§a targeting " + p.getName()); + BaseBand.notify("§a§lNo longer§a targeting " + p.getName()); } }), Friend((p) -> { TCN player = Objects.requireNonNull(PlayerDB.player(p.getGameProfile().getId(), p.getGameProfile().getName())); player.set("isFriend", player.getBoolean("isFriend") != Boolean.TRUE); if(player.getBoolean("isFriend")) { - Chat.notify("§aMarked " + p.getName() + " as a friend."); + BaseBand.notify("§aMarked " + p.getName() + " as a friend."); } else { - Chat.notify("§c§lUn§cmarked " + p.getName() + " as a friend."); + BaseBand.notify("§c§lUn§cmarked " + p.getName() + " as a friend."); } }), Message((p) -> Chat.openChat("/w " + p.getGameProfile().getName() + " ")), @@ -51,10 +52,10 @@ public class MidClick extends Feature { public enum BlockAction { None((b) -> {}), Select((b) -> { - com.baseband.client.feature.world.Select.begin = b; - com.baseband.client.feature.world.Select.end = b; + de.com.baseband.client.feature.world.Select.begin = b; + de.com.baseband.client.feature.world.Select.end = b; }), - Corner(com.baseband.client.feature.world.Select::select), + Corner(de.com.baseband.client.feature.world.Select::select), ; public final Consumer action; BlockAction(Consumer action) { @@ -65,12 +66,12 @@ public class MidClick extends Feature { public enum EntityAction { None((e) -> {}), Target((e) -> { - if(com.baseband.client.feature.client.Client.entityTarget != e) { - com.baseband.client.feature.client.Client.entityTarget = e; - Chat.notify("§cNow targeting entity ID " + e.getEntityId()); + if(Client.entityTarget != e) { + Client.entityTarget = e; + BaseBand.notify("§cNow targeting entity ID " + e.getEntityId()); } else { - com.baseband.client.feature.client.Client.entityTarget = null; - Chat.notify("§aEntity target reset."); + Client.entityTarget = null; + BaseBand.notify("§aEntity target reset."); } }), ; diff --git a/Client/src/main/java/com/baseband/client/feature/client/Spotify.java b/Client/src/main/java/de/com/baseband/client/feature/client/Spotify.java similarity index 86% rename from Client/src/main/java/com/baseband/client/feature/client/Spotify.java rename to Client/src/main/java/de/com/baseband/client/feature/client/Spotify.java index b3b3f1f..539338a 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/Spotify.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/Spotify.java @@ -1,11 +1,9 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; -import com.baseband.client.BaseBand; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.feature.render.HUD; -import com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.registry.annotation.Config; import de.labystudio.spotifyapi.SpotifyAPI; import de.labystudio.spotifyapi.SpotifyAPIFactory; import de.labystudio.spotifyapi.SpotifyListener; diff --git a/Client/src/main/java/com/baseband/client/feature/client/Timer.java b/Client/src/main/java/de/com/baseband/client/feature/client/Timer.java similarity index 85% rename from Client/src/main/java/com/baseband/client/feature/client/Timer.java rename to Client/src/main/java/de/com/baseband/client/feature/client/Timer.java index e023e74..cfbc084 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/Timer.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/Timer.java @@ -1,16 +1,16 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.event.events.PlayerDestroyEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.registry.annotation.Range; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.ServerDataManager; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.event.events.PlayerDestroyEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.registry.annotation.Range; +import de.com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.interact.ServerDataManager; import net.minecraft.client.Minecraft; import net.minecraft.network.play.server.SPacketPlayerPosLook; import net.minecraftforge.client.event.RenderWorldLastEvent; diff --git a/Client/src/main/java/com/baseband/client/feature/client/Trust.java b/Client/src/main/java/de/com/baseband/client/feature/client/Trust.java similarity index 70% rename from Client/src/main/java/com/baseband/client/feature/client/Trust.java rename to Client/src/main/java/de/com/baseband/client/feature/client/Trust.java index 20a6d14..5c49510 100644 --- a/Client/src/main/java/com/baseband/client/feature/client/Trust.java +++ b/Client/src/main/java/de/com/baseband/client/feature/client/Trust.java @@ -1,14 +1,14 @@ -package com.baseband.client.feature.client; +package de.com.baseband.client.feature.client; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.ClientCategory; -import com.baseband.client.registry.PlayerDB; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.registry.annotation.Trigger; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.ClientCategory; +import de.com.baseband.client.registry.PlayerDB; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.registry.annotation.Trigger; +import de.com.baseband.client.util.adapt.Marker; import de.tudbut.parsing.TCN; @ClientCategory @@ -44,7 +44,7 @@ public class Trust extends Feature { @Override public void onEnable() { if(name.isEmpty()) { - Chat.notify("First set the name of a player to modify."); + BaseBand.notify("First set the name of a player to modify."); toggle(); } TCN player = PlayerDB.player(null, name); diff --git a/Client/src/main/java/com/baseband/client/feature/combat/AutoKill.java b/Client/src/main/java/de/com/baseband/client/feature/combat/AutoKill.java similarity index 91% rename from Client/src/main/java/com/baseband/client/feature/combat/AutoKill.java rename to Client/src/main/java/de/com/baseband/client/feature/combat/AutoKill.java index 6da4f93..2e96ffb 100644 --- a/Client/src/main/java/com/baseband/client/feature/combat/AutoKill.java +++ b/Client/src/main/java/de/com/baseband/client/feature/combat/AutoKill.java @@ -1,11 +1,11 @@ -package com.baseband.client.feature.combat; +package de.com.baseband.client.feature.combat; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Combat; -import com.baseband.client.registry.PlayerDB; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Combat; +import de.com.baseband.client.registry.PlayerDB; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.util.adapt.Marker; import de.tudbut.parsing.TCN; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/Client/src/main/java/com/baseband/client/feature/combat/AutoTotem.java b/Client/src/main/java/de/com/baseband/client/feature/combat/AutoTotem.java similarity index 97% rename from Client/src/main/java/com/baseband/client/feature/combat/AutoTotem.java rename to Client/src/main/java/de/com/baseband/client/feature/combat/AutoTotem.java index 41f84ef..c7761f2 100644 --- a/Client/src/main/java/com/baseband/client/feature/combat/AutoTotem.java +++ b/Client/src/main/java/de/com/baseband/client/feature/combat/AutoTotem.java @@ -1,12 +1,12 @@ -package com.baseband.client.feature.combat; +package de.com.baseband.client.feature.combat; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Combat; -import com.baseband.client.gui.GuiBBIngame; -import com.baseband.client.registry.annotation.*; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; -import com.baseband.client.util.interact.InventoryUtils; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Combat; +import de.com.baseband.client.gui.GuiBBIngame; +import de.com.baseband.client.registry.annotation.*; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.interact.Chat; +import de.com.baseband.client.util.interact.InventoryUtils; import de.tudbut.tools.Lock; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.init.Items; diff --git a/Client/src/main/java/com/baseband/client/feature/command/Bind.java b/Client/src/main/java/de/com/baseband/client/feature/command/Bind.java similarity index 75% rename from Client/src/main/java/com/baseband/client/feature/command/Bind.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Bind.java index f3d7b47..ae7a63d 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Bind.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Bind.java @@ -1,14 +1,13 @@ -package com.baseband.client.feature.command; +package de.com.baseband.client.feature.command; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Command; -import com.baseband.client.feature.client.Client; -import com.baseband.client.registry.SetCommand; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.registry.SetCommand; +import de.com.baseband.client.util.interact.Chat; import org.lwjgl.input.Keyboard; -import static com.baseband.client.feature.Features.features; - @Command public class Bind extends Feature { @Override @@ -23,7 +22,7 @@ public class Bind extends Feature { SetCommand f = null; - for(Feature feature : features) { + for(Feature feature : Features.features) { if(feature.toString().equalsIgnoreCase(module)) { f = feature; break; diff --git a/Client/src/main/java/com/baseband/client/feature/command/Connect.java b/Client/src/main/java/de/com/baseband/client/feature/command/Connect.java similarity index 76% rename from Client/src/main/java/com/baseband/client/feature/command/Connect.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Connect.java index ec14eae..67a18d2 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Connect.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Connect.java @@ -1,9 +1,10 @@ -package com.baseband.client.feature.command; +package de.com.baseband.client.feature.command; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Command; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Command; import net.minecraft.client.multiplayer.GuiConnecting; -import static com.baseband.client.BaseBand.LOGGER; + +import static de.com.baseband.client.BaseBand.LOGGER; @Command public class Connect extends Feature { diff --git a/Client/src/main/java/com/baseband/client/feature/command/Disconnect.java b/Client/src/main/java/de/com/baseband/client/feature/command/Disconnect.java similarity index 76% rename from Client/src/main/java/com/baseband/client/feature/command/Disconnect.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Disconnect.java index b1215d4..5fdcf38 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Disconnect.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Disconnect.java @@ -1,8 +1,7 @@ -package com.baseband.client.feature.command; - -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Command; +package de.com.baseband.client.feature.command; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Command; import net.minecraft.network.play.server.SPacketDisconnect; import net.minecraft.util.text.TextComponentString; diff --git a/Client/src/main/java/com/baseband/client/feature/command/Help.java b/Client/src/main/java/de/com/baseband/client/feature/command/Help.java similarity index 94% rename from Client/src/main/java/com/baseband/client/feature/command/Help.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Help.java index 6fd6bf9..06d105c 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Help.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Help.java @@ -1,11 +1,11 @@ -package com.baseband.client.feature.command; +package de.com.baseband.client.feature.command; -import com.baseband.client.feature.Category; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.Command; -import com.baseband.client.feature.client.Client; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.feature.Category; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.util.interact.Chat; import de.tudbut.obj.TLMap; import net.minecraft.util.text.Style; import net.minecraft.util.text.TextComponentString; diff --git a/Client/src/main/java/com/baseband/client/feature/command/Say.java b/Client/src/main/java/de/com/baseband/client/feature/command/Say.java similarity index 68% rename from Client/src/main/java/com/baseband/client/feature/command/Say.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Say.java index b6aa7df..91d5842 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Say.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Say.java @@ -1,7 +1,7 @@ -package com.baseband.client.feature.command; +package de.com.baseband.client.feature.command; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Command; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Command; import net.minecraft.network.play.client.CPacketChatMessage; @Command diff --git a/Client/src/main/java/com/baseband/client/feature/command/Set.java b/Client/src/main/java/de/com/baseband/client/feature/command/Set.java similarity index 75% rename from Client/src/main/java/com/baseband/client/feature/command/Set.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Set.java index 58a82ad..e9e0f35 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Set.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Set.java @@ -1,25 +1,24 @@ -package com.baseband.client.feature.command; +package de.com.baseband.client.feature.command; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Command; -import com.baseband.client.feature.client.Client; -import com.baseband.client.registry.ConfigHandle; -import com.baseband.client.registry.SetCommand; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.registry.SetCommand; +import de.com.baseband.client.util.interact.Chat; import java.util.HashMap; -import static com.baseband.client.BaseBand.RANDOM; -import static com.baseband.client.feature.Features.features; - @Command public class Set extends Feature { private static final HashMap quickSet = new HashMap<>(); public static int addQuickSet(ConfigHandle handle) { - int n = RANDOM.nextInt(Integer.MAX_VALUE); - while(quickSet.containsKey(n)) n = RANDOM.nextInt(Integer.MAX_VALUE); + int n = BaseBand.RANDOM.nextInt(Integer.MAX_VALUE); + while(quickSet.containsKey(n)) n = BaseBand.RANDOM.nextInt(Integer.MAX_VALUE); quickSet.put(n, handle); return n; } @@ -48,7 +47,7 @@ public class Set extends Feature { isQS = true; } catch (NumberFormatException ignored) {} - for(Feature feature : features) { + for(Feature feature : Features.features) { if(feature.toString().equalsIgnoreCase(module)) { f = feature; break; diff --git a/Client/src/main/java/com/baseband/client/feature/command/Test.java b/Client/src/main/java/de/com/baseband/client/feature/command/Test.java similarity index 51% rename from Client/src/main/java/com/baseband/client/feature/command/Test.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Test.java index 1668901..c15b5ba 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Test.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Test.java @@ -1,9 +1,9 @@ -package com.baseband.client.feature.command; +package de.com.baseband.client.feature.command; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Command; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Range; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Range; /** * @author TudbuT diff --git a/Client/src/main/java/com/baseband/client/feature/command/Trigger.java b/Client/src/main/java/de/com/baseband/client/feature/command/Trigger.java similarity index 71% rename from Client/src/main/java/com/baseband/client/feature/command/Trigger.java rename to Client/src/main/java/de/com/baseband/client/feature/command/Trigger.java index 326c96d..5962599 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Trigger.java +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Trigger.java @@ -1,13 +1,12 @@ -package com.baseband.client.feature.command; +package de.com.baseband.client.feature.command; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Command; -import com.baseband.client.feature.client.Client; -import com.baseband.client.gui.lib.component.Component; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.util.interact.Chat; - -import static com.baseband.client.feature.Features.features; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.gui.lib.component.Component; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.util.interact.Chat; @Command @Description("Triggers some trigger on some module. This is equivalent to pressing the corresponding button in the GUI. Spaces can be replaced with underscores.") @@ -23,7 +22,7 @@ public class Trigger extends Feature { Feature f = null; - for(Feature feature : features) { + for(Feature feature : Features.features) { if(feature.toString().equalsIgnoreCase(module)) { f = feature; break; diff --git a/Client/src/main/java/com/baseband/client/feature/movement/ElytraBot.java b/Client/src/main/java/de/com/baseband/client/feature/movement/ElytraBot.java similarity index 81% rename from Client/src/main/java/com/baseband/client/feature/movement/ElytraBot.java rename to Client/src/main/java/de/com/baseband/client/feature/movement/ElytraBot.java index 200e79f..8e39e5d 100644 --- a/Client/src/main/java/com/baseband/client/feature/movement/ElytraBot.java +++ b/Client/src/main/java/de/com/baseband/client/feature/movement/ElytraBot.java @@ -1,15 +1,15 @@ -package com.baseband.client.feature.movement; +package de.com.baseband.client.feature.movement; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.Movement; -import com.baseband.client.feature.client.Client; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.registry.annotation.Range; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Movement; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.registry.annotation.Range; +import de.com.baseband.client.util.adapt.Marker; import net.minecraft.entity.player.EntityPlayer; @Movement @@ -51,7 +51,7 @@ public class ElytraBot extends Feature { @Override public void onEnable() { if(!Features.isFeatureEnabled(ElytraFly.class)) { - Chat.notify("§cElytraBot cannot work without ElytraFly."); + BaseBand.notify("§cElytraBot cannot work without ElytraFly."); toggle(); return; } @@ -70,7 +70,7 @@ public class ElytraBot extends Feature { public void onTick() { ElytraFly efly = Features.getFeature(ElytraFly.class); if(!efly.enabled) { - Chat.notify("§cElytraBot cannot work without ElytraFly."); + BaseBand.notify("§cElytraBot cannot work without ElytraFly."); toggle(); return; } @@ -95,7 +95,7 @@ public class ElytraBot extends Feature { break a; } } catch (Exception ignored) {} - Chat.notify("§cInvalid ElytraBot target."); + BaseBand.notify("§cInvalid ElytraBot target."); toggle(); return; } else { @@ -108,7 +108,7 @@ public class ElytraBot extends Feature { break a; } } - Chat.notify("§cElytraBot couldn't find your target player."); + BaseBand.notify("§cElytraBot couldn't find your target player."); toggle(); return; } diff --git a/Client/src/main/java/com/baseband/client/feature/movement/ElytraFly.java b/Client/src/main/java/de/com/baseband/client/feature/movement/ElytraFly.java similarity index 94% rename from Client/src/main/java/com/baseband/client/feature/movement/ElytraFly.java rename to Client/src/main/java/de/com/baseband/client/feature/movement/ElytraFly.java index f521f4b..f3762a1 100644 --- a/Client/src/main/java/com/baseband/client/feature/movement/ElytraFly.java +++ b/Client/src/main/java/de/com/baseband/client/feature/movement/ElytraFly.java @@ -1,15 +1,15 @@ -package com.baseband.client.feature.movement; +package de.com.baseband.client.feature.movement; -import com.baseband.client.event.events.MoveEvent; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Movement; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.registry.annotation.Range; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.MotionUtil; +import de.com.baseband.client.event.events.MoveEvent; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Movement; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.registry.annotation.Range; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.interact.MotionUtil; import de.tudbut.tools.Lock; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.player.EntityPlayer; diff --git a/Client/src/main/java/com/baseband/client/feature/movement/NoSlowDown.java b/Client/src/main/java/de/com/baseband/client/feature/movement/NoSlowDown.java similarity index 80% rename from Client/src/main/java/com/baseband/client/feature/movement/NoSlowDown.java rename to Client/src/main/java/de/com/baseband/client/feature/movement/NoSlowDown.java index 562ffce..b6e507f 100644 --- a/Client/src/main/java/com/baseband/client/feature/movement/NoSlowDown.java +++ b/Client/src/main/java/de/com/baseband/client/feature/movement/NoSlowDown.java @@ -1,7 +1,7 @@ -package com.baseband.client.feature.movement; +package de.com.baseband.client.feature.movement; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Movement; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Movement; import net.minecraftforge.client.event.InputUpdateEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; diff --git a/Client/src/main/java/com/baseband/client/feature/movement/Speed.java b/Client/src/main/java/de/com/baseband/client/feature/movement/Speed.java similarity index 89% rename from Client/src/main/java/com/baseband/client/feature/movement/Speed.java rename to Client/src/main/java/de/com/baseband/client/feature/movement/Speed.java index 11b328e..c894971 100644 --- a/Client/src/main/java/com/baseband/client/feature/movement/Speed.java +++ b/Client/src/main/java/de/com/baseband/client/feature/movement/Speed.java @@ -1,15 +1,15 @@ -package com.baseband.client.feature.movement; +package de.com.baseband.client.feature.movement; -import com.baseband.client.event.events.MoveEvent; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.Movement; -import com.baseband.client.feature.client.Timer; -import com.baseband.client.mixin.mixins.IMinecraft; -import com.baseband.client.mixin.mixins.ITimer; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.util.interact.MotionUtil; +import de.com.baseband.client.event.events.MoveEvent; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Movement; +import de.com.baseband.client.feature.client.Timer; +import de.com.baseband.client.mixin.mixins.IMinecraft; +import de.com.baseband.client.mixin.mixins.ITimer; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.util.interact.MotionUtil; import net.minecraft.block.BlockLiquid; import net.minecraft.block.state.IBlockState; import net.minecraft.network.play.server.SPacketPlayerPosLook; diff --git a/Client/src/main/java/com/baseband/client/feature/movement/Velocity.java b/Client/src/main/java/de/com/baseband/client/feature/movement/Velocity.java similarity index 84% rename from Client/src/main/java/com/baseband/client/feature/movement/Velocity.java rename to Client/src/main/java/de/com/baseband/client/feature/movement/Velocity.java index 868fec7..989f166 100644 --- a/Client/src/main/java/com/baseband/client/feature/movement/Velocity.java +++ b/Client/src/main/java/de/com/baseband/client/feature/movement/Velocity.java @@ -1,9 +1,9 @@ -package com.baseband.client.feature.movement; +package de.com.baseband.client.feature.movement; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Movement; -import com.baseband.client.mixin.mixins.ISPacketExplosion; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Movement; +import de.com.baseband.client.mixin.mixins.ISPacketExplosion; import net.minecraft.network.play.server.SPacketEntityVelocity; import net.minecraft.network.play.server.SPacketExplosion; import net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent; diff --git a/Client/src/main/java/com/baseband/client/feature/render/Bright.java b/Client/src/main/java/de/com/baseband/client/feature/render/Bright.java similarity index 83% rename from Client/src/main/java/com/baseband/client/feature/render/Bright.java rename to Client/src/main/java/de/com/baseband/client/feature/render/Bright.java index f23918b..f98960c 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/Bright.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/Bright.java @@ -1,8 +1,8 @@ -package com.baseband.client.feature.render; +package de.com.baseband.client.feature.render; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Render; -import com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.registry.annotation.Config; import net.minecraft.init.MobEffects; import net.minecraft.potion.PotionEffect; diff --git a/Client/src/main/java/com/baseband/client/feature/render/ClickGUI.java b/Client/src/main/java/de/com/baseband/client/feature/render/ClickGUI.java similarity index 80% rename from Client/src/main/java/com/baseband/client/feature/render/ClickGUI.java rename to Client/src/main/java/de/com/baseband/client/feature/render/ClickGUI.java index a32aadd..2fcaa43 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/ClickGUI.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/ClickGUI.java @@ -1,13 +1,12 @@ -package com.baseband.client.feature.render; +package de.com.baseband.client.feature.render; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Render; -import com.baseband.client.gui.GuiRewrite; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; - -import static com.baseband.client.feature.Features.features; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.gui.GuiRewrite; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; @Render public class ClickGUI extends Feature { @@ -67,7 +66,7 @@ public class ClickGUI extends Feature { @Override protected void setup() { if(saveExpanded == SaveExpandedMode.UntilExit) { - for (Feature feature : features) { + for (Feature feature : Features.features) { feature.subComponentsShown = false; } } @@ -81,7 +80,7 @@ public class ClickGUI extends Feature { } if(guiRewrite == null) guiRewrite = new GuiRewrite(); if(saveExpanded == SaveExpandedMode.Never) { - for (Feature feature : features) { + for (Feature feature : Features.features) { feature.subComponentsShown = false; } } diff --git a/Client/src/main/java/com/baseband/client/feature/render/ESP.java b/Client/src/main/java/de/com/baseband/client/feature/render/ESP.java similarity index 86% rename from Client/src/main/java/com/baseband/client/feature/render/ESP.java rename to Client/src/main/java/de/com/baseband/client/feature/render/ESP.java index e80a17a..3575e53 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/ESP.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/ESP.java @@ -1,11 +1,11 @@ -package com.baseband.client.feature.render; +package de.com.baseband.client.feature.render; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.Render; -import com.baseband.client.feature.client.Client; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.util.render.RenderAdapter; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.util.render.RenderAdapter; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; diff --git a/Client/src/main/java/de/com/baseband/client/feature/render/Freecam.java b/Client/src/main/java/de/com/baseband/client/feature/render/Freecam.java new file mode 100644 index 0000000..c7784e4 --- /dev/null +++ b/Client/src/main/java/de/com/baseband/client/feature/render/Freecam.java @@ -0,0 +1,127 @@ +package de.com.baseband.client.feature.render; + +import de.com.baseband.client.event.events.PlayerDestroyEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.util.interact.FreecamPlayer; +import de.com.baseband.client.util.render.RenderAdapter; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.GameType; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.lwjgl.opengl.GL11; + +import java.util.Objects; + +@Render +public class Freecam extends Feature { + + GameType type; + + @Override + public boolean displayOnClickGUI() { + return true; + } + + public void onEnable() { + if(notIngame()) { + toggle(); + return; + } + + EntityPlayer player = new FreecamPlayer(mc.player, mc.world); + mc.world.spawnEntity(player); + mc.renderChunksMany = false; + mc.setRenderViewEntity(player); + } + + public void onPlayerDestroy(PlayerDestroyEvent event) { + toggle(); + } + + @Override + public String toString() { + return "Freecam"; + } + + @Override + public void onDisable() { + if(notIngame()) { + return; + } + mc.world.removeEntity(Objects.requireNonNull(mc.getRenderViewEntity())); + mc.setRenderViewEntity(mc.player); + mc.renderChunksMany = true; + } + + @SubscribeEvent + public void onRender(RenderWorldLastEvent event) { + + if(notIngame()) + return; + + Entity main = mc.player; + Entity e = mc.getRenderViewEntity(); + assert e != null; + Vec3d p = e.getPositionEyes(event.getPartialTicks()).add(0, -e.getEyeHeight(), 0); + Vec3d pos = main.getPositionVector(); + float entityHalfed = main.width / 2 + 0.01f; + float entityHeight = main.height + 0.01f; + + RenderAdapter.ready(); + RenderAdapter.translate(-p.x, -p.y, -p.z); + RenderAdapter.color(0x80ff0000); + RenderAdapter.depth(false); + RenderAdapter.begin(GL11.GL_QUADS); + + // bottom + RenderAdapter.put(pos.x - entityHalfed, pos.y - 0.01, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y - 0.01, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y - 0.01, pos.z - entityHalfed); + RenderAdapter.put(pos.x - entityHalfed, pos.y - 0.01, pos.z - entityHalfed); + + RenderAdapter.next(); + + // top + RenderAdapter.put(pos.x - entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); + RenderAdapter.put(pos.x - entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); + + RenderAdapter.next(); + + // z - + RenderAdapter.put(pos.x - entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y - 0.01, pos.z - entityHalfed); + RenderAdapter.put(pos.x - entityHalfed, pos.y - 0.01, pos.z - entityHalfed); + + RenderAdapter.next(); + + // z + + RenderAdapter.put(pos.x - entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y - 0.01, pos.z + entityHalfed); + RenderAdapter.put(pos.x - entityHalfed, pos.y - 0.01, pos.z + entityHalfed); + + RenderAdapter.next(); + + // x - + RenderAdapter.put(pos.x - entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); + RenderAdapter.put(pos.x - entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); + RenderAdapter.put(pos.x - entityHalfed, pos.y - 0.01, pos.z + entityHalfed); + RenderAdapter.put(pos.x - entityHalfed, pos.y - 0.01, pos.z - entityHalfed); + + RenderAdapter.next(); + + // y + + RenderAdapter.put(pos.x + entityHalfed, pos.y + entityHeight, pos.z - entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y + entityHeight, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y - 0.01, pos.z + entityHalfed); + RenderAdapter.put(pos.x + entityHalfed, pos.y - 0.01, pos.z - entityHalfed); + + RenderAdapter.end(); + } +} diff --git a/Client/src/main/java/com/baseband/client/feature/render/HUD.java b/Client/src/main/java/de/com/baseband/client/feature/render/HUD.java similarity index 82% rename from Client/src/main/java/com/baseband/client/feature/render/HUD.java rename to Client/src/main/java/de/com/baseband/client/feature/render/HUD.java index ee231bc..72bf416 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/HUD.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/HUD.java @@ -1,18 +1,18 @@ -package com.baseband.client.feature.render; +package de.com.baseband.client.feature.render; -import com.baseband.client.BaseBand; -import com.baseband.client.feature.Category; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.Render; -import com.baseband.client.feature.client.Client; -import com.baseband.client.feature.client.Spotify; -import com.baseband.client.gui.GuiTheme; -import com.baseband.client.registry.annotation.*; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.interact.ServerDataManager; -import com.baseband.client.util.render.Pixels; -import com.baseband.client.util.render.TextSplitter; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Category; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.feature.client.Spotify; +import de.com.baseband.client.gui.GuiTheme; +import de.com.baseband.client.registry.annotation.*; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.interact.ServerDataManager; +import de.com.baseband.client.util.render.Pixels; +import de.com.baseband.client.util.render.TextSplitter; import de.labystudio.spotifyapi.SpotifyAPI; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; @@ -25,10 +25,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.text.SimpleDateFormat; import java.util.*; -import static com.baseband.client.BaseBand.LOGGER; -import static com.baseband.client.feature.Features.features; -import static com.baseband.client.util.render.TextSplitter.*; - @Render public class HUD extends Feature { @@ -71,7 +67,7 @@ public class HUD extends Feature { } public static void notify(String text, int time) { - LOGGER.info(text); + BaseBand.LOGGER.info(text); notifs.add(new Notification(text, time)); } @@ -196,7 +192,7 @@ public class HUD extends Feature { infoString += posString(Objects.requireNonNull(mc.getRenderViewEntity()), "Camera"); } if (showTPS) - infoString += "TPS: " + (roundedTo(2, ServerDataManager.tps)); + infoString += "TPS: " + (TextSplitter.roundedTo(2, ServerDataManager.tps)); if (showTPS && showPing) infoString += " | "; if (showPing) @@ -218,18 +214,18 @@ public class HUD extends Feature { initString += "\n" + infoString + "\n"; } - int maxWidth = getStringWidth(initString); - Feature[] renderFeatures = Arrays.stream(features).filter(m -> m.enabled && m.category != Category.COMMAND && m.getClass() != Client.class && m != this && m.renderInHUD()).sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(includeStatus ? value.text : value.toString()))).toArray(Feature[]::new); + int maxWidth = TextSplitter.getStringWidth(initString); + Feature[] renderFeatures = Arrays.stream(Features.features).filter(m -> m.enabled && m.category != Category.COMMAND && m.getClass() != Client.class && m != this && m.renderInHUD()).sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(includeStatus ? value.text : value.toString()))).toArray(Feature[]::new); for (Feature f : renderFeatures) { maxWidth = Math.max(mc.fontRenderer.getStringWidth(f.text), maxWidth); } if(background) { - Gui.drawRect(2, 2, maxWidth + 4, renderFeatures.length * mc.fontRenderer.FONT_HEIGHT + getStringHeight(initString) + 4, Pixels.mulTransparency(theme.getBackgroundColor(), 0.5f)); + Gui.drawRect(2, 2, maxWidth + 4, renderFeatures.length * mc.fontRenderer.FONT_HEIGHT + TextSplitter.getStringHeight(initString) + 4, Pixels.mulTransparency(theme.getBackgroundColor(), 0.5f)); } - drawString(initString, 3,3, theme.getGreenColor(), textShadow); - int y = 3 + getStringHeight(initString); + TextSplitter.drawString(initString, 3,3, theme.getGreenColor(), textShadow); + int y = 3 + TextSplitter.getStringHeight(initString); for (Feature f : renderFeatures) { mc.fontRenderer.drawString(f.text, 3, y, theme.getGreenColor(), textShadow); y = y + mc.fontRenderer.FONT_HEIGHT; @@ -266,7 +262,7 @@ public class HUD extends Feature { drawSizedBox(x, y, xSize, localYSize, 0x202040 + (notif.opacity(0x80, 1) << 24), isCenter == 1); GlStateManager.enableBlend(); - drawString(text, x + textOffset, y + textOffset - isCenter * textboxYSize, 0xffffff + (Math.max(8, notif.opacity(0xff, 2)) << 24), notif.opacity(2) == 1.0 && textShadow); + TextSplitter.drawString(text, x + textOffset, y + textOffset - isCenter * textboxYSize, 0xffffff + (Math.max(8, notif.opacity(0xff, 2)) << 24), notif.opacity(2) == 1.0 && textShadow); GlStateManager.disableBlend(); y += (localYSize + nVSpace) * dir; } @@ -275,17 +271,17 @@ public class HUD extends Feature { y = 3; switch (infoLoc) { case BottomRight: - y = sr.getScaledHeight() - 3 - getStringHeight(infoString); + y = sr.getScaledHeight() - 3 - TextSplitter.getStringHeight(infoString); case TopRight: - x = sr.getScaledWidth() - 3 - getStringWidth(infoString); + x = sr.getScaledWidth() - 3 - TextSplitter.getStringWidth(infoString); break; } if(background) { - drawSizedBox(x - 1, y - 1, getStringWidth(infoString) + 2, getStringHeight(infoString) + 2, Pixels.mulTransparency(theme.getBackgroundColor(), 0.5f), false); + drawSizedBox(x - 1, y - 1, TextSplitter.getStringWidth(infoString) + 2, TextSplitter.getStringHeight(infoString) + 2, Pixels.mulTransparency(theme.getBackgroundColor(), 0.5f), false); } - drawString(infoString, x, y, theme.getGreenColor(), textShadow); + TextSplitter.drawString(infoString, x, y, theme.getGreenColor(), textShadow); } } @@ -294,7 +290,7 @@ public class HUD extends Feature { } private void drawStringCentered(String s, int x, int y, int color, boolean shadow) { - drawString(s, x - getStringWidth(s), y, color, shadow); + TextSplitter.drawString(s, x - TextSplitter.getStringWidth(s), y, color, shadow); } private String posString(Entity e, String name) { diff --git a/Client/src/main/java/com/baseband/client/feature/render/Nametags.java b/Client/src/main/java/de/com/baseband/client/feature/render/Nametags.java similarity index 97% rename from Client/src/main/java/com/baseband/client/feature/render/Nametags.java rename to Client/src/main/java/de/com/baseband/client/feature/render/Nametags.java index e8e4aba..936da91 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/Nametags.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/Nametags.java @@ -1,9 +1,9 @@ -package com.baseband.client.feature.render; +package de.com.baseband.client.feature.render; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Render; -import com.baseband.client.mixin.mixins.IMinecraft; -import com.baseband.client.mixin.mixins.IRenderManager; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.mixin.mixins.IMinecraft; +import de.com.baseband.client.mixin.mixins.IRenderManager; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; diff --git a/Client/src/main/java/com/baseband/client/feature/render/NoRender.java b/Client/src/main/java/de/com/baseband/client/feature/render/NoRender.java similarity index 79% rename from Client/src/main/java/com/baseband/client/feature/render/NoRender.java rename to Client/src/main/java/de/com/baseband/client/feature/render/NoRender.java index 02b3dfa..68ad224 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/NoRender.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/NoRender.java @@ -1,8 +1,8 @@ -package com.baseband.client.feature.render; +package de.com.baseband.client.feature.render; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Render; -import com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.registry.annotation.Config; import net.minecraftforge.client.event.RenderBlockOverlayEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; diff --git a/Client/src/main/java/com/baseband/client/feature/render/RenderFun.java b/Client/src/main/java/de/com/baseband/client/feature/render/RenderFun.java similarity index 73% rename from Client/src/main/java/com/baseband/client/feature/render/RenderFun.java rename to Client/src/main/java/de/com/baseband/client/feature/render/RenderFun.java index 44a66cc..7613a44 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/RenderFun.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/RenderFun.java @@ -1,11 +1,11 @@ -package com.baseband.client.feature.render; +package de.com.baseband.client.feature.render; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.Render; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.Render; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.util.adapt.Marker; import net.minecraftforge.client.event.EntityViewRenderEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import org.lwjgl.opengl.GL11; diff --git a/Client/src/main/java/com/baseband/client/feature/world/AutoEat.java b/Client/src/main/java/de/com/baseband/client/feature/world/AutoEat.java similarity index 92% rename from Client/src/main/java/com/baseband/client/feature/world/AutoEat.java rename to Client/src/main/java/de/com/baseband/client/feature/world/AutoEat.java index aa5168c..08e8606 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/AutoEat.java +++ b/Client/src/main/java/de/com/baseband/client/feature/world/AutoEat.java @@ -1,11 +1,11 @@ -package com.baseband.client.feature.world; +package de.com.baseband.client.feature.world; -import com.baseband.client.event.events.BaritoneEvent; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.World; -import com.baseband.client.mixin.mixins.IMinecraft; -import com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.event.events.BaritoneEvent; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.World; +import de.com.baseband.client.mixin.mixins.IMinecraft; +import de.com.baseband.client.registry.annotation.Config; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.settings.KeyBinding; import net.minecraft.init.MobEffects; diff --git a/Client/src/main/java/com/baseband/client/feature/world/AutoRespawn.java b/Client/src/main/java/de/com/baseband/client/feature/world/AutoRespawn.java similarity index 65% rename from Client/src/main/java/com/baseband/client/feature/world/AutoRespawn.java rename to Client/src/main/java/de/com/baseband/client/feature/world/AutoRespawn.java index 89cd016..615d3eb 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/AutoRespawn.java +++ b/Client/src/main/java/de/com/baseband/client/feature/world/AutoRespawn.java @@ -1,8 +1,8 @@ -package com.baseband.client.feature.world; +package de.com.baseband.client.feature.world; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.World; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.World; import de.tudbut.tools.Lock; import net.minecraft.client.gui.GuiGameOver; @@ -19,7 +19,7 @@ public class AutoRespawn extends Feature { if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) { mc.player.respawnPlayer(); mc.displayGuiScreen(null); - Chat.notify("[AutoRespawn] Respawned."); + BaseBand.notify("[AutoRespawn] Respawned."); lock.lock(500); } } diff --git a/Client/src/main/java/com/baseband/client/feature/world/AutoSignText.java b/Client/src/main/java/de/com/baseband/client/feature/world/AutoSignText.java similarity index 68% rename from Client/src/main/java/com/baseband/client/feature/world/AutoSignText.java rename to Client/src/main/java/de/com/baseband/client/feature/world/AutoSignText.java index e34bffe..3cc7a12 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/AutoSignText.java +++ b/Client/src/main/java/de/com/baseband/client/feature/world/AutoSignText.java @@ -1,8 +1,8 @@ -package com.baseband.client.feature.world; +package de.com.baseband.client.feature.world; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.World; -import com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.World; +import de.com.baseband.client.registry.annotation.Config; @World public class AutoSignText extends Feature { diff --git a/Client/src/main/java/com/baseband/client/feature/world/FastBreak.java b/Client/src/main/java/de/com/baseband/client/feature/world/FastBreak.java similarity index 82% rename from Client/src/main/java/com/baseband/client/feature/world/FastBreak.java rename to Client/src/main/java/de/com/baseband/client/feature/world/FastBreak.java index fdc2aa9..beab50a 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/FastBreak.java +++ b/Client/src/main/java/de/com/baseband/client/feature/world/FastBreak.java @@ -1,10 +1,10 @@ -package com.baseband.client.feature.world; +package de.com.baseband.client.feature.world; -import com.baseband.client.event.events.DamageBlockEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.World; -import com.baseband.client.mixin.mixins.IPlayerControllerMP; -import com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.event.events.DamageBlockEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.World; +import de.com.baseband.client.mixin.mixins.IPlayerControllerMP; +import de.com.baseband.client.registry.annotation.Config; import net.minecraft.network.play.client.CPacketPlayerDigging; import net.minecraft.util.EnumHand; diff --git a/Client/src/main/java/com/baseband/client/feature/world/Ping.java b/Client/src/main/java/de/com/baseband/client/feature/world/Ping.java similarity index 81% rename from Client/src/main/java/com/baseband/client/feature/world/Ping.java rename to Client/src/main/java/de/com/baseband/client/feature/world/Ping.java index 158f17d..f306c67 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/Ping.java +++ b/Client/src/main/java/de/com/baseband/client/feature/world/Ping.java @@ -1,11 +1,11 @@ -package com.baseband.client.feature.world; +package de.com.baseband.client.feature.world; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.World; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Description; -import com.baseband.client.registry.annotation.Range; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.World; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Description; +import de.com.baseband.client.registry.annotation.Range; import net.minecraft.network.play.client.CPacketKeepAlive; @World diff --git a/Client/src/main/java/com/baseband/client/feature/world/SeedOverlay.java b/Client/src/main/java/de/com/baseband/client/feature/world/SeedOverlay.java similarity index 87% rename from Client/src/main/java/com/baseband/client/feature/world/SeedOverlay.java rename to Client/src/main/java/de/com/baseband/client/feature/world/SeedOverlay.java index 821e393..d5b5618 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/SeedOverlay.java +++ b/Client/src/main/java/de/com/baseband/client/feature/world/SeedOverlay.java @@ -1,14 +1,15 @@ -package com.baseband.client.feature.world; +package de.com.baseband.client.feature.world; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.category.World; -import com.baseband.client.feature.render.ClickGUI; -import com.baseband.client.registry.annotation.*; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.adapt.SimpleWorldGenerator; -import com.baseband.client.util.interact.Chat; -import com.baseband.client.util.render.Pixels; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.World; +import de.com.baseband.client.feature.render.ClickGUI; +import de.com.baseband.client.registry.annotation.*; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.adapt.SimpleWorldGenerator; +import de.com.baseband.client.util.render.Pixels; +import de.com.baseband.client.util.render.RenderAdapter; import de.tudbut.tools.Lock; import net.minecraft.block.Block; import net.minecraft.client.entity.EntityPlayerSP; @@ -23,9 +24,6 @@ import org.lwjgl.opengl.GL11; import java.util.ArrayList; import java.util.Objects; -import static com.baseband.client.BaseBand.LOGGER; -import static com.baseband.client.util.render.RenderAdapter.*; - @World @Description("Shows changes done to the world compared to its original state\n" + "This module works similarly to the original in TTC, but is written form the ground up because the old code sucked.") @@ -110,25 +108,25 @@ public class SeedOverlay extends Feature { } catch (NumberFormatException e) { seed = this.seed.hashCode(); } - Chat.notify("Creating world with seed " + seed + "..."); + BaseBand.notify("Creating world with seed " + seed + "..."); int rd = this.rd * 2 + 1; genOverworld = SimpleWorldGenerator.overworld(mc.world.getWorldInfo(), seed, rd); genNether = SimpleWorldGenerator.nether(mc.world.getWorldInfo(), seed, rd); genEnd = SimpleWorldGenerator.end(mc.world.getWorldInfo(), seed, rd); int length = rd * 16 * 256 * rd * 16; - Chat.notify("World generators acquired. Allocating render buffer with " + (length * 4 / 1024) + "KB space."); + BaseBand.notify("World generators acquired. Allocating render buffer with " + (length * 4 / 1024) + "KB space."); bufferPosition = new BlockPos((mc.player.chunkCoordX - this.rd) * 16, 0, (mc.player.chunkCoordZ - this.rd) * 16); frontBuffer = new int[rd * 16][256][rd * 16]; backBuffer = new int[rd * 16][256][rd * 16]; - LOGGER.info("Allocated."); + BaseBand.LOGGER.info("Allocated."); for (int x = 0; x < rd * 16; x++) { for (int z = 0; z < rd * 16; z++) { frontBuffer[x][0][z] = 0x800000ff; backBuffer[x][0][z] = 0x800000ff; } } - LOGGER.info("Filled buffer with unloaded state."); - Chat.notify("Render buffer created. Starting..."); + BaseBand.LOGGER.info("Filled buffer with unloaded state."); + BaseBand.notify("Render buffer created. Starting..."); setEnabled(true); }, this + " init").start(); } @@ -150,7 +148,7 @@ public class SeedOverlay extends Feature { // these should already be stopped! if(updater.isAlive() || generator.isAlive()) { - LOGGER.warn(this + " threads were still running when stopping the world. This should not happen! Stopping them forcefully."); + BaseBand.LOGGER.warn(this + " threads were still running when stopping the world. This should not happen! Stopping them forcefully."); //noinspection deprecation updater.stop(); //noinspection deprecation @@ -168,7 +166,7 @@ public class SeedOverlay extends Feature { backBuffer = null; canSetRD = true; - LOGGER.info("SeedOverlay completely disabled."); + BaseBand.LOGGER.info("SeedOverlay completely disabled."); }, this + " stopper").start(); } @@ -177,7 +175,7 @@ public class SeedOverlay extends Feature { @Override public void onEnable() { if(frontBuffer == null) { - Chat.notify("Please input a |Seed| and trigger |Generate now|"); + BaseBand.notify("Please input a |Seed| and trigger |Generate now|"); toggle(); return; } @@ -319,22 +317,22 @@ public class SeedOverlay extends Feature { @SubscribeEvent public synchronized void onRender(RenderWorldLastEvent event) { Vec3d p = Objects.requireNonNull(mc.getRenderViewEntity()).getPositionEyes(event.getPartialTicks()).add(0, -mc.getRenderViewEntity().getEyeHeight(), 0); - ready(); - translate(-p.x + bufferPosition.getX(), -p.y, -p.z + bufferPosition.getZ()); - color(0xffff00ff); // if this renders, this is an error - depth(false); - begin(GL11.GL_QUADS); + RenderAdapter.ready(); + RenderAdapter.translate(-p.x + bufferPosition.getX(), -p.y, -p.z + bufferPosition.getZ()); + RenderAdapter.color(0xffff00ff); // if this renders, this is an error + RenderAdapter.depth(false); + RenderAdapter.begin(GL11.GL_QUADS); for (int x = 0; x < frontBuffer.length; x++) { for (int y = 0; y < frontBuffer[x].length; y++) { for (int z = 0; z < frontBuffer[x][y].length; z++) { int c = frontBuffer[x][y][z]; if(c != 0) { - changeColor(c); - drawBlockFacesNow(x, y, z); + RenderAdapter.changeColor(c); + RenderAdapter.drawBlockFacesNow(x, y, z); } } } } - end(); + RenderAdapter.end(); } } diff --git a/Client/src/main/java/com/baseband/client/feature/world/Select.java b/Client/src/main/java/de/com/baseband/client/feature/world/Select.java similarity index 64% rename from Client/src/main/java/com/baseband/client/feature/world/Select.java rename to Client/src/main/java/de/com/baseband/client/feature/world/Select.java index 0b67dd5..395cac5 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/Select.java +++ b/Client/src/main/java/de/com/baseband/client/feature/world/Select.java @@ -1,12 +1,11 @@ -package com.baseband.client.feature.world; +package de.com.baseband.client.feature.world; -import com.baseband.client.BaseBand; -import com.baseband.client.event.Priority; -import com.baseband.client.event.events.SelectEvent; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.category.World; -import com.baseband.client.util.interact.Chat; -import com.baseband.client.util.type.Selection; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.Priority; +import de.com.baseband.client.event.events.SelectEvent; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.category.World; +import de.com.baseband.client.util.type.Selection; import net.minecraft.util.math.BlockPos; @World @@ -19,13 +18,13 @@ public class Select extends Feature { if(end != null || begin == null) { begin = b; end = null; - Chat.notify("Selection reset."); - Chat.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ()); + BaseBand.notify("Selection reset."); + BaseBand.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ()); BaseBand.publish(new SelectEvent(null)); return; } end = b; - Chat.notify("Position 2: " + b.getX() + " " + b.getY() + " " + b.getZ()); + BaseBand.notify("Position 2: " + b.getX() + " " + b.getY() + " " + b.getZ()); BaseBand.publish(new SelectEvent(new Selection(begin, end))); } diff --git a/Client/src/main/java/com/baseband/client/gui/GuiBBIngame.java b/Client/src/main/java/de/com/baseband/client/gui/GuiBBIngame.java similarity index 88% rename from Client/src/main/java/com/baseband/client/gui/GuiBBIngame.java rename to Client/src/main/java/de/com/baseband/client/gui/GuiBBIngame.java index 9cefac8..e508387 100644 --- a/Client/src/main/java/com/baseband/client/gui/GuiBBIngame.java +++ b/Client/src/main/java/de/com/baseband/client/gui/GuiBBIngame.java @@ -1,6 +1,7 @@ -package com.baseband.client.gui; +package de.com.baseband.client.gui; -import com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.util.adapt.FieldFinder; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiIngame; @@ -13,8 +14,6 @@ import net.minecraft.util.ResourceLocation; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import static com.baseband.client.BaseBand.mc; - public class GuiBBIngame extends Gui { public static void drawOffhandSlot(int x, int y) { @@ -23,7 +22,7 @@ public class GuiBBIngame extends Gui { public void drawOffhandSlot0(int x, int y) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/widgets.png")); + BaseBand.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/widgets.png")); drawTexturedModalRect(x, y, 24, 22, 29, 24); } diff --git a/Client/src/main/java/com/baseband/client/gui/GuiRewrite.java b/Client/src/main/java/de/com/baseband/client/gui/GuiRewrite.java similarity index 88% rename from Client/src/main/java/com/baseband/client/gui/GuiRewrite.java rename to Client/src/main/java/de/com/baseband/client/gui/GuiRewrite.java index d0ad5ef..8202806 100644 --- a/Client/src/main/java/com/baseband/client/gui/GuiRewrite.java +++ b/Client/src/main/java/de/com/baseband/client/gui/GuiRewrite.java @@ -1,12 +1,12 @@ -package com.baseband.client.gui; +package de.com.baseband.client.gui; -import com.baseband.client.BaseBand; -import com.baseband.client.feature.Feature; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.render.ClickGUI; -import com.baseband.client.gui.lib.GUIManager; -import com.baseband.client.gui.lib.component.Category; -import com.baseband.client.gui.lib.component.Component; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.render.ClickGUI; +import de.com.baseband.client.gui.lib.GUIManager; +import de.com.baseband.client.gui.lib.component.Category; +import de.com.baseband.client.gui.lib.component.Component; import de.tudbut.obj.TLMap; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; @@ -17,8 +17,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; -import static com.baseband.client.feature.Features.features; - public class GuiRewrite extends GuiScreen { // The mouse X and Y @@ -58,8 +56,8 @@ public class GuiRewrite extends GuiScreen { private void createComponents() { ArrayList categories = new ArrayList<>(); int y = 10; - TLMap map = new TLMap<>(); - for (Feature feature : features) { + TLMap map = new TLMap<>(); + for (Feature feature : Features.features) { if (!feature.displayOnClickGUI()) { continue; } @@ -92,7 +90,7 @@ public class GuiRewrite extends GuiScreen { super.onGuiClosed(); Features.getFeature(ClickGUI.class).setEnabled(false); for (Category category : categories) { - com.baseband.client.feature.Category c = com.baseband.client.feature.Category.fromName(category.text); + de.com.baseband.client.feature.Category c = de.com.baseband.client.feature.Category.fromName(category.text); assert c != null; c.show = category.subComponentsShown; c.x = category.location.getX(); diff --git a/Client/src/main/java/com/baseband/client/gui/GuiTheme.java b/Client/src/main/java/de/com/baseband/client/gui/GuiTheme.java similarity index 98% rename from Client/src/main/java/com/baseband/client/gui/GuiTheme.java rename to Client/src/main/java/de/com/baseband/client/gui/GuiTheme.java index a719168..b36b578 100644 --- a/Client/src/main/java/com/baseband/client/gui/GuiTheme.java +++ b/Client/src/main/java/de/com/baseband/client/gui/GuiTheme.java @@ -1,4 +1,4 @@ -package com.baseband.client.gui; +package de.com.baseband.client.gui; import net.minecraft.client.gui.GuiScreen; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/GUIManager.java b/Client/src/main/java/de/com/baseband/client/gui/lib/GUIManager.java similarity index 92% rename from Client/src/main/java/com/baseband/client/gui/lib/GUIManager.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/GUIManager.java index cb473d1..3a91ec1 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/GUIManager.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/GUIManager.java @@ -1,9 +1,9 @@ -package com.baseband.client.gui.lib; +package de.com.baseband.client.gui.lib; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.client.Client; -import com.baseband.client.gui.GuiTheme; -import com.baseband.client.gui.lib.component.Component; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.gui.GuiTheme; +import de.com.baseband.client.gui.lib.component.Component; import org.lwjgl.util.Rectangle; import java.util.HashMap; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/RenderException.java b/Client/src/main/java/de/com/baseband/client/gui/lib/RenderException.java similarity index 84% rename from Client/src/main/java/com/baseband/client/gui/lib/RenderException.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/RenderException.java index 5de6b8d..0cfa063 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/RenderException.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/RenderException.java @@ -1,6 +1,6 @@ -package com.baseband.client.gui.lib; +package de.com.baseband.client.gui.lib; -import com.baseband.client.gui.lib.component.Component; +import de.com.baseband.client.gui.lib.component.Component; public class RenderException extends Exception { diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/Button.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Button.java similarity index 92% rename from Client/src/main/java/com/baseband/client/gui/lib/component/Button.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/Button.java index 0bac07e..951852a 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/Button.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Button.java @@ -1,4 +1,4 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; public class Button extends Component { diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/Category.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Category.java similarity index 93% rename from Client/src/main/java/com/baseband/client/gui/lib/component/Category.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/Category.java index 22cf0ad..68d8f3d 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/Category.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Category.java @@ -1,7 +1,7 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.gui.lib.GUIManager; -import com.baseband.client.gui.lib.RenderException; +import de.com.baseband.client.gui.lib.GUIManager; +import de.com.baseband.client.gui.lib.RenderException; import de.tudbut.obj.Transient; import net.minecraft.client.gui.Gui; import org.lwjgl.util.Point; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/Component.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Component.java similarity index 92% rename from Client/src/main/java/com/baseband/client/gui/lib/component/Component.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/Component.java index e68b8e2..c5bbb99 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/Component.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Component.java @@ -1,13 +1,13 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.BaseBand; -import com.baseband.client.gui.lib.GUIManager; -import com.baseband.client.gui.lib.RenderException; -import com.baseband.client.registry.AnyGate; -import com.baseband.client.registry.annotation.Config; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.util.adapt.Marker; -import com.baseband.client.util.render.TextSplitter; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.gui.lib.GUIManager; +import de.com.baseband.client.gui.lib.RenderException; +import de.com.baseband.client.registry.AnyGate; +import de.com.baseband.client.registry.annotation.Config; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.util.render.TextSplitter; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/EnumButton.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/EnumButton.java similarity index 88% rename from Client/src/main/java/com/baseband/client/gui/lib/component/EnumButton.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/EnumButton.java index ff6ce71..50614c3 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/EnumButton.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/EnumButton.java @@ -1,7 +1,7 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.feature.command.Set; -import com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.feature.command.Set; +import de.com.baseband.client.registry.ConfigHandle; public class EnumButton extends Component { ConfigHandle handle; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/IntSlider.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/IntSlider.java similarity index 92% rename from Client/src/main/java/com/baseband/client/gui/lib/component/IntSlider.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/IntSlider.java index adbe837..564878e 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/IntSlider.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/IntSlider.java @@ -1,15 +1,14 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.feature.command.Set; -import com.baseband.client.gui.lib.GUIManager; -import com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.command.Set; +import de.com.baseband.client.gui.lib.GUIManager; +import de.com.baseband.client.registry.ConfigHandle; import net.minecraft.client.gui.Gui; import org.lwjgl.input.Keyboard; import java.util.function.Function; -import static com.baseband.client.BaseBand.LOGGER; - public class IntSlider extends Component { public float f = 0; @@ -80,7 +79,7 @@ public class IntSlider extends Component { try { f = (handle.getContent().getInteger(field) - adder) / (float) mapper; } catch (NullPointerException e) { - LOGGER.debug(e.getStackTrace()); + BaseBand.LOGGER.debug(e.getStackTrace()); } if(countdown > 0) { --countdown; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/KeyButton.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/KeyButton.java similarity index 92% rename from Client/src/main/java/com/baseband/client/gui/lib/component/KeyButton.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/KeyButton.java index 5b92087..49787b7 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/KeyButton.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/KeyButton.java @@ -1,6 +1,6 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.registry.ConfigHandle; import org.lwjgl.input.Keyboard; public class KeyButton extends Button { diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/Slider.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Slider.java similarity index 92% rename from Client/src/main/java/com/baseband/client/gui/lib/component/Slider.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/Slider.java index 84866f1..002ecfb 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/Slider.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/Slider.java @@ -1,15 +1,14 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.feature.command.Set; -import com.baseband.client.gui.lib.GUIManager; -import com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.command.Set; +import de.com.baseband.client.gui.lib.GUIManager; +import de.com.baseband.client.registry.ConfigHandle; import net.minecraft.client.gui.Gui; import org.lwjgl.input.Keyboard; import java.util.function.Function; -import static com.baseband.client.BaseBand.LOGGER; - public class Slider extends Component { public float f = 0; @@ -78,7 +77,7 @@ public class Slider extends Component { try { f = (handle.getContent().getFloat(field) - adder) / mapper; } catch (NullPointerException e) { - LOGGER.debug(e.getStackTrace()); + BaseBand.LOGGER.debug(e.getStackTrace()); } if(countdown > 0) { --countdown; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/StringButton.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/StringButton.java similarity index 87% rename from Client/src/main/java/com/baseband/client/gui/lib/component/StringButton.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/StringButton.java index 9c03dc4..971e137 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/StringButton.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/StringButton.java @@ -1,7 +1,7 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.feature.command.Set; -import com.baseband.client.registry.ConfigHandle; +import de.com.baseband.client.feature.command.Set; +import de.com.baseband.client.registry.ConfigHandle; public class StringButton extends Button { protected final String name; diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/ToggleButton.java b/Client/src/main/java/de/com/baseband/client/gui/lib/component/ToggleButton.java similarity index 84% rename from Client/src/main/java/com/baseband/client/gui/lib/component/ToggleButton.java rename to Client/src/main/java/de/com/baseband/client/gui/lib/component/ToggleButton.java index e29b0dc..6fac02c 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/ToggleButton.java +++ b/Client/src/main/java/de/com/baseband/client/gui/lib/component/ToggleButton.java @@ -1,9 +1,8 @@ -package com.baseband.client.gui.lib.component; +package de.com.baseband.client.gui.lib.component; -import com.baseband.client.feature.command.Set; -import com.baseband.client.registry.ConfigHandle; - -import static com.baseband.client.BaseBand.LOGGER; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.feature.command.Set; +import de.com.baseband.client.registry.ConfigHandle; public class ToggleButton extends Component { @@ -33,7 +32,7 @@ public class ToggleButton extends Component { try { green = handle.getContent().getBoolean(field); } catch (NullPointerException e) { - LOGGER.debug(e.getStackTrace()); + BaseBand.LOGGER.debug(e.getStackTrace()); } } diff --git a/Client/src/main/java/com/baseband/client/mixin/MixinProxy.java b/Client/src/main/java/de/com/baseband/client/mixin/MixinProxy.java similarity index 84% rename from Client/src/main/java/com/baseband/client/mixin/MixinProxy.java rename to Client/src/main/java/de/com/baseband/client/mixin/MixinProxy.java index 2dc4f0a..3a8484c 100644 --- a/Client/src/main/java/com/baseband/client/mixin/MixinProxy.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/MixinProxy.java @@ -1,16 +1,16 @@ -package com.baseband.client.mixin; +package de.com.baseband.client.mixin; -import com.baseband.client.BaseBand; -import com.baseband.client.event.events.DamageBlockEvent; -import com.baseband.client.event.events.MotionUpdateEvent; -import com.baseband.client.event.events.MoveEvent; -import com.baseband.client.event.events.PacketEvent; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.chat.ChatExtras; -import com.baseband.client.feature.client.Client; -import com.baseband.client.feature.render.NoRender; -import com.baseband.client.feature.world.AutoSignText; -import com.baseband.client.util.net.ScreenshotHelper; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.event.events.DamageBlockEvent; +import de.com.baseband.client.event.events.MotionUpdateEvent; +import de.com.baseband.client.event.events.MoveEvent; +import de.com.baseband.client.event.events.PacketEvent; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.chat.ChatExtras; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.feature.render.NoRender; +import de.com.baseband.client.feature.world.AutoSignText; +import de.com.baseband.client.util.net.ScreenshotHelper; import net.minecraft.client.gui.ChatLine; import net.minecraft.client.gui.Gui; import net.minecraft.client.multiplayer.WorldClient; @@ -118,13 +118,13 @@ public class MixinProxy { public static class MoveEventProxy { public static boolean isCancelled(Object e) { - return ((com.baseband.client.event.events.MoveEvent) e).isCancelled(); + return ((MoveEvent) e).isCancelled(); } public static MoverType getType(Object e) { - return ((com.baseband.client.event.events.MoveEvent) e).type; + return ((MoveEvent) e).type; } public static Vec3d getVec(Object e) { - com.baseband.client.event.events.MoveEvent ev = (com.baseband.client.event.events.MoveEvent) e; + MoveEvent ev = (MoveEvent) e; return new Vec3d(ev.x, ev.y, ev.z); } } diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/ICPacketChat.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/ICPacketChat.java similarity index 86% rename from Client/src/main/java/com/baseband/client/mixin/mixins/ICPacketChat.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/ICPacketChat.java index 86587ac..254cc43 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/ICPacketChat.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/ICPacketChat.java @@ -1,4 +1,4 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; import net.minecraft.network.play.client.CPacketChatMessage; import org.spongepowered.asm.mixin.Mixin; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/IMinecraft.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/IMinecraft.java similarity index 89% rename from Client/src/main/java/com/baseband/client/mixin/mixins/IMinecraft.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/IMinecraft.java index aeed274..a39c64b 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/IMinecraft.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/IMinecraft.java @@ -1,4 +1,4 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; import net.minecraft.client.Minecraft; import net.minecraft.util.Timer; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/IPlayerControllerMP.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/IPlayerControllerMP.java similarity index 90% rename from Client/src/main/java/com/baseband/client/mixin/mixins/IPlayerControllerMP.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/IPlayerControllerMP.java index a71b355..928c667 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/IPlayerControllerMP.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/IPlayerControllerMP.java @@ -1,4 +1,4 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; import net.minecraft.client.multiplayer.PlayerControllerMP; import org.spongepowered.asm.mixin.Mixin; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/IRenderManager.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/IRenderManager.java similarity index 81% rename from Client/src/main/java/com/baseband/client/mixin/mixins/IRenderManager.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/IRenderManager.java index da06f27..7b4fd2f 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/IRenderManager.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/IRenderManager.java @@ -1,7 +1,6 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.util.math.Vec3d; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/ISPacketExplosion.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/ISPacketExplosion.java similarity index 89% rename from Client/src/main/java/com/baseband/client/mixin/mixins/ISPacketExplosion.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/ISPacketExplosion.java index 1b6dad8..ef833ba 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/ISPacketExplosion.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/ISPacketExplosion.java @@ -1,4 +1,4 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; import net.minecraft.network.play.server.SPacketExplosion; import org.spongepowered.asm.mixin.Mixin; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/ITimer.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/ITimer.java similarity index 83% rename from Client/src/main/java/com/baseband/client/mixin/mixins/ITimer.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/ITimer.java index 88adbc4..a0c0a04 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/ITimer.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/ITimer.java @@ -1,4 +1,4 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; import net.minecraft.util.Timer; import org.spongepowered.asm.mixin.Mixin; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinEntityPlayerSP.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEntityPlayerSP.java similarity index 96% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinEntityPlayerSP.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEntityPlayerSP.java index 5debaae..3a969c9 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinEntityPlayerSP.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEntityPlayerSP.java @@ -1,7 +1,7 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; import com.mojang.authlib.GameProfile; +import de.com.baseband.client.mixin.MixinProxy; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.MoverType; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinEntityRender.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEntityRender.java similarity index 92% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinEntityRender.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEntityRender.java index 90e2e97..960533c 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinEntityRender.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEntityRender.java @@ -1,6 +1,6 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; +import de.com.baseband.client.mixin.MixinProxy; import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.client.renderer.EntityRenderer; import net.minecraft.util.math.RayTraceResult; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinEventBus.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEventBus.java similarity index 92% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinEventBus.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEventBus.java index 96443e1..f9b32cc 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinEventBus.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinEventBus.java @@ -1,8 +1,8 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; import net.minecraftforge.fml.common.eventhandler.EventBus; -import org.spongepowered.asm.mixin.Mixin; import org.apache.logging.log4j.Logger; +import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinFMLNetworkRegistry.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinFMLNetworkRegistry.java similarity index 96% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinFMLNetworkRegistry.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinFMLNetworkRegistry.java index acbbf53..a0de725 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinFMLNetworkRegistry.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinFMLNetworkRegistry.java @@ -1,6 +1,5 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.BaseBand; import com.google.common.collect.Maps; import io.netty.channel.ChannelHandler; import net.minecraftforge.fml.common.ModContainer; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinGuiEditSign.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinGuiEditSign.java similarity index 88% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinGuiEditSign.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinGuiEditSign.java index 24bd7ce..ad0db23 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinGuiEditSign.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinGuiEditSign.java @@ -1,6 +1,6 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; +import de.com.baseband.client.mixin.MixinProxy; import net.minecraft.client.gui.inventory.GuiEditSign; import net.minecraft.tileentity.TileEntitySign; import org.spongepowered.asm.mixin.Final; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinGuiNewChat.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinGuiNewChat.java similarity index 92% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinGuiNewChat.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinGuiNewChat.java index e24d906..f83e317 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinGuiNewChat.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinGuiNewChat.java @@ -1,6 +1,6 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; +import de.com.baseband.client.mixin.MixinProxy; import net.minecraft.client.gui.ChatLine; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiNewChat; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinMinecraft.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinMinecraft.java similarity index 82% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinMinecraft.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinMinecraft.java index 4f66ac5..d41d14a 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinMinecraft.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinMinecraft.java @@ -1,6 +1,6 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; +import de.com.baseband.client.mixin.MixinProxy; import net.minecraft.client.Minecraft; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinNetworkManager.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinNetworkManager.java similarity index 91% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinNetworkManager.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinNetworkManager.java index 90bbf3c..b9e17ff 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinNetworkManager.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinNetworkManager.java @@ -1,6 +1,6 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; +import de.com.baseband.client.mixin.MixinProxy; import io.netty.channel.ChannelHandlerContext; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinPlayerControllerMP.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinPlayerControllerMP.java similarity index 90% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinPlayerControllerMP.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinPlayerControllerMP.java index 985c26f..4b23feb 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinPlayerControllerMP.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinPlayerControllerMP.java @@ -1,6 +1,6 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; +import de.com.baseband.client.mixin.MixinProxy; import net.minecraft.client.multiplayer.PlayerControllerMP; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; diff --git a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinScreenshotHelper.java b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinScreenshotHelper.java similarity index 90% rename from Client/src/main/java/com/baseband/client/mixin/mixins/MixinScreenshotHelper.java rename to Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinScreenshotHelper.java index b0d3f01..edd45d2 100644 --- a/Client/src/main/java/com/baseband/client/mixin/mixins/MixinScreenshotHelper.java +++ b/Client/src/main/java/de/com/baseband/client/mixin/mixins/MixinScreenshotHelper.java @@ -1,7 +1,7 @@ -package com.baseband.client.mixin.mixins; +package de.com.baseband.client.mixin.mixins; -import com.baseband.client.mixin.MixinProxy; +import de.com.baseband.client.mixin.MixinProxy; import net.minecraft.client.shader.Framebuffer; import net.minecraft.util.ScreenShotHelper; import org.spongepowered.asm.mixin.Mixin; diff --git a/Client/src/main/java/com/baseband/client/registry/AnyGate.java b/Client/src/main/java/de/com/baseband/client/registry/AnyGate.java similarity index 89% rename from Client/src/main/java/com/baseband/client/registry/AnyGate.java rename to Client/src/main/java/de/com/baseband/client/registry/AnyGate.java index d5f71b3..ddfe954 100644 --- a/Client/src/main/java/com/baseband/client/registry/AnyGate.java +++ b/Client/src/main/java/de/com/baseband/client/registry/AnyGate.java @@ -1,9 +1,9 @@ -package com.baseband.client.registry; +package de.com.baseband.client.registry; -import com.baseband.client.registry.annotation.Gate; -import com.baseband.client.registry.annotation.MultiGate; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.registry.annotation.Gate; +import de.com.baseband.client.registry.annotation.MultiGate; +import de.com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.util.adapt.Marker; import javax.annotation.Nonnull; import java.lang.reflect.AnnotatedElement; @@ -105,6 +105,10 @@ public class AnyGate { cache.put(gate, get(FieldFinder.findMarked(clazz, gate), o)); } + for(int gate : multiGate.andNot()) { + cache.put(gate, get(FieldFinder.findMarked(clazz, gate), o)); + } + for(int gate : multiGate.or()) { cache.put(gate, get(FieldFinder.findMarked(clazz, gate), o)); } @@ -151,6 +155,11 @@ public class AnyGate { return false; } + for(int gate : multiGate.andNot()) { + if(cache.get(gate).isTrueAndCanPass()) + return false; + } + boolean pass = multiGate.or().length == 0; for(int gate : multiGate.or()) { if(cache.get(gate).isTrueAndCanPass()) diff --git a/Client/src/main/java/com/baseband/client/registry/ConfigHandle.java b/Client/src/main/java/de/com/baseband/client/registry/ConfigHandle.java similarity index 91% rename from Client/src/main/java/com/baseband/client/registry/ConfigHandle.java rename to Client/src/main/java/de/com/baseband/client/registry/ConfigHandle.java index d421369..5fdb2f6 100644 --- a/Client/src/main/java/com/baseband/client/registry/ConfigHandle.java +++ b/Client/src/main/java/de/com/baseband/client/registry/ConfigHandle.java @@ -1,12 +1,11 @@ -package com.baseband.client.registry; +package de.com.baseband.client.registry; +import de.com.baseband.client.BaseBand; import de.tudbut.parsing.TCN; import java.lang.reflect.Field; import java.util.ArrayList; -import static com.baseband.client.BaseBand.LOGGER; - public class ConfigHandle implements SetCommand { final String name; @@ -66,7 +65,7 @@ public class ConfigHandle implements SetCommand { try { updated(setting); } catch(Exception e) { - LOGGER.info((Object) "Unable to setWithString", e); + BaseBand.LOGGER.info((Object) "Unable to setWithString", e); // reset tcn.set(setting, original); updated(setting); diff --git a/Client/src/main/java/com/baseband/client/registry/Configuration.java b/Client/src/main/java/de/com/baseband/client/registry/Configuration.java similarity index 74% rename from Client/src/main/java/com/baseband/client/registry/Configuration.java rename to Client/src/main/java/de/com/baseband/client/registry/Configuration.java index f9c0ed5..e9fb1b9 100644 --- a/Client/src/main/java/com/baseband/client/registry/Configuration.java +++ b/Client/src/main/java/de/com/baseband/client/registry/Configuration.java @@ -1,16 +1,15 @@ -package com.baseband.client.registry; +package de.com.baseband.client.registry; -import com.baseband.client.Setup; -import com.baseband.client.feature.Feature; -import com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.Setup; +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.util.adapt.FieldFinder; import de.tudbut.parsing.TCN; import de.tudbut.tools.Registry; import java.io.IOException; import java.util.ArrayList; -import static com.baseband.client.feature.Features.features; - public class Configuration { public static final ArrayList updaters = new ArrayList<>(); @@ -49,9 +48,9 @@ public class Configuration { } public static void cloneConfigFrom(TCN fullDB) { - boolean[] wasEnabled = new boolean[features.length]; - for (int i = 0; i < features.length; i++) { - Feature feature = features[i]; + boolean[] wasEnabled = new boolean[Features.features.length]; + for (int i = 0; i < Features.features.length; i++) { + Feature feature = Features.features[i]; wasEnabled[i] = feature.enabled; for (ConfigHandle handle : feature.ownedHandles.values()) { handle.cloneFrom(fullDB.getSub(handle.getName())); @@ -60,10 +59,10 @@ public class Configuration { for (Updater updater : updaters) { updater.populate(); } - for (int i = 0; i < features.length; i++) { - if(features[i].enabled != wasEnabled[i]) { - features[i].enabled = wasEnabled[i]; - features[i].toggle(); + for (int i = 0; i < Features.features.length; i++) { + if(Features.features[i].enabled != wasEnabled[i]) { + Features.features[i].enabled = wasEnabled[i]; + Features.features[i].toggle(); } } PlayerDB.Data.cloneFrom(fullDB.getSub("PlayerData")); diff --git a/Client/src/main/java/com/baseband/client/registry/PlayerDB.java b/Client/src/main/java/de/com/baseband/client/registry/PlayerDB.java similarity index 97% rename from Client/src/main/java/com/baseband/client/registry/PlayerDB.java rename to Client/src/main/java/de/com/baseband/client/registry/PlayerDB.java index d49becf..61da0b0 100644 --- a/Client/src/main/java/com/baseband/client/registry/PlayerDB.java +++ b/Client/src/main/java/de/com/baseband/client/registry/PlayerDB.java @@ -1,6 +1,6 @@ -package com.baseband.client.registry; +package de.com.baseband.client.registry; -import com.baseband.client.util.interact.ServerDataManager; +import de.com.baseband.client.util.interact.ServerDataManager; import de.tudbut.parsing.TCN; import de.tudbut.parsing.TCNArray; import de.tudbut.tools.ConfigSaverTCN2; diff --git a/Client/src/main/java/com/baseband/client/registry/SetCommand.java b/Client/src/main/java/de/com/baseband/client/registry/SetCommand.java similarity index 68% rename from Client/src/main/java/com/baseband/client/registry/SetCommand.java rename to Client/src/main/java/de/com/baseband/client/registry/SetCommand.java index 7b6efa8..b71d779 100644 --- a/Client/src/main/java/com/baseband/client/registry/SetCommand.java +++ b/Client/src/main/java/de/com/baseband/client/registry/SetCommand.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry; +package de.com.baseband.client.registry; public interface SetCommand { diff --git a/Client/src/main/java/com/baseband/client/registry/Updater.java b/Client/src/main/java/de/com/baseband/client/registry/Updater.java similarity index 98% rename from Client/src/main/java/com/baseband/client/registry/Updater.java rename to Client/src/main/java/de/com/baseband/client/registry/Updater.java index c5f5208..4d9fd21 100644 --- a/Client/src/main/java/com/baseband/client/registry/Updater.java +++ b/Client/src/main/java/de/com/baseband/client/registry/Updater.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry; +package de.com.baseband.client.registry; import de.tudbut.tools.ReflectUtil; diff --git a/Client/src/main/java/com/baseband/client/registry/annotation/Config.java b/Client/src/main/java/de/com/baseband/client/registry/annotation/Config.java similarity index 87% rename from Client/src/main/java/com/baseband/client/registry/annotation/Config.java rename to Client/src/main/java/de/com/baseband/client/registry/annotation/Config.java index 8a66604..83edca5 100644 --- a/Client/src/main/java/com/baseband/client/registry/annotation/Config.java +++ b/Client/src/main/java/de/com/baseband/client/registry/annotation/Config.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry.annotation; +package de.com.baseband.client.registry.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/registry/annotation/Description.java b/Client/src/main/java/de/com/baseband/client/registry/annotation/Description.java similarity index 77% rename from Client/src/main/java/com/baseband/client/registry/annotation/Description.java rename to Client/src/main/java/de/com/baseband/client/registry/annotation/Description.java index 875645c..7c94115 100644 --- a/Client/src/main/java/com/baseband/client/registry/annotation/Description.java +++ b/Client/src/main/java/de/com/baseband/client/registry/annotation/Description.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry.annotation; +package de.com.baseband.client.registry.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Client/src/main/java/com/baseband/client/registry/annotation/Gate.java b/Client/src/main/java/de/com/baseband/client/registry/annotation/Gate.java similarity index 76% rename from Client/src/main/java/com/baseband/client/registry/annotation/Gate.java rename to Client/src/main/java/de/com/baseband/client/registry/annotation/Gate.java index 21bc8ef..5803dde 100644 --- a/Client/src/main/java/com/baseband/client/registry/annotation/Gate.java +++ b/Client/src/main/java/de/com/baseband/client/registry/annotation/Gate.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry.annotation; +package de.com.baseband.client.registry.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Client/src/main/java/com/baseband/client/registry/annotation/KeyBound.java b/Client/src/main/java/de/com/baseband/client/registry/annotation/KeyBound.java similarity index 82% rename from Client/src/main/java/com/baseband/client/registry/annotation/KeyBound.java rename to Client/src/main/java/de/com/baseband/client/registry/annotation/KeyBound.java index 7243f6b..7a805ca 100644 --- a/Client/src/main/java/com/baseband/client/registry/annotation/KeyBound.java +++ b/Client/src/main/java/de/com/baseband/client/registry/annotation/KeyBound.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry.annotation; +package de.com.baseband.client.registry.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Client/src/main/java/com/baseband/client/registry/annotation/MultiGate.java b/Client/src/main/java/de/com/baseband/client/registry/annotation/MultiGate.java similarity index 74% rename from Client/src/main/java/com/baseband/client/registry/annotation/MultiGate.java rename to Client/src/main/java/de/com/baseband/client/registry/annotation/MultiGate.java index a6afa3f..2b0314f 100644 --- a/Client/src/main/java/com/baseband/client/registry/annotation/MultiGate.java +++ b/Client/src/main/java/de/com/baseband/client/registry/annotation/MultiGate.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry.annotation; +package de.com.baseband.client.registry.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -7,5 +7,6 @@ import java.lang.annotation.RetentionPolicy; public @interface MultiGate { int[] or() default {}; int[] and() default {}; + int[] andNot() default {}; int[] overrideOr() default {}; } diff --git a/Client/src/main/java/com/baseband/client/registry/annotation/Range.java b/Client/src/main/java/de/com/baseband/client/registry/annotation/Range.java similarity index 87% rename from Client/src/main/java/com/baseband/client/registry/annotation/Range.java rename to Client/src/main/java/de/com/baseband/client/registry/annotation/Range.java index b593aa9..af2a275 100644 --- a/Client/src/main/java/com/baseband/client/registry/annotation/Range.java +++ b/Client/src/main/java/de/com/baseband/client/registry/annotation/Range.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry.annotation; +package de.com.baseband.client.registry.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/registry/annotation/Trigger.java b/Client/src/main/java/de/com/baseband/client/registry/annotation/Trigger.java similarity index 87% rename from Client/src/main/java/com/baseband/client/registry/annotation/Trigger.java rename to Client/src/main/java/de/com/baseband/client/registry/annotation/Trigger.java index 90e43c0..e759bd2 100644 --- a/Client/src/main/java/com/baseband/client/registry/annotation/Trigger.java +++ b/Client/src/main/java/de/com/baseband/client/registry/annotation/Trigger.java @@ -1,4 +1,4 @@ -package com.baseband.client.registry.annotation; +package de.com.baseband.client.registry.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/util/adapt/FieldFinder.java b/Client/src/main/java/de/com/baseband/client/util/adapt/FieldFinder.java similarity index 97% rename from Client/src/main/java/com/baseband/client/util/adapt/FieldFinder.java rename to Client/src/main/java/de/com/baseband/client/util/adapt/FieldFinder.java index d530ed8..7c902c4 100644 --- a/Client/src/main/java/com/baseband/client/util/adapt/FieldFinder.java +++ b/Client/src/main/java/de/com/baseband/client/util/adapt/FieldFinder.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.adapt; +package de.com.baseband.client.util.adapt; import de.tudbut.tools.ReflectUtil; diff --git a/Client/src/main/java/com/baseband/client/util/adapt/Marker.java b/Client/src/main/java/de/com/baseband/client/util/adapt/Marker.java similarity index 86% rename from Client/src/main/java/com/baseband/client/util/adapt/Marker.java rename to Client/src/main/java/de/com/baseband/client/util/adapt/Marker.java index 674b348..2ce50a0 100644 --- a/Client/src/main/java/com/baseband/client/util/adapt/Marker.java +++ b/Client/src/main/java/de/com/baseband/client/util/adapt/Marker.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.adapt; +package de.com.baseband.client.util.adapt; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/util/adapt/ServerPing.java b/Client/src/main/java/de/com/baseband/client/util/adapt/ServerPing.java similarity index 98% rename from Client/src/main/java/com/baseband/client/util/adapt/ServerPing.java rename to Client/src/main/java/de/com/baseband/client/util/adapt/ServerPing.java index c0af572..946f8fe 100644 --- a/Client/src/main/java/com/baseband/client/util/adapt/ServerPing.java +++ b/Client/src/main/java/de/com/baseband/client/util/adapt/ServerPing.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.adapt; +package de.com.baseband.client.util.adapt; import de.tudbut.tools.Lock; import net.minecraft.client.multiplayer.ServerAddress; diff --git a/Client/src/main/java/com/baseband/client/util/adapt/SimpleWorldGenerator.java b/Client/src/main/java/de/com/baseband/client/util/adapt/SimpleWorldGenerator.java similarity index 98% rename from Client/src/main/java/com/baseband/client/util/adapt/SimpleWorldGenerator.java rename to Client/src/main/java/de/com/baseband/client/util/adapt/SimpleWorldGenerator.java index d26c3c5..4e6bac0 100644 --- a/Client/src/main/java/com/baseband/client/util/adapt/SimpleWorldGenerator.java +++ b/Client/src/main/java/de/com/baseband/client/util/adapt/SimpleWorldGenerator.java @@ -1,7 +1,7 @@ -package com.baseband.client.util.adapt; +package de.com.baseband.client.util.adapt; -import com.baseband.client.BaseBand; -import com.baseband.client.Setup; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.Setup; import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; diff --git a/Client/src/main/java/com/baseband/client/util/adapt/WorldRecreationGenerator.java b/Client/src/main/java/de/com/baseband/client/util/adapt/WorldRecreationGenerator.java similarity index 95% rename from Client/src/main/java/com/baseband/client/util/adapt/WorldRecreationGenerator.java rename to Client/src/main/java/de/com/baseband/client/util/adapt/WorldRecreationGenerator.java index 1012cc3..104338b 100644 --- a/Client/src/main/java/com/baseband/client/util/adapt/WorldRecreationGenerator.java +++ b/Client/src/main/java/de/com/baseband/client/util/adapt/WorldRecreationGenerator.java @@ -1,6 +1,7 @@ -package com.baseband.client.util.adapt; +package de.com.baseband.client.util.adapt; -import com.baseband.client.Setup; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.Setup; import de.tudbut.tools.ReflectUtil; import net.minecraft.client.Minecraft; import net.minecraft.nbt.NBTTagCompound; @@ -30,8 +31,6 @@ import java.util.Map; import java.util.Random; import java.util.concurrent.atomic.AtomicLong; -import static com.baseband.client.BaseBand.LOGGER; - public class WorldRecreationGenerator implements IChunkProvider { public final World world; @@ -139,7 +138,7 @@ public class WorldRecreationGenerator implements IChunkProvider { public synchronized boolean tick() { if(hasNewChunks) { - LOGGER.debug(this + ": Creating variations for {} MultiChunks.", realLoaded.size()); + BaseBand.LOGGER.debug(this + ": Creating variations for {} MultiChunks.", realLoaded.size()); int variations = 0; for (Map.Entry entry : realLoaded.entrySet()) { entry.getValue().makeVariations(); @@ -147,12 +146,12 @@ public class WorldRecreationGenerator implements IChunkProvider { for (Map.Entry entry : realLoaded.entrySet()) { variations += entry.getValue().backVariations.size(); } - LOGGER.debug(this + ": Checking {} variations.", variations); + BaseBand.LOGGER.debug(this + ": Checking {} variations.", variations); for (Map.Entry entry : realLoaded.entrySet()) { ChunkPos pos = entry.getKey(); entry.getValue().findPreferred(mc.world.getChunk(pos.x, pos.z)); } - LOGGER.debug(this + ": Done."); + BaseBand.LOGGER.debug(this + ": Done."); hasNewChunks = false; } @@ -174,7 +173,7 @@ public class WorldRecreationGenerator implements IChunkProvider { } private void onUnload(ChunkPos pos, Chunk chunk) { - LOGGER.debug(this + " is unloading chunk at {} {}", pos.x, pos.z); + BaseBand.LOGGER.debug(this + " is unloading chunk at {} {}", pos.x, pos.z); chunk.onUnload(); loaded.remove(pos); realLoaded.remove(pos); @@ -245,7 +244,7 @@ public class WorldRecreationGenerator implements IChunkProvider { public MultiChunk(Chunk initial, WorldRecreationGenerator generator) { pos = initial.getPos(); - LOGGER.debug(this + ": MultiChunk at {} {} created.", pos.x, pos.z); + BaseBand.LOGGER.debug(this + ": MultiChunk at {} {} created.", pos.x, pos.z); this.generator = generator; map = new ChunkPos[] { new ChunkPos(pos.x + 0, pos.z - 1), @@ -398,7 +397,7 @@ public class WorldRecreationGenerator implements IChunkProvider { variations = backVariations; backVariations = new ArrayList<>(); } - LOGGER.debug(generator + ": preferred state of chunk {} {} is now {}", pos.x, pos.z, preferredState); + BaseBand.LOGGER.debug(generator + ": preferred state of chunk {} {} is now {}", pos.x, pos.z, preferredState); } } diff --git a/Client/src/main/java/com/baseband/client/util/baritone/BaritoneManager.java b/Client/src/main/java/de/com/baseband/client/util/baritone/BaritoneManager.java similarity index 91% rename from Client/src/main/java/com/baseband/client/util/baritone/BaritoneManager.java rename to Client/src/main/java/de/com/baseband/client/util/baritone/BaritoneManager.java index ebe27a5..9a6c4cb 100644 --- a/Client/src/main/java/com/baseband/client/util/baritone/BaritoneManager.java +++ b/Client/src/main/java/de/com/baseband/client/util/baritone/BaritoneManager.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.baritone; +package de.com.baseband.client.util.baritone; import baritone.api.BaritoneAPI; import baritone.api.IBaritone; @@ -7,10 +7,10 @@ import baritone.api.process.IBaritoneProcess; import baritone.api.process.ICustomGoalProcess; import baritone.api.process.PathingCommand; import baritone.api.process.PathingCommandType; -import com.baseband.client.BaseBand; -import com.baseband.client.Setup; -import com.baseband.client.event.events.BaritoneEvent; -import com.baseband.client.util.interact.Chat; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.Setup; +import de.com.baseband.client.event.events.BaritoneEvent; +import de.com.baseband.client.util.interact.Chat; import net.minecraft.util.math.Vec3d; public class BaritoneManager { diff --git a/Client/src/main/java/com/baseband/client/util/baritone/BaritonePresenceManager.java b/Client/src/main/java/de/com/baseband/client/util/baritone/BaritonePresenceManager.java similarity index 76% rename from Client/src/main/java/com/baseband/client/util/baritone/BaritonePresenceManager.java rename to Client/src/main/java/de/com/baseband/client/util/baritone/BaritonePresenceManager.java index df04de9..4c80c0f 100644 --- a/Client/src/main/java/com/baseband/client/util/baritone/BaritonePresenceManager.java +++ b/Client/src/main/java/de/com/baseband/client/util/baritone/BaritonePresenceManager.java @@ -1,7 +1,7 @@ -package com.baseband.client.util.baritone; +package de.com.baseband.client.util.baritone; -import static com.baseband.client.BaseBand.LOGGER; +import de.com.baseband.client.BaseBand; public class BaritonePresenceManager { @@ -20,12 +20,12 @@ public class BaritonePresenceManager { } if (IS_BARITONE_PRESENT) { - LOGGER.info("Baritone is present!"); + BaseBand.LOGGER.info("Baritone is present!"); try { BaritoneManager.getBaritone(); } catch (Throwable e) { - LOGGER.warn("Baritone is allegedly present but cannot seem to load!"); + BaseBand.LOGGER.warn("Baritone is allegedly present but cannot seem to load!"); IS_BARITONE_PRESENT = false; } } diff --git a/Client/src/main/java/de/com/baseband/client/util/data/GitHash.java b/Client/src/main/java/de/com/baseband/client/util/data/GitHash.java new file mode 100644 index 0000000..7209302 --- /dev/null +++ b/Client/src/main/java/de/com/baseband/client/util/data/GitHash.java @@ -0,0 +1,6 @@ +package de.com.baseband.client.util.data; + +public class GitHash { + + public static final String GIT_HASH = "[dev]"; +} diff --git a/Client/src/main/java/com/baseband/client/util/interact/BlockUtils.java b/Client/src/main/java/de/com/baseband/client/util/interact/BlockUtils.java similarity index 92% rename from Client/src/main/java/com/baseband/client/util/interact/BlockUtils.java rename to Client/src/main/java/de/com/baseband/client/util/interact/BlockUtils.java index 17d5e6a..7130f9f 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/BlockUtils.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/BlockUtils.java @@ -1,6 +1,6 @@ -package com.baseband.client.util.interact; +package de.com.baseband.client.util.interact; -import com.baseband.client.util.type.Selection; +import de.com.baseband.client.util.type.Selection; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3i; diff --git a/Client/src/main/java/com/baseband/client/util/interact/Chat.java b/Client/src/main/java/de/com/baseband/client/util/interact/Chat.java similarity index 74% rename from Client/src/main/java/com/baseband/client/util/interact/Chat.java rename to Client/src/main/java/de/com/baseband/client/util/interact/Chat.java index 13f1b45..1363ecb 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/Chat.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/Chat.java @@ -1,10 +1,7 @@ -package com.baseband.client.util.interact; +package de.com.baseband.client.util.interact; -import com.baseband.client.Setup; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.client.Client; -import com.baseband.client.feature.render.HUD; import com.mojang.realmsclient.gui.ChatFormatting; +import de.com.baseband.client.Setup; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.util.text.ITextComponent; @@ -14,8 +11,6 @@ import net.minecraft.util.text.TextFormatting; import java.util.Random; -import static com.baseband.client.BaseBand.LOGGER; - public class Chat { //forge sucks balls so hard omg public static void print(String s) { @@ -68,22 +63,4 @@ public class Chat { Minecraft.getMinecraft().player.sendChatMessage(msg); } - public static void notify(String text) { - Client c = Features.getFeature(Client.class); - if(Features.isFeatureEnabled(HUD.class) && c.notificationDest != Client.NotificationDest.Chat) { - HUD.notifs.add(new HUD.Notification(text)); - if(c.notificationDest == Client.NotificationDest.Both) - print(text); - else - LOGGER.info(text); - } else - print(text); - } - - public static void notifyAll(String text) { - if(Features.isFeatureEnabled(HUD.class)) { - HUD.notifs.add(new HUD.Notification(text)); - } - print(text); - } } diff --git a/Client/src/main/java/com/baseband/client/util/interact/FreecamPlayer.java b/Client/src/main/java/de/com/baseband/client/util/interact/FreecamPlayer.java similarity index 96% rename from Client/src/main/java/com/baseband/client/util/interact/FreecamPlayer.java rename to Client/src/main/java/de/com/baseband/client/util/interact/FreecamPlayer.java index bf329f9..da1b528 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/FreecamPlayer.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/FreecamPlayer.java @@ -1,7 +1,7 @@ -package com.baseband.client.util.interact; +package de.com.baseband.client.util.interact; -import com.baseband.client.feature.Features; -import com.baseband.client.feature.render.Freecam; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.render.Freecam; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityOtherPlayerMP; import net.minecraft.client.entity.EntityPlayerSP; diff --git a/Client/src/main/java/com/baseband/client/util/interact/InventoryUtils.java b/Client/src/main/java/de/com/baseband/client/util/interact/InventoryUtils.java similarity index 96% rename from Client/src/main/java/com/baseband/client/util/interact/InventoryUtils.java rename to Client/src/main/java/de/com/baseband/client/util/interact/InventoryUtils.java index 7459c93..1a3f9da 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/InventoryUtils.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/InventoryUtils.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.interact; +package de.com.baseband.client.util.interact; import net.minecraft.init.Items; import net.minecraft.inventory.ClickType; @@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.network.play.client.CPacketClickWindow; import net.minecraft.network.play.client.CPacketHeldItemChange; -import static com.baseband.client.BaseBand.mc; +import static de.com.baseband.client.BaseBand.mc; public class InventoryUtils { public static final int OFFHAND_SLOT = 45; diff --git a/Client/src/main/java/com/baseband/client/util/interact/MotionUtil.java b/Client/src/main/java/de/com/baseband/client/util/interact/MotionUtil.java similarity index 97% rename from Client/src/main/java/com/baseband/client/util/interact/MotionUtil.java rename to Client/src/main/java/de/com/baseband/client/util/interact/MotionUtil.java index c2135f5..d965e62 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/MotionUtil.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/MotionUtil.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.interact; +package de.com.baseband.client.util.interact; import net.minecraft.client.Minecraft; diff --git a/Client/src/main/java/com/baseband/client/util/interact/RotationManager.java b/Client/src/main/java/de/com/baseband/client/util/interact/RotationManager.java similarity index 71% rename from Client/src/main/java/com/baseband/client/util/interact/RotationManager.java rename to Client/src/main/java/de/com/baseband/client/util/interact/RotationManager.java index 601974f..285cd3e 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/RotationManager.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/RotationManager.java @@ -1,6 +1,6 @@ -package com.baseband.client.util.interact; +package de.com.baseband.client.util.interact; -import static com.baseband.client.BaseBand.mc; +import de.com.baseband.client.BaseBand; public class RotationManager { @@ -11,8 +11,8 @@ public class RotationManager { private static long startTime = 0; public static void run(float destYaw, float destPitch, int timeMs) { - sourceYaw = mc.player.rotationYaw; - sourcePitch = mc.player.rotationPitch; + sourceYaw = BaseBand.mc.player.rotationYaw; + sourcePitch = BaseBand.mc.player.rotationPitch; RotationManager.destYaw = destYaw; RotationManager.destPitch = destPitch; RotationManager.timeMs = timeMs; @@ -30,8 +30,8 @@ public class RotationManager { public static void onTick() { if(!active) return; - if((mc.player.rotationYaw = getDest(sourceYaw, destYaw)) == destYaw && - (mc.player.rotationPitch = getDest(sourcePitch, destPitch)) == destPitch) + if((BaseBand.mc.player.rotationYaw = getDest(sourceYaw, destYaw)) == destYaw && + (BaseBand.mc.player.rotationPitch = getDest(sourcePitch, destPitch)) == destPitch) active = false; } diff --git a/Client/src/main/java/com/baseband/client/util/interact/ServerDataManager.java b/Client/src/main/java/de/com/baseband/client/util/interact/ServerDataManager.java similarity index 77% rename from Client/src/main/java/com/baseband/client/util/interact/ServerDataManager.java rename to Client/src/main/java/de/com/baseband/client/util/interact/ServerDataManager.java index 07e7cce..868aa67 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/ServerDataManager.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/ServerDataManager.java @@ -1,15 +1,13 @@ -package com.baseband.client.util.interact; +package de.com.baseband.client.util.interact; -import com.baseband.client.BaseBand; -import com.baseband.client.Setup; -import com.baseband.client.util.adapt.ServerPing; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.Setup; +import de.com.baseband.client.util.adapt.ServerPing; import de.tudbut.tools.Lock; import net.minecraft.client.network.NetworkPlayerInfo; import java.util.Objects; -import static com.baseband.client.BaseBand.mc; - public class ServerDataManager { public static long ping = -1; @@ -42,9 +40,9 @@ public class ServerDataManager { } public static void onTick() { - if (mc.world == null || mc.player == null) return; + if (BaseBand.mc.world == null || BaseBand.mc.player == null) return; - tabList = Objects.requireNonNull(mc.getConnection()).getPlayerInfoMap().toArray(new NetworkPlayerInfo[0]); + tabList = Objects.requireNonNull(BaseBand.mc.getConnection()).getPlayerInfoMap().toArray(new NetworkPlayerInfo[0]); long time = System.currentTimeMillis(); if (lastTick != -1) { @@ -76,8 +74,8 @@ public class ServerDataManager { Lock lock = new Lock(); while (BaseBand.enabled) { lock.lock(5000); - if(mc.getCurrentServerData() != null) { - long[] pingData = ServerPing.getPingToServer(mc.getCurrentServerData()); + if(BaseBand.mc.getCurrentServerData() != null) { + long[] pingData = ServerPing.getPingToServer(BaseBand.mc.getCurrentServerData()); ping = pingData[0]; players = pingData[1]; maxPlayers = pingData[2]; diff --git a/Client/src/main/java/com/baseband/client/util/misc/SBE.java b/Client/src/main/java/de/com/baseband/client/util/misc/SBE.java similarity index 98% rename from Client/src/main/java/com/baseband/client/util/misc/SBE.java rename to Client/src/main/java/de/com/baseband/client/util/misc/SBE.java index 0a09f54..29b2972 100644 --- a/Client/src/main/java/com/baseband/client/util/misc/SBE.java +++ b/Client/src/main/java/de/com/baseband/client/util/misc/SBE.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.misc; +package de.com.baseband.client.util.misc; import java.util.Random; diff --git a/Client/src/main/java/com/baseband/client/util/misc/SecurePRandom.java b/Client/src/main/java/de/com/baseband/client/util/misc/SecurePRandom.java similarity index 97% rename from Client/src/main/java/com/baseband/client/util/misc/SecurePRandom.java rename to Client/src/main/java/de/com/baseband/client/util/misc/SecurePRandom.java index 7865f10..9d1ecbf 100644 --- a/Client/src/main/java/com/baseband/client/util/misc/SecurePRandom.java +++ b/Client/src/main/java/de/com/baseband/client/util/misc/SecurePRandom.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.misc; +package de.com.baseband.client.util.misc; import de.tudbut.obj.NotSupportedException; diff --git a/Client/src/main/java/com/baseband/client/util/misc/Timer.java b/Client/src/main/java/de/com/baseband/client/util/misc/Timer.java similarity index 85% rename from Client/src/main/java/com/baseband/client/util/misc/Timer.java rename to Client/src/main/java/de/com/baseband/client/util/misc/Timer.java index 2f01677..44ccdfa 100644 --- a/Client/src/main/java/com/baseband/client/util/misc/Timer.java +++ b/Client/src/main/java/de/com/baseband/client/util/misc/Timer.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.misc; +package de.com.baseband.client.util.misc; public class Timer { private long currentMS = 0L; diff --git a/Client/src/main/java/com/baseband/client/util/misc/Trypt.java b/Client/src/main/java/de/com/baseband/client/util/misc/Trypt.java similarity index 98% rename from Client/src/main/java/com/baseband/client/util/misc/Trypt.java rename to Client/src/main/java/de/com/baseband/client/util/misc/Trypt.java index a6616b7..386dfe3 100644 --- a/Client/src/main/java/com/baseband/client/util/misc/Trypt.java +++ b/Client/src/main/java/de/com/baseband/client/util/misc/Trypt.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.misc; +package de.com.baseband.client.util.misc; import java.security.SecureRandom; import java.util.ArrayList; diff --git a/Client/src/main/java/com/baseband/client/util/net/ScreenshotHelper.java b/Client/src/main/java/de/com/baseband/client/util/net/ScreenshotHelper.java similarity index 95% rename from Client/src/main/java/com/baseband/client/util/net/ScreenshotHelper.java rename to Client/src/main/java/de/com/baseband/client/util/net/ScreenshotHelper.java index fff21a5..23499cb 100644 --- a/Client/src/main/java/com/baseband/client/util/net/ScreenshotHelper.java +++ b/Client/src/main/java/de/com/baseband/client/util/net/ScreenshotHelper.java @@ -1,8 +1,8 @@ -package com.baseband.client.util.net; +package de.com.baseband.client.util.net; -import com.baseband.client.util.interact.Chat; import com.google.gson.JsonElement; import com.google.gson.JsonParser; +import de.com.baseband.client.BaseBand; import net.minecraft.client.Minecraft; import javax.imageio.ImageIO; @@ -38,7 +38,7 @@ public class ScreenshotHelper extends Thread { private static void copyAndPrint(StringSelection stringSelection, String string) { Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard.setContents(stringSelection, stringSelection); - Chat.notify("Image uploaded to: " + string); + BaseBand.notify("Image uploaded to: " + string); } @Override diff --git a/Client/src/main/java/com/baseband/client/util/net/WebServiceClient.java b/Client/src/main/java/de/com/baseband/client/util/net/WebServiceClient.java similarity index 78% rename from Client/src/main/java/com/baseband/client/util/net/WebServiceClient.java rename to Client/src/main/java/de/com/baseband/client/util/net/WebServiceClient.java index eec225b..c86ba13 100644 --- a/Client/src/main/java/com/baseband/client/util/net/WebServiceClient.java +++ b/Client/src/main/java/de/com/baseband/client/util/net/WebServiceClient.java @@ -1,13 +1,11 @@ -package com.baseband.client.util.net; +package de.com.baseband.client.util.net; -import com.baseband.client.BaseBand; +import de.com.baseband.client.BaseBand; import de.tudbut.net.ws.Client; import de.tudbut.net.ws.ConnectionHandler; import java.io.IOException; -import static com.baseband.client.BaseBand.LOGGER; - public class WebServiceClient { @SuppressWarnings("FieldCanBeLocal") // not finished yet private static Client client; @@ -17,7 +15,7 @@ public class WebServiceClient { client = new Client("azidoazideazi.de", 30000); //client.addReceiveHook(READER); } catch (IOException e) { - LOGGER.fatal(e); + BaseBand.LOGGER.fatal(e); BaseBand.shutdown(); } } diff --git a/Client/src/main/java/com/baseband/client/util/render/Pixels.java b/Client/src/main/java/de/com/baseband/client/util/render/Pixels.java similarity index 84% rename from Client/src/main/java/com/baseband/client/util/render/Pixels.java rename to Client/src/main/java/de/com/baseband/client/util/render/Pixels.java index feff9f4..9df39bd 100644 --- a/Client/src/main/java/com/baseband/client/util/render/Pixels.java +++ b/Client/src/main/java/de/com/baseband/client/util/render/Pixels.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.render; +package de.com.baseband.client.util.render; public class Pixels { public static int mulTransparency(int color, float m) { diff --git a/Client/src/main/java/com/baseband/client/util/render/RenderAdapter.java b/Client/src/main/java/de/com/baseband/client/util/render/RenderAdapter.java similarity index 99% rename from Client/src/main/java/com/baseband/client/util/render/RenderAdapter.java rename to Client/src/main/java/de/com/baseband/client/util/render/RenderAdapter.java index 6352150..a498165 100644 --- a/Client/src/main/java/com/baseband/client/util/render/RenderAdapter.java +++ b/Client/src/main/java/de/com/baseband/client/util/render/RenderAdapter.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.render; +package de.com.baseband.client.util.render; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; diff --git a/Client/src/main/java/com/baseband/client/util/render/TextSplitter.java b/Client/src/main/java/de/com/baseband/client/util/render/TextSplitter.java similarity index 96% rename from Client/src/main/java/com/baseband/client/util/render/TextSplitter.java rename to Client/src/main/java/de/com/baseband/client/util/render/TextSplitter.java index d27ed0d..2dd3172 100644 --- a/Client/src/main/java/com/baseband/client/util/render/TextSplitter.java +++ b/Client/src/main/java/de/com/baseband/client/util/render/TextSplitter.java @@ -1,6 +1,6 @@ -package com.baseband.client.util.render; +package de.com.baseband.client.util.render; -import com.baseband.client.BaseBand; +import de.com.baseband.client.BaseBand; import net.minecraft.client.gui.FontRenderer; public class TextSplitter { diff --git a/Client/src/main/java/de/com/baseband/client/util/type/FeatureAction.java b/Client/src/main/java/de/com/baseband/client/util/type/FeatureAction.java new file mode 100644 index 0000000..3f221a5 --- /dev/null +++ b/Client/src/main/java/de/com/baseband/client/util/type/FeatureAction.java @@ -0,0 +1,7 @@ +package de.com.baseband.client.util.type; + +import de.com.baseband.client.feature.Feature; + +public interface FeatureAction { + void run(T feature); +} diff --git a/Client/src/main/java/com/baseband/client/util/type/KeyBind.java b/Client/src/main/java/de/com/baseband/client/util/type/KeyBind.java similarity index 74% rename from Client/src/main/java/com/baseband/client/util/type/KeyBind.java rename to Client/src/main/java/de/com/baseband/client/util/type/KeyBind.java index c963017..6e3d2dc 100644 --- a/Client/src/main/java/com/baseband/client/util/type/KeyBind.java +++ b/Client/src/main/java/de/com/baseband/client/util/type/KeyBind.java @@ -1,14 +1,13 @@ -package com.baseband.client.util.type; +package de.com.baseband.client.util.type; -import com.baseband.client.registry.AnyGate; -import com.baseband.client.util.adapt.FieldFinder; -import com.baseband.client.util.adapt.Marker; +import de.com.baseband.client.BaseBand; +import de.com.baseband.client.registry.AnyGate; +import de.com.baseband.client.util.adapt.FieldFinder; +import de.com.baseband.client.util.adapt.Marker; import org.lwjgl.input.Keyboard; import java.lang.reflect.Field; -import static com.baseband.client.BaseBand.mc; - public class KeyBind { public static final Field KEY_FIELD = FieldFinder.findMarked(KeyBind.class, 1); @Marker(1) @@ -26,7 +25,7 @@ public class KeyBind { public void onTick() { if(!gate.canPass()) return; - if(key != null && mc.currentScreen == null) { + if(key != null && BaseBand.mc.currentScreen == null) { if (Keyboard.isKeyDown(key)) { if(!down) { down = true; diff --git a/Client/src/main/java/com/baseband/client/util/type/Selection.java b/Client/src/main/java/de/com/baseband/client/util/type/Selection.java similarity index 96% rename from Client/src/main/java/com/baseband/client/util/type/Selection.java rename to Client/src/main/java/de/com/baseband/client/util/type/Selection.java index 667d25a..bca9566 100644 --- a/Client/src/main/java/com/baseband/client/util/type/Selection.java +++ b/Client/src/main/java/de/com/baseband/client/util/type/Selection.java @@ -1,4 +1,4 @@ -package com.baseband.client.util.type; +package de.com.baseband.client.util.type; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3i; diff --git a/Client/src/main/java/de/com/baseband/prod/LoadHandler.java b/Client/src/main/java/de/com/baseband/prod/LoadHandler.java new file mode 100644 index 0000000..55579c2 --- /dev/null +++ b/Client/src/main/java/de/com/baseband/prod/LoadHandler.java @@ -0,0 +1,14 @@ +package de.com.baseband.prod; + +import de.com.baseband.client.BaseBand; + +public class LoadHandler { + + public static void loaded() { + try { + Class.forName("de.com.baseband.launcher.Tweaker").getDeclaredMethod("loaded", Class.class).invoke(null, BaseBand.class); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/Client/src/main/resources/mixins.baseband.json b/Client/src/main/resources/mixins.baseband.json index 0d5b3be..ccb981c 100644 --- a/Client/src/main/resources/mixins.baseband.json +++ b/Client/src/main/resources/mixins.baseband.json @@ -1,7 +1,7 @@ { "required": true, "compatibilityLevel": "JAVA_8", - "package": "com.baseband.client.mixin.mixins", + "package": "de.com.baseband.client.mixin.mixins", "minVersion": "0", "refmap": "mixins.baseband.refmap.json", "client": [ @@ -13,13 +13,13 @@ "ITimer", "MixinEntityPlayerSP", "MixinEntityRender", + "MixinEventBus", "MixinFMLNetworkRegistry", "MixinGuiEditSign", "MixinGuiNewChat", "MixinMinecraft", "MixinNetworkManager", "MixinPlayerControllerMP", - "MixinScreenshotHelper", - "MixinEventBus" + "MixinScreenshotHelper" ] } \ No newline at end of file diff --git a/Discord/build.gradle b/Discord/build.gradle index fda0c02..b57efc4 100644 --- a/Discord/build.gradle +++ b/Discord/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' } -group = 'com.baseband.bot' +group = 'de.com.baseband.bot' version = '1.0-SNAPSHOT' repositories { @@ -39,7 +39,7 @@ jar { } manifest.attributes( - 'Main-Class': 'com.baseband.bot.Main', + 'Main-Class': 'de.com.baseband.bot.Main', ) archiveFileName = "BaseBand-Discord.jar" diff --git a/Discord/src/main/java/com/baseband/bot/Main.java b/Discord/src/main/java/de/com/baseband/bot/Main.java similarity index 99% rename from Discord/src/main/java/com/baseband/bot/Main.java rename to Discord/src/main/java/de/com/baseband/bot/Main.java index 86076a9..fce5331 100644 --- a/Discord/src/main/java/com/baseband/bot/Main.java +++ b/Discord/src/main/java/de/com/baseband/bot/Main.java @@ -1,8 +1,7 @@ -package com.baseband.bot; +package de.com.baseband.bot; import de.tudbut.io.TypedInputStream; import de.tudbut.io.TypedOutputStream; -import de.tudbut.net.ws.Client; import de.tudbut.parsing.TCN; import de.tudbut.tools.Hasher; import net.dv8tion.jda.api.JDA; diff --git a/Installer/build.gradle b/Installer/build.gradle index 3da642e..b985be2 100644 --- a/Installer/build.gradle +++ b/Installer/build.gradle @@ -9,7 +9,7 @@ sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = co jar { manifest { attributes( - 'Main-Class': 'com.baseband.installer.Main' + 'Main-Class': 'de.com.baseband.installer.Main' ) } diff --git a/Installer/src/main/java/com/baseband/installer/Key.java b/Installer/src/main/java/de/com/baseband/installer/Key.java similarity index 98% rename from Installer/src/main/java/com/baseband/installer/Key.java rename to Installer/src/main/java/de/com/baseband/installer/Key.java index b172da4..7ae75c2 100644 --- a/Installer/src/main/java/com/baseband/installer/Key.java +++ b/Installer/src/main/java/de/com/baseband/installer/Key.java @@ -3,7 +3,7 @@ // (powered by FernFlower decompiler) // -package com.baseband.installer; +package de.com.baseband.installer; import java.nio.charset.StandardCharsets; import java.security.SecureRandom; diff --git a/Installer/src/main/java/com/baseband/installer/Main.java b/Installer/src/main/java/de/com/baseband/installer/Main.java similarity index 82% rename from Installer/src/main/java/com/baseband/installer/Main.java rename to Installer/src/main/java/de/com/baseband/installer/Main.java index 719b071..2741b27 100644 --- a/Installer/src/main/java/com/baseband/installer/Main.java +++ b/Installer/src/main/java/de/com/baseband/installer/Main.java @@ -1,4 +1,4 @@ -package com.baseband.installer; +package de.com.baseband.installer; public class Main { public static void main(String[] args) { diff --git a/Installer/src/main/java/com/baseband/login/LoginGenerator.java b/Installer/src/main/java/de/com/baseband/login/LoginGenerator.java similarity index 93% rename from Installer/src/main/java/com/baseband/login/LoginGenerator.java rename to Installer/src/main/java/de/com/baseband/login/LoginGenerator.java index 6f21f9f..2e4f413 100644 --- a/Installer/src/main/java/com/baseband/login/LoginGenerator.java +++ b/Installer/src/main/java/de/com/baseband/login/LoginGenerator.java @@ -1,6 +1,6 @@ -package com.baseband.login; +package de.com.baseband.login; -import com.baseband.installer.Key; +import de.com.baseband.installer.Key; import java.io.*; diff --git a/Installer/src/main/java/old/baseband/installer/InstallerApp.java b/Installer/src/main/java/old/baseband/installer/InstallerApp.java index 718b3b8..d3c02d3 100644 --- a/Installer/src/main/java/old/baseband/installer/InstallerApp.java +++ b/Installer/src/main/java/old/baseband/installer/InstallerApp.java @@ -6,7 +6,7 @@ package old.baseband.installer; -import com.baseband.installer.Key; +import de.com.baseband.installer.Key; import old.baseband.installer.util.minecraft.MinecraftFiles; import javax.crypto.Cipher; @@ -16,9 +16,13 @@ import javax.swing.*; import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.io.*; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.File; import java.net.Socket; -import java.security.*; +import java.security.KeyFactory; +import java.security.MessageDigest; +import java.security.PublicKey; import java.security.spec.X509EncodedKeySpec; import java.util.Base64; import java.util.UUID; @@ -28,7 +32,7 @@ public class InstallerApp { private JFrame installerFrame; public static String username; public static String password; - public static com.baseband.installer.Key keyinstance; + public static Key keyinstance; public InstallerApp() { try { @@ -133,7 +137,7 @@ public class InstallerApp { //We need this to make sure we're not being poked at String ticket = getRandomTicket(); - keyinstance = new com.baseband.installer.Key(ticket); + keyinstance = new Key(ticket); byte[] encryptedTicket = aesE.doFinal(ticket.getBytes()); outputF.writeInt(encryptedTicket.length); outputF.write(encryptedTicket); @@ -293,7 +297,7 @@ public class InstallerApp { //We need this to make sure we're not being poked at String ticket = getRandomTicket(); - keyinstance = new com.baseband.installer.Key(ticket); + keyinstance = new Key(ticket); byte[] encryptedTicket = aesE.doFinal(ticket.getBytes()); outputF.writeInt(encryptedTicket.length); outputF.write(encryptedTicket); diff --git a/Loader/build.gradle b/Loader/build.gradle index e96b5a9..1fabbed 100644 --- a/Loader/build.gradle +++ b/Loader/build.gradle @@ -41,8 +41,8 @@ minecraft { property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' - jvmArgs = ["-Dfml.coreMods.load=com.baseband.launcher.Tweaker", "-Xmx700M"] - args = ["-tweakClass", "com.baseband.launcher.Tweaker"] + jvmArgs = ["-Dfml.coreMods.load=de.com.baseband.launcher.Tweaker", "-Xmx700M"] + args = ["-tweakClass", "de.com.baseband.launcher.Tweaker"] } } } @@ -113,7 +113,7 @@ jar { manifest { attributes( - 'TweakClass': 'com.baseband.launcher.Tweaker', + 'TweakClass': 'de.com.baseband.launcher.Tweaker', 'TweakOrder': 0, 'FMLCorePluginContainsFMLMod': 'true', 'ForceLoadAsMod': 'true' @@ -129,8 +129,7 @@ jar { exclude("mcmod.info") } - baseName = 'BaseBand' - version = 'Loader' + archiveFileName = 'BaseBand-Loader.jar' } def proguardBuildDir = "${buildDir}/proguard" diff --git a/Loader/src/main/java/com/baseband/launcher/security/SecurityImpl.java b/Loader/src/main/java/com/baseband/launcher/security/SecurityImpl.java deleted file mode 100644 index 21dc63e..0000000 --- a/Loader/src/main/java/com/baseband/launcher/security/SecurityImpl.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.baseband.launcher.security; - -import com.baseband.launcher.util.Util; - -public interface SecurityImpl extends Util { - void run(); -} diff --git a/Loader/src/main/java/com/baseband/launcher/Loader.java b/Loader/src/main/java/de/com/baseband/launcher/Loader.java similarity index 95% rename from Loader/src/main/java/com/baseband/launcher/Loader.java rename to Loader/src/main/java/de/com/baseband/launcher/Loader.java index 4dd1884..830ca25 100644 --- a/Loader/src/main/java/com/baseband/launcher/Loader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/Loader.java @@ -1,15 +1,14 @@ -package com.baseband.launcher; +package de.com.baseband.launcher; +import de.com.baseband.launcher.classloader.CustomClassLoader; +import de.com.baseband.launcher.util.RSAKey; +import de.com.baseband.launcher.util.Util; import de.tudbut.io.TypedInputStream; import de.tudbut.io.TypedOutputStream; -import de.tudbut.parsing.JSON; import de.tudbut.parsing.TCN; import de.tudbut.tools.Hasher; import de.tudbut.tools.Tools; import de.tudbut.tools.encryption.Key; -import com.baseband.launcher.classloader.CustomClassLoader; -import com.baseband.launcher.util.RSAKey; -import com.baseband.launcher.util.Util; import de.tudbut.tools.encryption.RawKey; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; @@ -23,7 +22,6 @@ import java.lang.reflect.Method; import java.net.Socket; import java.nio.charset.StandardCharsets; import java.util.Arrays; -import java.util.Base64; import java.util.HashMap; import java.util.stream.Collectors; diff --git a/Loader/src/main/java/com/baseband/launcher/Tweaker.java b/Loader/src/main/java/de/com/baseband/launcher/Tweaker.java similarity index 96% rename from Loader/src/main/java/com/baseband/launcher/Tweaker.java rename to Loader/src/main/java/de/com/baseband/launcher/Tweaker.java index 8a29d1c..f217ce5 100644 --- a/Loader/src/main/java/com/baseband/launcher/Tweaker.java +++ b/Loader/src/main/java/de/com/baseband/launcher/Tweaker.java @@ -3,12 +3,11 @@ * Unauthorized copying of this file via any medium is Strictly Prohibited. */ -package com.baseband.launcher; +package de.com.baseband.launcher; import net.minecraft.launchwrapper.ITweaker; import net.minecraft.launchwrapper.LaunchClassLoader; import net.minecraftforge.common.ForgeVersion; -import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; import org.spongepowered.asm.launch.MixinTweaker; import org.spongepowered.asm.mixin.MixinEnvironment; diff --git a/Loader/src/main/java/com/baseband/launcher/classloader/CustomClassLoader.java b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java similarity index 94% rename from Loader/src/main/java/com/baseband/launcher/classloader/CustomClassLoader.java rename to Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java index dc1e003..a474844 100644 --- a/Loader/src/main/java/com/baseband/launcher/classloader/CustomClassLoader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java @@ -1,12 +1,12 @@ -package com.baseband.launcher.classloader; +package de.com.baseband.launcher.classloader; -import com.baseband.launcher.url.URLWrapper; +import de.com.baseband.launcher.url.URLWrapper; +import de.com.baseband.launcher.util.Util; import de.tudbut.security.*; import de.tudbut.security.permissionmanager.CallClassRestriction; import de.tudbut.security.permissionmanager.ClassLoaderRestriction; import de.tudbut.security.permissionmanager.PermissionOR; import net.minecraft.launchwrapper.Launch; -import com.baseband.launcher.util.Util; import org.spongepowered.asm.mixin.transformer.MixinTransformer; import org.spongepowered.asm.service.MixinService; import org.spongepowered.asm.service.mojang.MixinServiceLaunchWrapper; @@ -19,7 +19,7 @@ import java.net.URL; import java.util.*; import java.util.stream.Collectors; -import static com.baseband.launcher.Loader.exit; +import static de.com.baseband.launcher.Loader.exit; public class CustomClassLoader extends ClassLoader implements Util { private final HashSet names = new HashSet<>(); @@ -80,7 +80,7 @@ public class CustomClassLoader extends ClassLoader implements Util { public void informClient() { LOGGER.info("Informing client that it has been loaded."); try { - this.loadClass("com.baseband.prod.LoadHandler").getDeclaredMethod("loaded").invoke(null); + this.loadClass("de.com.baseband.prod.LoadHandler").getDeclaredMethod("loaded").invoke(null); } catch (Exception e) { throw new RuntimeException(e); } @@ -187,7 +187,7 @@ public class CustomClassLoader extends ClassLoader implements Util { private byte[] getBytes(String name) { PermissionManager[] pm = new PermissionManager[1]; parent.mixinPermissionManager.access(x -> pm[0] = x.getValue()); - if(!name.replace('/', '.').startsWith("com.baseband.client.mixin") || !pm[0].checkCaller(new MixinStrictness())) + if(!name.replace('/', '.').startsWith("de.com.baseband.client.mixin") || !pm[0].checkCaller(new MixinStrictness())) return null; final byte[][] bytes = {null}; diff --git a/Loader/src/main/java/de/com/baseband/launcher/security/SecurityImpl.java b/Loader/src/main/java/de/com/baseband/launcher/security/SecurityImpl.java new file mode 100644 index 0000000..c5da000 --- /dev/null +++ b/Loader/src/main/java/de/com/baseband/launcher/security/SecurityImpl.java @@ -0,0 +1,7 @@ +package de.com.baseband.launcher.security; + +import de.com.baseband.launcher.util.Util; + +public interface SecurityImpl extends Util { + void run(); +} diff --git a/Loader/src/main/java/com/baseband/launcher/security/impl/TestImpl.java b/Loader/src/main/java/de/com/baseband/launcher/security/impl/TestImpl.java similarity index 55% rename from Loader/src/main/java/com/baseband/launcher/security/impl/TestImpl.java rename to Loader/src/main/java/de/com/baseband/launcher/security/impl/TestImpl.java index b24ad4c..f994519 100644 --- a/Loader/src/main/java/com/baseband/launcher/security/impl/TestImpl.java +++ b/Loader/src/main/java/de/com/baseband/launcher/security/impl/TestImpl.java @@ -1,6 +1,6 @@ -package com.baseband.launcher.security.impl; +package de.com.baseband.launcher.security.impl; -import com.baseband.launcher.security.SecurityImpl; +import de.com.baseband.launcher.security.SecurityImpl; public class TestImpl implements SecurityImpl { @Override diff --git a/Loader/src/main/java/com/baseband/launcher/url/ByteURLHandler.java b/Loader/src/main/java/de/com/baseband/launcher/url/ByteURLHandler.java similarity index 90% rename from Loader/src/main/java/com/baseband/launcher/url/ByteURLHandler.java rename to Loader/src/main/java/de/com/baseband/launcher/url/ByteURLHandler.java index 9c2261b..9363d69 100644 --- a/Loader/src/main/java/com/baseband/launcher/url/ByteURLHandler.java +++ b/Loader/src/main/java/de/com/baseband/launcher/url/ByteURLHandler.java @@ -1,4 +1,4 @@ -package com.baseband.launcher.url; +package de.com.baseband.launcher.url; import java.net.URL; import java.net.URLConnection; diff --git a/Loader/src/main/java/com/baseband/launcher/url/ResourceConnection.java b/Loader/src/main/java/de/com/baseband/launcher/url/ResourceConnection.java similarity index 95% rename from Loader/src/main/java/com/baseband/launcher/url/ResourceConnection.java rename to Loader/src/main/java/de/com/baseband/launcher/url/ResourceConnection.java index 8019eff..e4c5428 100644 --- a/Loader/src/main/java/com/baseband/launcher/url/ResourceConnection.java +++ b/Loader/src/main/java/de/com/baseband/launcher/url/ResourceConnection.java @@ -1,4 +1,4 @@ -package com.baseband.launcher.url; +package de.com.baseband.launcher.url; import java.io.ByteArrayInputStream; import java.io.InputStream; diff --git a/Loader/src/main/java/com/baseband/launcher/url/URLWrapper.java b/Loader/src/main/java/de/com/baseband/launcher/url/URLWrapper.java similarity index 86% rename from Loader/src/main/java/com/baseband/launcher/url/URLWrapper.java rename to Loader/src/main/java/de/com/baseband/launcher/url/URLWrapper.java index 0a23dc3..7bfdfa1 100644 --- a/Loader/src/main/java/com/baseband/launcher/url/URLWrapper.java +++ b/Loader/src/main/java/de/com/baseband/launcher/url/URLWrapper.java @@ -1,4 +1,4 @@ -package com.baseband.launcher.url; +package de.com.baseband.launcher.url; import java.net.MalformedURLException; import java.net.URL; diff --git a/Loader/src/main/java/com/baseband/launcher/util/RSAKey.java b/Loader/src/main/java/de/com/baseband/launcher/util/RSAKey.java similarity index 98% rename from Loader/src/main/java/com/baseband/launcher/util/RSAKey.java rename to Loader/src/main/java/de/com/baseband/launcher/util/RSAKey.java index f6657b2..43b21d2 100644 --- a/Loader/src/main/java/com/baseband/launcher/util/RSAKey.java +++ b/Loader/src/main/java/de/com/baseband/launcher/util/RSAKey.java @@ -1,4 +1,4 @@ -package com.baseband.launcher.util; +package de.com.baseband.launcher.util; import javax.crypto.Cipher; import java.security.*; diff --git a/Loader/src/main/java/com/baseband/launcher/util/Util.java b/Loader/src/main/java/de/com/baseband/launcher/util/Util.java similarity index 86% rename from Loader/src/main/java/com/baseband/launcher/util/Util.java rename to Loader/src/main/java/de/com/baseband/launcher/util/Util.java index 5a964cc..3ca6b4d 100644 --- a/Loader/src/main/java/com/baseband/launcher/util/Util.java +++ b/Loader/src/main/java/de/com/baseband/launcher/util/Util.java @@ -1,4 +1,4 @@ -package com.baseband.launcher.util; +package de.com.baseband.launcher.util; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/Server/build.gradle b/Server/build.gradle index 8a8440b..f7594c3 100644 --- a/Server/build.gradle +++ b/Server/build.gradle @@ -31,9 +31,8 @@ jar { } manifest { attributes( - 'Main-Class': 'com.baseband.server.Main' + 'Main-Class': 'de.com.baseband.server.Main' ) } - baseName = 'BaseBand' - version = 'Server' + archiveFileName = 'BaseBand-Server.jar' } \ No newline at end of file diff --git a/Server/src/main/java/com/baseband/server/BotServiceHandler.java b/Server/src/main/java/de/com/baseband/server/BotServiceHandler.java similarity index 96% rename from Server/src/main/java/com/baseband/server/BotServiceHandler.java rename to Server/src/main/java/de/com/baseband/server/BotServiceHandler.java index 55f3960..a45c7f7 100644 --- a/Server/src/main/java/com/baseband/server/BotServiceHandler.java +++ b/Server/src/main/java/de/com/baseband/server/BotServiceHandler.java @@ -1,15 +1,12 @@ -package com.baseband.server; +package de.com.baseband.server; import at.favre.lib.crypto.bcrypt.BCrypt; import de.tudbut.io.TypedInputStream; import de.tudbut.io.TypedOutputStream; import de.tudbut.parsing.TCN; -import de.tudbut.tools.Hasher; import java.io.IOException; import java.net.Socket; -import java.nio.charset.StandardCharsets; -import java.security.SecureRandom; public class BotServiceHandler { diff --git a/Server/src/main/java/com/baseband/server/CheckNull.java b/Server/src/main/java/de/com/baseband/server/CheckNull.java similarity index 95% rename from Server/src/main/java/com/baseband/server/CheckNull.java rename to Server/src/main/java/de/com/baseband/server/CheckNull.java index 2c54d5c..8017093 100644 --- a/Server/src/main/java/com/baseband/server/CheckNull.java +++ b/Server/src/main/java/de/com/baseband/server/CheckNull.java @@ -1,4 +1,4 @@ -package com.baseband.server; +package de.com.baseband.server; import java.util.Arrays; import java.util.Objects; diff --git a/Server/src/main/java/com/baseband/server/LoaderHandler.java b/Server/src/main/java/de/com/baseband/server/LoaderHandler.java similarity index 97% rename from Server/src/main/java/com/baseband/server/LoaderHandler.java rename to Server/src/main/java/de/com/baseband/server/LoaderHandler.java index 944bdd4..399d166 100644 --- a/Server/src/main/java/com/baseband/server/LoaderHandler.java +++ b/Server/src/main/java/de/com/baseband/server/LoaderHandler.java @@ -1,4 +1,4 @@ -package com.baseband.server; +package de.com.baseband.server; import de.tudbut.io.TypedInputStream; import de.tudbut.io.TypedOutputStream; diff --git a/Server/src/main/java/com/baseband/server/Main.java b/Server/src/main/java/de/com/baseband/server/Main.java similarity index 99% rename from Server/src/main/java/com/baseband/server/Main.java rename to Server/src/main/java/de/com/baseband/server/Main.java index dbfcd23..d52c15b 100644 --- a/Server/src/main/java/com/baseband/server/Main.java +++ b/Server/src/main/java/de/com/baseband/server/Main.java @@ -3,7 +3,7 @@ * Unauthorized copying of this file via any medium is Strictly Prohibited. */ -package com.baseband.server; +package de.com.baseband.server; import at.favre.lib.crypto.bcrypt.BCrypt; diff --git a/Server/src/main/java/com/baseband/server/RSAKey.java b/Server/src/main/java/de/com/baseband/server/RSAKey.java similarity index 99% rename from Server/src/main/java/com/baseband/server/RSAKey.java rename to Server/src/main/java/de/com/baseband/server/RSAKey.java index b7d605c..26d4ef5 100644 --- a/Server/src/main/java/com/baseband/server/RSAKey.java +++ b/Server/src/main/java/de/com/baseband/server/RSAKey.java @@ -1,4 +1,4 @@ -package com.baseband.server; +package de.com.baseband.server; import javax.crypto.Cipher; import java.security.*; diff --git a/Server/src/main/java/com/baseband/server/UserHandler.java b/Server/src/main/java/de/com/baseband/server/UserHandler.java similarity index 98% rename from Server/src/main/java/com/baseband/server/UserHandler.java rename to Server/src/main/java/de/com/baseband/server/UserHandler.java index bc76487..d623b66 100644 --- a/Server/src/main/java/com/baseband/server/UserHandler.java +++ b/Server/src/main/java/de/com/baseband/server/UserHandler.java @@ -1,4 +1,4 @@ -package com.baseband.server; +package de.com.baseband.server; import at.favre.lib.crypto.bcrypt.BCrypt; import de.tudbut.parsing.TCN; diff --git a/scripts/gen_hash.sh b/scripts/gen_hash.sh new file mode 100644 index 0000000..05a7907 --- /dev/null +++ b/scripts/gen_hash.sh @@ -0,0 +1,2 @@ +#!/bin/bash +