package refactor
This commit is contained in:
parent
b72baefd53
commit
fce00f8c35
182 changed files with 992 additions and 1025 deletions
|
@ -25,7 +25,9 @@ jobs:
|
||||||
- name: Initialize Gradle
|
- name: Initialize Gradle
|
||||||
uses: https://github.com/gradle/actions/setup-gradle@v3
|
uses: https://github.com/gradle/actions/setup-gradle@v3
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./gradlew Client:build
|
run: |
|
||||||
|
bash scripts/gen_hash.sh
|
||||||
|
./gradlew Client:build
|
||||||
- name: Obfuscate Broadway
|
- name: Obfuscate Broadway
|
||||||
if: github.ref == 'refs/heads/release'
|
if: github.ref == 'refs/heads/release'
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -45,7 +45,7 @@ minecraft {
|
||||||
runs {
|
runs {
|
||||||
client {
|
client {
|
||||||
workingDirectory project.file('run')
|
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"]
|
args = ["--userType", "mojang", "--username", "qukn", "--accessToken", "eyJraWQiOiJhYzg0YSIsImFsZyI6IkhTMjU2In0.eyJ4dWlkIjoiMjUzNTQyNTU0MzA3NTkyNSIsImFnZyI6IkFkdWx0Iiwic3ViIjoiNGU0YmNlN2UtZDBkZi00MjM3LWFhNTUtMjZmZTVhNjY3ZmQ4IiwiYXV0aCI6IlhCT1giLCJucyI6ImRlZmF1bHQiLCJyb2xlcyI6W10sImlzcyI6ImF1dGhlbnRpY2F0aW9uIiwiZmxhZ3MiOlsidHdvZmFjdG9yYXV0aCIsIm1zYW1pZ3JhdGlvbl9zdGFnZTQiLCJvcmRlcnNfMjAyMiIsIm11bHRpcGxheWVyIl0sInByb2ZpbGVzIjp7Im1jIjoiODZhMzJmY2UtYTk0Ni00MzY2LWI0YTAtMDk3YTI5MDcyZTU0In0sInBsYXRmb3JtIjoiUENfTEFVTkNIRVIiLCJuYmYiOjE3MTY1NTc3MzQsImV4cCI6MTcxNjY0NDEzNCwiaWF0IjoxNzE2NTU3NzM0fQ.Bt1AahWJrQqv8iJe8JH4T2IczdKzDjPnN-z7YLpcpFw", "--uuid", "86a32fcea9464366b4a0097a29072e54"]
|
||||||
|
|
||||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
|
@ -135,7 +135,7 @@ jar {
|
||||||
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
|
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
|
||||||
'TweakOrder': '0',
|
'TweakOrder': '0',
|
||||||
'FMLCorePluginContainsFMLMod': 'true',
|
'FMLCorePluginContainsFMLMod': 'true',
|
||||||
'FMLCorePlugin': 'com.baseband.client.DevStub',
|
'FMLCorePlugin': 'de.com.baseband.client.DevStub',
|
||||||
'ForceLoadAsMod': 'true'
|
'ForceLoadAsMod': 'true'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -148,8 +148,8 @@ tasks.register('releaseJar', Jar) {
|
||||||
dependsOn "reobfJar"
|
dependsOn "reobfJar"
|
||||||
|
|
||||||
from(zipTree(jar.archiveFile)) {
|
from(zipTree(jar.archiveFile)) {
|
||||||
exclude 'com/baseband/client/DevStub.class'
|
exclude 'de/com/baseband/client/DevStub.class'
|
||||||
exclude 'com/baseband/client/DevStub.java'
|
exclude 'de/com/baseband/client/DevStub.java'
|
||||||
exclude 'org/spongepowered/**'
|
exclude 'org/spongepowered/**'
|
||||||
exclude 'META-INF/**'
|
exclude 'META-INF/**'
|
||||||
exclude 'mcmod.info'
|
exclude 'mcmod.info'
|
||||||
|
|
|
@ -11,23 +11,23 @@
|
||||||
-obfuscationdictionary dictionary.txt
|
-obfuscationdictionary dictionary.txt
|
||||||
-classobfuscationdictionary dictionary.txt
|
-classobfuscationdictionary dictionary.txt
|
||||||
-packageobfuscationdictionary dictionary.txt
|
-packageobfuscationdictionary dictionary.txt
|
||||||
-repackageclasses com.baseband.prod
|
-repackageclasses de.com.baseband.prod
|
||||||
-keepattributes *
|
-keepattributes *
|
||||||
-ignorewarnings
|
-ignorewarnings
|
||||||
#-overloadaggressively
|
#-overloadaggressively
|
||||||
|
|
||||||
# keep things meant to exist in prod
|
# keep things meant to exist in prod
|
||||||
-keep class com.baseband.prod.** { *; }
|
-keep class de.com.baseband.prod.** { *; }
|
||||||
-keep class com.baseband.client.mixin.** { *; }
|
-keep class de.com.baseband.client.mixin.** { *; }
|
||||||
-keep class com.baseband.client.DevStub {
|
-keep class de.com.baseband.launcher.DevStub {
|
||||||
public <methods>;
|
public <methods>;
|
||||||
}
|
}
|
||||||
-keep class com.baseband.launcher.Tweaker {
|
-keep class de.com.baseband.launcher.Tweaker {
|
||||||
public <methods>;
|
public <methods>;
|
||||||
}
|
}
|
||||||
|
|
||||||
# jna
|
# 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
|
# Also keep - Enumerations. Keep the special static methods that are required in
|
||||||
# enumeration classes.
|
# enumeration classes.
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
package com.baseband.client.event;
|
|
||||||
|
|
||||||
public class Event {
|
|
||||||
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.baseband.client.util.type;
|
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
|
||||||
|
|
||||||
public interface FeatureAction<T extends Feature> {
|
|
||||||
void run(T feature);
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +1,17 @@
|
||||||
package com.baseband.client;
|
package de.com.baseband.client;
|
||||||
|
|
||||||
import com.baseband.client.event.Event;
|
import de.com.baseband.client.event.Event;
|
||||||
import com.baseband.client.event.EventManager;
|
import de.com.baseband.client.event.EventManager;
|
||||||
import com.baseband.client.event.FMLEventHandler;
|
import de.com.baseband.client.event.FMLEventHandler;
|
||||||
import com.baseband.client.event.remote.RemoteEvent;
|
import de.com.baseband.client.event.remote.RemoteEvent;
|
||||||
import com.baseband.client.event.remote.RemoteEventManager;
|
import de.com.baseband.client.event.remote.RemoteEventManager;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.registry.Configuration;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.registry.Updater;
|
import de.com.baseband.client.feature.render.HUD;
|
||||||
import com.baseband.client.util.interact.Chat;
|
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 de.tudbut.tools.Lock;
|
||||||
import hint.Mobf;
|
import hint.Mobf;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -43,14 +45,6 @@ public class BaseBand {
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends Event> T publish(T event) {
|
|
||||||
if(event instanceof RemoteEvent)
|
|
||||||
remoteEventManager.publish((RemoteEvent) event);
|
|
||||||
else
|
|
||||||
eventManager.publish(event);
|
|
||||||
return event;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void onInit() {
|
public static void onInit() {
|
||||||
LOGGER.info("Initializing...");
|
LOGGER.info("Initializing...");
|
||||||
String[] banned = {"0836f9ee-4c5d-45e4-b39c-954880199acb", "18f87992-6459-43b8-8d26-6a4c74bee7ec", "f84e53c5-9143-4934-860c-ea44c9ad0e9f"};
|
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 extends Event> 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);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,9 +1,8 @@
|
||||||
package com.baseband.client;
|
package de.com.baseband.client;
|
||||||
|
|
||||||
import net.minecraftforge.common.ForgeVersion;
|
import net.minecraftforge.common.ForgeVersion;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||||
import net.minecraftforge.fml.relauncher.FMLInjectionData;
|
|
||||||
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
|
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
|
@ -1,13 +1,13 @@
|
||||||
package com.baseband.client;
|
package de.com.baseband.client;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.chat.*;
|
import de.com.baseband.client.feature.chat.*;
|
||||||
import com.baseband.client.feature.client.*;
|
import de.com.baseband.client.feature.client.*;
|
||||||
import com.baseband.client.feature.combat.AutoTotem;
|
import de.com.baseband.client.feature.combat.AutoTotem;
|
||||||
import com.baseband.client.feature.command.*;
|
import de.com.baseband.client.feature.command.*;
|
||||||
import com.baseband.client.feature.movement.*;
|
import de.com.baseband.client.feature.movement.*;
|
||||||
import com.baseband.client.feature.render.*;
|
import de.com.baseband.client.feature.render.*;
|
||||||
import com.baseband.client.feature.world.*;
|
import de.com.baseband.client.feature.world.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TudbuT
|
* @author TudbuT
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baseband.client.event;
|
package de.com.baseband.client.event;
|
||||||
|
|
||||||
public class CancellableEvent extends Event {
|
public class CancellableEvent extends Event {
|
||||||
boolean cancelled = false;
|
boolean cancelled = false;
|
|
@ -0,0 +1,5 @@
|
||||||
|
package de.com.baseband.client.event;
|
||||||
|
|
||||||
|
public class Event {
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baseband.client.event;
|
package de.com.baseband.client.event;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,11 +1,12 @@
|
||||||
package com.baseband.client.event;
|
package de.com.baseband.client.event;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.Setup;
|
import de.com.baseband.client.Setup;
|
||||||
import com.baseband.client.event.events.PlayerDestroyEvent;
|
import de.com.baseband.client.event.events.PlayerDestroyEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
import net.minecraft.client.entity.EntityPlayerSP;
|
||||||
import net.minecraftforge.client.event.ClientChatEvent;
|
import net.minecraftforge.client.event.ClientChatEvent;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
|
@ -14,10 +15,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||||
|
|
||||||
import java.util.Arrays;
|
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
|
//forge mod loader more like fuck my life this shit BLOWS
|
||||||
public class FMLEventHandler {
|
public class FMLEventHandler {
|
||||||
|
|
||||||
|
@ -31,14 +28,14 @@ public class FMLEventHandler {
|
||||||
Chat.history(event.getMessage());
|
Chat.history(event.getMessage());
|
||||||
String[] cmd = event.getMessage().substring(prefix.length()).split(" ");
|
String[] cmd = event.getMessage().substring(prefix.length()).split(" ");
|
||||||
String[] args = Arrays.copyOfRange(cmd, 1, cmd.length);
|
String[] args = Arrays.copyOfRange(cmd, 1, cmd.length);
|
||||||
for (Feature feature : features) {
|
for (Feature feature : Features.features) {
|
||||||
if (feature.toString().equalsIgnoreCase(cmd[0])) {
|
if (feature.toString().equalsIgnoreCase(cmd[0])) {
|
||||||
try {
|
try {
|
||||||
feature.onCommand(args);
|
feature.onCommand(args);
|
||||||
return;
|
return;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.error("Error executing command {}", event.getMessage());
|
BaseBand.LOGGER.error("Error executing command {}", event.getMessage());
|
||||||
LOGGER.error((Object) "The error: ", e);
|
BaseBand.LOGGER.error((Object) "The error: ", e);
|
||||||
Chat.print("Error executing this command. Please send your latest.log to the " + setup.Name + " developers.");
|
Chat.print("Error executing this command. Please send your latest.log to the " + setup.Name + " developers.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +53,7 @@ public class FMLEventHandler {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void tick(TickEvent.ClientTickEvent event) {
|
public void tick(TickEvent.ClientTickEvent event) {
|
||||||
BaseBand.remoteEventManager.onTick();
|
BaseBand.remoteEventManager.onTick();
|
||||||
if(mc.world == null || mc.player == null) {
|
if(BaseBand.mc.world == null || BaseBand.mc.player == null) {
|
||||||
if(playerLastTick != null) {
|
if(playerLastTick != null) {
|
||||||
BaseBand.publish(new PlayerDestroyEvent(playerLastTick));
|
BaseBand.publish(new PlayerDestroyEvent(playerLastTick));
|
||||||
}
|
}
|
||||||
|
@ -65,9 +62,9 @@ public class FMLEventHandler {
|
||||||
}
|
}
|
||||||
if(event.phase != TickEvent.Phase.END)
|
if(event.phase != TickEvent.Phase.END)
|
||||||
return;
|
return;
|
||||||
playerLastTick = mc.player;
|
playerLastTick = BaseBand.mc.player;
|
||||||
KeyManager.updateKeyBinds();
|
KeyManager.updateKeyBinds();
|
||||||
for(Feature feature : features) {
|
for(Feature feature : Features.features) {
|
||||||
feature.onEveryTick();
|
feature.onEveryTick();
|
||||||
if(feature.enabled) {
|
if(feature.enabled) {
|
||||||
feature.onTick();
|
feature.onTick();
|
|
@ -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;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baseband.client.event;
|
package de.com.baseband.client.event;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
|
@ -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 {
|
public class BaritoneEvent extends CancellableEvent {
|
||||||
String reason;
|
String reason;
|
|
@ -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.EnumFacing;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
|
@ -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 class MotionUpdateEvent extends Event {
|
||||||
public static class Pre extends MotionUpdateEvent {}
|
public static class Pre extends MotionUpdateEvent {}
|
|
@ -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;
|
import net.minecraft.entity.MoverType;
|
||||||
|
|
||||||
public class MoveEvent extends CancellableEvent {
|
public class MoveEvent extends CancellableEvent {
|
|
@ -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;
|
import net.minecraft.network.Packet;
|
||||||
|
|
||||||
public abstract class PacketEvent extends CancellableEvent {
|
public abstract class PacketEvent extends CancellableEvent {
|
|
@ -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;
|
import net.minecraft.client.entity.EntityPlayerSP;
|
||||||
|
|
||||||
public class PlayerDestroyEvent extends Event {
|
public class PlayerDestroyEvent extends Event {
|
|
@ -1,16 +1,14 @@
|
||||||
package com.baseband.client.event.events;
|
package de.com.baseband.client.event.events;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.event.remote.RemoteEvent;
|
import de.com.baseband.client.event.remote.RemoteEvent;
|
||||||
import com.baseband.client.event.remote.RemoteEventManager;
|
import de.com.baseband.client.event.remote.RemoteEventManager;
|
||||||
import com.baseband.client.util.interact.BlockUtils;
|
import de.com.baseband.client.util.interact.BlockUtils;
|
||||||
import com.baseband.client.util.type.Selection;
|
import de.com.baseband.client.util.type.Selection;
|
||||||
import de.tudbut.obj.Save;
|
import de.tudbut.obj.Save;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
|
||||||
|
|
||||||
public class SelectEvent extends RemoteEvent {
|
public class SelectEvent extends RemoteEvent {
|
||||||
@Save
|
@Save
|
||||||
public Selection selection;
|
public Selection selection;
|
||||||
|
@ -25,7 +23,7 @@ public class SelectEvent extends RemoteEvent {
|
||||||
if(BaseBand.remoteEventManager.isConnected()) {
|
if(BaseBand.remoteEventManager.isConnected()) {
|
||||||
RemoteEventManager manager = BaseBand.remoteEventManager;
|
RemoteEventManager manager = BaseBand.remoteEventManager;
|
||||||
Selection[] splitSelection = BlockUtils.splitSelection1D(selection, manager.getPeers());
|
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())
|
if(splitSelection.length > manager.getID())
|
||||||
return splitSelection[manager.getID()];
|
return splitSelection[manager.getID()];
|
||||||
else return null;
|
else return null;
|
|
@ -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
|
// any event which might be useful to others and can be serialized (@Save) should extend RemoteEvent
|
||||||
public class RemoteEvent extends Event {
|
public class RemoteEvent extends Event {
|
|
@ -1,11 +1,9 @@
|
||||||
package com.baseband.client.event.remote;
|
package de.com.baseband.client.event.remote;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.Setup;
|
import de.com.baseband.client.event.remote.events.RemoteInitEvent;
|
||||||
import com.baseband.client.event.remote.events.RemoteInitEvent;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.client.AltControl;
|
||||||
import com.baseband.client.feature.client.AltControl;
|
|
||||||
import com.baseband.client.util.interact.Chat;
|
|
||||||
import de.tudbut.io.TypedInputStream;
|
import de.tudbut.io.TypedInputStream;
|
||||||
import de.tudbut.io.TypedOutputStream;
|
import de.tudbut.io.TypedOutputStream;
|
||||||
import de.tudbut.parsing.JSON;
|
import de.tudbut.parsing.JSON;
|
||||||
|
@ -23,7 +21,7 @@ import java.util.LinkedList;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
|
|
||||||
public class RemoteEventManager {
|
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 Socket head = null;
|
||||||
public final ArrayList<Socket> clients = new ArrayList<>();
|
public final ArrayList<Socket> clients = new ArrayList<>();
|
||||||
|
@ -40,14 +38,14 @@ public class RemoteEventManager {
|
||||||
try {
|
try {
|
||||||
head = new Socket(ip, Setup.Port);
|
head = new Socket(ip, Setup.Port);
|
||||||
initClient();
|
initClient();
|
||||||
Chat.notify("[Remote] Started as client.");
|
BaseBand.notify("[Remote] Started as client.");
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
try {
|
try {
|
||||||
server = new ServerSocket(Setup.Port);
|
server = new ServerSocket(Setup.Port);
|
||||||
initServer();
|
initServer();
|
||||||
Chat.notify("[Remote] Started as server.");
|
BaseBand.notify("[Remote] Started as server.");
|
||||||
} catch (IOException e) {
|
} 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);
|
s.setSoTimeout(1);
|
||||||
clients.add(s);
|
clients.add(s);
|
||||||
publish(new RemoteInitEvent(clients.size() + 1));
|
publish(new RemoteInitEvent(clients.size() + 1));
|
||||||
Chat.notify("[Remote] Client connected.");
|
BaseBand.notify("[Remote] Client connected.");
|
||||||
} else {
|
} else {
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
|
@ -146,7 +144,7 @@ public class RemoteEventManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void disconnectClient(int i) throws IOException {
|
private void disconnectClient(int i) throws IOException {
|
||||||
Chat.notify("[Remote] A peer disconnected.");
|
BaseBand.notify("[Remote] A peer disconnected.");
|
||||||
clients.remove(i).close();
|
clients.remove(i).close();
|
||||||
publish(new RemoteInitEvent(clients.size() + 1));
|
publish(new RemoteInitEvent(clients.size() + 1));
|
||||||
}
|
}
|
||||||
|
@ -161,12 +159,12 @@ public class RemoteEventManager {
|
||||||
o.write('B');
|
o.write('B');
|
||||||
o.flush();
|
o.flush();
|
||||||
if(!(i.read() == 'B' && i.read() == 'B')) {
|
if(!(i.read() == 'B' && i.read() == 'B')) {
|
||||||
Chat.notify("[Remote] Unable to connect.");
|
BaseBand.notify("[Remote] Unable to connect.");
|
||||||
end();
|
end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
head.setSoTimeout(1);
|
head.setSoTimeout(1);
|
||||||
Chat.notify("[Remote] Connected.");
|
BaseBand.notify("[Remote] Connected.");
|
||||||
while(head != null) {
|
while(head != null) {
|
||||||
while(!toSend.isEmpty()) {
|
while(!toSend.isEmpty()) {
|
||||||
String stringEvent = JSON.write((TCN)ConfigSaverTCN2.write(toSend.poll(), false, false));
|
String stringEvent = JSON.write((TCN)ConfigSaverTCN2.write(toSend.poll(), false, false));
|
||||||
|
@ -177,7 +175,7 @@ public class RemoteEventManager {
|
||||||
try {
|
try {
|
||||||
head.setSoTimeout(1);
|
head.setSoTimeout(1);
|
||||||
if ((id = i.read()) == -1) {
|
if ((id = i.read()) == -1) {
|
||||||
Chat.notify("[Remote] Connection ended.");
|
BaseBand.notify("[Remote] Connection ended.");
|
||||||
end();
|
end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -187,7 +185,7 @@ public class RemoteEventManager {
|
||||||
} catch (InterruptedIOException ignored) {}
|
} catch (InterruptedIOException ignored) {}
|
||||||
}
|
}
|
||||||
} catch (IOException | JSON.JSONFormatException | ClassNotFoundException e) {
|
} catch (IOException | JSON.JSONFormatException | ClassNotFoundException e) {
|
||||||
Chat.notify("[Remote] Connection ended.");
|
BaseBand.notify("[Remote] Connection ended.");
|
||||||
end();
|
end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -207,7 +205,7 @@ public class RemoteEventManager {
|
||||||
RemoteEvent event = toProcess.poll();
|
RemoteEvent event = toProcess.poll();
|
||||||
if(event instanceof RemoteInitEvent) {
|
if(event instanceof RemoteInitEvent) {
|
||||||
peers = ((RemoteInitEvent) event).peers;
|
peers = ((RemoteInitEvent) event).peers;
|
||||||
Chat.notify("[Remote] Peers connected: " + peers + ".");
|
BaseBand.notify("[Remote] Peers connected: " + peers + ".");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BaseBand.eventManager.publish(event);
|
BaseBand.eventManager.publish(event);
|
|
@ -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 de.com.baseband.client.event.remote.RemoteEvent;
|
||||||
import com.baseband.client.registry.Configuration;
|
import de.com.baseband.client.registry.Configuration;
|
||||||
import de.tudbut.obj.Save;
|
import de.tudbut.obj.Save;
|
||||||
import de.tudbut.parsing.TCN;
|
import de.tudbut.parsing.TCN;
|
||||||
|
|
|
@ -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;
|
import de.tudbut.obj.Save;
|
||||||
|
|
||||||
public class RemoteInitEvent extends RemoteEvent {
|
public class RemoteInitEvent extends RemoteEvent {
|
|
@ -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;
|
import de.tudbut.obj.Save;
|
||||||
|
|
||||||
public class RemoteSendMessageEvent extends RemoteEvent {
|
public class RemoteSendMessageEvent extends RemoteEvent {
|
|
@ -1,10 +1,10 @@
|
||||||
package com.baseband.client.feature;
|
package de.com.baseband.client.feature;
|
||||||
|
|
||||||
import com.baseband.client.feature.category.*;
|
import de.com.baseband.client.feature.category.*;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.registry.ConfigHandle;
|
||||||
import com.baseband.client.registry.Configuration;
|
import de.com.baseband.client.registry.Configuration;
|
||||||
import com.baseband.client.util.adapt.FieldFinder;
|
import de.com.baseband.client.util.adapt.FieldFinder;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
package com.baseband.client.feature;
|
package de.com.baseband.client.feature;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.Setup;
|
import de.com.baseband.client.event.KeyManager;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import com.baseband.client.gui.lib.component.*;
|
import de.com.baseband.client.gui.lib.component.*;
|
||||||
import com.baseband.client.registry.AnyGate;
|
import de.com.baseband.client.registry.AnyGate;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.registry.ConfigHandle;
|
||||||
import com.baseband.client.registry.Configuration;
|
import de.com.baseband.client.registry.Configuration;
|
||||||
import com.baseband.client.registry.SetCommand;
|
import de.com.baseband.client.registry.SetCommand;
|
||||||
import com.baseband.client.registry.annotation.*;
|
import de.com.baseband.client.registry.annotation.*;
|
||||||
import com.baseband.client.util.adapt.FieldFinder;
|
import de.com.baseband.client.util.adapt.FieldFinder;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.type.KeyBind;
|
||||||
import com.baseband.client.util.type.KeyBind;
|
|
||||||
import com.baseband.client.event.KeyManager;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
|
@ -32,7 +30,7 @@ public abstract class Feature extends ToggleButton implements SetCommand {
|
||||||
private static final int MARKER_PREFIX = -1024;
|
private static final int MARKER_PREFIX = -1024;
|
||||||
public static final int M_ENABLED = MARKER_PREFIX + 1;
|
public static final int M_ENABLED = MARKER_PREFIX + 1;
|
||||||
|
|
||||||
protected Setup Setup;
|
protected de.com.baseband.client.Setup Setup;
|
||||||
|
|
||||||
protected Minecraft mc;
|
protected Minecraft mc;
|
||||||
|
|
||||||
|
@ -82,18 +80,18 @@ public abstract class Feature extends ToggleButton implements SetCommand {
|
||||||
if(enabled) {
|
if(enabled) {
|
||||||
BaseBand.eventManager.subscribe(this);
|
BaseBand.eventManager.subscribe(this);
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
Chat.notify("§l" + this + "§a enabled§r.");
|
BaseBand.notify("§l" + this + "§a enabled§r.");
|
||||||
onEnable();
|
onEnable();
|
||||||
} else {
|
} else {
|
||||||
BaseBand.eventManager.unsubscribe(this);
|
BaseBand.eventManager.unsubscribe(this);
|
||||||
MinecraftForge.EVENT_BUS.unregister(this);
|
MinecraftForge.EVENT_BUS.unregister(this);
|
||||||
Chat.notify("§l" + this + "§c disabled§r.");
|
BaseBand.notify("§l" + this + "§c disabled§r.");
|
||||||
onDisable();
|
onDisable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void register(Minecraft mc) {
|
public final void register(Minecraft mc) {
|
||||||
Setup = com.baseband.client.Setup.get();
|
Setup = de.com.baseband.client.Setup.get();
|
||||||
this.mc = mc;
|
this.mc = mc;
|
||||||
|
|
||||||
this.text = toString();
|
this.text = toString();
|
||||||
|
@ -127,7 +125,7 @@ public abstract class Feature extends ToggleButton implements SetCommand {
|
||||||
String keyBindConfig = keyBindString + " Key";
|
String keyBindConfig = keyBindString + " Key";
|
||||||
KeyBind keyBind = new KeyBind(null, () -> {
|
KeyBind keyBind = new KeyBind(null, () -> {
|
||||||
btn.click(0, 0, 0);
|
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);
|
}, gate);
|
||||||
subComponents.add(new KeyButton(keyBindString, settings, keyBindConfig).gate(AnyGate.get(f, this, null, keyBound.allowChangeGate())).hover(description));
|
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));
|
Configuration.registerUpdater(settings.linkWith(keyBind, KeyBind.KEY_FIELD).name(keyBindConfig));
|
|
@ -1,8 +1,8 @@
|
||||||
package com.baseband.client.feature;
|
package de.com.baseband.client.feature;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.Setup;
|
import de.com.baseband.client.Setup;
|
||||||
import com.baseband.client.util.type.FeatureAction;
|
import de.com.baseband.client.util.type.FeatureAction;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
|
@ -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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -1,14 +1,13 @@
|
||||||
package com.baseband.client.feature.chat;
|
package de.com.baseband.client.feature.chat;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.Chat;
|
|
||||||
import net.minecraftforge.client.event.ClientChatEvent;
|
import net.minecraftforge.client.event.ClientChatEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
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 {
|
public class ChatAppend extends Feature {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,8 +40,8 @@ public class ChatAppend extends Feature {
|
||||||
if(message.matches("\\W.*"))
|
if(message.matches("\\W.*"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Chat.history(message);
|
de.com.baseband.client.util.interact.Chat.history(message);
|
||||||
Chat.send(applyWatermark((custom ? (customUnicodeToggle ? toUnicode(customWatermark) : customWatermark) : toUnicode("baseband")), message), false);
|
de.com.baseband.client.util.interact.Chat.send(applyWatermark((custom ? (customUnicodeToggle ? toUnicode(customWatermark) : customWatermark) : toUnicode("baseband")), message), false);
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.feature.render.HUD;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.mixin.mixins.ICPacketChat;
|
import de.com.baseband.client.feature.render.HUD;
|
||||||
import com.baseband.client.registry.annotation.*;
|
import de.com.baseband.client.mixin.mixins.ICPacketChat;
|
||||||
import com.baseband.client.util.adapt.FieldFinder;
|
import de.com.baseband.client.registry.annotation.*;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.FieldFinder;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.misc.SBE;
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import com.baseband.client.util.misc.Trypt;
|
import de.com.baseband.client.util.misc.SBE;
|
||||||
|
import de.com.baseband.client.util.misc.Trypt;
|
||||||
import de.tudbut.tools.Hasher;
|
import de.tudbut.tools.Hasher;
|
||||||
import net.minecraft.network.play.client.CPacketChatMessage;
|
import net.minecraft.network.play.client.CPacketChatMessage;
|
||||||
import net.minecraft.network.play.server.SPacketChat;
|
import net.minecraft.network.play.server.SPacketChat;
|
||||||
|
@ -22,10 +23,7 @@ import java.util.Arrays;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.RANDOM;
|
@de.com.baseband.client.feature.category.Chat
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
|
||||||
|
|
||||||
@com.baseband.client.feature.category.Chat
|
|
||||||
public class ChatCrypt extends Feature {
|
public class ChatCrypt extends Feature {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
@ -50,7 +48,7 @@ public class ChatCrypt extends Feature {
|
||||||
@Config("Channel")
|
@Config("Channel")
|
||||||
@Description("Used to distinguish between different groups of people using ChatCrypt (otherwise you get garbage in chat).")
|
@Description("Used to distinguish between different groups of people using ChatCrypt (otherwise you get garbage in chat).")
|
||||||
@Range("0..128")
|
@Range("0..128")
|
||||||
public int channel = RANDOM.nextInt(128);
|
public int channel = BaseBand.RANDOM.nextInt(128);
|
||||||
|
|
||||||
@Config("Use SBE algorithm")
|
@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" +
|
@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})
|
@MultiGate(and = {2, 3})
|
||||||
public void resetTrypt() {
|
public void resetTrypt() {
|
||||||
trypt = null;
|
trypt = null;
|
||||||
Chat.notifyAll("§c§lChat>§a Trypt instance reset.");
|
BaseBand.notifyAll("§c§lChat>§a Trypt instance reset.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Config("Password")
|
@Config("Password")
|
||||||
|
@ -111,7 +109,7 @@ public class ChatCrypt extends Feature {
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
if(password.isEmpty() || password.equalsIgnoreCase("CLICK HERE")) {
|
if(password.isEmpty() || password.equalsIgnoreCase("CLICK HERE")) {
|
||||||
toggle();
|
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);
|
boolean isOurs = message.equals(sentEncrypted);
|
||||||
|
|
||||||
LOGGER.info("decrypt: {}", message);
|
BaseBand.LOGGER.info("decrypt: {}", message);
|
||||||
byte[] original = recoverBytes(message);
|
byte[] original = recoverBytes(message);
|
||||||
if(!useSBE && decryptNoKeep(original).equals("CC:keep") && allowCCKeep) {
|
if(!useSBE && decryptNoKeep(original).equals("CC:keep") && allowCCKeep) {
|
||||||
keepTrypt = true;
|
keepTrypt = true;
|
||||||
trypt = null;
|
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);
|
e.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -164,10 +162,10 @@ public class ChatCrypt extends Feature {
|
||||||
if(!useSBE && keepTrypt && (!isOurs || !sentOriginal.equals(message))) {
|
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
|
// 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)) {
|
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 {
|
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;
|
keepTrypt = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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 de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Trigger;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.util.adapt.FieldFinder;
|
import de.com.baseband.client.registry.annotation.Trigger;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.FieldFinder;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import net.minecraft.client.gui.ChatLine;
|
import net.minecraft.client.gui.ChatLine;
|
||||||
import net.minecraft.client.gui.GuiNewChat;
|
import net.minecraft.client.gui.GuiNewChat;
|
||||||
import net.minecraft.network.play.server.SPacketChat;
|
import net.minecraft.network.play.server.SPacketChat;
|
||||||
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@com.baseband.client.feature.category.Chat
|
@de.com.baseband.client.feature.category.Chat
|
||||||
public class ChatExtras extends Feature {
|
public class ChatExtras extends Feature {
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public class ChatExtras extends Feature {
|
||||||
chatLines.remove(i--);
|
chatLines.remove(i--);
|
||||||
}
|
}
|
||||||
mc.ingameGUI.getChatGUI().refreshChat();
|
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);
|
Pattern pattern = Pattern.compile("[^\t\r\n\\x20-\\x7E]+", Pattern.CASE_INSENSITIVE);
|
||||||
Matcher matcher = pattern.matcher(message);
|
Matcher matcher = pattern.matcher(message);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
Chat.print("Unicode filtered!");
|
de.com.baseband.client.util.interact.Chat.print("Unicode filtered!");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
if (notifyOnPopLag) {
|
if (notifyOnPopLag) {
|
||||||
mc.ingameGUI.getChatGUI().printChatMessage(new TextComponentString(message.replaceAll(pattern.pattern(), "")));
|
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")) {
|
if (text.contains("jndi") || text.contains("ldap")) {
|
||||||
text = text.replace("jndi", "");
|
text = text.replace("jndi", "");
|
||||||
text = text.replace("ldap", "");
|
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);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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 de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.util.adapt.FieldFinder;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.adapt.FieldFinder;
|
||||||
import net.minecraft.network.play.server.SPacketChat;
|
import net.minecraft.network.play.server.SPacketChat;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.TextComponentString;
|
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.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
@de.com.baseband.client.feature.category.Chat
|
||||||
|
|
||||||
@com.baseband.client.feature.category.Chat
|
|
||||||
public class ChatFilter extends Feature {
|
public class ChatFilter extends Feature {
|
||||||
|
|
||||||
public enum Mode {
|
public enum Mode {
|
||||||
|
@ -105,9 +103,9 @@ public class ChatFilter extends Feature {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(changed) {
|
if(changed) {
|
||||||
LOGGER.info("Original message: {}", packet.getChatComponent().getUnformattedText());
|
BaseBand.LOGGER.info("Original message: {}", packet.getChatComponent().getUnformattedText());
|
||||||
if (mode == Mode.Block) {
|
if (mode == Mode.Block) {
|
||||||
Chat.print("Message filtered.");
|
de.com.baseband.client.util.interact.Chat.print("Message filtered.");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
|
@ -1,13 +1,12 @@
|
||||||
package com.baseband.client.feature.chat;
|
package de.com.baseband.client.feature.chat;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.util.interact.Chat;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@com.baseband.client.feature.category.Chat
|
@de.com.baseband.client.feature.category.Chat
|
||||||
public class ISeeYou extends Feature {
|
public class ISeeYou extends Feature {
|
||||||
|
|
||||||
private final ArrayList<String> names = new ArrayList<>();
|
private final ArrayList<String> names = new ArrayList<>();
|
||||||
|
@ -31,8 +30,8 @@ public class ISeeYou extends Feature {
|
||||||
try {
|
try {
|
||||||
for (final Entity entity : mc.world.loadedEntityList) if (entity instanceof EntityPlayer && !entity.getName().equalsIgnoreCase(mc.player.getName())) newnames.add(entity.getName());
|
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)) {
|
if (!names.equals(newnames)) {
|
||||||
for (final String name : newnames) if (!names.contains(name)) Chat.print("[ISeeYou] I 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)) Chat.print("[ISeeYou] I no longer 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.clear();
|
||||||
names.addAll(newnames);
|
names.addAll(newnames);
|
||||||
}
|
}
|
|
@ -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 de.com.baseband.client.event.events.PlayerDestroyEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.registry.PlayerDB;
|
import de.com.baseband.client.registry.PlayerDB;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
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")
|
@Description("Accepts TPA-Requests automatically")
|
||||||
public class TPAccept extends Feature {
|
public class TPAccept extends Feature {
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package com.baseband.client.feature.client;
|
package de.com.baseband.client.feature.client;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.event.remote.events.RemoteConfigEvent;
|
import de.com.baseband.client.event.remote.events.RemoteConfigEvent;
|
||||||
import com.baseband.client.event.remote.events.RemoteSendMessageEvent;
|
import de.com.baseband.client.event.remote.events.RemoteSendMessageEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.feature.render.ClickGUI;
|
import de.com.baseband.client.feature.render.ClickGUI;
|
||||||
import com.baseband.client.registry.Configuration;
|
import de.com.baseband.client.registry.Configuration;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.registry.annotation.Trigger;
|
import de.com.baseband.client.registry.annotation.Trigger;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
|
|
||||||
@ClientCategory
|
@ClientCategory
|
||||||
public class AltControl extends Feature {
|
public class AltControl extends Feature {
|
||||||
|
@ -45,12 +45,12 @@ public class AltControl extends Feature {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onRemoteSendChat(RemoteSendMessageEvent event) {
|
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);
|
Chat.simulateSend(event.message, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onConfig(RemoteConfigEvent event) {
|
public void onConfig(RemoteConfigEvent event) {
|
||||||
Chat.notify("[AltControl] Received a config.");
|
BaseBand.notify("[AltControl] Received a config.");
|
||||||
|
|
||||||
String ip = this.ip;
|
String ip = this.ip;
|
||||||
boolean gui = Features.isFeatureEnabled(ClickGUI.class);
|
boolean gui = Features.isFeatureEnabled(ClickGUI.class);
|
|
@ -1,10 +1,10 @@
|
||||||
package com.baseband.client.feature.client;
|
package de.com.baseband.client.feature.client;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Range;
|
import de.com.baseband.client.registry.annotation.Range;
|
||||||
import com.baseband.client.util.adapt.FieldFinder;
|
import de.com.baseband.client.util.adapt.FieldFinder;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiDisconnected;
|
import net.minecraft.client.gui.GuiDisconnected;
|
|
@ -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.process.IBaritoneProcess;
|
||||||
import baritone.api.selection.ISelectionManager;
|
import baritone.api.selection.ISelectionManager;
|
||||||
import baritone.api.utils.BetterBlockPos;
|
import baritone.api.utils.BetterBlockPos;
|
||||||
import com.baseband.client.event.events.SelectEvent;
|
import de.com.baseband.client.event.events.SelectEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.util.baritone.BaritoneManager;
|
import de.com.baseband.client.util.baritone.BaritoneManager;
|
||||||
import com.baseband.client.util.baritone.BaritonePresenceManager;
|
import de.com.baseband.client.util.baritone.BaritonePresenceManager;
|
||||||
import com.baseband.client.util.type.Selection;
|
import de.com.baseband.client.util.type.Selection;
|
||||||
|
|
||||||
@ClientCategory
|
@ClientCategory
|
||||||
public class Baritone extends Feature {
|
public class Baritone extends Feature {
|
|
@ -1,19 +1,19 @@
|
||||||
package com.baseband.client.feature.client;
|
package de.com.baseband.client.feature.client;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.event.events.PacketEvent;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.event.events.PlayerDestroyEvent;
|
import de.com.baseband.client.event.events.PlayerDestroyEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.gui.GuiTheme;
|
import de.com.baseband.client.gui.GuiTheme;
|
||||||
import com.baseband.client.registry.Configuration;
|
import de.com.baseband.client.registry.Configuration;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.KeyBound;
|
import de.com.baseband.client.registry.annotation.KeyBound;
|
||||||
import com.baseband.client.registry.annotation.Trigger;
|
import de.com.baseband.client.registry.annotation.Trigger;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import com.baseband.client.util.interact.RotationManager;
|
import de.com.baseband.client.util.interact.RotationManager;
|
||||||
import com.baseband.client.util.interact.ServerDataManager;
|
import de.com.baseband.client.util.interact.ServerDataManager;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
||||||
|
@ -40,7 +40,7 @@ public class Client extends Feature {
|
||||||
public void clearTargets() {
|
public void clearTargets() {
|
||||||
entityTarget = null;
|
entityTarget = null;
|
||||||
playerTarget = null;
|
playerTarget = null;
|
||||||
Chat.notify("§aCleared all targets.");
|
BaseBand.notify("§aCleared all targets.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Config("ScreenshotUpload")
|
@Config("ScreenshotUpload")
|
||||||
|
@ -57,7 +57,7 @@ public class Client extends Feature {
|
||||||
@Trigger("Save config")
|
@Trigger("Save config")
|
||||||
public void saveConfig() {
|
public void saveConfig() {
|
||||||
Configuration.save();
|
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();
|
ServerDataManager.onTimePacket();
|
||||||
}
|
}
|
||||||
if(packet instanceof SPacketPlayerPosLook && lagNotify) { //TODO: if packetfly then ignore
|
if(packet instanceof SPacketPlayerPosLook && lagNotify) { //TODO: if packetfly then ignore
|
||||||
Chat.notify("[LagNotify] §cLagback!");
|
BaseBand.notify("[LagNotify] §cLagback!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package com.baseband.client.feature.client;
|
package de.com.baseband.client.feature.client;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.registry.PlayerDB;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.PlayerDB;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import de.tudbut.parsing.TCN;
|
import de.tudbut.parsing.TCN;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
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()));
|
TCN player = Objects.requireNonNull(PlayerDB.player(p.getGameProfile().getId(), p.getGameProfile().getName()));
|
||||||
player.set("isTarget", player.getBoolean("isTarget") != Boolean.TRUE);
|
player.set("isTarget", player.getBoolean("isTarget") != Boolean.TRUE);
|
||||||
if(player.getBoolean("isTarget")) {
|
if(player.getBoolean("isTarget")) {
|
||||||
com.baseband.client.feature.client.Client.playerTarget = p;
|
Client.playerTarget = p;
|
||||||
Chat.notify("§cNow targeting " + p.getName());
|
BaseBand.notify("§cNow targeting " + p.getName());
|
||||||
} else {
|
} else {
|
||||||
Chat.notify("§a§lNo longer§a targeting " + p.getName());
|
BaseBand.notify("§a§lNo longer§a targeting " + p.getName());
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Friend((p) -> {
|
Friend((p) -> {
|
||||||
TCN player = Objects.requireNonNull(PlayerDB.player(p.getGameProfile().getId(), p.getGameProfile().getName()));
|
TCN player = Objects.requireNonNull(PlayerDB.player(p.getGameProfile().getId(), p.getGameProfile().getName()));
|
||||||
player.set("isFriend", player.getBoolean("isFriend") != Boolean.TRUE);
|
player.set("isFriend", player.getBoolean("isFriend") != Boolean.TRUE);
|
||||||
if(player.getBoolean("isFriend")) {
|
if(player.getBoolean("isFriend")) {
|
||||||
Chat.notify("§aMarked " + p.getName() + " as a friend.");
|
BaseBand.notify("§aMarked " + p.getName() + " as a friend.");
|
||||||
} else {
|
} 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() + " ")),
|
Message((p) -> Chat.openChat("/w " + p.getGameProfile().getName() + " ")),
|
||||||
|
@ -51,10 +52,10 @@ public class MidClick extends Feature {
|
||||||
public enum BlockAction {
|
public enum BlockAction {
|
||||||
None((b) -> {}),
|
None((b) -> {}),
|
||||||
Select((b) -> {
|
Select((b) -> {
|
||||||
com.baseband.client.feature.world.Select.begin = b;
|
de.com.baseband.client.feature.world.Select.begin = b;
|
||||||
com.baseband.client.feature.world.Select.end = 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<BlockPos> action;
|
public final Consumer<BlockPos> action;
|
||||||
BlockAction(Consumer<BlockPos> action) {
|
BlockAction(Consumer<BlockPos> action) {
|
||||||
|
@ -65,12 +66,12 @@ public class MidClick extends Feature {
|
||||||
public enum EntityAction {
|
public enum EntityAction {
|
||||||
None((e) -> {}),
|
None((e) -> {}),
|
||||||
Target((e) -> {
|
Target((e) -> {
|
||||||
if(com.baseband.client.feature.client.Client.entityTarget != e) {
|
if(Client.entityTarget != e) {
|
||||||
com.baseband.client.feature.client.Client.entityTarget = e;
|
Client.entityTarget = e;
|
||||||
Chat.notify("§cNow targeting entity ID " + e.getEntityId());
|
BaseBand.notify("§cNow targeting entity ID " + e.getEntityId());
|
||||||
} else {
|
} else {
|
||||||
com.baseband.client.feature.client.Client.entityTarget = null;
|
Client.entityTarget = null;
|
||||||
Chat.notify("§aEntity target reset.");
|
BaseBand.notify("§aEntity target reset.");
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
;
|
;
|
|
@ -1,11 +1,9 @@
|
||||||
package com.baseband.client.feature.client;
|
package de.com.baseband.client.feature.client;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.feature.render.HUD;
|
|
||||||
import com.baseband.client.registry.annotation.Config;
|
|
||||||
import de.labystudio.spotifyapi.SpotifyAPI;
|
import de.labystudio.spotifyapi.SpotifyAPI;
|
||||||
import de.labystudio.spotifyapi.SpotifyAPIFactory;
|
import de.labystudio.spotifyapi.SpotifyAPIFactory;
|
||||||
import de.labystudio.spotifyapi.SpotifyListener;
|
import de.labystudio.spotifyapi.SpotifyListener;
|
|
@ -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 de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.event.events.PlayerDestroyEvent;
|
import de.com.baseband.client.event.events.PlayerDestroyEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.registry.annotation.Range;
|
import de.com.baseband.client.registry.annotation.Range;
|
||||||
import com.baseband.client.util.adapt.FieldFinder;
|
import de.com.baseband.client.util.adapt.FieldFinder;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.ServerDataManager;
|
import de.com.baseband.client.util.interact.ServerDataManager;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
|
@ -1,14 +1,14 @@
|
||||||
package com.baseband.client.feature.client;
|
package de.com.baseband.client.feature.client;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.category.ClientCategory;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.registry.PlayerDB;
|
import de.com.baseband.client.feature.category.ClientCategory;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.PlayerDB;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Trigger;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.registry.annotation.Trigger;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import de.tudbut.parsing.TCN;
|
import de.tudbut.parsing.TCN;
|
||||||
|
|
||||||
@ClientCategory
|
@ClientCategory
|
||||||
|
@ -44,7 +44,7 @@ public class Trust extends Feature {
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
if(name.isEmpty()) {
|
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();
|
toggle();
|
||||||
}
|
}
|
||||||
TCN player = PlayerDB.player(null, name);
|
TCN player = PlayerDB.player(null, name);
|
|
@ -1,11 +1,11 @@
|
||||||
package com.baseband.client.feature.combat;
|
package de.com.baseband.client.feature.combat;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Combat;
|
import de.com.baseband.client.feature.category.Combat;
|
||||||
import com.baseband.client.registry.PlayerDB;
|
import de.com.baseband.client.registry.PlayerDB;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import de.tudbut.parsing.TCN;
|
import de.tudbut.parsing.TCN;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
|
@ -1,12 +1,12 @@
|
||||||
package com.baseband.client.feature.combat;
|
package de.com.baseband.client.feature.combat;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Combat;
|
import de.com.baseband.client.feature.category.Combat;
|
||||||
import com.baseband.client.gui.GuiBBIngame;
|
import de.com.baseband.client.gui.GuiBBIngame;
|
||||||
import com.baseband.client.registry.annotation.*;
|
import de.com.baseband.client.registry.annotation.*;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import com.baseband.client.util.interact.InventoryUtils;
|
import de.com.baseband.client.util.interact.InventoryUtils;
|
||||||
import de.tudbut.tools.Lock;
|
import de.tudbut.tools.Lock;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
|
@ -1,14 +1,13 @@
|
||||||
package com.baseband.client.feature.command;
|
package de.com.baseband.client.feature.command;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import com.baseband.client.registry.SetCommand;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.registry.SetCommand;
|
||||||
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import static com.baseband.client.feature.Features.features;
|
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
public class Bind extends Feature {
|
public class Bind extends Feature {
|
||||||
@Override
|
@Override
|
||||||
|
@ -23,7 +22,7 @@ public class Bind extends Feature {
|
||||||
|
|
||||||
SetCommand f = null;
|
SetCommand f = null;
|
||||||
|
|
||||||
for(Feature feature : features) {
|
for(Feature feature : Features.features) {
|
||||||
if(feature.toString().equalsIgnoreCase(module)) {
|
if(feature.toString().equalsIgnoreCase(module)) {
|
||||||
f = feature;
|
f = feature;
|
||||||
break;
|
break;
|
|
@ -1,9 +1,10 @@
|
||||||
package com.baseband.client.feature.command;
|
package de.com.baseband.client.feature.command;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import net.minecraft.client.multiplayer.GuiConnecting;
|
import net.minecraft.client.multiplayer.GuiConnecting;
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
|
||||||
|
import static de.com.baseband.client.BaseBand.LOGGER;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
public class Connect extends Feature {
|
public class Connect extends Feature {
|
|
@ -1,8 +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.server.SPacketDisconnect;
|
import net.minecraft.network.play.server.SPacketDisconnect;
|
||||||
import net.minecraft.util.text.TextComponentString;
|
import net.minecraft.util.text.TextComponentString;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.baseband.client.feature.command;
|
package de.com.baseband.client.feature.command;
|
||||||
|
|
||||||
import com.baseband.client.feature.Category;
|
import de.com.baseband.client.feature.Category;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import de.tudbut.obj.TLMap;
|
import de.tudbut.obj.TLMap;
|
||||||
import net.minecraft.util.text.Style;
|
import net.minecraft.util.text.Style;
|
||||||
import net.minecraft.util.text.TextComponentString;
|
import net.minecraft.util.text.TextComponentString;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.baseband.client.feature.command;
|
package de.com.baseband.client.feature.command;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import net.minecraft.network.play.client.CPacketChatMessage;
|
import net.minecraft.network.play.client.CPacketChatMessage;
|
||||||
|
|
||||||
@Command
|
@Command
|
|
@ -1,25 +1,24 @@
|
||||||
package com.baseband.client.feature.command;
|
package de.com.baseband.client.feature.command;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import com.baseband.client.registry.SetCommand;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.util.interact.Chat;
|
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 java.util.HashMap;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.RANDOM;
|
|
||||||
import static com.baseband.client.feature.Features.features;
|
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
public class Set extends Feature {
|
public class Set extends Feature {
|
||||||
|
|
||||||
private static final HashMap<Integer, ConfigHandle> quickSet = new HashMap<>();
|
private static final HashMap<Integer, ConfigHandle> quickSet = new HashMap<>();
|
||||||
|
|
||||||
public static int addQuickSet(ConfigHandle handle) {
|
public static int addQuickSet(ConfigHandle handle) {
|
||||||
int n = RANDOM.nextInt(Integer.MAX_VALUE);
|
int n = BaseBand.RANDOM.nextInt(Integer.MAX_VALUE);
|
||||||
while(quickSet.containsKey(n)) n = RANDOM.nextInt(Integer.MAX_VALUE);
|
while(quickSet.containsKey(n)) n = BaseBand.RANDOM.nextInt(Integer.MAX_VALUE);
|
||||||
quickSet.put(n, handle);
|
quickSet.put(n, handle);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +47,7 @@ public class Set extends Feature {
|
||||||
isQS = true;
|
isQS = true;
|
||||||
} catch (NumberFormatException ignored) {}
|
} catch (NumberFormatException ignored) {}
|
||||||
|
|
||||||
for(Feature feature : features) {
|
for(Feature feature : Features.features) {
|
||||||
if(feature.toString().equalsIgnoreCase(module)) {
|
if(feature.toString().equalsIgnoreCase(module)) {
|
||||||
f = feature;
|
f = feature;
|
||||||
break;
|
break;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.baseband.client.feature.command;
|
package de.com.baseband.client.feature.command;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Range;
|
import de.com.baseband.client.registry.annotation.Range;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TudbuT
|
* @author TudbuT
|
|
@ -1,13 +1,12 @@
|
||||||
package com.baseband.client.feature.command;
|
package de.com.baseband.client.feature.command;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Command;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.category.Command;
|
||||||
import com.baseband.client.gui.lib.component.Component;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.gui.lib.component.Component;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
|
import de.com.baseband.client.util.interact.Chat;
|
||||||
import static com.baseband.client.feature.Features.features;
|
|
||||||
|
|
||||||
@Command
|
@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.")
|
@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;
|
Feature f = null;
|
||||||
|
|
||||||
for(Feature feature : features) {
|
for(Feature feature : Features.features) {
|
||||||
if(feature.toString().equalsIgnoreCase(module)) {
|
if(feature.toString().equalsIgnoreCase(module)) {
|
||||||
f = feature;
|
f = feature;
|
||||||
break;
|
break;
|
|
@ -1,15 +1,15 @@
|
||||||
package com.baseband.client.feature.movement;
|
package de.com.baseband.client.feature.movement;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Movement;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.category.Movement;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Range;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.registry.annotation.Range;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
@Movement
|
@Movement
|
||||||
|
@ -51,7 +51,7 @@ public class ElytraBot extends Feature {
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
if(!Features.isFeatureEnabled(ElytraFly.class)) {
|
if(!Features.isFeatureEnabled(ElytraFly.class)) {
|
||||||
Chat.notify("§cElytraBot cannot work without ElytraFly.");
|
BaseBand.notify("§cElytraBot cannot work without ElytraFly.");
|
||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ public class ElytraBot extends Feature {
|
||||||
public void onTick() {
|
public void onTick() {
|
||||||
ElytraFly efly = Features.getFeature(ElytraFly.class);
|
ElytraFly efly = Features.getFeature(ElytraFly.class);
|
||||||
if(!efly.enabled) {
|
if(!efly.enabled) {
|
||||||
Chat.notify("§cElytraBot cannot work without ElytraFly.");
|
BaseBand.notify("§cElytraBot cannot work without ElytraFly.");
|
||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ public class ElytraBot extends Feature {
|
||||||
break a;
|
break a;
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
Chat.notify("§cInvalid ElytraBot target.");
|
BaseBand.notify("§cInvalid ElytraBot target.");
|
||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -108,7 +108,7 @@ public class ElytraBot extends Feature {
|
||||||
break a;
|
break a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Chat.notify("§cElytraBot couldn't find your target player.");
|
BaseBand.notify("§cElytraBot couldn't find your target player.");
|
||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
|
@ -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 de.com.baseband.client.event.events.MoveEvent;
|
||||||
import com.baseband.client.event.events.PacketEvent;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Movement;
|
import de.com.baseband.client.feature.category.Movement;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.registry.annotation.Range;
|
import de.com.baseband.client.registry.annotation.Range;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.MotionUtil;
|
import de.com.baseband.client.util.interact.MotionUtil;
|
||||||
import de.tudbut.tools.Lock;
|
import de.tudbut.tools.Lock;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
import net.minecraft.client.entity.EntityPlayerSP;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.baseband.client.feature.movement;
|
package de.com.baseband.client.feature.movement;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Movement;
|
import de.com.baseband.client.feature.category.Movement;
|
||||||
import net.minecraftforge.client.event.InputUpdateEvent;
|
import net.minecraftforge.client.event.InputUpdateEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
|
@ -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 de.com.baseband.client.event.events.MoveEvent;
|
||||||
import com.baseband.client.event.events.PacketEvent;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.category.Movement;
|
import de.com.baseband.client.feature.category.Movement;
|
||||||
import com.baseband.client.feature.client.Timer;
|
import de.com.baseband.client.feature.client.Timer;
|
||||||
import com.baseband.client.mixin.mixins.IMinecraft;
|
import de.com.baseband.client.mixin.mixins.IMinecraft;
|
||||||
import com.baseband.client.mixin.mixins.ITimer;
|
import de.com.baseband.client.mixin.mixins.ITimer;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.util.interact.MotionUtil;
|
import de.com.baseband.client.util.interact.MotionUtil;
|
||||||
import net.minecraft.block.BlockLiquid;
|
import net.minecraft.block.BlockLiquid;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
|
@ -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 de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Movement;
|
import de.com.baseband.client.feature.category.Movement;
|
||||||
import com.baseband.client.mixin.mixins.ISPacketExplosion;
|
import de.com.baseband.client.mixin.mixins.ISPacketExplosion;
|
||||||
import net.minecraft.network.play.server.SPacketEntityVelocity;
|
import net.minecraft.network.play.server.SPacketEntityVelocity;
|
||||||
import net.minecraft.network.play.server.SPacketExplosion;
|
import net.minecraft.network.play.server.SPacketExplosion;
|
||||||
import net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent;
|
import net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.baseband.client.feature.render;
|
package de.com.baseband.client.feature.render;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Render;
|
import de.com.baseband.client.feature.category.Render;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import net.minecraft.init.MobEffects;
|
import net.minecraft.init.MobEffects;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package com.baseband.client.feature.render;
|
package de.com.baseband.client.feature.render;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Render;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.gui.GuiRewrite;
|
import de.com.baseband.client.feature.category.Render;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.gui.GuiRewrite;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import static com.baseband.client.feature.Features.features;
|
|
||||||
|
|
||||||
@Render
|
@Render
|
||||||
public class ClickGUI extends Feature {
|
public class ClickGUI extends Feature {
|
||||||
|
@ -67,7 +66,7 @@ public class ClickGUI extends Feature {
|
||||||
@Override
|
@Override
|
||||||
protected void setup() {
|
protected void setup() {
|
||||||
if(saveExpanded == SaveExpandedMode.UntilExit) {
|
if(saveExpanded == SaveExpandedMode.UntilExit) {
|
||||||
for (Feature feature : features) {
|
for (Feature feature : Features.features) {
|
||||||
feature.subComponentsShown = false;
|
feature.subComponentsShown = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +80,7 @@ public class ClickGUI extends Feature {
|
||||||
}
|
}
|
||||||
if(guiRewrite == null) guiRewrite = new GuiRewrite();
|
if(guiRewrite == null) guiRewrite = new GuiRewrite();
|
||||||
if(saveExpanded == SaveExpandedMode.Never) {
|
if(saveExpanded == SaveExpandedMode.Never) {
|
||||||
for (Feature feature : features) {
|
for (Feature feature : Features.features) {
|
||||||
feature.subComponentsShown = false;
|
feature.subComponentsShown = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
package com.baseband.client.feature.render;
|
package de.com.baseband.client.feature.render;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.category.Render;
|
import de.com.baseband.client.feature.category.Render;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.util.render.RenderAdapter;
|
import de.com.baseband.client.util.render.RenderAdapter;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,18 +1,18 @@
|
||||||
package com.baseband.client.feature.render;
|
package de.com.baseband.client.feature.render;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Category;
|
import de.com.baseband.client.feature.Category;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.category.Render;
|
import de.com.baseband.client.feature.category.Render;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.feature.client.Spotify;
|
import de.com.baseband.client.feature.client.Spotify;
|
||||||
import com.baseband.client.gui.GuiTheme;
|
import de.com.baseband.client.gui.GuiTheme;
|
||||||
import com.baseband.client.registry.annotation.*;
|
import de.com.baseband.client.registry.annotation.*;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.ServerDataManager;
|
import de.com.baseband.client.util.interact.ServerDataManager;
|
||||||
import com.baseband.client.util.render.Pixels;
|
import de.com.baseband.client.util.render.Pixels;
|
||||||
import com.baseband.client.util.render.TextSplitter;
|
import de.com.baseband.client.util.render.TextSplitter;
|
||||||
import de.labystudio.spotifyapi.SpotifyAPI;
|
import de.labystudio.spotifyapi.SpotifyAPI;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
|
@ -25,10 +25,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
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
|
@Render
|
||||||
public class HUD extends Feature {
|
public class HUD extends Feature {
|
||||||
|
|
||||||
|
@ -71,7 +67,7 @@ public class HUD extends Feature {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void notify(String text, int time) {
|
public static void notify(String text, int time) {
|
||||||
LOGGER.info(text);
|
BaseBand.LOGGER.info(text);
|
||||||
notifs.add(new Notification(text, time));
|
notifs.add(new Notification(text, time));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +192,7 @@ public class HUD extends Feature {
|
||||||
infoString += posString(Objects.requireNonNull(mc.getRenderViewEntity()), "Camera");
|
infoString += posString(Objects.requireNonNull(mc.getRenderViewEntity()), "Camera");
|
||||||
}
|
}
|
||||||
if (showTPS)
|
if (showTPS)
|
||||||
infoString += "TPS: " + (roundedTo(2, ServerDataManager.tps));
|
infoString += "TPS: " + (TextSplitter.roundedTo(2, ServerDataManager.tps));
|
||||||
if (showTPS && showPing)
|
if (showTPS && showPing)
|
||||||
infoString += " | ";
|
infoString += " | ";
|
||||||
if (showPing)
|
if (showPing)
|
||||||
|
@ -218,18 +214,18 @@ public class HUD extends Feature {
|
||||||
initString += "\n" + infoString + "\n";
|
initString += "\n" + infoString + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
int maxWidth = getStringWidth(initString);
|
int maxWidth = TextSplitter.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);
|
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) {
|
for (Feature f : renderFeatures) {
|
||||||
maxWidth = Math.max(mc.fontRenderer.getStringWidth(f.text), maxWidth);
|
maxWidth = Math.max(mc.fontRenderer.getStringWidth(f.text), maxWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(background) {
|
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);
|
TextSplitter.drawString(initString, 3,3, theme.getGreenColor(), textShadow);
|
||||||
int y = 3 + getStringHeight(initString);
|
int y = 3 + TextSplitter.getStringHeight(initString);
|
||||||
for (Feature f : renderFeatures) {
|
for (Feature f : renderFeatures) {
|
||||||
mc.fontRenderer.drawString(f.text, 3, y, theme.getGreenColor(), textShadow);
|
mc.fontRenderer.drawString(f.text, 3, y, theme.getGreenColor(), textShadow);
|
||||||
y = y + mc.fontRenderer.FONT_HEIGHT;
|
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);
|
drawSizedBox(x, y, xSize, localYSize, 0x202040 + (notif.opacity(0x80, 1) << 24), isCenter == 1);
|
||||||
GlStateManager.enableBlend();
|
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();
|
GlStateManager.disableBlend();
|
||||||
y += (localYSize + nVSpace) * dir;
|
y += (localYSize + nVSpace) * dir;
|
||||||
}
|
}
|
||||||
|
@ -275,17 +271,17 @@ public class HUD extends Feature {
|
||||||
y = 3;
|
y = 3;
|
||||||
switch (infoLoc) {
|
switch (infoLoc) {
|
||||||
case BottomRight:
|
case BottomRight:
|
||||||
y = sr.getScaledHeight() - 3 - getStringHeight(infoString);
|
y = sr.getScaledHeight() - 3 - TextSplitter.getStringHeight(infoString);
|
||||||
case TopRight:
|
case TopRight:
|
||||||
x = sr.getScaledWidth() - 3 - getStringWidth(infoString);
|
x = sr.getScaledWidth() - 3 - TextSplitter.getStringWidth(infoString);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(background) {
|
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) {
|
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) {
|
private String posString(Entity e, String name) {
|
|
@ -1,9 +1,9 @@
|
||||||
package com.baseband.client.feature.render;
|
package de.com.baseband.client.feature.render;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Render;
|
import de.com.baseband.client.feature.category.Render;
|
||||||
import com.baseband.client.mixin.mixins.IMinecraft;
|
import de.com.baseband.client.mixin.mixins.IMinecraft;
|
||||||
import com.baseband.client.mixin.mixins.IRenderManager;
|
import de.com.baseband.client.mixin.mixins.IRenderManager;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.client.renderer.BufferBuilder;
|
import net.minecraft.client.renderer.BufferBuilder;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.baseband.client.feature.render;
|
package de.com.baseband.client.feature.render;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Render;
|
import de.com.baseband.client.feature.category.Render;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import net.minecraftforge.client.event.RenderBlockOverlayEvent;
|
import net.minecraftforge.client.event.RenderBlockOverlayEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.baseband.client.feature.render;
|
package de.com.baseband.client.feature.render;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.Render;
|
import de.com.baseband.client.feature.category.Render;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import net.minecraftforge.client.event.EntityViewRenderEvent;
|
import net.minecraftforge.client.event.EntityViewRenderEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
|
@ -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 de.com.baseband.client.event.events.BaritoneEvent;
|
||||||
import com.baseband.client.event.events.PacketEvent;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.World;
|
import de.com.baseband.client.feature.category.World;
|
||||||
import com.baseband.client.mixin.mixins.IMinecraft;
|
import de.com.baseband.client.mixin.mixins.IMinecraft;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.init.MobEffects;
|
import net.minecraft.init.MobEffects;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.baseband.client.feature.world;
|
package de.com.baseband.client.feature.world;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.category.World;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.feature.category.World;
|
||||||
import de.tudbut.tools.Lock;
|
import de.tudbut.tools.Lock;
|
||||||
import net.minecraft.client.gui.GuiGameOver;
|
import net.minecraft.client.gui.GuiGameOver;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ public class AutoRespawn extends Feature {
|
||||||
if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) {
|
if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) {
|
||||||
mc.player.respawnPlayer();
|
mc.player.respawnPlayer();
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
Chat.notify("[AutoRespawn] Respawned.");
|
BaseBand.notify("[AutoRespawn] Respawned.");
|
||||||
lock.lock(500);
|
lock.lock(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
package com.baseband.client.feature.world;
|
package de.com.baseband.client.feature.world;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.World;
|
import de.com.baseband.client.feature.category.World;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
|
|
||||||
@World
|
@World
|
||||||
public class AutoSignText extends Feature {
|
public class AutoSignText extends Feature {
|
|
@ -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 de.com.baseband.client.event.events.DamageBlockEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.World;
|
import de.com.baseband.client.feature.category.World;
|
||||||
import com.baseband.client.mixin.mixins.IPlayerControllerMP;
|
import de.com.baseband.client.mixin.mixins.IPlayerControllerMP;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import net.minecraft.network.play.client.CPacketPlayerDigging;
|
import net.minecraft.network.play.client.CPacketPlayerDigging;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
|
|
@ -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 de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.World;
|
import de.com.baseband.client.feature.category.World;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Description;
|
import de.com.baseband.client.registry.annotation.Description;
|
||||||
import com.baseband.client.registry.annotation.Range;
|
import de.com.baseband.client.registry.annotation.Range;
|
||||||
import net.minecraft.network.play.client.CPacketKeepAlive;
|
import net.minecraft.network.play.client.CPacketKeepAlive;
|
||||||
|
|
||||||
@World
|
@World
|
|
@ -1,14 +1,15 @@
|
||||||
package com.baseband.client.feature.world;
|
package de.com.baseband.client.feature.world;
|
||||||
|
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.World;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.render.ClickGUI;
|
import de.com.baseband.client.feature.category.World;
|
||||||
import com.baseband.client.registry.annotation.*;
|
import de.com.baseband.client.feature.render.ClickGUI;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.registry.annotation.*;
|
||||||
import com.baseband.client.util.adapt.SimpleWorldGenerator;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.adapt.SimpleWorldGenerator;
|
||||||
import com.baseband.client.util.render.Pixels;
|
import de.com.baseband.client.util.render.Pixels;
|
||||||
|
import de.com.baseband.client.util.render.RenderAdapter;
|
||||||
import de.tudbut.tools.Lock;
|
import de.tudbut.tools.Lock;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
import net.minecraft.client.entity.EntityPlayerSP;
|
||||||
|
@ -23,9 +24,6 @@ import org.lwjgl.opengl.GL11;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
|
||||||
import static com.baseband.client.util.render.RenderAdapter.*;
|
|
||||||
|
|
||||||
@World
|
@World
|
||||||
@Description("Shows changes done to the world compared to its original state\n" +
|
@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.")
|
"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) {
|
} catch (NumberFormatException e) {
|
||||||
seed = this.seed.hashCode();
|
seed = this.seed.hashCode();
|
||||||
}
|
}
|
||||||
Chat.notify("Creating world with seed " + seed + "...");
|
BaseBand.notify("Creating world with seed " + seed + "...");
|
||||||
int rd = this.rd * 2 + 1;
|
int rd = this.rd * 2 + 1;
|
||||||
genOverworld = SimpleWorldGenerator.overworld(mc.world.getWorldInfo(), seed, rd);
|
genOverworld = SimpleWorldGenerator.overworld(mc.world.getWorldInfo(), seed, rd);
|
||||||
genNether = SimpleWorldGenerator.nether(mc.world.getWorldInfo(), seed, rd);
|
genNether = SimpleWorldGenerator.nether(mc.world.getWorldInfo(), seed, rd);
|
||||||
genEnd = SimpleWorldGenerator.end(mc.world.getWorldInfo(), seed, rd);
|
genEnd = SimpleWorldGenerator.end(mc.world.getWorldInfo(), seed, rd);
|
||||||
int length = rd * 16 * 256 * rd * 16;
|
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);
|
bufferPosition = new BlockPos((mc.player.chunkCoordX - this.rd) * 16, 0, (mc.player.chunkCoordZ - this.rd) * 16);
|
||||||
frontBuffer = new int[rd * 16][256][rd * 16];
|
frontBuffer = new int[rd * 16][256][rd * 16];
|
||||||
backBuffer = 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 x = 0; x < rd * 16; x++) {
|
||||||
for (int z = 0; z < rd * 16; z++) {
|
for (int z = 0; z < rd * 16; z++) {
|
||||||
frontBuffer[x][0][z] = 0x800000ff;
|
frontBuffer[x][0][z] = 0x800000ff;
|
||||||
backBuffer[x][0][z] = 0x800000ff;
|
backBuffer[x][0][z] = 0x800000ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.info("Filled buffer with unloaded state.");
|
BaseBand.LOGGER.info("Filled buffer with unloaded state.");
|
||||||
Chat.notify("Render buffer created. Starting...");
|
BaseBand.notify("Render buffer created. Starting...");
|
||||||
setEnabled(true);
|
setEnabled(true);
|
||||||
}, this + " init").start();
|
}, this + " init").start();
|
||||||
}
|
}
|
||||||
|
@ -150,7 +148,7 @@ public class SeedOverlay extends Feature {
|
||||||
|
|
||||||
// these should already be stopped!
|
// these should already be stopped!
|
||||||
if(updater.isAlive() || generator.isAlive()) {
|
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
|
//noinspection deprecation
|
||||||
updater.stop();
|
updater.stop();
|
||||||
//noinspection deprecation
|
//noinspection deprecation
|
||||||
|
@ -168,7 +166,7 @@ public class SeedOverlay extends Feature {
|
||||||
backBuffer = null;
|
backBuffer = null;
|
||||||
|
|
||||||
canSetRD = true;
|
canSetRD = true;
|
||||||
LOGGER.info("SeedOverlay completely disabled.");
|
BaseBand.LOGGER.info("SeedOverlay completely disabled.");
|
||||||
}, this + " stopper").start();
|
}, this + " stopper").start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +175,7 @@ public class SeedOverlay extends Feature {
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
if(frontBuffer == null) {
|
if(frontBuffer == null) {
|
||||||
Chat.notify("Please input a |Seed| and trigger |Generate now|");
|
BaseBand.notify("Please input a |Seed| and trigger |Generate now|");
|
||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -319,22 +317,22 @@ public class SeedOverlay extends Feature {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public synchronized void onRender(RenderWorldLastEvent event) {
|
public synchronized void onRender(RenderWorldLastEvent event) {
|
||||||
Vec3d p = Objects.requireNonNull(mc.getRenderViewEntity()).getPositionEyes(event.getPartialTicks()).add(0, -mc.getRenderViewEntity().getEyeHeight(), 0);
|
Vec3d p = Objects.requireNonNull(mc.getRenderViewEntity()).getPositionEyes(event.getPartialTicks()).add(0, -mc.getRenderViewEntity().getEyeHeight(), 0);
|
||||||
ready();
|
RenderAdapter.ready();
|
||||||
translate(-p.x + bufferPosition.getX(), -p.y, -p.z + bufferPosition.getZ());
|
RenderAdapter.translate(-p.x + bufferPosition.getX(), -p.y, -p.z + bufferPosition.getZ());
|
||||||
color(0xffff00ff); // if this renders, this is an error
|
RenderAdapter.color(0xffff00ff); // if this renders, this is an error
|
||||||
depth(false);
|
RenderAdapter.depth(false);
|
||||||
begin(GL11.GL_QUADS);
|
RenderAdapter.begin(GL11.GL_QUADS);
|
||||||
for (int x = 0; x < frontBuffer.length; x++) {
|
for (int x = 0; x < frontBuffer.length; x++) {
|
||||||
for (int y = 0; y < frontBuffer[x].length; y++) {
|
for (int y = 0; y < frontBuffer[x].length; y++) {
|
||||||
for (int z = 0; z < frontBuffer[x][y].length; z++) {
|
for (int z = 0; z < frontBuffer[x][y].length; z++) {
|
||||||
int c = frontBuffer[x][y][z];
|
int c = frontBuffer[x][y][z];
|
||||||
if(c != 0) {
|
if(c != 0) {
|
||||||
changeColor(c);
|
RenderAdapter.changeColor(c);
|
||||||
drawBlockFacesNow(x, y, z);
|
RenderAdapter.drawBlockFacesNow(x, y, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end();
|
RenderAdapter.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,12 +1,11 @@
|
||||||
package com.baseband.client.feature.world;
|
package de.com.baseband.client.feature.world;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.event.Priority;
|
import de.com.baseband.client.event.Priority;
|
||||||
import com.baseband.client.event.events.SelectEvent;
|
import de.com.baseband.client.event.events.SelectEvent;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.category.World;
|
import de.com.baseband.client.feature.category.World;
|
||||||
import com.baseband.client.util.interact.Chat;
|
import de.com.baseband.client.util.type.Selection;
|
||||||
import com.baseband.client.util.type.Selection;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
@World
|
@World
|
||||||
|
@ -19,13 +18,13 @@ public class Select extends Feature {
|
||||||
if(end != null || begin == null) {
|
if(end != null || begin == null) {
|
||||||
begin = b;
|
begin = b;
|
||||||
end = null;
|
end = null;
|
||||||
Chat.notify("Selection reset.");
|
BaseBand.notify("Selection reset.");
|
||||||
Chat.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ());
|
BaseBand.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ());
|
||||||
BaseBand.publish(new SelectEvent(null));
|
BaseBand.publish(new SelectEvent(null));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
end = b;
|
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)));
|
BaseBand.publish(new SelectEvent(new Selection(begin, end)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import net.minecraft.client.gui.GuiIngame;
|
import net.minecraft.client.gui.GuiIngame;
|
||||||
|
@ -13,8 +14,6 @@ import net.minecraft.util.ResourceLocation;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.mc;
|
|
||||||
|
|
||||||
public class GuiBBIngame extends Gui {
|
public class GuiBBIngame extends Gui {
|
||||||
|
|
||||||
public static void drawOffhandSlot(int x, int y) {
|
public static void drawOffhandSlot(int x, int y) {
|
||||||
|
@ -23,7 +22,7 @@ public class GuiBBIngame extends Gui {
|
||||||
|
|
||||||
public void drawOffhandSlot0(int x, int y) {
|
public void drawOffhandSlot0(int x, int y) {
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
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);
|
drawTexturedModalRect(x, y, 24, 22, 29, 24);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package com.baseband.client.gui;
|
package de.com.baseband.client.gui;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.feature.Feature;
|
import de.com.baseband.client.feature.Feature;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.render.ClickGUI;
|
import de.com.baseband.client.feature.render.ClickGUI;
|
||||||
import com.baseband.client.gui.lib.GUIManager;
|
import de.com.baseband.client.gui.lib.GUIManager;
|
||||||
import com.baseband.client.gui.lib.component.Category;
|
import de.com.baseband.client.gui.lib.component.Category;
|
||||||
import com.baseband.client.gui.lib.component.Component;
|
import de.com.baseband.client.gui.lib.component.Component;
|
||||||
import de.tudbut.obj.TLMap;
|
import de.tudbut.obj.TLMap;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
@ -17,8 +17,6 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import static com.baseband.client.feature.Features.features;
|
|
||||||
|
|
||||||
public class GuiRewrite extends GuiScreen {
|
public class GuiRewrite extends GuiScreen {
|
||||||
|
|
||||||
// The mouse X and Y
|
// The mouse X and Y
|
||||||
|
@ -58,8 +56,8 @@ public class GuiRewrite extends GuiScreen {
|
||||||
private void createComponents() {
|
private void createComponents() {
|
||||||
ArrayList<Category> categories = new ArrayList<>();
|
ArrayList<Category> categories = new ArrayList<>();
|
||||||
int y = 10;
|
int y = 10;
|
||||||
TLMap<com.baseband.client.feature.Category, Category> map = new TLMap<>();
|
TLMap<de.com.baseband.client.feature.Category, Category> map = new TLMap<>();
|
||||||
for (Feature feature : features) {
|
for (Feature feature : Features.features) {
|
||||||
if (!feature.displayOnClickGUI()) {
|
if (!feature.displayOnClickGUI()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +90,7 @@ public class GuiRewrite extends GuiScreen {
|
||||||
super.onGuiClosed();
|
super.onGuiClosed();
|
||||||
Features.getFeature(ClickGUI.class).setEnabled(false);
|
Features.getFeature(ClickGUI.class).setEnabled(false);
|
||||||
for (Category category : categories) {
|
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;
|
assert c != null;
|
||||||
c.show = category.subComponentsShown;
|
c.show = category.subComponentsShown;
|
||||||
c.x = category.location.getX();
|
c.x = category.location.getX();
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baseband.client.gui;
|
package de.com.baseband.client.gui;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.baseband.client.gui.lib;
|
package de.com.baseband.client.gui.lib;
|
||||||
|
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.gui.GuiTheme;
|
import de.com.baseband.client.gui.GuiTheme;
|
||||||
import com.baseband.client.gui.lib.component.Component;
|
import de.com.baseband.client.gui.lib.component.Component;
|
||||||
import org.lwjgl.util.Rectangle;
|
import org.lwjgl.util.Rectangle;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
|
@ -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 {
|
public class RenderException extends Exception {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baseband.client.gui.lib.component;
|
package de.com.baseband.client.gui.lib.component;
|
||||||
|
|
||||||
public class Button extends Component {
|
public class Button extends Component {
|
||||||
|
|
|
@ -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 de.com.baseband.client.gui.lib.GUIManager;
|
||||||
import com.baseband.client.gui.lib.RenderException;
|
import de.com.baseband.client.gui.lib.RenderException;
|
||||||
import de.tudbut.obj.Transient;
|
import de.tudbut.obj.Transient;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import org.lwjgl.util.Point;
|
import org.lwjgl.util.Point;
|
|
@ -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 de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.gui.lib.GUIManager;
|
import de.com.baseband.client.gui.lib.GUIManager;
|
||||||
import com.baseband.client.gui.lib.RenderException;
|
import de.com.baseband.client.gui.lib.RenderException;
|
||||||
import com.baseband.client.registry.AnyGate;
|
import de.com.baseband.client.registry.AnyGate;
|
||||||
import com.baseband.client.registry.annotation.Config;
|
import de.com.baseband.client.registry.annotation.Config;
|
||||||
import com.baseband.client.registry.annotation.Gate;
|
import de.com.baseband.client.registry.annotation.Gate;
|
||||||
import com.baseband.client.util.adapt.Marker;
|
import de.com.baseband.client.util.adapt.Marker;
|
||||||
import com.baseband.client.util.render.TextSplitter;
|
import de.com.baseband.client.util.render.TextSplitter;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
|
@ -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 de.com.baseband.client.feature.command.Set;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.registry.ConfigHandle;
|
||||||
|
|
||||||
public class EnumButton extends Component {
|
public class EnumButton extends Component {
|
||||||
ConfigHandle handle;
|
ConfigHandle handle;
|
|
@ -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 de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.gui.lib.GUIManager;
|
import de.com.baseband.client.feature.command.Set;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.gui.lib.GUIManager;
|
||||||
|
import de.com.baseband.client.registry.ConfigHandle;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
|
||||||
|
|
||||||
public class IntSlider extends Component {
|
public class IntSlider extends Component {
|
||||||
|
|
||||||
public float f = 0;
|
public float f = 0;
|
||||||
|
@ -80,7 +79,7 @@ public class IntSlider extends Component {
|
||||||
try {
|
try {
|
||||||
f = (handle.getContent().getInteger(field) - adder) / (float) mapper;
|
f = (handle.getContent().getInteger(field) - adder) / (float) mapper;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
LOGGER.debug(e.getStackTrace());
|
BaseBand.LOGGER.debug(e.getStackTrace());
|
||||||
}
|
}
|
||||||
if(countdown > 0) {
|
if(countdown > 0) {
|
||||||
--countdown;
|
--countdown;
|
|
@ -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;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
public class KeyButton extends Button {
|
public class KeyButton extends Button {
|
|
@ -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 de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.gui.lib.GUIManager;
|
import de.com.baseband.client.feature.command.Set;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.gui.lib.GUIManager;
|
||||||
|
import de.com.baseband.client.registry.ConfigHandle;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
|
||||||
|
|
||||||
public class Slider extends Component {
|
public class Slider extends Component {
|
||||||
|
|
||||||
public float f = 0;
|
public float f = 0;
|
||||||
|
@ -78,7 +77,7 @@ public class Slider extends Component {
|
||||||
try {
|
try {
|
||||||
f = (handle.getContent().getFloat(field) - adder) / mapper;
|
f = (handle.getContent().getFloat(field) - adder) / mapper;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
LOGGER.debug(e.getStackTrace());
|
BaseBand.LOGGER.debug(e.getStackTrace());
|
||||||
}
|
}
|
||||||
if(countdown > 0) {
|
if(countdown > 0) {
|
||||||
--countdown;
|
--countdown;
|
|
@ -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 de.com.baseband.client.feature.command.Set;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.registry.ConfigHandle;
|
||||||
|
|
||||||
public class StringButton extends Button {
|
public class StringButton extends Button {
|
||||||
protected final String name;
|
protected final String name;
|
|
@ -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 de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.registry.ConfigHandle;
|
import de.com.baseband.client.feature.command.Set;
|
||||||
|
import de.com.baseband.client.registry.ConfigHandle;
|
||||||
import static com.baseband.client.BaseBand.LOGGER;
|
|
||||||
|
|
||||||
public class ToggleButton extends Component {
|
public class ToggleButton extends Component {
|
||||||
|
|
||||||
|
@ -33,7 +32,7 @@ public class ToggleButton extends Component {
|
||||||
try {
|
try {
|
||||||
green = handle.getContent().getBoolean(field);
|
green = handle.getContent().getBoolean(field);
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
LOGGER.debug(e.getStackTrace());
|
BaseBand.LOGGER.debug(e.getStackTrace());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package com.baseband.client.mixin;
|
package de.com.baseband.client.mixin;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import de.com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.event.events.DamageBlockEvent;
|
import de.com.baseband.client.event.events.DamageBlockEvent;
|
||||||
import com.baseband.client.event.events.MotionUpdateEvent;
|
import de.com.baseband.client.event.events.MotionUpdateEvent;
|
||||||
import com.baseband.client.event.events.MoveEvent;
|
import de.com.baseband.client.event.events.MoveEvent;
|
||||||
import com.baseband.client.event.events.PacketEvent;
|
import de.com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.feature.Features;
|
import de.com.baseband.client.feature.Features;
|
||||||
import com.baseband.client.feature.chat.ChatExtras;
|
import de.com.baseband.client.feature.chat.ChatExtras;
|
||||||
import com.baseband.client.feature.client.Client;
|
import de.com.baseband.client.feature.client.Client;
|
||||||
import com.baseband.client.feature.render.NoRender;
|
import de.com.baseband.client.feature.render.NoRender;
|
||||||
import com.baseband.client.feature.world.AutoSignText;
|
import de.com.baseband.client.feature.world.AutoSignText;
|
||||||
import com.baseband.client.util.net.ScreenshotHelper;
|
import de.com.baseband.client.util.net.ScreenshotHelper;
|
||||||
import net.minecraft.client.gui.ChatLine;
|
import net.minecraft.client.gui.ChatLine;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import net.minecraft.client.multiplayer.WorldClient;
|
import net.minecraft.client.multiplayer.WorldClient;
|
||||||
|
@ -118,13 +118,13 @@ public class MixinProxy {
|
||||||
|
|
||||||
public static class MoveEventProxy {
|
public static class MoveEventProxy {
|
||||||
public static boolean isCancelled(Object e) {
|
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) {
|
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) {
|
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);
|
return new Vec3d(ev.x, ev.y, ev.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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 net.minecraft.network.play.client.CPacketChatMessage;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
|
@ -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.client.Minecraft;
|
||||||
import net.minecraft.util.Timer;
|
import net.minecraft.util.Timer;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baseband.client.mixin.mixins;
|
package de.com.baseband.client.mixin.mixins;
|
||||||
|
|
||||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue