Using updated config
This commit is contained in:
@@ -13,6 +13,7 @@ import java.util.Map;
|
|||||||
public class ConfigManager {
|
public class ConfigManager {
|
||||||
|
|
||||||
private static final ObjectMapper MAPPER = new ObjectMapper();
|
private static final ObjectMapper MAPPER = new ObjectMapper();
|
||||||
|
private static File configFile;
|
||||||
|
|
||||||
// SINGLE ROOT TREE
|
// SINGLE ROOT TREE
|
||||||
private static final Map<String, Property<?>> ROOT = new LinkedHashMap<>();
|
private static final Map<String, Property<?>> ROOT = new LinkedHashMap<>();
|
||||||
@@ -23,13 +24,21 @@ public class ConfigManager {
|
|||||||
|
|
||||||
private final String[] path;
|
private final String[] path;
|
||||||
|
|
||||||
private File configFile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a root namespace
|
* Creates a root namespace
|
||||||
*/
|
*/
|
||||||
public ConfigManager(File configFile, String namespace) {
|
public ConfigManager(File configFile, String namespace) {
|
||||||
this.configFile = configFile;
|
ConfigManager.configFile = configFile;
|
||||||
|
this.currentMap = new LinkedHashMap<>();
|
||||||
|
this.path = new String[] { namespace };
|
||||||
|
|
||||||
|
ROOT.put(namespace, Property.namespace(currentMap));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a root namespace
|
||||||
|
*/
|
||||||
|
public ConfigManager(String namespace) {
|
||||||
this.currentMap = new LinkedHashMap<>();
|
this.currentMap = new LinkedHashMap<>();
|
||||||
this.path = new String[] { namespace };
|
this.path = new String[] { namespace };
|
||||||
|
|
||||||
@@ -40,7 +49,6 @@ public class ConfigManager {
|
|||||||
* Creates a sub-namespace inside a parent
|
* Creates a sub-namespace inside a parent
|
||||||
*/
|
*/
|
||||||
public ConfigManager(ConfigManager parent, String namespace) {
|
public ConfigManager(ConfigManager parent, String namespace) {
|
||||||
this.configFile = parent.configFile;
|
|
||||||
this.currentMap = new LinkedHashMap<>();
|
this.currentMap = new LinkedHashMap<>();
|
||||||
|
|
||||||
this.path = new String[parent.path.length + 1];
|
this.path = new String[parent.path.length + 1];
|
||||||
@@ -80,7 +88,7 @@ public class ConfigManager {
|
|||||||
/**
|
/**
|
||||||
* Save entire config
|
* Save entire config
|
||||||
*/
|
*/
|
||||||
public void save() {
|
public static void save() {
|
||||||
|
|
||||||
ObjectNode rootJson = MAPPER.createObjectNode();
|
ObjectNode rootJson = MAPPER.createObjectNode();
|
||||||
saveRecursive(rootJson, ROOT);
|
saveRecursive(rootJson, ROOT);
|
||||||
|
|||||||
@@ -271,15 +271,14 @@ public class Property<T> {
|
|||||||
|
|
||||||
// ---------- Keybindings (no SaturnClient) ----------
|
// ---------- Keybindings (no SaturnClient) ----------
|
||||||
|
|
||||||
public boolean isKeyPressed(long windowHandle, boolean screenOpen) {
|
public boolean isKeyPressed() {
|
||||||
|
|
||||||
return (Integer) value != -1 &&
|
return (Integer) value != -1 &&
|
||||||
MinecraftProvider.PROVIDER.isKeyPressed((Integer) value) && !screenOpen;
|
MinecraftProvider.PROVIDER.isKeyPressed((Integer) value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean wasKeyPressed(long windowHandle, boolean screenOpen) {
|
public boolean wasKeyPressed() {
|
||||||
|
boolean pressed = isKeyPressed();
|
||||||
boolean pressed = isKeyPressed(windowHandle, screenOpen);
|
|
||||||
|
|
||||||
boolean result = pressed && !wasPressedLastTick;
|
boolean result = pressed && !wasPressedLastTick;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ package org.saturnclient.cosmetics.cloak;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
|
|
||||||
import net.minecraft.client.render.OverlayTexture;
|
import net.minecraft.client.render.OverlayTexture;
|
||||||
import net.minecraft.client.render.RenderLayer;
|
import net.minecraft.client.render.RenderLayer;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package org.saturnclient.modules;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property.NamedProperty;
|
import org.saturnclient.config.manager.Property.NamedProperty;
|
||||||
|
|
||||||
public class ModDimensions {
|
public class ModDimensions {
|
||||||
public Property<Integer> x = Property.integer(0);
|
public Property<Integer> x = Property.integer(0);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.modules;
|
package org.saturnclient.modules;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
import org.saturnclient.config.manager.ConfigManager;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property.NamedProperty;
|
import org.saturnclient.config.manager.Property.NamedProperty;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Textures;
|
import org.saturnclient.ui.resources.Textures;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.saturnclient.modules.ModDimensions;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.util.Objects;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
|
|
||||||
public class AutoSprint extends Module {
|
public class AutoSprint extends Module {
|
||||||
private static Property<Boolean> enabled = Property.bool(false);
|
private static Property<Boolean> enabled = Property.bool(false);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.saturnclient.modules.HudMod;
|
|||||||
import org.saturnclient.modules.ModDimensions;
|
import org.saturnclient.modules.ModDimensions;
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
@@ -25,8 +25,7 @@ public class Clock extends Module implements HudMod {
|
|||||||
enabled.named("Enabled"),
|
enabled.named("Enabled"),
|
||||||
format.named("Format"),
|
format.named("Format"),
|
||||||
seconds.named("Show seconds"),
|
seconds.named("Show seconds"),
|
||||||
dimensions.prop()
|
dimensions.prop());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -45,12 +44,18 @@ public class Clock extends Module implements HudMod {
|
|||||||
|
|
||||||
switch (format.value) {
|
switch (format.value) {
|
||||||
case 0:
|
case 0:
|
||||||
if (seconds.value) { text = currentTime.format(DateTimeFormatter.ofPattern("HH:mm:ss")); }
|
if (seconds.value) {
|
||||||
else { text = currentTime.format(DateTimeFormatter.ofPattern("HH:mm")); }
|
text = currentTime.format(DateTimeFormatter.ofPattern("HH:mm:ss"));
|
||||||
|
} else {
|
||||||
|
text = currentTime.format(DateTimeFormatter.ofPattern("HH:mm"));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (seconds.value) { text = currentTime.format(DateTimeFormatter.ofPattern("hh:mm:ss a")); }
|
if (seconds.value) {
|
||||||
else { text = currentTime.format(DateTimeFormatter.ofPattern("hh:mm a")); }
|
text = currentTime.format(DateTimeFormatter.ofPattern("hh:mm:ss a"));
|
||||||
|
} else {
|
||||||
|
text = currentTime.format(DateTimeFormatter.ofPattern("hh:mm a"));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.saturnclient.modules.ModDimensions;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
@@ -13,7 +13,8 @@ import net.minecraft.util.math.Vec3d;
|
|||||||
|
|
||||||
public class Coordinates extends Module implements HudMod {
|
public class Coordinates extends Module implements HudMod {
|
||||||
private static Property<Boolean> enabled = Property.bool(false);
|
private static Property<Boolean> enabled = Property.bool(false);
|
||||||
private static Property<Integer> displayMethod = Property.select(0, "Flat", "Flat annotated", "Newline", "Newline annotated");
|
private static Property<Integer> displayMethod = Property.select(0, "Flat", "Flat annotated", "Newline",
|
||||||
|
"Newline annotated");
|
||||||
private static ModDimensions dimensions = new ModDimensions(40, 18);
|
private static ModDimensions dimensions = new ModDimensions(40, 18);
|
||||||
|
|
||||||
public Coordinates() {
|
public Coordinates() {
|
||||||
@@ -23,8 +24,7 @@ public class Coordinates extends Module implements HudMod {
|
|||||||
.tags("Utility"),
|
.tags("Utility"),
|
||||||
enabled.named("Enabled"),
|
enabled.named("Enabled"),
|
||||||
displayMethod.named("Display Method"),
|
displayMethod.named("Display Method"),
|
||||||
dimensions.prop()
|
dimensions.prop());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.saturnclient.modules.mods;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Textures;
|
import org.saturnclient.ui.resources.Textures;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.saturnclient.modules.ModDimensions;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
@@ -20,8 +20,7 @@ public class DayCounter extends Module implements HudMod {
|
|||||||
.version("v0.1.0")
|
.version("v0.1.0")
|
||||||
.tags("Utility"),
|
.tags("Utility"),
|
||||||
enabled.named("Enabled"),
|
enabled.named("Enabled"),
|
||||||
dimensions.prop()
|
dimensions.prop());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -58,4 +57,3 @@ public class DayCounter extends Module implements HudMod {
|
|||||||
enabled.value = e;
|
enabled.value = e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.saturnclient.modules.ModDimensions;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import org.lwjgl.glfw.GLFW;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
|
|
||||||
import net.minecraft.client.option.Perspective;
|
import net.minecraft.client.option.Perspective;
|
||||||
|
|
||||||
@@ -23,8 +23,7 @@ public class Freelook extends Module {
|
|||||||
.version("0.1.0"),
|
.version("0.1.0"),
|
||||||
enabled.named("Enabled"),
|
enabled.named("Enabled"),
|
||||||
toggle.named("Toggle freelook"),
|
toggle.named("Toggle freelook"),
|
||||||
freelookKey.named("Freelook Keybinding")
|
freelookKey.named("Freelook Keybinding"));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.modules.mods;
|
|||||||
|
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
|
|
||||||
public class Fullbright extends Module {
|
public class Fullbright extends Module {
|
||||||
private static Property<Boolean> enabled = Property.bool(false);
|
private static Property<Boolean> enabled = Property.bool(false);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.saturnclient.modules.ModDimensions;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
@@ -28,8 +28,7 @@ public class HealthDisplay extends Module implements HudMod {
|
|||||||
enabled.named("Enabled"),
|
enabled.named("Enabled"),
|
||||||
displayMode.named("Display mode"),
|
displayMode.named("Display mode"),
|
||||||
decimals.named("Decimals"),
|
decimals.named("Decimals"),
|
||||||
dimensions.prop()
|
dimensions.prop());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import org.saturnclient.modules.Module;
|
|||||||
import org.saturnclient.modules.HudMod;
|
import org.saturnclient.modules.HudMod;
|
||||||
import org.saturnclient.modules.ModDimensions;
|
import org.saturnclient.modules.ModDimensions;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
|
|
||||||
@@ -40,8 +40,7 @@ public class Keystrokes extends Module implements HudMod {
|
|||||||
showSpace.named("Show space"),
|
showSpace.named("Show space"),
|
||||||
dimensions.prop(),
|
dimensions.prop(),
|
||||||
clickFg.named("Clicked fg"),
|
clickFg.named("Clicked fg"),
|
||||||
clickBg.named("Clicked bg")
|
clickBg.named("Clicked bg"));
|
||||||
);
|
|
||||||
|
|
||||||
dimensions.renderBackground = false;
|
dimensions.renderBackground = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.saturnclient.modules.mods;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.modules.mods.utils.HealthRenderState;
|
import org.saturnclient.modules.mods.utils.HealthRenderState;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.state.LivingEntityRenderState;
|
import net.minecraft.client.render.entity.state.LivingEntityRenderState;
|
||||||
|
|
||||||
@@ -35,8 +35,7 @@ public class Nametags extends Module {
|
|||||||
"Red",
|
"Red",
|
||||||
"Light Purple",
|
"Light Purple",
|
||||||
"Yellow",
|
"Yellow",
|
||||||
"White"
|
"White");
|
||||||
);
|
|
||||||
private static Property<Integer> healthColor = Property.select(12,
|
private static Property<Integer> healthColor = Property.select(12,
|
||||||
"Black",
|
"Black",
|
||||||
"Dark Blue",
|
"Dark Blue",
|
||||||
@@ -53,8 +52,7 @@ public class Nametags extends Module {
|
|||||||
"Red",
|
"Red",
|
||||||
"Light Purple",
|
"Light Purple",
|
||||||
"Yellow",
|
"Yellow",
|
||||||
"White"
|
"White");
|
||||||
);
|
|
||||||
|
|
||||||
private static final String[] COLOR_CODES = {
|
private static final String[] COLOR_CODES = {
|
||||||
"§0", "§1", "§2", "§3", "§4", "§5", "§6", "§7",
|
"§0", "§1", "§2", "§3", "§4", "§5", "§6", "§7",
|
||||||
@@ -77,8 +75,7 @@ public class Nametags extends Module {
|
|||||||
unit.named("Unit"),
|
unit.named("Unit"),
|
||||||
format.named("Format"),
|
format.named("Format"),
|
||||||
nameColor.named("Name color"),
|
nameColor.named("Name color"),
|
||||||
healthColor.named("Health color")
|
healthColor.named("Health color"));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -86,16 +83,18 @@ public class Nametags extends Module {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getHealthString(LivingEntityRenderState state, HealthRenderState hrs, float health, float maxHealth) {
|
public static String getHealthString(LivingEntityRenderState state, HealthRenderState hrs, float health,
|
||||||
|
float maxHealth) {
|
||||||
String ret = "";
|
String ret = "";
|
||||||
|
|
||||||
switch (format.value){
|
switch (format.value) {
|
||||||
case 0: // value
|
case 0: // value
|
||||||
ret = String.format("%.1f", health / (unit.value + 1));
|
ret = String.format("%.1f", health / (unit.value + 1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // value / total
|
case 1: // value / total
|
||||||
ret = String.format("%.1f", health / (unit.value + 1)) + " / " + String.format("%.1f", maxHealth / (unit.value + 1));
|
ret = String.format("%.1f", health / (unit.value + 1)) + " / "
|
||||||
|
+ String.format("%.1f", maxHealth / (unit.value + 1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // %
|
case 2: // %
|
||||||
@@ -106,20 +105,28 @@ public class Nametags extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getNametagString(LivingEntityRenderState state) {
|
public static String getNametagString(LivingEntityRenderState state) {
|
||||||
if (state.customName == null) return null;
|
if (state.customName == null)
|
||||||
if (!healthDisplay.value) return state.customName.getString(); // name only
|
return null;
|
||||||
if (!(state instanceof HealthRenderState hrs)) return null;
|
if (!healthDisplay.value)
|
||||||
|
return state.customName.getString(); // name only
|
||||||
|
if (!(state instanceof HealthRenderState hrs))
|
||||||
|
return null;
|
||||||
|
|
||||||
float health = hrs.saturn$getHealth();
|
float health = hrs.saturn$getHealth();
|
||||||
float maxHealth = hrs.saturn$getMaxHealth();
|
float maxHealth = hrs.saturn$getMaxHealth();
|
||||||
|
|
||||||
HealthRenderState.EntityType type = hrs.saturn$getEntityType();
|
HealthRenderState.EntityType type = hrs.saturn$getEntityType();
|
||||||
if (type == HealthRenderState.EntityType.PASSIVE && !passive.value) return null;
|
if (type == HealthRenderState.EntityType.PASSIVE && !passive.value)
|
||||||
if (type == HealthRenderState.EntityType.HOSTILE && !hostile.value) return null;
|
return null;
|
||||||
if (type == HealthRenderState.EntityType.PLAYER && !players.value) return null;
|
if (type == HealthRenderState.EntityType.HOSTILE && !hostile.value)
|
||||||
if (type == HealthRenderState.EntityType.OTHER) return null;
|
return null;
|
||||||
|
if (type == HealthRenderState.EntityType.PLAYER && !players.value)
|
||||||
|
return null;
|
||||||
|
if (type == HealthRenderState.EntityType.OTHER)
|
||||||
|
return null;
|
||||||
|
|
||||||
if (health < 0f || maxHealth < 0f || health > maxHealth) return null;
|
if (health < 0f || maxHealth < 0f || health > maxHealth)
|
||||||
|
return null;
|
||||||
|
|
||||||
String hpColor = COLOR_CODES[healthColor.value];
|
String hpColor = COLOR_CODES[healthColor.value];
|
||||||
String color = COLOR_CODES[nameColor.value];
|
String color = COLOR_CODES[nameColor.value];
|
||||||
@@ -127,7 +134,8 @@ public class Nametags extends Module {
|
|||||||
String obf = obfuscate.value ? "§k" : "";
|
String obf = obfuscate.value ? "§k" : "";
|
||||||
String reset = "§r";
|
String reset = "§r";
|
||||||
|
|
||||||
String ret = color + obf + state.customName.getString() + reset + " " + hpColor + getHealthString(state, hrs, health, maxHealth) + heart;
|
String ret = color + obf + state.customName.getString() + reset + " " + hpColor
|
||||||
|
+ getHealthString(state, hrs, health, maxHealth) + heart;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.modules.mods;
|
|||||||
|
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
|
|
||||||
public class NoFog extends Module {
|
public class NoFog extends Module {
|
||||||
private static Property<Boolean> enabled = Property.bool(false);
|
private static Property<Boolean> enabled = Property.bool(false);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import org.saturnclient.modules.HudMod;
|
|||||||
import org.saturnclient.modules.ModDimensions;
|
import org.saturnclient.modules.ModDimensions;
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.saturnclient.modules.ModDimensions;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
@@ -31,8 +31,7 @@ public class Speedometer extends Module implements HudMod {
|
|||||||
axis.named("Speed type"),
|
axis.named("Speed type"),
|
||||||
unitText.named("Unit text"),
|
unitText.named("Unit text"),
|
||||||
speedText.named("Show speed text"),
|
speedText.named("Show speed text"),
|
||||||
dimensions.prop()
|
dimensions.prop());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.saturnclient.modules.ModDimensions;
|
|||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|
||||||
import net.minecraft.client.resource.language.I18n;
|
import net.minecraft.client.resource.language.I18n;
|
||||||
@@ -26,8 +26,10 @@ public class StatusEffects extends Module implements HudMod {
|
|||||||
|
|
||||||
private final StatusEffectInstance[] dummyEffects = {
|
private final StatusEffectInstance[] dummyEffects = {
|
||||||
new StatusEffectInstance(Registries.STATUS_EFFECT.getEntry(Identifier.ofVanilla("speed")).get(), 12000, 2),
|
new StatusEffectInstance(Registries.STATUS_EFFECT.getEntry(Identifier.ofVanilla("speed")).get(), 12000, 2),
|
||||||
new StatusEffectInstance(Registries.STATUS_EFFECT.getEntry(Identifier.ofVanilla("strength")).get(), 12000, 2),
|
new StatusEffectInstance(Registries.STATUS_EFFECT.getEntry(Identifier.ofVanilla("strength")).get(), 12000,
|
||||||
new StatusEffectInstance(Registries.STATUS_EFFECT.getEntry(Identifier.ofVanilla("fire_resistance")).get(), 12000, 2),
|
2),
|
||||||
|
new StatusEffectInstance(Registries.STATUS_EFFECT.getEntry(Identifier.ofVanilla("fire_resistance")).get(),
|
||||||
|
12000, 2),
|
||||||
};
|
};
|
||||||
|
|
||||||
public StatusEffects() {
|
public StatusEffects() {
|
||||||
@@ -68,7 +70,8 @@ public class StatusEffects extends Module implements HudMod {
|
|||||||
renderEffects(scope, Arrays.asList(dummyEffects));
|
renderEffects(scope, Arrays.asList(dummyEffects));
|
||||||
}
|
}
|
||||||
|
|
||||||
// This code was from: https://github.com/magicus/statuseffecttimer/blob/master/src/main/java/se/icus/mag/statuseffecttimer/mixin/StatusEffectTimerMixin.java
|
// This code was from:
|
||||||
|
// https://github.com/magicus/statuseffecttimer/blob/master/src/main/java/se/icus/mag/statuseffecttimer/mixin/StatusEffectTimerMixin.java
|
||||||
private String getDurationAsString(StatusEffectInstance statusEffectInstance) {
|
private String getDurationAsString(StatusEffectInstance statusEffectInstance) {
|
||||||
if (statusEffectInstance.isInfinite()) {
|
if (statusEffectInstance.isInfinite()) {
|
||||||
return I18n.translate("effect.duration.infinite");
|
return I18n.translate("effect.duration.infinite");
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import org.saturnclient.modules.HudMod;
|
|||||||
import org.saturnclient.modules.ModDimensions;
|
import org.saturnclient.modules.ModDimensions;
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
@@ -30,8 +30,7 @@ public class Tps extends Module implements HudMod {
|
|||||||
.version("v0.1.0")
|
.version("v0.1.0")
|
||||||
.tags("Utility"),
|
.tags("Utility"),
|
||||||
enabled.named("Enabled"),
|
enabled.named("Enabled"),
|
||||||
dimensions.prop()
|
dimensions.prop());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onTimePacket(long worldAge) {
|
public static void onTimePacket(long worldAge) {
|
||||||
@@ -50,7 +49,8 @@ public class Tps extends Module implements HudMod {
|
|||||||
samplesFilled = Math.min(samplesFilled + 1, SAMPLE_COUNT);
|
samplesFilled = Math.min(samplesFilled + 1, SAMPLE_COUNT);
|
||||||
|
|
||||||
double sum = 0;
|
double sum = 0;
|
||||||
for (int i = 0; i < samplesFilled; i++) sum += samples[i];
|
for (int i = 0; i < samplesFilled; i++)
|
||||||
|
sum += samples[i];
|
||||||
currentTps = sum / samplesFilled;
|
currentTps = sum / samplesFilled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,8 @@ public class Tps extends Module implements HudMod {
|
|||||||
currentTps = 20.0;
|
currentTps = 20.0;
|
||||||
sampleIndex = 0;
|
sampleIndex = 0;
|
||||||
samplesFilled = SAMPLE_COUNT;
|
samplesFilled = SAMPLE_COUNT;
|
||||||
for (int i = 0; i < SAMPLE_COUNT; i++) samples[i] = 20.0;
|
for (int i = 0; i < SAMPLE_COUNT; i++)
|
||||||
|
samples[i] = 20.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.saturnclient.modules.mods;
|
|||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.modules.ModuleDetails;
|
import org.saturnclient.modules.ModuleDetails;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
|
|
||||||
public class Zoom extends Module {
|
public class Zoom extends Module {
|
||||||
private static Property<Boolean> enabled = Property.bool(false);
|
private static Property<Boolean> enabled = Property.bool(false);
|
||||||
@@ -22,8 +22,7 @@ public class Zoom extends Module {
|
|||||||
enabled.named("Enabled"),
|
enabled.named("Enabled"),
|
||||||
toggle.named("Toggle zoom"),
|
toggle.named("Toggle zoom"),
|
||||||
zoomKey.named("Zoom Keybinding"),
|
zoomKey.named("Zoom Keybinding"),
|
||||||
zoomLevel.named("Zoom Level")
|
zoomLevel.named("Zoom Level"));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import org.saturnclient.cosmetics.cloak.Cloaks;
|
|||||||
import org.saturnclient.cosmetics.hat.Hats;
|
import org.saturnclient.cosmetics.hat.Hats;
|
||||||
import org.saturnclient.modules.ModManager;
|
import org.saturnclient.modules.ModManager;
|
||||||
import org.saturnclient.saturnclient.client.ServiceClient;
|
import org.saturnclient.saturnclient.client.ServiceClient;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
import org.saturnclient.config.manager.ConfigManager;
|
||||||
import org.saturnclient.saturnclient.event.KeyInputHandler;
|
import org.saturnclient.saturnclient.event.KeyInputHandler;
|
||||||
import org.saturnclient.saturnclient.mixin.DrawContextAccessor;
|
import org.saturnclient.saturnclient.mixin.DrawContextAccessor;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ package org.saturnclient.saturnclient.client.player;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
|
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
|
|
||||||
|
|||||||
-55
@@ -1,55 +0,0 @@
|
|||||||
package org.saturnclient.saturnclient.config;
|
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
|
||||||
|
|
||||||
public class AnimationConfig {
|
|
||||||
public static ConfigManager config;
|
|
||||||
|
|
||||||
// Logo
|
|
||||||
public static final AnimationConfig logo = new AnimationConfig(true, 700, 0);
|
|
||||||
|
|
||||||
// Main menu
|
|
||||||
public static final AnimationConfig mainMenu = new AnimationConfig(true, 700, 120);
|
|
||||||
|
|
||||||
// Mod menu
|
|
||||||
public static final AnimationConfig modMenu = new AnimationConfig(true, 700, 20);
|
|
||||||
|
|
||||||
// Shift menu
|
|
||||||
public static final AnimationConfig shiftMenu = new AnimationConfig(true, 700, 100);
|
|
||||||
|
|
||||||
// Cosmetics menu
|
|
||||||
public static final AnimationConfig cosmeticsMenu = new AnimationConfig(true, 700, 40);
|
|
||||||
|
|
||||||
// Emote wheel
|
|
||||||
public static final AnimationConfig emoteWheel = new AnimationConfig(true, 700, 40);
|
|
||||||
|
|
||||||
public static void init(ConfigManager parent) {
|
|
||||||
config = new ConfigManager(parent, "Animations");
|
|
||||||
|
|
||||||
logo.init("Logo");
|
|
||||||
mainMenu.init("Main Menu");
|
|
||||||
modMenu.init("Mod Menu");
|
|
||||||
shiftMenu.init("Shift Menu");
|
|
||||||
cosmeticsMenu.init("Cosmetics Menu");
|
|
||||||
emoteWheel.init("Emote Wheel");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Animation properties
|
|
||||||
public final Property<Integer> duration;
|
|
||||||
public final Property<Integer> stagger;
|
|
||||||
public final Property<Integer> curve;
|
|
||||||
|
|
||||||
public AnimationConfig(boolean enabled, int delay, int stagger) {
|
|
||||||
this.duration = Property.integer(delay);
|
|
||||||
this.stagger = Property.integer(stagger);
|
|
||||||
this.curve = Property.select(1, "Ease In Out Cubic", "Ease Out Cubic", "Ease In Out Back");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void init(String name) {
|
|
||||||
// config.property("Enable " + name + " Animations", this.enabled);
|
|
||||||
config.property(name + " Duration", this.duration);
|
|
||||||
config.property(name + " Stagger", this.stagger);
|
|
||||||
config.property(name + " Curve", this.curve);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
package org.saturnclient.saturnclient.config;
|
|
||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
|
||||||
import org.saturnclient.ui.resources.Textures;
|
|
||||||
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
|
|
||||||
public class Config {
|
|
||||||
public static ConfigManager config;
|
|
||||||
|
|
||||||
public static Property<Boolean> realisticLogo = Property.bool(false);
|
|
||||||
public static Property<Boolean> saturnTitleScreen = Property.bool(true);
|
|
||||||
public static Property<Boolean> cloakPhysics = Property.bool(true);
|
|
||||||
public static Property<Integer> openEmoteWheel = Property.keybinding(GLFW.GLFW_KEY_B);
|
|
||||||
public static Property<Boolean> stagger = Property.bool(true);
|
|
||||||
|
|
||||||
public static Identifier getLogo() {
|
|
||||||
return realisticLogo.value ? Textures.REALISTIC_LOGO : Textures.LOGO;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void init() {
|
|
||||||
config = new ConfigManager("Saturn Client");
|
|
||||||
config.property("Realistic logo", realisticLogo);
|
|
||||||
config.property("Saturn client title screen", saturnTitleScreen);
|
|
||||||
config.property("Open Emote Wheel", openEmoteWheel);
|
|
||||||
config.property("Cloak Physics", cloakPhysics);
|
|
||||||
config.property("Stagger Animations", stagger);
|
|
||||||
|
|
||||||
// Initialize a sub namespace for theme
|
|
||||||
Theme.init(config);
|
|
||||||
|
|
||||||
// Initialize a sub namespace for animations
|
|
||||||
AnimationConfig.init(config);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
package org.saturnclient.saturnclient.config;
|
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
|
||||||
|
|
||||||
public class Theme {
|
|
||||||
// Main UI background (slightly warm dark to match Saturn tone)
|
|
||||||
public static final Property<Integer> BACKGROUND = Property.color(0xFF12100D);
|
|
||||||
|
|
||||||
// Default text color
|
|
||||||
public static final Property<Integer> FOREGROUND = Property.color(0xFFF2E6D2);
|
|
||||||
|
|
||||||
// Widget default background (normal state)
|
|
||||||
public static final Property<Integer> PRIMARY = Property.color(0xFF1C1915);
|
|
||||||
|
|
||||||
// Widget text color
|
|
||||||
public static final Property<Integer> PRIMARY_FG = Property.color(0xFFEAD9B8);
|
|
||||||
|
|
||||||
// Saturn brand color (hovered / enabled / selected)
|
|
||||||
public static final Property<Integer> ACCENT = Property.color(0xFFE2BF7D);
|
|
||||||
|
|
||||||
// Text/icons shown on accent background
|
|
||||||
public static final Property<Integer> ACCENT_FG = Property.color(0xFF1A140A);
|
|
||||||
|
|
||||||
// Misc colors
|
|
||||||
public static final Property<Integer> SCROLL = Property.color(0xFFE2BF7D);
|
|
||||||
|
|
||||||
// UI metrics
|
|
||||||
public static final Property<Integer> BG_RADIUS = Property.integer(12);
|
|
||||||
public static final Property<Integer> WIDGET_RADIUS = Property.integer(10);
|
|
||||||
|
|
||||||
// Font
|
|
||||||
public static final Property<Integer> FONT = Property.font(2);
|
|
||||||
|
|
||||||
public static void init(ConfigManager parent) {
|
|
||||||
ConfigManager config = new ConfigManager(parent, "UI Style");
|
|
||||||
config.property("Background", BACKGROUND);
|
|
||||||
config.property("Foreground", FOREGROUND);
|
|
||||||
config.property("Primary", PRIMARY);
|
|
||||||
config.property("Primary Foreground", PRIMARY_FG);
|
|
||||||
config.property("Accent", ACCENT);
|
|
||||||
config.property("Accent Foreground", ACCENT_FG);
|
|
||||||
config.property("Scrollbar Color", SCROLL);
|
|
||||||
|
|
||||||
config.property("Background Radius", BG_RADIUS);
|
|
||||||
config.property("Widget Radius", WIDGET_RADIUS);
|
|
||||||
|
|
||||||
config.property("Font", FONT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* primary by default, accent if true
|
|
||||||
*/
|
|
||||||
public static int getBg(boolean hover) {
|
|
||||||
return hover ? ACCENT.value : PRIMARY.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* (Foreground) primary by default, accent if true
|
|
||||||
*/
|
|
||||||
public static int getFg(boolean hover) {
|
|
||||||
return hover ? ACCENT_FG.value : PRIMARY_FG.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Multiplies existing alpha with 0–255 alpha.
|
|
||||||
*/
|
|
||||||
public static int withAlpha(int alpha, int color) {
|
|
||||||
alpha = Math.max(0, Math.min(255, alpha));
|
|
||||||
|
|
||||||
int originalAlpha = (color >>> 24) & 0xFF;
|
|
||||||
|
|
||||||
// Merge (multiply) alphas
|
|
||||||
int merged = (originalAlpha * alpha) / 255;
|
|
||||||
|
|
||||||
return (color & 0x00FFFFFF) | (merged << 24);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Multiplies existing alpha with 0.0–1.0 alpha.
|
|
||||||
*/
|
|
||||||
public static int withAlpha(float alpha, int color) {
|
|
||||||
alpha = Math.max(0f, Math.min(1f, alpha));
|
|
||||||
|
|
||||||
int originalAlpha = (color >>> 24) & 0xFF;
|
|
||||||
|
|
||||||
int merged = (int) (originalAlpha * alpha);
|
|
||||||
|
|
||||||
return (color & 0x00FFFFFF) | (merged << 24);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-181
@@ -1,181 +0,0 @@
|
|||||||
package org.saturnclient.saturnclient.config.manager;
|
|
||||||
|
|
||||||
import com.google.gson.*;
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class ConfigManager {
|
|
||||||
|
|
||||||
private static final File configFile = new File(SaturnClient.client.runDirectory, "saturn.json");
|
|
||||||
|
|
||||||
// SINGLE ROOT TREE
|
|
||||||
private static final Map<String, Property<?>> ROOT = new LinkedHashMap<>();
|
|
||||||
|
|
||||||
private static JsonObject cachedJson = null;
|
|
||||||
|
|
||||||
private final Map<String, Property<?>> currentMap;
|
|
||||||
|
|
||||||
private final String[] path;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a root namespace
|
|
||||||
*/
|
|
||||||
public ConfigManager(String namespace) {
|
|
||||||
this.currentMap = new LinkedHashMap<>();
|
|
||||||
this.path = new String[] { namespace }; // Path is just ["namespace"]
|
|
||||||
ROOT.put(namespace, Property.namespace(currentMap));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a sub-namespace inside a parent
|
|
||||||
*/
|
|
||||||
public ConfigManager(ConfigManager parent, String namespace) {
|
|
||||||
this.currentMap = new LinkedHashMap<>();
|
|
||||||
|
|
||||||
// Build new path: parent path + current namespace
|
|
||||||
this.path = new String[parent.path.length + 1];
|
|
||||||
System.arraycopy(parent.path, 0, this.path, 0, parent.path.length);
|
|
||||||
this.path[this.path.length - 1] = namespace;
|
|
||||||
|
|
||||||
parent.property(namespace, Property.namespace(currentMap));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a property
|
|
||||||
*/
|
|
||||||
public <T> Property<T> property(String name, Property<T> value) {
|
|
||||||
currentMap.put(name, value);
|
|
||||||
loadSingleProperty(name, value);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add empty namespace
|
|
||||||
*/
|
|
||||||
public ConfigManager sub(String name) {
|
|
||||||
return new ConfigManager(this, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load entire config
|
|
||||||
*/
|
|
||||||
public static void load() {
|
|
||||||
SaturnClient.LOGGER.info("Loading config...");
|
|
||||||
|
|
||||||
JsonObject json = loadAndCache();
|
|
||||||
if (json == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
loadRecursive(json, ROOT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save entire config
|
|
||||||
*/
|
|
||||||
public static void save() {
|
|
||||||
SaturnClient.LOGGER.info("Saving config...");
|
|
||||||
|
|
||||||
JsonObject rootJson = new JsonObject();
|
|
||||||
saveRecursive(rootJson, ROOT);
|
|
||||||
|
|
||||||
try {
|
|
||||||
String formatted = new GsonBuilder()
|
|
||||||
.setPrettyPrinting()
|
|
||||||
.create()
|
|
||||||
.toJson(rootJson);
|
|
||||||
|
|
||||||
Files.writeString(configFile.toPath(), formatted);
|
|
||||||
SaturnClient.LOGGER.info("Config saved successfully.");
|
|
||||||
} catch (IOException e) {
|
|
||||||
SaturnClient.LOGGER.error("Error saving config file", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Recursive save
|
|
||||||
*/
|
|
||||||
private static void saveRecursive(JsonObject json, Map<String, Property<?>> map) {
|
|
||||||
map.forEach((name, prop) -> {
|
|
||||||
if (prop.isNamespace()) {
|
|
||||||
JsonObject child = new JsonObject();
|
|
||||||
saveRecursive(child, prop.getNamespaceMap());
|
|
||||||
json.add(name, child);
|
|
||||||
} else {
|
|
||||||
json.add(name, prop.toJson());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Recursive load
|
|
||||||
*/
|
|
||||||
private static void loadRecursive(JsonObject json, Map<String, Property<?>> map) {
|
|
||||||
map.forEach((name, prop) -> {
|
|
||||||
JsonElement element = json.get(name);
|
|
||||||
if (element == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (prop.isNamespace() && element.isJsonObject()) {
|
|
||||||
loadRecursive(element.getAsJsonObject(), prop.getNamespaceMap());
|
|
||||||
} else {
|
|
||||||
prop.loadFromJson(element);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load only a single property immediately after creation,
|
|
||||||
* traversing the JSON tree based on this manager's path.
|
|
||||||
*/
|
|
||||||
private void loadSingleProperty(String name, Property<?> prop) {
|
|
||||||
JsonObject source = cachedJson != null ? cachedJson : loadAndCache();
|
|
||||||
if (source == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Traverse the tree to the correct namespace
|
|
||||||
JsonObject currentScope = source;
|
|
||||||
for (String segment : path) {
|
|
||||||
JsonElement next = currentScope.get(segment);
|
|
||||||
if (next != null && next.isJsonObject()) {
|
|
||||||
currentScope = next.getAsJsonObject();
|
|
||||||
} else {
|
|
||||||
return; // Path doesn't exist in config yet
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now look for the property inside the correctly nested object
|
|
||||||
JsonElement element = currentScope.get(name);
|
|
||||||
if (element != null) {
|
|
||||||
prop.loadFromJson(element);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads file and caches json
|
|
||||||
*/
|
|
||||||
private static JsonObject loadAndCache() {
|
|
||||||
try {
|
|
||||||
if (!configFile.exists()) {
|
|
||||||
Files.writeString(configFile.toPath(), "{}");
|
|
||||||
return new JsonObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
String json = Files.readString(configFile.toPath());
|
|
||||||
cachedJson = JsonParser.parseString(json).getAsJsonObject();
|
|
||||||
return cachedJson;
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
|
||||||
SaturnClient.LOGGER.error("Error reading config file", e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, Property<?>> getProperties() {
|
|
||||||
return currentMap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-298
@@ -1,298 +0,0 @@
|
|||||||
package org.saturnclient.saturnclient.config.manager;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.gson.JsonPrimitive;
|
|
||||||
|
|
||||||
public class Property<T> {
|
|
||||||
public static class NamedProperty<T> {
|
|
||||||
public String name;
|
|
||||||
public Property<T> prop;
|
|
||||||
|
|
||||||
public NamedProperty(String name, Property<T> value) {
|
|
||||||
this.name = name;
|
|
||||||
this.prop = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum PropertyType {
|
|
||||||
BOOLEAN,
|
|
||||||
INTEGER,
|
|
||||||
FLOAT,
|
|
||||||
STRING,
|
|
||||||
HEX,
|
|
||||||
NAMESPACE,
|
|
||||||
SELECT,
|
|
||||||
KEYBINDING,
|
|
||||||
}
|
|
||||||
|
|
||||||
public T value;
|
|
||||||
public boolean isReset = false;
|
|
||||||
private T defaultValue;
|
|
||||||
private String[] availableValues;
|
|
||||||
private final PropertyType type;
|
|
||||||
private boolean wasPressedLastTick = false;
|
|
||||||
|
|
||||||
private Property(T value, PropertyType type) {
|
|
||||||
this.value = value;
|
|
||||||
this.defaultValue = value;
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Factory Methods ----------
|
|
||||||
public static <T> Property<T> from(T value) {
|
|
||||||
if (value instanceof Boolean)
|
|
||||||
return new Property<>(value, PropertyType.BOOLEAN);
|
|
||||||
if (value instanceof Integer)
|
|
||||||
return new Property<>(value, PropertyType.INTEGER);
|
|
||||||
if (value instanceof Float)
|
|
||||||
return new Property<>(value, PropertyType.FLOAT);
|
|
||||||
if (value instanceof String)
|
|
||||||
return new Property<>(value, PropertyType.STRING);
|
|
||||||
if (valueIsNamespace(value))
|
|
||||||
return new Property<>(value, PropertyType.NAMESPACE);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Integer> font(int value) {
|
|
||||||
return select(value, "Default", "Inter", "Inter bold");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Integer> select(Integer value, String... availableValues) {
|
|
||||||
Property<Integer> property = new Property<>(value, PropertyType.SELECT);
|
|
||||||
property.availableValues = availableValues;
|
|
||||||
return property;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Map<String, Property<?>>> namespace(Map<String, Property<?>> value) {
|
|
||||||
return new Property<>(value, PropertyType.NAMESPACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Boolean> bool(boolean value) {
|
|
||||||
return new Property<>(value, PropertyType.BOOLEAN);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Integer> integer(int value) {
|
|
||||||
return new Property<>(value, PropertyType.INTEGER);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Float> floatProp(float value) {
|
|
||||||
return new Property<>(value, PropertyType.FLOAT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<String> string(String value) {
|
|
||||||
return new Property<>(value, PropertyType.STRING);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Integer> color(int value) {
|
|
||||||
return new Property<>(value, PropertyType.HEX);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Property<Integer> keybinding(int value) {
|
|
||||||
return new Property<>(value, PropertyType.KEYBINDING);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Select Helpers ----------
|
|
||||||
public void next() {
|
|
||||||
if (type == PropertyType.SELECT) {
|
|
||||||
int i = (Integer) value;
|
|
||||||
setValue((i < availableValues.length - 1) ? i + 1 : 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void prev() {
|
|
||||||
if (type == PropertyType.SELECT) {
|
|
||||||
int i = (Integer) value;
|
|
||||||
setValue((i > 0) ? i - 1 : availableValues.length - 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSelection(int selection) {
|
|
||||||
if (type == PropertyType.SELECT && selection >= 0 && selection < availableValues.length) {
|
|
||||||
setValue(selection);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSelection() {
|
|
||||||
return (type == PropertyType.SELECT) ? availableValues[(Integer) value] : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Lifecycle ----------
|
|
||||||
public void reset() {
|
|
||||||
value = defaultValue;
|
|
||||||
isReset = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PropertyType getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public Map<String, Property<?>> getNamespaceValue() {
|
|
||||||
if (type == PropertyType.NAMESPACE && value instanceof Map) {
|
|
||||||
return (Map<String, Property<?>>) value;
|
|
||||||
}
|
|
||||||
throw new IllegalStateException("Property is not a namespace");
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- JSON Serialization ----------
|
|
||||||
/*
|
|
||||||
* BOOLEAN,
|
|
||||||
* INTEGER,
|
|
||||||
* FLOAT,
|
|
||||||
* STRING,
|
|
||||||
* HEX,
|
|
||||||
* NAMESPACE,
|
|
||||||
* SELECT,
|
|
||||||
* KEYBINDING,
|
|
||||||
*/
|
|
||||||
public JsonElement toJson() {
|
|
||||||
switch (type) {
|
|
||||||
case BOOLEAN:
|
|
||||||
return new JsonPrimitive((Boolean) value);
|
|
||||||
case INTEGER:
|
|
||||||
return new JsonPrimitive((Integer) value);
|
|
||||||
case FLOAT:
|
|
||||||
return new JsonPrimitive((Float) value);
|
|
||||||
case NAMESPACE:
|
|
||||||
JsonObject nested = new JsonObject();
|
|
||||||
getNamespaceValue().forEach((k, v) -> nested.add(k, v.toJson()));
|
|
||||||
return nested;
|
|
||||||
case HEX:
|
|
||||||
return new JsonPrimitive(String.format("#%08X", (Integer) value));
|
|
||||||
case KEYBINDING:
|
|
||||||
return new JsonPrimitive((Integer) value);
|
|
||||||
case SELECT:
|
|
||||||
return new JsonPrimitive((Integer) value);
|
|
||||||
default:
|
|
||||||
return new JsonPrimitive(String.valueOf(value));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadFromJson(JsonElement element) {
|
|
||||||
if (element == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case BOOLEAN:
|
|
||||||
if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isBoolean())
|
|
||||||
setValue(element.getAsBoolean());
|
|
||||||
break;
|
|
||||||
case INTEGER:
|
|
||||||
if (element.isJsonPrimitive()) {
|
|
||||||
JsonPrimitive p = element.getAsJsonPrimitive();
|
|
||||||
if (p.isNumber())
|
|
||||||
setValue(p.getAsInt());
|
|
||||||
else if (p.isString())
|
|
||||||
setValue(parseHexToInt(p.getAsString()));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case FLOAT:
|
|
||||||
if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isNumber())
|
|
||||||
setValue(element.getAsFloat());
|
|
||||||
break;
|
|
||||||
case STRING:
|
|
||||||
if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isString())
|
|
||||||
setValue(element.getAsString());
|
|
||||||
break;
|
|
||||||
case HEX:
|
|
||||||
if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isString())
|
|
||||||
setValue(parseHexToInt(element.getAsString()));
|
|
||||||
break;
|
|
||||||
case NAMESPACE:
|
|
||||||
if (element.isJsonObject()) {
|
|
||||||
JsonObject obj = element.getAsJsonObject();
|
|
||||||
getNamespaceValue().forEach((k, v) -> v.loadFromJson(obj.get(k)));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SELECT:
|
|
||||||
if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isNumber())
|
|
||||||
setSelection(element.getAsInt());
|
|
||||||
break;
|
|
||||||
case KEYBINDING:
|
|
||||||
if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isNumber())
|
|
||||||
setValue(element.getAsInt());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Utility ----------
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return String.valueOf(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean valueIsNamespace(Object obj) {
|
|
||||||
return obj instanceof Map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void setValue(Object value) {
|
|
||||||
this.value = (T) value;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void setValue(Object value, Object defaultValue) {
|
|
||||||
this.value = (T) value;
|
|
||||||
this.defaultValue = (T) defaultValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public NamedProperty<T> named(String name) {
|
|
||||||
return new NamedProperty<>(name, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Keybindings ----------
|
|
||||||
public boolean isKeyPressed() {
|
|
||||||
return (Integer) value != -1 &&
|
|
||||||
GLFW.glfwGetKey(SaturnClient.client.getWindow().getHandle(), (Integer) value) == GLFW.GLFW_PRESS &&
|
|
||||||
SaturnClient.client.currentScreen == null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean wasKeyPressed() {
|
|
||||||
boolean pressed = isKeyPressed();
|
|
||||||
boolean result = pressed && !wasPressedLastTick;
|
|
||||||
wasPressedLastTick = pressed;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- HEX ----------
|
|
||||||
public static int parseHexToInt(String hex) {
|
|
||||||
hex = hex.replace("#", "");
|
|
||||||
if (hex.length() == 6)
|
|
||||||
hex = "FF" + hex;
|
|
||||||
if (hex.length() != 8)
|
|
||||||
throw new IllegalArgumentException("Hex must be 6 or 8 chars long, got \'" + hex + "\'");
|
|
||||||
return (int) Long.parseLong(hex, 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Misc
|
|
||||||
public Property<T> copy() {
|
|
||||||
return new Property<>(this.value, this.type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void load(String name, JsonElement element) {
|
|
||||||
if (element != null && element.isJsonObject()) {
|
|
||||||
load(name, element.getAsJsonObject());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void load(String name, JsonObject element) {
|
|
||||||
JsonElement value = element.get(name);
|
|
||||||
if (value != null)
|
|
||||||
this.loadFromJson(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isNamespace() {
|
|
||||||
return type == PropertyType.NAMESPACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public Map<String, Property<?>> getNamespaceMap() {
|
|
||||||
return isNamespace() ? (Map<String, Property<?>>) (Object) value : null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+3
-2
@@ -7,7 +7,7 @@ import net.minecraft.client.util.InputUtil;
|
|||||||
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.client.ServiceClient;
|
import org.saturnclient.saturnclient.client.ServiceClient;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.ui.screens.EmoteWheel;
|
import org.saturnclient.ui.screens.EmoteWheel;
|
||||||
import org.saturnclient.ui.screens.ShiftMenu;
|
import org.saturnclient.ui.screens.ShiftMenu;
|
||||||
|
|
||||||
@@ -39,7 +39,8 @@ public class KeyInputHandler {
|
|||||||
client.setScreen(new ShiftMenu());
|
client.setScreen(new ShiftMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.openEmoteWheel.wasKeyPressed() && client.currentScreen == null && !InputUtil.isKeyPressed(client.getWindow().getHandle(), GLFW.GLFW_KEY_F3)) {
|
if (Config.openEmoteWheel.wasKeyPressed() && client.currentScreen == null
|
||||||
|
&& !InputUtil.isKeyPressed(client.getWindow().getHandle(), GLFW.GLFW_KEY_F3)) {
|
||||||
client.setScreen(new EmoteWheel());
|
client.setScreen(new EmoteWheel());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.saturnclient.modules.HudMod;
|
|||||||
import org.saturnclient.modules.ModDimensions;
|
import org.saturnclient.modules.ModDimensions;
|
||||||
import org.saturnclient.modules.ModManager;
|
import org.saturnclient.modules.ModManager;
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
import org.saturnclient.config.manager.ConfigManager;
|
||||||
import org.saturnclient.saturnclient.mixin.DrawContextAccessor;
|
import org.saturnclient.saturnclient.mixin.DrawContextAccessor;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
@@ -95,7 +95,8 @@ public class HudEditor extends Screen {
|
|||||||
SaturnScreen.ROTATING_PANORAMA_RENDERER.render(context, this.width, this.height, 1.0F, delta);
|
SaturnScreen.ROTATING_PANORAMA_RENDERER.render(context, this.width, this.height, 1.0F, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderScope scope = new RenderScope(context.getMatrices(), ((DrawContextAccessor) context).getVertexConsumers());
|
RenderScope scope = new RenderScope(context.getMatrices(),
|
||||||
|
((DrawContextAccessor) context).getVertexConsumers());
|
||||||
|
|
||||||
for (HudMod mod : hudMods) {
|
for (HudMod mod : hudMods) {
|
||||||
ModDimensions dim = mod.getDimensions();
|
ModDimensions dim = mod.getDimensions();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.saturnclient.mixin;
|
package org.saturnclient.saturnclient.mixin;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.ui.screens.TitleMenu;
|
import org.saturnclient.ui.screens.TitleMenu;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|||||||
+5
-3
@@ -3,7 +3,7 @@ package org.saturnclient.saturnclient.mixin;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
import org.saturnclient.ui.resources.Textures;
|
import org.saturnclient.ui.resources.Textures;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -33,10 +33,12 @@ public abstract class SplashOverlayMixin {
|
|||||||
@Shadow
|
@Shadow
|
||||||
private long reloadStartTime;
|
private long reloadStartTime;
|
||||||
|
|
||||||
@Shadow @Final
|
@Shadow
|
||||||
|
@Final
|
||||||
private boolean reloading;
|
private boolean reloading;
|
||||||
|
|
||||||
@Shadow @Final
|
@Shadow
|
||||||
|
@Final
|
||||||
private Consumer<Optional<Throwable>> exceptionHandler;
|
private Consumer<Optional<Throwable>> exceptionHandler;
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.ui.anim;
|
|||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
|
|
||||||
public abstract class Animation {
|
public abstract class Animation {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.anim;
|
package org.saturnclient.ui.anim;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
|
|
||||||
public class Fade extends Animation {
|
public class Fade extends Animation {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.anim;
|
package org.saturnclient.ui.anim;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
|
|
||||||
public class FadeOut extends Animation {
|
public class FadeOut extends Animation {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.anim;
|
package org.saturnclient.ui.anim;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
|
|
||||||
public class SlideFade extends Animation {
|
public class SlideFade extends Animation {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.anim;
|
package org.saturnclient.ui.anim;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
|
|
||||||
public class SlideX extends Animation {
|
public class SlideX extends Animation {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.anim;
|
package org.saturnclient.ui.anim;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
|
|
||||||
public class SlideY extends Animation {
|
public class SlideY extends Animation {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.components;
|
package org.saturnclient.ui.components;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.ui.components;
|
|||||||
|
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.saturnclient.ui.components;
|
package org.saturnclient.ui.components;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.components.inputs;
|
package org.saturnclient.ui.components.inputs;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
import org.saturnclient.config.manager.ConfigManager;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
public class FloatInput extends Input {
|
public class FloatInput extends Input {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.ui.components.inputs;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.ui.components.inputs;
|
|||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.components.inputs;
|
package org.saturnclient.ui.components.inputs;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
import org.saturnclient.config.manager.ConfigManager;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.resources.Fonts;
|
import org.saturnclient.ui.resources.Fonts;
|
||||||
|
|
||||||
public class IntInput extends Input {
|
public class IntInput extends Input {
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package org.saturnclient.ui.components.inputs;
|
package org.saturnclient.ui.components.inputs;
|
||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.components.inputs;
|
package org.saturnclient.ui.components.inputs;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.components.inputs;
|
package org.saturnclient.ui.components.inputs;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package org.saturnclient.ui.elements;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package org.saturnclient.ui.elements;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
@@ -88,7 +88,8 @@ public class Scroll extends Element {
|
|||||||
|
|
||||||
int calculateScrollBarY() {
|
int calculateScrollBarY() {
|
||||||
int scrollBarHeight = calculateScrollBarHeight();
|
int scrollBarHeight = calculateScrollBarHeight();
|
||||||
if (maxScroll <= 0) return scrollBarPadding.value;
|
if (maxScroll <= 0)
|
||||||
|
return scrollBarPadding.value;
|
||||||
int y = (scroll * (height - scrollBarHeight - scrollBarPadding.value * 2)) / maxScroll + scrollBarPadding.value;
|
int y = (scroll * (height - scrollBarHeight - scrollBarPadding.value * 2)) / maxScroll + scrollBarPadding.value;
|
||||||
return Math.min(y, height - scrollBarHeight - scrollBarPadding.value);
|
return Math.min(y, height - scrollBarHeight - scrollBarPadding.value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package org.saturnclient.ui.screens;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.saturnclient.config.manager.ConfigManager;
|
import org.saturnclient.config.manager.ConfigManager;
|
||||||
import org.saturnclient.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.components.Sidebar;
|
import org.saturnclient.ui.components.Sidebar;
|
||||||
import org.saturnclient.ui.components.inputs.FloatInput;
|
import org.saturnclient.ui.components.inputs.FloatInput;
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package org.saturnclient.ui.screens;
|
|||||||
import org.saturnclient.cosmetics.Emotes;
|
import org.saturnclient.cosmetics.Emotes;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.client.ServiceClient;
|
import org.saturnclient.saturnclient.client.ServiceClient;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.Utils;
|
import org.saturnclient.ui.Utils;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.ui.screens;
|
|||||||
|
|
||||||
import org.saturnclient.modules.ModManager;
|
import org.saturnclient.modules.ModManager;
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.anim.SlideFade;
|
import org.saturnclient.ui.anim.SlideFade;
|
||||||
import org.saturnclient.ui.components.SaturnModule;
|
import org.saturnclient.ui.components.SaturnModule;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.saturnclient.ui.screens;
|
package org.saturnclient.ui.screens;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.saturnclient.menus.HudEditor;
|
import org.saturnclient.saturnclient.menus.HudEditor;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.saturnclient.ui.screens;
|
package org.saturnclient.ui.screens;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.saturnclient.menus.HudEditor;
|
import org.saturnclient.saturnclient.menus.HudEditor;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.saturnclient.ui.screens.cosmetics;
|
|||||||
import org.saturnclient.cosmetics.cloak.Cloaks;
|
import org.saturnclient.cosmetics.cloak.Cloaks;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
import org.saturnclient.ui.anim.SlideY;
|
import org.saturnclient.ui.anim.SlideY;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.saturnclient.ui.screens.cosmetics;
|
|||||||
import org.saturnclient.cosmetics.hat.Hats;
|
import org.saturnclient.cosmetics.hat.Hats;
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
import org.saturnclient.ui.anim.SlideY;
|
import org.saturnclient.ui.anim.SlideY;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import org.saturnclient.cosmetics.cloak.Cloaks;
|
|||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.client.ServiceClient;
|
import org.saturnclient.saturnclient.client.ServiceClient;
|
||||||
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.Utils;
|
import org.saturnclient.ui.Utils;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import org.saturnclient.cosmetics.hat.Hats;
|
|||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.client.ServiceClient;
|
import org.saturnclient.saturnclient.client.ServiceClient;
|
||||||
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.Utils;
|
import org.saturnclient.ui.Utils;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
|
|||||||
Reference in New Issue
Block a user