From 65dd269c266650724c392b121855f87cdf4dbe2b Mon Sep 17 00:00:00 2001 From: akarahdev Date: Thu, 18 Jan 2024 08:29:01 -0500 Subject: test --- .../hysky/skyblocker/config/SkyblockerConfig.java | 11 +++++ .../config/categories/SlayersCategory.java | 18 ++++++++ .../skyblock/endermanslayer/BeaconHighlighter.java | 51 ++++++++++++++++++++++ .../hysky/skyblocker/skyblock/entity/MobGlow.java | 40 +++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 9477fbed..b8606b87 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -918,6 +918,17 @@ public class SkyblockerConfig { public static class Slayer { @SerialEntry public VampireSlayer vampireSlayer = new VampireSlayer(); + + @SerialEntry + public EndermanSlayer endermanSlayer = new EndermanSlayer(); + } + + public static class EndermanSlayer { + @SerialEntry + public boolean highlightNukekubiHeads = true; + + @SerialEntry + public boolean highlightBeacons = true; } public static class VampireSlayer { diff --git a/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java index 7df95172..15e6f4a6 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java @@ -16,6 +16,24 @@ public class SlayersCategory { public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) { return ConfigCategory.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.category.slayer")) + .group(OptionGroup.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.slayer.endermanSlayer")) + .collapsed(true) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.slayer.endermanSlayer.highlightNukekubiHeads")) + .binding(defaults.slayer.endermanSlayer.highlightNukekubiHeads, + () -> config.slayer.endermanSlayer.highlightNukekubiHeads, + newValue -> config.slayer.endermanSlayer.highlightNukekubiHeads = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.slayer.endermanSlayer.highlightBeacons")) + .binding(defaults.slayer.endermanSlayer.highlightBeacons, + () -> config.slayer.endermanSlayer.highlightBeacons, + newValue -> config.slayer.endermanSlayer.highlightBeacons = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .build()) //Vampire Slayer .group(OptionGroup.createBuilder() diff --git a/src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java new file mode 100644 index 00000000..2dc64aff --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java @@ -0,0 +1,51 @@ +package de.hysky.skyblocker.skyblock.endermanslayer; + +import de.hysky.skyblocker.utils.Tickable; +import de.hysky.skyblocker.utils.render.RenderHelper; +import de.hysky.skyblocker.utils.render.Renderable; +import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; +import net.minecraft.block.Block; +import net.minecraft.client.MinecraftClient; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.nbt.NbtString; +import net.minecraft.util.math.BlockPos; + +public class BeaconHighlighter implements Tickable, Renderable { + BlockPos pos = null; + @Override + public void tick(MinecraftClient client) { + var player = MinecraftClient.getInstance().player; + var world = MinecraftClient.getInstance().world; + pos = null; + if(player != null && world != null) { + for(int x = (int) (player.getX()-20); x Date: Thu, 18 Jan 2024 09:20:11 -0500 Subject: improve beacons --- .../java/de/hysky/skyblocker/SkyblockerMod.java | 2 +- .../skyblocker/skyblock/end/BeaconHighlighter.java | 68 ++++++++++++++++++++++ .../skyblock/endermanslayer/BeaconHighlighter.java | 62 -------------------- src/main/java/de/hysky/skyblocker/utils/Utils.java | 8 +++ 4 files changed, 77 insertions(+), 63 deletions(-) create mode 100644 src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java delete mode 100644 src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/SkyblockerMod.java b/src/main/java/de/hysky/skyblocker/SkyblockerMod.java index 905478ce..3fca09ce 100644 --- a/src/main/java/de/hysky/skyblocker/SkyblockerMod.java +++ b/src/main/java/de/hysky/skyblocker/SkyblockerMod.java @@ -14,7 +14,7 @@ import de.hysky.skyblocker.skyblock.dungeon.puzzle.waterboard.Waterboard; import de.hysky.skyblocker.skyblock.dungeon.secrets.DungeonManager; import de.hysky.skyblocker.skyblock.dungeon.secrets.SecretsTracker; import de.hysky.skyblocker.skyblock.dwarven.DwarvenHud; -import de.hysky.skyblocker.skyblock.endermanslayer.BeaconHighlighter; +import de.hysky.skyblocker.skyblock.end.BeaconHighlighter; import de.hysky.skyblocker.skyblock.item.*; import de.hysky.skyblocker.skyblock.item.tooltip.BackpackPreview; import de.hysky.skyblocker.skyblock.item.tooltip.ItemTooltip; diff --git a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java new file mode 100644 index 00000000..1815179f --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java @@ -0,0 +1,68 @@ +package de.hysky.skyblocker.skyblock.end; + +import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.utils.render.RenderHelper; +import de.hysky.skyblocker.utils.scheduler.Scheduler; +import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; +import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; +import net.minecraft.client.MinecraftClient; +import net.minecraft.util.math.BlockPos; + +import java.util.ArrayList; +import java.util.List; + +public class BeaconHighlighter { + static List pos = new ArrayList<>(); + + /** + * Initializes the beacon highlighting system. + * `BeaconHighlighter::render` is called after translucent rendering. + * `BeaconHighlighter::update` should be called every 5 ticks. + */ + public static void init() { + WorldRenderEvents.AFTER_TRANSLUCENT.register(BeaconHighlighter::render); + Scheduler.INSTANCE.scheduleCyclic(BeaconHighlighter::update, 5); + } + + /** + * Updates the position of the beacon. + * It checks in a 15 block radius on the X/Z axis, and a ~5 block radius on the Y axis. + * If a beacon is found, `pos` is updated to the beacon's position. + */ + + public static void update() { + var player = MinecraftClient.getInstance().player; + var world = MinecraftClient.getInstance().world; + pos.clear(); + if(player != null && world != null && + SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) { + for(int x = (player.getBlockPos().getX()-15); x { + RenderHelper.renderFilled( + context, + it, + new float[]{1.0f, 0.0f, 0.0f}, + 0.5f, + true + ); + }); + } +} diff --git a/src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java deleted file mode 100644 index 44e86966..00000000 --- a/src/main/java/de/hysky/skyblocker/skyblock/endermanslayer/BeaconHighlighter.java +++ /dev/null @@ -1,62 +0,0 @@ -package de.hysky.skyblocker.skyblock.endermanslayer; - -import de.hysky.skyblocker.config.SkyblockerConfigManager; -import de.hysky.skyblocker.skyblock.entity.MobGlow; -import de.hysky.skyblocker.utils.Tickable; -import de.hysky.skyblocker.utils.render.RenderHelper; -import de.hysky.skyblocker.utils.render.Renderable; -import de.hysky.skyblocker.utils.scheduler.Scheduler; -import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; -import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.client.MinecraftClient; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NbtCompound; -import net.minecraft.nbt.NbtString; -import net.minecraft.util.math.BlockPos; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class BeaconHighlighter { - static BlockPos pos = null; - - public static void init() { - WorldRenderEvents.AFTER_TRANSLUCENT.register(BeaconHighlighter::render); - Scheduler.INSTANCE.scheduleCyclic(BeaconHighlighter::update, 20); - } - - public static void update() { - Logger logger = LoggerFactory.getLogger(BeaconHighlighter.class); - - var player = MinecraftClient.getInstance().player; - var world = MinecraftClient.getInstance().world; - pos = null; - if(player != null && world != null && - SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) { - for(int x = (player.getBlockPos().getX()-15); x Date: Thu, 18 Jan 2024 09:21:58 -0500 Subject: improve nukekubi highlighting --- .../java/de/hysky/skyblocker/skyblock/entity/MobGlow.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index fdaa0d6c..2d0eed4e 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -67,10 +67,13 @@ public class MobGlow { } // Enderman Slayer - // Nukekubi Heads - Logger logger = LoggerFactory.getLogger(MobGlow.class); - if(entity instanceof ArmorStandEntity) { + // Highlights Nukekubi Heads + if(SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads + && entity instanceof ArmorStandEntity) { + // check for items in the armor sets for (net.minecraft.item.ItemStack it : entity.getArmorItems()) { + // hacky way to check if an item is a player head w/o + // some shenanigans if(!it.toString().startsWith("1 player_head")) continue; @@ -81,6 +84,8 @@ public class MobGlow { // for the nukekubi head, compare against it to exclusively find // armorstands that are nukekubi heads if (it.getNbt().contains("SkullOwner")) { + // get the texture of the nukekubi head item itself and + // compare it var texture = it .getNbt() .getCompound("SkullOwner") @@ -88,8 +93,8 @@ public class MobGlow { .getList("textures", NbtElement.COMPOUND_TYPE) .getCompound(0) .getString("Value"); - return SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads - && texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); + + return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); } } -- cgit From 932cd36d51d505396552478e184d86b4a3a2eb94 Mon Sep 17 00:00:00 2001 From: akarahdev Date: Thu, 18 Jan 2024 09:24:13 -0500 Subject: make this not bannable --- src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java index 1815179f..0da5cc97 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java @@ -61,7 +61,7 @@ public class BeaconHighlighter { it, new float[]{1.0f, 0.0f, 0.0f}, 0.5f, - true + false ); }); } -- cgit From 8b9f2d8bed28c0e2867871d4017eb63ebb904482 Mon Sep 17 00:00:00 2001 From: akarahdev Date: Thu, 18 Jan 2024 09:26:50 -0500 Subject: add nukekubi glow coloring --- .../hysky/skyblocker/skyblock/entity/MobGlow.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index 2d0eed4e..ef61271d 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -123,6 +123,39 @@ public class MobGlow { }; } + // copypaste nukekubi head logic + if(entity instanceof ArmorStandEntity) { + for (net.minecraft.item.ItemStack it : entity.getArmorItems()) { + // hacky way to check if an item is a player head w/o + // some shenanigans + if(!it.toString().startsWith("1 player_head")) + continue; + + + if (it.hasNbt()) { + assert it.getNbt() != null; + // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id + // for the nukekubi head, compare against it to exclusively find + // armorstands that are nukekubi heads + if (it.getNbt().contains("SkullOwner")) { + // get the texture of the nukekubi head item itself and + // compare it + var texture = it + .getNbt() + .getCompound("SkullOwner") + .getCompound("Properties") + .getList("textures", NbtElement.COMPOUND_TYPE) + .getCompound(0) + .getString("Value"); + + if(texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0=")) { + return 0x990099; + } + } + } + } + } + return 0xf57738; } } -- cgit From 1c11eadc90ab43a0fdddfac9a65fd6b8f043837c Mon Sep 17 00:00:00 2001 From: akarahdev Date: Thu, 18 Jan 2024 09:36:35 -0500 Subject: finish up --- src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index ef61271d..f7fb7a3e 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -123,7 +123,7 @@ public class MobGlow { }; } - // copypaste nukekubi head logic + // copypaste nukekebi head logic if(entity instanceof ArmorStandEntity) { for (net.minecraft.item.ItemStack it : entity.getArmorItems()) { // hacky way to check if an item is a player head w/o @@ -138,7 +138,7 @@ public class MobGlow { // for the nukekubi head, compare against it to exclusively find // armorstands that are nukekubi heads if (it.getNbt().contains("SkullOwner")) { - // get the texture of the nukekubi head item itself and + // get the texture of the nukekebi head item itself and // compare it var texture = it .getNbt() -- cgit From ffb7d6a489934ee8429146c451a54f5d7627bf64 Mon Sep 17 00:00:00 2001 From: akarahdev Date: Thu, 18 Jan 2024 12:02:57 -0500 Subject: please work --- .../mixin/ClientPlayNetworkHandlerMixin.java | 12 +++++- .../skyblocker/skyblock/end/BeaconHighlighter.java | 49 +++++----------------- 2 files changed, 21 insertions(+), 40 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java index a8537088..15339c78 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java @@ -6,6 +6,7 @@ import com.llamalad7.mixinextras.sugar.Local; import de.hysky.skyblocker.skyblock.FishingHelper; import de.hysky.skyblocker.skyblock.dungeon.DungeonScore; import de.hysky.skyblocker.skyblock.dungeon.secrets.DungeonManager; +import de.hysky.skyblocker.skyblock.end.BeaconHighlighter; import de.hysky.skyblocker.skyblock.waypoint.MythologicalRitual; import de.hysky.skyblocker.utils.Utils; import net.minecraft.client.MinecraftClient; @@ -15,6 +16,7 @@ import net.minecraft.entity.EntityStatuses; import net.minecraft.entity.ItemEntity; import net.minecraft.entity.LivingEntity; import net.minecraft.network.packet.s2c.play.EntityStatusS2CPacket; +import net.minecraft.network.packet.s2c.play.BlockUpdateS2CPacket; import net.minecraft.network.packet.s2c.play.ParticleS2CPacket; import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket; import net.minecraft.util.Identifier; @@ -71,7 +73,15 @@ public abstract class ClientPlayNetworkHandlerMixin { @ModifyExpressionValue(method = "onEntityStatus", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/EntityStatusS2CPacket;getEntity(Lnet/minecraft/world/World;)Lnet/minecraft/entity/Entity;")) private Entity skyblocker$onEntityDeath(Entity entity, @Local(argsOnly = true) EntityStatusS2CPacket packet) { - if (packet.getStatus() == EntityStatuses.PLAY_DEATH_SOUND_OR_ADD_PROJECTILE_HIT_PARTICLES) DungeonScore.handleEntityDeath(entity); + if (packet.getStatus() == EntityStatuses.PLAY_DEATH_SOUND_OR_ADD_PROJECTILE_HIT_PARTICLES) + DungeonScore.handleEntityDeath(entity); return entity; } + @Inject(method = "onBlockUpdate", at = @At("RETURN")) + private void skyblocker$onBlockUpdate(BlockUpdateS2CPacket packet, CallbackInfo ci) { + BeaconHighlighter.positions.remove(packet.getPos()); + if(packet.getState().toString().contains("minecraft:beacon")) { + BeaconHighlighter.positions.add(packet.getPos()); + } + } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java index 0da5cc97..98929e7c 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java @@ -1,52 +1,24 @@ package de.hysky.skyblocker.skyblock.end; import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.utils.Utils; import de.hysky.skyblocker.utils.render.RenderHelper; -import de.hysky.skyblocker.utils.scheduler.Scheduler; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; -import net.minecraft.client.MinecraftClient; import net.minecraft.util.math.BlockPos; import java.util.ArrayList; import java.util.List; public class BeaconHighlighter { - static List pos = new ArrayList<>(); + public static List positions = new ArrayList<>(); /** * Initializes the beacon highlighting system. * `BeaconHighlighter::render` is called after translucent rendering. - * `BeaconHighlighter::update` should be called every 5 ticks. */ public static void init() { WorldRenderEvents.AFTER_TRANSLUCENT.register(BeaconHighlighter::render); - Scheduler.INSTANCE.scheduleCyclic(BeaconHighlighter::update, 5); - } - - /** - * Updates the position of the beacon. - * It checks in a 15 block radius on the X/Z axis, and a ~5 block radius on the Y axis. - * If a beacon is found, `pos` is updated to the beacon's position. - */ - - public static void update() { - var player = MinecraftClient.getInstance().player; - var world = MinecraftClient.getInstance().world; - pos.clear(); - if(player != null && world != null && - SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) { - for(int x = (player.getBlockPos().getX()-15); x { - RenderHelper.renderFilled( - context, - it, - new float[]{1.0f, 0.0f, 0.0f}, - 0.5f, - false - ); - }); + if(Utils.isInTheEnd() && SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) + positions.forEach((it) -> RenderHelper.renderFilled( + context, + it, + new float[]{1.0f, 0.0f, 0.0f}, + 0.5f, + false + )); } } -- cgit From 954ccdb5ef1c0cbe658bfae43edd9cf832854ead Mon Sep 17 00:00:00 2001 From: akarahdev Date: Thu, 18 Jan 2024 15:27:27 -0500 Subject: refactor variable names --- .../mixin/ClientPlayNetworkHandlerMixin.java | 4 ++-- .../skyblocker/skyblock/end/BeaconHighlighter.java | 6 +++--- .../hysky/skyblocker/skyblock/entity/MobGlow.java | 24 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java index 15339c78..9e11e5ff 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java @@ -79,9 +79,9 @@ public abstract class ClientPlayNetworkHandlerMixin { } @Inject(method = "onBlockUpdate", at = @At("RETURN")) private void skyblocker$onBlockUpdate(BlockUpdateS2CPacket packet, CallbackInfo ci) { - BeaconHighlighter.positions.remove(packet.getPos()); + BeaconHighlighter.beaconPositions.remove(packet.getPos()); if(packet.getState().toString().contains("minecraft:beacon")) { - BeaconHighlighter.positions.add(packet.getPos()); + BeaconHighlighter.beaconPositions.add(packet.getPos()); } } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java index 98929e7c..667318a4 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java @@ -11,7 +11,7 @@ import java.util.ArrayList; import java.util.List; public class BeaconHighlighter { - public static List positions = new ArrayList<>(); + public static List beaconPositions = new ArrayList<>(); /** * Initializes the beacon highlighting system. @@ -28,9 +28,9 @@ public class BeaconHighlighter { */ public static void render(WorldRenderContext context) { if(Utils.isInTheEnd() && SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) - positions.forEach((it) -> RenderHelper.renderFilled( + beaconPositions.forEach((position) -> RenderHelper.renderFilled( context, - it, + position, new float[]{1.0f, 0.0f, 0.0f}, 0.5f, false diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index f7fb7a3e..4f789f7b 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -71,22 +71,22 @@ public class MobGlow { if(SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads && entity instanceof ArmorStandEntity) { // check for items in the armor sets - for (net.minecraft.item.ItemStack it : entity.getArmorItems()) { + for (net.minecraft.item.ItemStack armorItem : entity.getArmorItems()) { // hacky way to check if an item is a player head w/o // some shenanigans - if(!it.toString().startsWith("1 player_head")) + if(!armorItem.toString().startsWith("1 player_head")) continue; - if (it.hasNbt()) { - assert it.getNbt() != null; + if (armorItem.hasNbt()) { + assert armorItem.getNbt() != null; // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id // for the nukekubi head, compare against it to exclusively find // armorstands that are nukekubi heads - if (it.getNbt().contains("SkullOwner")) { + if (armorItem.getNbt().contains("SkullOwner")) { // get the texture of the nukekubi head item itself and // compare it - var texture = it + var texture = armorItem .getNbt() .getCompound("SkullOwner") .getCompound("Properties") @@ -125,22 +125,22 @@ public class MobGlow { // copypaste nukekebi head logic if(entity instanceof ArmorStandEntity) { - for (net.minecraft.item.ItemStack it : entity.getArmorItems()) { + for (net.minecraft.item.ItemStack armorItem : entity.getArmorItems()) { // hacky way to check if an item is a player head w/o // some shenanigans - if(!it.toString().startsWith("1 player_head")) + if(!armorItem.toString().startsWith("1 player_head")) continue; - if (it.hasNbt()) { - assert it.getNbt() != null; + if (armorItem.hasNbt()) { + assert armorItem.getNbt() != null; // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id // for the nukekubi head, compare against it to exclusively find // armorstands that are nukekubi heads - if (it.getNbt().contains("SkullOwner")) { + if (armorItem.getNbt().contains("SkullOwner")) { // get the texture of the nukekebi head item itself and // compare it - var texture = it + var texture = armorItem .getNbt() .getCompound("SkullOwner") .getCompound("Properties") -- cgit From b00506f518135dd4d062a311908e4506390513db Mon Sep 17 00:00:00 2001 From: akarahdev Date: Sat, 20 Jan 2024 15:40:32 -0500 Subject: again! --- .../hysky/skyblocker/config/SkyblockerConfig.java | 1501 ++++++++++---------- .../mixin/ClientPlayNetworkHandlerMixin.java | 11 +- .../skyblocker/skyblock/end/BeaconHighlighter.java | 13 +- .../hysky/skyblocker/skyblock/entity/MobGlow.java | 245 ++-- 4 files changed, 871 insertions(+), 899 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index b8606b87..5cc0f1b8 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -17,1008 +17,997 @@ import java.util.ArrayList; import java.util.List; public class SkyblockerConfig { - @SerialEntry - public int version = 1; - - @SerialEntry - public General general = new General(); - - @SerialEntry - public Locations locations = new Locations(); - - @SerialEntry - public Slayer slayer = new Slayer(); - - @SerialEntry - public QuickNav quickNav = new QuickNav(); - - @SerialEntry - public Messages messages = new Messages(); - - @SerialEntry - public RichPresence richPresence = new RichPresence(); - - public static class QuickNav { - @SerialEntry - public boolean enableQuickNav = true; - - @SerialEntry - public QuickNavItem button1 = new QuickNavItem(true, new ItemData("diamond_sword"), "Your Skills", "/skills"); - - @SerialEntry - public QuickNavItem button2 = new QuickNavItem(true, new ItemData("painting"), "Collections", "/collection"); - - /* REGEX Explanation - * "Pets" : simple match on letters - * "(?: \\(\\d+\\/\\d+\\))?" : optional match on the non-capturing group for the page in the format " ($number/$number)" - */ - @SerialEntry - public QuickNavItem button3 = new QuickNavItem(true, new ItemData("bone"), "Pets(:? \\(\\d+\\/\\d+\\))?", "/pets"); - - /* REGEX Explanation - * "Wardrobe" : simple match on letters - * " \\([12]\\/2\\)" : match on the page either " (1/2)" or " (2/2)" - */ - @SerialEntry - public QuickNavItem button4 = new QuickNavItem(true, - new ItemData("leather_chestplate", 1, "tag:{display:{color:8991416}}"), "Wardrobe \\([12]/2\\)", - "/wardrobe"); - - @SerialEntry - public QuickNavItem button5 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-2081424676,-57521078,-2073572414,158072763],Properties:{textures:[{Value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}}}"), - "Sack of Sacks", "/sacks"); - - /* REGEX Explanation - * "(?:Rift )?" : optional match on the non-capturing group "Rift " - * "Storage" : simple match on letters - * "(?: \\([12]\\/2\\))?" : optional match on the non-capturing group " (1/2)" or " (2/2)" - */ - @SerialEntry - public QuickNavItem button6 = new QuickNavItem(true, new ItemData("ender_chest"), - "(?:Rift )?Storage(?: \\(1/2\\))?", "/storage"); - - @SerialEntry - public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), - "none", "/hub"); - - @SerialEntry - public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), - "none", "/warp dungeon_hub"); + @SerialEntry + public int version = 1; + + @SerialEntry + public General general = new General(); + + @SerialEntry + public Locations locations = new Locations(); + + @SerialEntry + public Slayer slayer = new Slayer(); + + @SerialEntry + public QuickNav quickNav = new QuickNav(); + + @SerialEntry + public Messages messages = new Messages(); + + @SerialEntry + public RichPresence richPresence = new RichPresence(); + + public static class QuickNav { + @SerialEntry + public boolean enableQuickNav = true; + + @SerialEntry + public QuickNavItem button1 = new QuickNavItem(true, new ItemData("diamond_sword"), "Your Skills", "/skills"); + + @SerialEntry + public QuickNavItem button2 = new QuickNavItem(true, new ItemData("painting"), "Collections", "/collection"); + + /* REGEX Explanation + * "Pets" : simple match on letters + * "(?: \\(\\d+\\/\\d+\\))?" : optional match on the non-capturing group for the page in the format " ($number/$number)" + */ + @SerialEntry + public QuickNavItem button3 = new QuickNavItem(true, new ItemData("bone"), "Pets(:? \\(\\d+\\/\\d+\\))?", "/pets"); + + /* REGEX Explanation + * "Wardrobe" : simple match on letters + * " \\([12]\\/2\\)" : match on the page either " (1/2)" or " (2/2)" + */ + @SerialEntry + public QuickNavItem button4 = new QuickNavItem(true, + new ItemData("leather_chestplate", 1, "tag:{display:{color:8991416}}"), "Wardrobe \\([12]/2\\)", + "/wardrobe"); + + @SerialEntry + public QuickNavItem button5 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;-2081424676,-57521078,-2073572414,158072763],Properties:{textures:[{Value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}}}"), + "Sack of Sacks", "/sacks"); + + /* REGEX Explanation + * "(?:Rift )?" : optional match on the non-capturing group "Rift " + * "Storage" : simple match on letters + * "(?: \\([12]\\/2\\))?" : optional match on the non-capturing group " (1/2)" or " (2/2)" + */ + @SerialEntry + public QuickNavItem button6 = new QuickNavItem(true, new ItemData("ender_chest"), + "(?:Rift )?Storage(?: \\(1/2\\))?", "/storage"); + + @SerialEntry + public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), + "none", "/hub"); - @SerialEntry - public QuickNavItem button9 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-562285948,532499670,-1705302742,775653035],Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjVkZjU1NTkyNjQzMGQ1ZDc1YWRlZDIxZGQ5NjE5Yjc2YzViN2NhMmM3ZjU0MDE0NDA1MjNkNTNhOGJjZmFhYiJ9fX0=\"}]}}}"), - "Visit prtl", "/visit prtl"); - - @SerialEntry - public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant Item", - "/etable"); + @SerialEntry + public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), + "none", "/warp dungeon_hub"); - @SerialEntry - public QuickNavItem button11 = new QuickNavItem(true, new ItemData("anvil"), "Anvil", "/anvil"); + @SerialEntry + public QuickNavItem button9 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;-562285948,532499670,-1705302742,775653035],Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjVkZjU1NTkyNjQzMGQ1ZDc1YWRlZDIxZGQ5NjE5Yjc2YzViN2NhMmM3ZjU0MDE0NDA1MjNkNTNhOGJjZmFhYiJ9fX0=\"}]}}}"), + "Visit prtl", "/visit prtl"); - @SerialEntry - public QuickNavItem button12 = new QuickNavItem(true, new ItemData("crafting_table"), "Craft Item", "/craft"); - } + @SerialEntry + public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant Item", + "/etable"); - public static class QuickNavItem { - public QuickNavItem(Boolean render, ItemData itemData, String uiTitle, String clickEvent) { - this.render = render; - this.item = itemData; - this.clickEvent = clickEvent; - this.uiTitle = uiTitle; - } + @SerialEntry + public QuickNavItem button11 = new QuickNavItem(true, new ItemData("anvil"), "Anvil", "/anvil"); - @SerialEntry - public Boolean render; + @SerialEntry + public QuickNavItem button12 = new QuickNavItem(true, new ItemData("crafting_table"), "Craft Item", "/craft"); + } - @SerialEntry - public ItemData item; + public static class QuickNavItem { + public QuickNavItem(Boolean render, ItemData itemData, String uiTitle, String clickEvent) { + this.render = render; + this.item = itemData; + this.clickEvent = clickEvent; + this.uiTitle = uiTitle; + } - @SerialEntry - public String uiTitle; + @SerialEntry + public Boolean render; - @SerialEntry - public String clickEvent; - } + @SerialEntry + public ItemData item; - public static class ItemData { - public ItemData(String itemName, int count, String nbt) { - this.itemName = itemName; - this.count = count; - this.nbt = nbt; - } + @SerialEntry + public String uiTitle; - public ItemData(String itemName) { - this.itemName = itemName; - this.count = 1; - this.nbt = ""; - } + @SerialEntry + public String clickEvent; + } - @SerialEntry - public String itemName; + public static class ItemData { + public ItemData(String itemName, int count, String nbt) { + this.itemName = itemName; + this.count = count; + this.nbt = nbt; + } - @SerialEntry - public int count; + public ItemData(String itemName) { + this.itemName = itemName; + this.count = 1; + this.nbt = ""; + } - @SerialEntry - public String nbt; - } + @SerialEntry + public String itemName; - public static class General { - @SerialEntry - public boolean enableTips = true; + @SerialEntry + public int count; - @SerialEntry - public boolean acceptReparty = true; + @SerialEntry + public String nbt; + } - @SerialEntry - public boolean betterPartyFinder = true; + public static class General { + @SerialEntry + public boolean enableTips = true; - @SerialEntry - public boolean backpackPreviewWithoutShift = false; + @SerialEntry + public boolean acceptReparty = true; - @SerialEntry - public boolean compactorDeletorPreview = true; + @SerialEntry + public boolean betterPartyFinder = true; - @SerialEntry - public boolean hideEmptyTooltips = true; + @SerialEntry + public boolean backpackPreviewWithoutShift = false; - @SerialEntry - public boolean hideStatusEffectOverlay = false; - - @SerialEntry - public boolean dontStripSkinAlphaValues = true; + @SerialEntry + public boolean compactorDeletorPreview = true; - @SerialEntry - public TabHudConf tabHud = new TabHudConf(); + @SerialEntry + public boolean hideEmptyTooltips = true; - @SerialEntry - public Bars bars = new Bars(); + @SerialEntry + public boolean hideStatusEffectOverlay = false; - @SerialEntry - public Experiments experiments = new Experiments(); + @SerialEntry + public boolean dontStripSkinAlphaValues = true; - @SerialEntry - public Fishing fishing = new Fishing(); + @SerialEntry + public TabHudConf tabHud = new TabHudConf(); - @SerialEntry - public FairySouls fairySouls = new FairySouls(); + @SerialEntry + public Bars bars = new Bars(); - @SerialEntry - public MythologicalRitual mythologicalRitual = new MythologicalRitual(); + @SerialEntry + public Experiments experiments = new Experiments(); - @SerialEntry - public ItemCooldown itemCooldown = new ItemCooldown(); + @SerialEntry + public Fishing fishing = new Fishing(); - @SerialEntry - public Shortcuts shortcuts = new Shortcuts(); + @SerialEntry + public FairySouls fairySouls = new FairySouls(); - @SerialEntry - public Waypoints waypoints = new Waypoints(); + @SerialEntry + public MythologicalRitual mythologicalRitual = new MythologicalRitual(); - @SerialEntry - public QuiverWarning quiverWarning = new QuiverWarning(); + @SerialEntry + public ItemCooldown itemCooldown = new ItemCooldown(); - @SerialEntry - public ItemList itemList = new ItemList(); + @SerialEntry + public Shortcuts shortcuts = new Shortcuts(); - @SerialEntry - public ItemTooltip itemTooltip = new ItemTooltip(); + @SerialEntry + public Waypoints waypoints = new Waypoints(); - @SerialEntry - public ItemInfoDisplay itemInfoDisplay = new ItemInfoDisplay(); + @SerialEntry + public QuiverWarning quiverWarning = new QuiverWarning(); - @SerialEntry - public WikiLookup wikiLookup = new WikiLookup(); + @SerialEntry + public ItemList itemList = new ItemList(); - @SerialEntry - public ChestValue chestValue = new ChestValue(); + @SerialEntry + public ItemTooltip itemTooltip = new ItemTooltip(); - @SerialEntry - public SpecialEffects specialEffects = new SpecialEffects(); + @SerialEntry + public ItemInfoDisplay itemInfoDisplay = new ItemInfoDisplay(); - @SerialEntry - public Hitbox hitbox = new Hitbox(); + @SerialEntry + public WikiLookup wikiLookup = new WikiLookup(); - @SerialEntry - public TitleContainer titleContainer = new TitleContainer(); + @SerialEntry + public ChestValue chestValue = new ChestValue(); - @SerialEntry - public TeleportOverlay teleportOverlay = new TeleportOverlay(); + @SerialEntry + public SpecialEffects specialEffects = new SpecialEffects(); - @SerialEntry - public FlameOverlay flameOverlay = new FlameOverlay(); + @SerialEntry + public Hitbox hitbox = new Hitbox(); - @SerialEntry - public List lockedSlots = new ArrayList<>(); + @SerialEntry + public TitleContainer titleContainer = new TitleContainer(); - @SerialEntry - public ObjectOpenHashSet protectedItems = new ObjectOpenHashSet<>(); + @SerialEntry + public TeleportOverlay teleportOverlay = new TeleportOverlay(); - @SerialEntry - public Object2ObjectOpenHashMap customItemNames = new Object2ObjectOpenHashMap<>(); + @SerialEntry + public FlameOverlay flameOverlay = new FlameOverlay(); - @SerialEntry - public Object2IntOpenHashMap customDyeColors = new Object2IntOpenHashMap<>(); + @SerialEntry + public List lockedSlots = new ArrayList<>(); - @SerialEntry - public Object2ObjectOpenHashMap customArmorTrims = new Object2ObjectOpenHashMap<>(); - } + @SerialEntry + public ObjectOpenHashSet protectedItems = new ObjectOpenHashSet<>(); - public static class TabHudConf { - @SerialEntry - public boolean tabHudEnabled = true; + @SerialEntry + public Object2ObjectOpenHashMap customItemNames = new Object2ObjectOpenHashMap<>(); - @SerialEntry - public int tabHudScale = 100; + @SerialEntry + public Object2IntOpenHashMap customDyeColors = new Object2IntOpenHashMap<>(); - @SerialEntry - public boolean plainPlayerNames = false; + @SerialEntry + public Object2ObjectOpenHashMap customArmorTrims = new Object2ObjectOpenHashMap<>(); + } - @SerialEntry - public NameSorting nameSorting = NameSorting.DEFAULT; - } + public static class TabHudConf { + @SerialEntry + public boolean tabHudEnabled = true; - public enum NameSorting { - DEFAULT, ALPHABETICAL; + @SerialEntry + public int tabHudScale = 100; - @Override - public String toString() { - return switch (this) { - case DEFAULT -> "Default"; - case ALPHABETICAL -> "Alphabetical"; - }; - } - } + @SerialEntry + public boolean plainPlayerNames = false; - public static class Bars { - @SerialEntry - public boolean enableBars = true; + @SerialEntry + public NameSorting nameSorting = NameSorting.DEFAULT; + } - @SerialEntry - public BarPositions barPositions = new BarPositions(); - } + public enum NameSorting { + DEFAULT, ALPHABETICAL; - public static class BarPositions { - @SerialEntry - public BarPosition healthBarPosition = BarPosition.LAYER1; + @Override + public String toString() { + return switch (this) { + case DEFAULT -> "Default"; + case ALPHABETICAL -> "Alphabetical"; + }; + } + } - @SerialEntry - public BarPosition manaBarPosition = BarPosition.LAYER1; + public static class Bars { + @SerialEntry + public boolean enableBars = true; - @SerialEntry - public BarPosition defenceBarPosition = BarPosition.LAYER1; + @SerialEntry + public BarPositions barPositions = new BarPositions(); + } - @SerialEntry - public BarPosition experienceBarPosition = BarPosition.LAYER1; + public static class BarPositions { + @SerialEntry + public BarPosition healthBarPosition = BarPosition.LAYER1; - } + @SerialEntry + public BarPosition manaBarPosition = BarPosition.LAYER1; - public enum BarPosition { - LAYER1, LAYER2, RIGHT, NONE; + @SerialEntry + public BarPosition defenceBarPosition = BarPosition.LAYER1; - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.general.bars.barpositions." + name()); - } + @SerialEntry + public BarPosition experienceBarPosition = BarPosition.LAYER1; - public int toInt() { - return switch (this) { - case LAYER1 -> 0; - case LAYER2 -> 1; - case RIGHT -> 2; - case NONE -> -1; - }; - } - } + } - public static class Experiments { - @SerialEntry - public boolean enableChronomatronSolver = true; + public enum BarPosition { + LAYER1, LAYER2, RIGHT, NONE; - @SerialEntry - public boolean enableSuperpairsSolver = true; + @Override + public String toString() { + return I18n.translate("text.autoconfig.skyblocker.option.general.bars.barpositions." + name()); + } - @SerialEntry - public boolean enableUltrasequencerSolver = true; - } + public int toInt() { + return switch (this) { + case LAYER1 -> 0; + case LAYER2 -> 1; + case RIGHT -> 2; + case NONE -> -1; + }; + } + } - public static class Fishing { - @SerialEntry - public boolean enableFishingHelper = true; - } + public static class Experiments { + @SerialEntry + public boolean enableChronomatronSolver = true; - public static class FairySouls { - @SerialEntry - public boolean enableFairySoulsHelper = false; + @SerialEntry + public boolean enableSuperpairsSolver = true; - @SerialEntry - public boolean highlightFoundSouls = true; + @SerialEntry + public boolean enableUltrasequencerSolver = true; + } - @SerialEntry - public boolean highlightOnlyNearbySouls = false; - } + public static class Fishing { + @SerialEntry + public boolean enableFishingHelper = true; + } - public static class MythologicalRitual { - @SerialEntry - public boolean enableMythologicalRitualHelper = true; - } + public static class FairySouls { + @SerialEntry + public boolean enableFairySoulsHelper = false; - public static class ItemCooldown { - @SerialEntry - public boolean enableItemCooldowns = true; - } + @SerialEntry + public boolean highlightFoundSouls = true; - public static class Shortcuts { - @SerialEntry - public boolean enableShortcuts = true; - - @SerialEntry - public boolean enableCommandShortcuts = true; - - @SerialEntry - public boolean enableCommandArgShortcuts = true; - } - - public static class Waypoints { - @SerialEntry - public boolean enableWaypoints = true; - - @SerialEntry - public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; - } + @SerialEntry + public boolean highlightOnlyNearbySouls = false; + } - public static class QuiverWarning { - @SerialEntry - public boolean enableQuiverWarning = true; + public static class MythologicalRitual { + @SerialEntry + public boolean enableMythologicalRitualHelper = true; + } - @SerialEntry - public boolean enableQuiverWarningInDungeons = true; + public static class ItemCooldown { + @SerialEntry + public boolean enableItemCooldowns = true; + } - @SerialEntry - public boolean enableQuiverWarningAfterDungeon = true; - } + public static class Shortcuts { + @SerialEntry + public boolean enableShortcuts = true; + + @SerialEntry + public boolean enableCommandShortcuts = true; + + @SerialEntry + public boolean enableCommandArgShortcuts = true; + } + + public static class Waypoints { + @SerialEntry + public boolean enableWaypoints = true; + + @SerialEntry + public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; + } - public static class Hitbox { - @SerialEntry - public boolean oldFarmlandHitbox = false; + public static class QuiverWarning { + @SerialEntry + public boolean enableQuiverWarning = true; - @SerialEntry - public boolean oldLeverHitbox = false; - } - - public static class TitleContainer { - @SerialEntry - public float titleContainerScale = 100; - - @SerialEntry - public int x = 540; - - @SerialEntry - public int y = 10; - - @SerialEntry - public Direction direction = Direction.HORIZONTAL; - - @SerialEntry - public Alignment alignment = Alignment.MIDDLE; - } + @SerialEntry + public boolean enableQuiverWarningInDungeons = true; - public static class TeleportOverlay { - @SerialEntry - public boolean enableTeleportOverlays = true; + @SerialEntry + public boolean enableQuiverWarningAfterDungeon = true; + } - @SerialEntry - public boolean enableWeirdTransmission = true; + public static class Hitbox { + @SerialEntry + public boolean oldFarmlandHitbox = false; - @SerialEntry - public boolean enableInstantTransmission = true; + @SerialEntry + public boolean oldLeverHitbox = false; + } + + public static class TitleContainer { + @SerialEntry + public float titleContainerScale = 100; + + @SerialEntry + public int x = 540; + + @SerialEntry + public int y = 10; + + @SerialEntry + public Direction direction = Direction.HORIZONTAL; + + @SerialEntry + public Alignment alignment = Alignment.MIDDLE; + } - @SerialEntry - public boolean enableEtherTransmission = true; + public static class TeleportOverlay { + @SerialEntry + public boolean enableTeleportOverlays = true; - @SerialEntry - public boolean enableSinrecallTransmission = true; + @SerialEntry + public boolean enableWeirdTransmission = true; - @SerialEntry - public boolean enableWitherImpact = true; - } + @SerialEntry + public boolean enableInstantTransmission = true; - public static class FlameOverlay { - @SerialEntry - public float flameHeight = 0f; + @SerialEntry + public boolean enableEtherTransmission = true; - @SerialEntry - public float flameOpacity = 0f; - } + @SerialEntry + public boolean enableSinrecallTransmission = true; - public enum Direction { - HORIZONTAL, VERTICAL; + @SerialEntry + public boolean enableWitherImpact = true; + } - @Override - public String toString() { - return switch (this) { - case HORIZONTAL -> "Horizontal"; - case VERTICAL -> "Vertical"; - }; - } - } + public static class FlameOverlay { + @SerialEntry + public float flameHeight = 0f; - public enum Alignment { - LEFT, RIGHT, MIDDLE; + @SerialEntry + public float flameOpacity = 0f; + } - @Override - public String toString() { - return switch (this) { - case LEFT -> "Left"; - case RIGHT -> "Right"; - case MIDDLE -> "Middle"; - }; - } - } + public enum Direction { + HORIZONTAL, VERTICAL; - public static class RichPresence { - @SerialEntry - public boolean enableRichPresence = false; + @Override + public String toString() { + return switch (this) { + case HORIZONTAL -> "Horizontal"; + case VERTICAL -> "Vertical"; + }; + } + } - @SerialEntry - public Info info = Info.LOCATION; + public enum Alignment { + LEFT, RIGHT, MIDDLE; - @SerialEntry - public boolean cycleMode = false; + @Override + public String toString() { + return switch (this) { + case LEFT -> "Left"; + case RIGHT -> "Right"; + case MIDDLE -> "Middle"; + }; + } + } - @SerialEntry - public String customMessage = "Playing Skyblock"; - } + public static class RichPresence { + @SerialEntry + public boolean enableRichPresence = false; - public static class ItemList { - @SerialEntry - public boolean enableItemList = true; - } + @SerialEntry + public Info info = Info.LOCATION; - public enum Average { - ONE_DAY, THREE_DAY, BOTH; + @SerialEntry + public boolean cycleMode = false; - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.general.itemTooltip.avg." + name()); - } - } + @SerialEntry + public String customMessage = "Playing Skyblock"; + } - public static class ItemTooltip { - @SerialEntry - public boolean enableNPCPrice = true; + public static class ItemList { + @SerialEntry + public boolean enableItemList = true; + } - @SerialEntry - public boolean enableMotesPrice = true; + public enum Average { + ONE_DAY, THREE_DAY, BOTH; - @SerialEntry - public boolean enableAvgBIN = true; + @Override + public String toString() { + return I18n.translate("text.autoconfig.skyblocker.option.general.itemTooltip.avg." + name()); + } + } - @SerialEntry - public Average avg = Average.THREE_DAY; + public static class ItemTooltip { + @SerialEntry + public boolean enableNPCPrice = true; - @SerialEntry - public boolean enableLowestBIN = true; + @SerialEntry + public boolean enableMotesPrice = true; - @SerialEntry - public boolean enableBazaarPrice = true; + @SerialEntry + public boolean enableAvgBIN = true; - @SerialEntry - public boolean enableObtainedDate = true; + @SerialEntry + public Average avg = Average.THREE_DAY; - @SerialEntry - public boolean enableMuseumInfo = true; + @SerialEntry + public boolean enableLowestBIN = true; - @SerialEntry - public boolean enableExoticTooltip = true; - } + @SerialEntry + public boolean enableBazaarPrice = true; - public static class ItemInfoDisplay { - @SerialEntry - public boolean attributeShardInfo = true; + @SerialEntry + public boolean enableObtainedDate = true; - @SerialEntry - public boolean itemRarityBackgrounds = false; + @SerialEntry + public boolean enableMuseumInfo = true; - @SerialEntry - public RarityBackgroundStyle itemRarityBackgroundStyle = RarityBackgroundStyle.CIRCULAR; + @SerialEntry + public boolean enableExoticTooltip = true; + } - @SerialEntry - public float itemRarityBackgroundsOpacity = 1f; - } + public static class ItemInfoDisplay { + @SerialEntry + public boolean attributeShardInfo = true; - public enum RarityBackgroundStyle { - CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), - SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); + @SerialEntry + public boolean itemRarityBackgrounds = false; - public final Identifier tex; + @SerialEntry + public RarityBackgroundStyle itemRarityBackgroundStyle = RarityBackgroundStyle.CIRCULAR; - RarityBackgroundStyle(Identifier tex) { - this.tex = tex; - } + @SerialEntry + public float itemRarityBackgroundsOpacity = 1f; + } - @Override - public String toString() { - return switch (this) { - case CIRCULAR -> "Circular"; - case SQUARE -> "Square"; - }; - } - } + public enum RarityBackgroundStyle { + CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), + SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); - public static class WikiLookup { - @SerialEntry - public boolean enableWikiLookup = true; + public final Identifier tex; - @SerialEntry - public boolean officialWiki = false; - } + RarityBackgroundStyle(Identifier tex) { + this.tex = tex; + } - public static class ChestValue { - @SerialEntry - public boolean enableChestValue = true; + @Override + public String toString() { + return switch (this) { + case CIRCULAR -> "Circular"; + case SQUARE -> "Square"; + }; + } + } - @SerialEntry - public Formatting color = Formatting.DARK_GREEN; + public static class WikiLookup { + @SerialEntry + public boolean enableWikiLookup = true; - @SerialEntry - public Formatting incompleteColor = Formatting.BLUE; - } + @SerialEntry + public boolean officialWiki = false; + } - public static class SpecialEffects { - @SerialEntry - public boolean rareDungeonDropEffects = true; - } + public static class ChestValue { + @SerialEntry + public boolean enableChestValue = true; - public static class Locations { - @SerialEntry - public Barn barn = new Barn(); + @SerialEntry + public Formatting color = Formatting.DARK_GREEN; - @SerialEntry - public Dungeons dungeons = new Dungeons(); + @SerialEntry + public Formatting incompleteColor = Formatting.BLUE; + } - @SerialEntry - public DwarvenMines dwarvenMines = new DwarvenMines(); + public static class SpecialEffects { + @SerialEntry + public boolean rareDungeonDropEffects = true; + } - @SerialEntry - public Rift rift = new Rift(); + public static class Locations { + @SerialEntry + public Barn barn = new Barn(); - @SerialEntry - public SpidersDen spidersDen = new SpidersDen(); - } + @SerialEntry + public Dungeons dungeons = new Dungeons(); - public static class Dungeons { - @SerialEntry - public SecretWaypoints secretWaypoints = new SecretWaypoints(); + @SerialEntry + public DwarvenMines dwarvenMines = new DwarvenMines(); - @SerialEntry - public DoorHighlight doorHighlight = new DoorHighlight(); + @SerialEntry + public Rift rift = new Rift(); - @SerialEntry - public DungeonScore dungeonScore = new DungeonScore(); + @SerialEntry + public SpidersDen spidersDen = new SpidersDen(); + } - @SerialEntry - public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); + public static class Dungeons { + @SerialEntry + public SecretWaypoints secretWaypoints = new SecretWaypoints(); - @SerialEntry - public MimicMessage mimicMessage = new MimicMessage(); + @SerialEntry + public DoorHighlight doorHighlight = new DoorHighlight(); - @SerialEntry - public boolean croesusHelper = true; + @SerialEntry + public DungeonScore dungeonScore = new DungeonScore(); - @SerialEntry - public boolean enableMap = true; + @SerialEntry + public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); - @SerialEntry - public float mapScaling = 1f; + @SerialEntry + public MimicMessage mimicMessage = new MimicMessage(); - @SerialEntry - public int mapX = 2; + @SerialEntry + public boolean croesusHelper = true; - @SerialEntry - public int mapY = 2; + @SerialEntry + public boolean enableMap = true; - @SerialEntry - public boolean playerSecretsTracker = false; + @SerialEntry + public float mapScaling = 1f; - @SerialEntry - public boolean starredMobGlow = true; + @SerialEntry + public int mapX = 2; - @SerialEntry - public boolean solveThreeWeirdos = true; + @SerialEntry + public int mapY = 2; - @SerialEntry - public boolean blazeSolver = true; + @SerialEntry + public boolean playerSecretsTracker = false; - @SerialEntry - public boolean creeperSolver = true; + @SerialEntry + public boolean starredMobGlow = true; - @SerialEntry - public boolean solveTrivia = true; + @SerialEntry + public boolean solveThreeWeirdos = true; - @SerialEntry - public boolean solveTicTacToe = true; + @SerialEntry + public boolean blazeSolver = true; - @SerialEntry - public boolean solveWaterboard = true; + @SerialEntry + public boolean creeperSolver = true; - @SerialEntry - public boolean fireFreezeStaffTimer = true; + @SerialEntry + public boolean solveTrivia = true; - @SerialEntry - public boolean floor3GuardianHealthDisplay = true; + @SerialEntry + public boolean solveTicTacToe = true; - @SerialEntry - public boolean allowDroppingProtectedItems = false; + @SerialEntry + public boolean solveWaterboard = true; - @SerialEntry - public LividColor lividColor = new LividColor(); + @SerialEntry + public boolean fireFreezeStaffTimer = true; - @SerialEntry - public Terminals terminals = new Terminals(); - } + @SerialEntry + public boolean floor3GuardianHealthDisplay = true; - public static class SecretWaypoints { - @SerialEntry - public boolean enableRoomMatching = true; + @SerialEntry + public boolean allowDroppingProtectedItems = false; - @SerialEntry - public boolean enableSecretWaypoints = true; + @SerialEntry + public LividColor lividColor = new LividColor(); - @SerialEntry - public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; + @SerialEntry + public Terminals terminals = new Terminals(); + } - @SerialEntry - public boolean showSecretText = true; + public static class SecretWaypoints { + @SerialEntry + public boolean enableRoomMatching = true; - @SerialEntry - public boolean enableEntranceWaypoints = true; + @SerialEntry + public boolean enableSecretWaypoints = true; - @SerialEntry - public boolean enableSuperboomWaypoints = true; + @SerialEntry + public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; - @SerialEntry - public boolean enableChestWaypoints = true; + @SerialEntry + public boolean showSecretText = true; - @SerialEntry - public boolean enableItemWaypoints = true; + @SerialEntry + public boolean enableEntranceWaypoints = true; - @SerialEntry - public boolean enableBatWaypoints = true; + @SerialEntry + public boolean enableSuperboomWaypoints = true; - @SerialEntry - public boolean enableWitherWaypoints = true; + @SerialEntry + public boolean enableChestWaypoints = true; - @SerialEntry - public boolean enableLeverWaypoints = true; + @SerialEntry + public boolean enableItemWaypoints = true; - @SerialEntry - public boolean enableFairySoulWaypoints = true; + @SerialEntry + public boolean enableBatWaypoints = true; - @SerialEntry - public boolean enableStonkWaypoints = true; + @SerialEntry + public boolean enableWitherWaypoints = true; - @SerialEntry - public boolean enableAotvWaypoints = true; + @SerialEntry + public boolean enableLeverWaypoints = true; - @SerialEntry - public boolean enablePearlWaypoints = true; + @SerialEntry + public boolean enableFairySoulWaypoints = true; - @SerialEntry - public boolean enableDefaultWaypoints = true; - } + @SerialEntry + public boolean enableStonkWaypoints = true; - public static class DoorHighlight { - @SerialEntry - public boolean enableDoorHighlight = true; + @SerialEntry + public boolean enableAotvWaypoints = true; - @SerialEntry - public Type doorHighlightType = Type.OUTLINED_HIGHLIGHT; + @SerialEntry + public boolean enablePearlWaypoints = true; - public enum Type { - HIGHLIGHT, - OUTLINED_HIGHLIGHT, - OUTLINE; + @SerialEntry + public boolean enableDefaultWaypoints = true; + } - @Override - public String toString() { - return switch (this) { - case HIGHLIGHT -> "Highlight"; - case OUTLINED_HIGHLIGHT -> "Outlined Highlight"; - case OUTLINE -> "Outline"; - }; - } - } - } + public static class DoorHighlight { + @SerialEntry + public boolean enableDoorHighlight = true; - public static class DungeonScore { - @SerialEntry - public boolean enableDungeonScore270Message = false; + @SerialEntry + public Type doorHighlightType = Type.OUTLINED_HIGHLIGHT; - @SerialEntry - public boolean enableDungeonScore270Title = false; + public enum Type { + HIGHLIGHT, + OUTLINED_HIGHLIGHT, + OUTLINE; - @SerialEntry - public boolean enableDungeonScore270Sound = false; + @Override + public String toString() { + return switch (this) { + case HIGHLIGHT -> "Highlight"; + case OUTLINED_HIGHLIGHT -> "Outlined Highlight"; + case OUTLINE -> "Outline"; + }; + } + } + } - @SerialEntry - public String dungeonScore270Message = "270 Score Reached!"; + public static class DungeonScore { + @SerialEntry + public boolean enableDungeonScore270Message = false; - @SerialEntry - public boolean enableDungeonScore300Message = true; + @SerialEntry + public boolean enableDungeonScore270Title = false; - @SerialEntry - public boolean enableDungeonScore300Title = true; + @SerialEntry + public boolean enableDungeonScore270Sound = false; - @SerialEntry - public boolean enableDungeonScore300Sound = true; + @SerialEntry + public String dungeonScore270Message = "270 Score Reached!"; - @SerialEntry - public String dungeonScore300Message = "300 Score Reached!"; + @SerialEntry + public boolean enableDungeonScore300Message = true; - @SerialEntry - public boolean enableScoreHUD = true; + @SerialEntry + public boolean enableDungeonScore300Title = true; - @SerialEntry - public int scoreX = 29; + @SerialEntry + public boolean enableDungeonScore300Sound = true; - @SerialEntry - public int scoreY = 134; + @SerialEntry + public String dungeonScore300Message = "300 Score Reached!"; - @SerialEntry - public float scoreScaling = 1f; - } + @SerialEntry + public boolean enableScoreHUD = true; - public static class DungeonChestProfit { - @SerialEntry - public boolean enableProfitCalculator = true; + @SerialEntry + public int scoreX = 29; - @SerialEntry - public boolean includeKismet = false; + @SerialEntry + public int scoreY = 134; - @SerialEntry - public boolean includeEssence = true; + @SerialEntry + public float scoreScaling = 1f; + } - @SerialEntry - public int neutralThreshold = 1000; + public static class DungeonChestProfit { + @SerialEntry + public boolean enableProfitCalculator = true; - @SerialEntry - public Formatting neutralColor = Formatting.DARK_GRAY; + @SerialEntry + public boolean includeKismet = false; - @SerialEntry - public Formatting profitColor = Formatting.DARK_GREEN; + @SerialEntry + public boolean includeEssence = true; - @SerialEntry - public Formatting lossColor = Formatting.RED; + @SerialEntry + public int neutralThreshold = 1000; - @SerialEntry - public Formatting incompleteColor = Formatting.BLUE; - } + @SerialEntry + public Formatting neutralColor = Formatting.DARK_GRAY; - public static class MimicMessage { - @SerialEntry - public boolean sendMimicMessage = true; + @SerialEntry + public Formatting profitColor = Formatting.DARK_GREEN; - @SerialEntry - public String mimicMessage = "Mimic dead!"; - } + @SerialEntry + public Formatting lossColor = Formatting.RED; - public static class LividColor { - @SerialEntry - public boolean enableLividColorGlow = true; + @SerialEntry + public Formatting incompleteColor = Formatting.BLUE; + } - @SerialEntry - public boolean enableLividColorText = true; + public static class MimicMessage { + @SerialEntry + public boolean sendMimicMessage = true; - @SerialEntry - public boolean enableLividColorTitle = true; + @SerialEntry + public String mimicMessage = "Mimic dead!"; + } - @SerialEntry - public String lividColorText = "The livid color is [color]"; - } + public static class LividColor { + @SerialEntry + public boolean enableLividColorGlow = true; - public static class Terminals { - @SerialEntry - public boolean solveColor = true; + @SerialEntry + public boolean enableLividColorText = true; - @SerialEntry - public boolean solveOrder = true; + @SerialEntry + public boolean enableLividColorTitle = true; - @SerialEntry - public boolean solveStartsWith = true; - } + @SerialEntry + public String lividColorText = "The livid color is [color]"; + } - public static class DwarvenMines { - @SerialEntry - public boolean enableDrillFuel = true; + public static class Terminals { + @SerialEntry + public boolean solveColor = true; - @SerialEntry - public boolean solveFetchur = true; + @SerialEntry + public boolean solveOrder = true; - @SerialEntry - public boolean solvePuzzler = true; + @SerialEntry + public boolean solveStartsWith = true; + } - @SerialEntry - public DwarvenHud dwarvenHud = new DwarvenHud(); - } + public static class DwarvenMines { + @SerialEntry + public boolean enableDrillFuel = true; - public static class DwarvenHud { - @SerialEntry - public boolean enabled = true; + @SerialEntry + public boolean solveFetchur = true; - @SerialEntry - public DwarvenHudStyle style = DwarvenHudStyle.SIMPLE; + @SerialEntry + public boolean solvePuzzler = true; - @SerialEntry - public boolean enableBackground = true; + @SerialEntry + public DwarvenHud dwarvenHud = new DwarvenHud(); + } - @SerialEntry - public int x = 10; + public static class DwarvenHud { + @SerialEntry + public boolean enabled = true; - @SerialEntry - public int y = 10; - } + @SerialEntry + public DwarvenHudStyle style = DwarvenHudStyle.SIMPLE; - public enum DwarvenHudStyle { - SIMPLE, FANCY, CLASSIC; + @SerialEntry + public boolean enableBackground = true; - @Override - public String toString() { - return switch (this) { - case SIMPLE -> "Simple"; - case FANCY -> "Fancy"; - case CLASSIC -> "Classic"; - }; - } - } + @SerialEntry + public int x = 10; - public static class Barn { - @SerialEntry - public boolean solveHungryHiker = true; + @SerialEntry + public int y = 10; + } - @SerialEntry - public boolean solveTreasureHunter = true; - } + public enum DwarvenHudStyle { + SIMPLE, FANCY, CLASSIC; - public static class Rift { - @SerialEntry - public boolean mirrorverseWaypoints = true; + @Override + public String toString() { + return switch (this) { + case SIMPLE -> "Simple"; + case FANCY -> "Fancy"; + case CLASSIC -> "Classic"; + }; + } + } - @SerialEntry - public boolean blobbercystGlow = true; + public static class Barn { + @SerialEntry + public boolean solveHungryHiker = true; - @SerialEntry - public boolean enigmaSoulWaypoints = false; + @SerialEntry + public boolean solveTreasureHunter = true; + } - @SerialEntry - public boolean highlightFoundEnigmaSouls = true; + public static class Rift { + @SerialEntry + public boolean mirrorverseWaypoints = true; - @SerialEntry - public int mcGrubberStacks = 0; - } + @SerialEntry + public boolean blobbercystGlow = true; - public static class SpidersDen { - @SerialEntry - public Relics relics = new Relics(); - } + @SerialEntry + public boolean enigmaSoulWaypoints = false; - public static class Relics { - @SerialEntry - public boolean enableRelicsHelper = false; + @SerialEntry + public boolean highlightFoundEnigmaSouls = true; - @SerialEntry - public boolean highlightFoundRelics = true; - } + @SerialEntry + public int mcGrubberStacks = 0; + } - public static class Slayer { - @SerialEntry - public VampireSlayer vampireSlayer = new VampireSlayer(); + public static class SpidersDen { + @SerialEntry + public Relics relics = new Relics(); + } - @SerialEntry - public EndermanSlayer endermanSlayer = new EndermanSlayer(); - } + public static class Relics { + @SerialEntry + public boolean enableRelicsHelper = false; - public static class EndermanSlayer { - @SerialEntry - public boolean highlightNukekubiHeads = true; + @SerialEntry + public boolean highlightFoundRelics = true; + } - @SerialEntry - public boolean highlightBeacons = true; - } + public static class Slayer { + @SerialEntry + public VampireSlayer vampireSlayer = new VampireSlayer(); + } - public static class VampireSlayer { - @SerialEntry - public boolean enableEffigyWaypoints = true; + public static class VampireSlayer { + @SerialEntry + public boolean enableEffigyWaypoints = true; - @SerialEntry - public boolean compactEffigyWaypoints; + @SerialEntry + public boolean compactEffigyWaypoints; - @SerialEntry - public int effigyUpdateFrequency = 5; + @SerialEntry + public int effigyUpdateFrequency = 5; - @SerialEntry - public boolean enableHolyIceIndicator = true; + @SerialEntry + public boolean enableHolyIceIndicator = true; - @SerialEntry - public int holyIceIndicatorTickDelay = 10; + @SerialEntry + public int holyIceIndicatorTickDelay = 10; - @SerialEntry - public int holyIceUpdateFrequency = 5; + @SerialEntry + public int holyIceUpdateFrequency = 5; - @SerialEntry - public boolean enableHealingMelonIndicator = true; + @SerialEntry + public boolean enableHealingMelonIndicator = true; - @SerialEntry - public float healingMelonHealthThreshold = 4f; + @SerialEntry + public float healingMelonHealthThreshold = 4f; - @SerialEntry - public boolean enableSteakStakeIndicator = true; + @SerialEntry + public boolean enableSteakStakeIndicator = true; - @SerialEntry - public int steakStakeUpdateFrequency = 5; + @SerialEntry + public int steakStakeUpdateFrequency = 5; - @SerialEntry - public boolean enableManiaIndicator = true; + @SerialEntry + public boolean enableManiaIndicator = true; - @SerialEntry - public int maniaUpdateFrequency = 5; - } + @SerialEntry + public int maniaUpdateFrequency = 5; + } - public static class Messages { - @SerialEntry - public ChatFilterResult hideAbility = ChatFilterResult.PASS; + public static class Messages { + @SerialEntry + public ChatFilterResult hideAbility = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideHeal = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideHeal = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideAOTE = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideAOTE = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideImplosion = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideImplosion = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideMoltenWave = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideMoltenWave = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideAds = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideAds = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideTeleportPad = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideTeleportPad = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideCombo = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideCombo = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideAutopet = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideAutopet = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideShowOff = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideShowOff = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideToggleSkyMall = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideToggleSkyMall = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideMimicKill = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideMimicKill = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideDeath = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideDeath = ChatFilterResult.PASS; - @SerialEntry - public boolean hideMana = false; - } + @SerialEntry + public boolean hideMana = false; + } - public enum Info { - PURSE, BITS, LOCATION; + public enum Info { + PURSE, BITS, LOCATION; - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.richPresence.info." + name()); - } - } + @Override + public String toString() { + return I18n.translate("text.autoconfig.skyblocker.option.richPresence.info." + name()); + } + } } diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java index 9e11e5ff..738c2165 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java @@ -3,11 +3,13 @@ package de.hysky.skyblocker.mixin; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.WrapWithCondition; import com.llamalad7.mixinextras.sugar.Local; +import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.skyblock.FishingHelper; import de.hysky.skyblocker.skyblock.dungeon.DungeonScore; import de.hysky.skyblocker.skyblock.dungeon.secrets.DungeonManager; import de.hysky.skyblocker.skyblock.end.BeaconHighlighter; import de.hysky.skyblocker.skyblock.waypoint.MythologicalRitual; +import de.hysky.skyblocker.utils.SlayerUtils; import de.hysky.skyblocker.utils.Utils; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayNetworkHandler; @@ -79,9 +81,12 @@ public abstract class ClientPlayNetworkHandlerMixin { } @Inject(method = "onBlockUpdate", at = @At("RETURN")) private void skyblocker$onBlockUpdate(BlockUpdateS2CPacket packet, CallbackInfo ci) { - BeaconHighlighter.beaconPositions.remove(packet.getPos()); - if(packet.getState().toString().contains("minecraft:beacon")) { - BeaconHighlighter.beaconPositions.add(packet.getPos()); + if(Utils.isInTheEnd() && SlayerUtils.isInSlayer()) { + BeaconHighlighter.beaconPositions.remove(packet.getPos()); + if(packet.getState().toString().contains("minecraft:beacon")) { + BeaconHighlighter.beaconPositions.add(packet.getPos()); + } } + } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java index 667318a4..65e9e639 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java @@ -24,16 +24,17 @@ public class BeaconHighlighter { /** * Renders the beacon glow around it. It is rendered in a red color with 50% opacity, and * is visible through walls. + * * @param context An instance of WorldRenderContext for the RenderHelper to use */ public static void render(WorldRenderContext context) { - if(Utils.isInTheEnd() && SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) + if (Utils.isInTheEnd() && SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) beaconPositions.forEach((position) -> RenderHelper.renderFilled( - context, - position, - new float[]{1.0f, 0.0f, 0.0f}, - 0.5f, - false + context, + position, + new float[]{1.0f, 0.0f, 0.0f}, + 0.5f, + false )); } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index 4f789f7b..65ed9c03 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -13,6 +13,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.entity.passive.BatEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; import net.minecraft.nbt.NbtElement; import net.minecraft.predicate.entity.EntityPredicates; import net.minecraft.util.Formatting; @@ -23,139 +24,115 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MobGlow { - public static boolean shouldMobGlow(Entity entity) { - Box box = entity.getBoundingBox(); - - if (!entity.isInvisible() && OcclusionCulling.getReducedCuller().isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) { - String name = entity.getName().getString(); - - // Dungeons - if (Utils.isInDungeons()) { - - // Minibosses - if (entity instanceof PlayerEntity) { - switch (name) { - case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", - "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": return LividColor.shouldGlow(name); - } - } - - // Regular Mobs - if (!(entity instanceof ArmorStandEntity)) { - List armorStands = getArmorStands(entity.getWorld(), box); - - if (!armorStands.isEmpty() && armorStands.get(0).getName().getString().contains("✯")) return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - } - - // Bats - return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow && entity instanceof BatEntity; - } - - // Rift - if (Utils.isInTheRift()) { - if (entity instanceof PlayerEntity) { - switch (name) { - // They have a space in their name for some reason... - case "Blobbercyst ": return SkyblockerConfigManager.get().locations.rift.blobbercystGlow; - } - } - } - - - - } - - // Enderman Slayer - // Highlights Nukekubi Heads - if(SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads - && entity instanceof ArmorStandEntity) { - // check for items in the armor sets - for (net.minecraft.item.ItemStack armorItem : entity.getArmorItems()) { - // hacky way to check if an item is a player head w/o - // some shenanigans - if(!armorItem.toString().startsWith("1 player_head")) - continue; - - - if (armorItem.hasNbt()) { - assert armorItem.getNbt() != null; - // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id - // for the nukekubi head, compare against it to exclusively find - // armorstands that are nukekubi heads - if (armorItem.getNbt().contains("SkullOwner")) { - // get the texture of the nukekubi head item itself and - // compare it - var texture = armorItem - .getNbt() - .getCompound("SkullOwner") - .getCompound("Properties") - .getList("textures", NbtElement.COMPOUND_TYPE) - .getCompound(0) - .getString("Value"); - - return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); - - } - } - } - } - - return false; - } - - private static List getArmorStands(World world, Box box) { + public static boolean shouldMobGlow(Entity entity) { + Box box = entity.getBoundingBox(); + + if (!entity.isInvisible() && OcclusionCulling.getReducedCuller().isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) { + String name = entity.getName().getString(); + + // Dungeons + if (Utils.isInDungeons()) { + + // Minibosses + if (entity instanceof PlayerEntity) { + switch (name) { + case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": + return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; + case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", + "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": + return LividColor.shouldGlow(name); + } + } + + // Regular Mobs + if (!(entity instanceof ArmorStandEntity)) { + List armorStands = getArmorStands(entity.getWorld(), box); + + if (!armorStands.isEmpty() && armorStands.get(0).getName().getString().contains("✯")) + return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; + } + + // Bats + return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow && entity instanceof BatEntity; + } + + // Rift + if (Utils.isInTheRift()) { + if (entity instanceof PlayerEntity) { + switch (name) { + // They have a space in their name for some reason... + case "Blobbercyst ": + return SkyblockerConfigManager.get().locations.rift.blobbercystGlow; + } + } + } + + + } + + // Enderman Slayer + // Highlights Nukekubi Heads + return SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads + && entity instanceof ArmorStandEntity + && isNukekubiHead((ArmorStandEntity) entity); + } + + private static boolean isNukekubiHead(ArmorStandEntity entity) { + for (ItemStack armorItem : entity.getArmorItems()) { + // hacky way to check if an item is a player head w/o + // some shenanigans + if (!armorItem.toString().startsWith("1 player_head")) + continue; + + if (armorItem.hasNbt()) { + assert armorItem.getNbt() != null; + // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id + // for the nukekubi head, compare against it to exclusively find + // armorstands that are nukekubi heads + if (armorItem.getNbt().contains("SkullOwner")) { + // get the texture of the nukekubi head item itself and + // compare it + var texture = armorItem + .getNbt() + .getCompound("SkullOwner") + .getCompound("Properties") + .getList("textures", NbtElement.COMPOUND_TYPE) + .getCompound(0) + .getString("Value"); + + return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); + + } + } + } + return false; + } + + private static List getArmorStands(World world, Box box) { return world.getEntitiesByClass(ArmorStandEntity.class, box.expand(0, 2, 0), EntityPredicates.NOT_MOUNTED); - } - - public static int getGlowColor(Entity entity) { - String name = entity.getName().getString(); - - if (entity instanceof PlayerEntity) { - return switch (name) { - case "Lost Adventurer" -> 0xfee15c; - case "Shadow Assassin" -> 0x5b2cb2; - case "Diamond Guy" -> 0x57c2f7; - case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", - "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid" -> LividColor.getGlowColor(name); - case "Blobbercyst " -> Formatting.GREEN.getColorValue(); - default -> 0xf57738; - }; - } - - // copypaste nukekebi head logic - if(entity instanceof ArmorStandEntity) { - for (net.minecraft.item.ItemStack armorItem : entity.getArmorItems()) { - // hacky way to check if an item is a player head w/o - // some shenanigans - if(!armorItem.toString().startsWith("1 player_head")) - continue; - - - if (armorItem.hasNbt()) { - assert armorItem.getNbt() != null; - // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id - // for the nukekubi head, compare against it to exclusively find - // armorstands that are nukekubi heads - if (armorItem.getNbt().contains("SkullOwner")) { - // get the texture of the nukekebi head item itself and - // compare it - var texture = armorItem - .getNbt() - .getCompound("SkullOwner") - .getCompound("Properties") - .getList("textures", NbtElement.COMPOUND_TYPE) - .getCompound(0) - .getString("Value"); - - if(texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0=")) { - return 0x990099; - } - } - } - } - } - - return 0xf57738; - } + } + + public static int getGlowColor(Entity entity) { + String name = entity.getName().getString(); + + if (entity instanceof PlayerEntity) { + return switch (name) { + case "Lost Adventurer" -> 0xfee15c; + case "Shadow Assassin" -> 0x5b2cb2; + case "Diamond Guy" -> 0x57c2f7; + case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", + "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid" -> + LividColor.getGlowColor(name); + case "Blobbercyst " -> Formatting.GREEN.getColorValue(); + default -> 0xf57738; + }; + } + + // copypaste nukekebi head logic + if (entity instanceof ArmorStandEntity && isNukekubiHead((ArmorStandEntity) entity)) { + return 0x990099; + } + + return 0xf57738; + } } -- cgit From b5b11b31e2d9ed911c6a740e15160982bcd1f71f Mon Sep 17 00:00:00 2001 From: akarahdev Date: Sat, 20 Jan 2024 15:48:55 -0500 Subject: adsjsjak --- .../hysky/skyblocker/config/SkyblockerConfig.java | 1358 ++++++++++---------- 1 file changed, 712 insertions(+), 646 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 5cc0f1b8..7d5c08d8 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -17,43 +17,43 @@ import java.util.ArrayList; import java.util.List; public class SkyblockerConfig { - @SerialEntry - public int version = 1; + @SerialEntry + public int version = 1; - @SerialEntry - public General general = new General(); + @SerialEntry + public General general = new General(); - @SerialEntry - public Locations locations = new Locations(); + @SerialEntry + public Locations locations = new Locations(); - @SerialEntry - public Slayer slayer = new Slayer(); + @SerialEntry + public Slayer slayer = new Slayer(); - @SerialEntry - public QuickNav quickNav = new QuickNav(); + @SerialEntry + public QuickNav quickNav = new QuickNav(); - @SerialEntry - public Messages messages = new Messages(); + @SerialEntry + public Messages messages = new Messages(); - @SerialEntry - public RichPresence richPresence = new RichPresence(); + @SerialEntry + public RichPresence richPresence = new RichPresence(); - public static class QuickNav { - @SerialEntry - public boolean enableQuickNav = true; + public static class QuickNav { + @SerialEntry + public boolean enableQuickNav = true; - @SerialEntry - public QuickNavItem button1 = new QuickNavItem(true, new ItemData("diamond_sword"), "Your Skills", "/skills"); + @SerialEntry + public QuickNavItem button1 = new QuickNavItem(true, new ItemData("diamond_sword"), "Your Skills", "/skills"); - @SerialEntry - public QuickNavItem button2 = new QuickNavItem(true, new ItemData("painting"), "Collections", "/collection"); + @SerialEntry + public QuickNavItem button2 = new QuickNavItem(true, new ItemData("painting"), "Collections", "/collection"); - /* REGEX Explanation - * "Pets" : simple match on letters - * "(?: \\(\\d+\\/\\d+\\))?" : optional match on the non-capturing group for the page in the format " ($number/$number)" - */ - @SerialEntry - public QuickNavItem button3 = new QuickNavItem(true, new ItemData("bone"), "Pets(:? \\(\\d+\\/\\d+\\))?", "/pets"); + /* REGEX Explanation + * "Pets" : simple match on letters + * "(?: \\(\\d+\\/\\d+\\))?" : optional match on the non-capturing group for the page in the format " ($number/$number)" + */ + @SerialEntry + public QuickNavItem button3 = new QuickNavItem(true, new ItemData("bone"), "Pets(:? \\(\\d+\\/\\d+\\))?", "/pets"); /* REGEX Explanation * "Wardrobe" : simple match on letters @@ -97,667 +97,694 @@ public class SkyblockerConfig { public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant Item", "/etable"); - @SerialEntry - public QuickNavItem button11 = new QuickNavItem(true, new ItemData("anvil"), "Anvil", "/anvil"); - @SerialEntry - public QuickNavItem button12 = new QuickNavItem(true, new ItemData("crafting_table"), "Craft Item", "/craft"); - } + @SerialEntry + public QuickNavItem button11 = new QuickNavItem(true, new ItemData("anvil"), "Anvil", "/anvil"); - public static class QuickNavItem { - public QuickNavItem(Boolean render, ItemData itemData, String uiTitle, String clickEvent) { - this.render = render; - this.item = itemData; - this.clickEvent = clickEvent; - this.uiTitle = uiTitle; - } + @SerialEntry + public QuickNavItem button12 = new QuickNavItem(true, new ItemData("crafting_table"), "Craft Item", "/craft"); + } - @SerialEntry - public Boolean render; + public static class QuickNavItem { + public QuickNavItem(Boolean render, ItemData itemData, String uiTitle, String clickEvent) { + this.render = render; + this.item = itemData; + this.clickEvent = clickEvent; + this.uiTitle = uiTitle; + } - @SerialEntry - public ItemData item; + @SerialEntry + public Boolean render; - @SerialEntry - public String uiTitle; + @SerialEntry + public ItemData item; - @SerialEntry - public String clickEvent; - } + @SerialEntry + public String uiTitle; - public static class ItemData { - public ItemData(String itemName, int count, String nbt) { - this.itemName = itemName; - this.count = count; - this.nbt = nbt; - } + @SerialEntry + public String clickEvent; + } - public ItemData(String itemName) { - this.itemName = itemName; - this.count = 1; - this.nbt = ""; - } + public static class ItemData { + public ItemData(String itemName, int count, String nbt) { + this.itemName = itemName; + this.count = count; + this.nbt = nbt; + } - @SerialEntry - public String itemName; + public ItemData(String itemName) { + this.itemName = itemName; + this.count = 1; + this.nbt = ""; + } - @SerialEntry - public int count; + @SerialEntry + public String itemName; - @SerialEntry - public String nbt; - } + @SerialEntry + public int count; - public static class General { - @SerialEntry - public boolean enableTips = true; + @SerialEntry + public String nbt; + } - @SerialEntry - public boolean acceptReparty = true; + public static class General { + @SerialEntry + public boolean enableTips = true; + + @SerialEntry + public boolean acceptReparty = true; +<<<<<<< HEAD @SerialEntry public boolean betterPartyFinder = true; @SerialEntry public boolean backpackPreviewWithoutShift = false; +======= + @SerialEntry + public boolean backpackPreviewWithoutShift = false; +>>>>>>> c9ef08ab (fix the indentation) - @SerialEntry - public boolean compactorDeletorPreview = true; + @SerialEntry + public boolean compactorDeletorPreview = true; - @SerialEntry - public boolean hideEmptyTooltips = true; + @SerialEntry + public boolean hideEmptyTooltips = true; - @SerialEntry - public boolean hideStatusEffectOverlay = false; + @SerialEntry + public boolean hideStatusEffectOverlay = false; - @SerialEntry - public boolean dontStripSkinAlphaValues = true; + @SerialEntry + public boolean dontStripSkinAlphaValues = true; - @SerialEntry - public TabHudConf tabHud = new TabHudConf(); + @SerialEntry + public TabHudConf tabHud = new TabHudConf(); - @SerialEntry - public Bars bars = new Bars(); + @SerialEntry + public Bars bars = new Bars(); - @SerialEntry - public Experiments experiments = new Experiments(); + @SerialEntry + public Experiments experiments = new Experiments(); - @SerialEntry - public Fishing fishing = new Fishing(); + @SerialEntry + public Fishing fishing = new Fishing(); - @SerialEntry - public FairySouls fairySouls = new FairySouls(); + @SerialEntry + public FairySouls fairySouls = new FairySouls(); - @SerialEntry - public MythologicalRitual mythologicalRitual = new MythologicalRitual(); + @SerialEntry + public MythologicalRitual mythologicalRitual = new MythologicalRitual(); - @SerialEntry - public ItemCooldown itemCooldown = new ItemCooldown(); + @SerialEntry + public ItemCooldown itemCooldown = new ItemCooldown(); - @SerialEntry - public Shortcuts shortcuts = new Shortcuts(); + @SerialEntry + public Shortcuts shortcuts = new Shortcuts(); - @SerialEntry - public Waypoints waypoints = new Waypoints(); + @SerialEntry + public Waypoints waypoints = new Waypoints(); - @SerialEntry - public QuiverWarning quiverWarning = new QuiverWarning(); + @SerialEntry + public QuiverWarning quiverWarning = new QuiverWarning(); - @SerialEntry - public ItemList itemList = new ItemList(); + @SerialEntry + public ItemList itemList = new ItemList(); - @SerialEntry - public ItemTooltip itemTooltip = new ItemTooltip(); + @SerialEntry + public ItemTooltip itemTooltip = new ItemTooltip(); - @SerialEntry - public ItemInfoDisplay itemInfoDisplay = new ItemInfoDisplay(); + @SerialEntry + public ItemInfoDisplay itemInfoDisplay = new ItemInfoDisplay(); - @SerialEntry - public WikiLookup wikiLookup = new WikiLookup(); + @SerialEntry + public WikiLookup wikiLookup = new WikiLookup(); - @SerialEntry - public ChestValue chestValue = new ChestValue(); + @SerialEntry + public ChestValue chestValue = new ChestValue(); - @SerialEntry - public SpecialEffects specialEffects = new SpecialEffects(); + @SerialEntry + public SpecialEffects specialEffects = new SpecialEffects(); - @SerialEntry - public Hitbox hitbox = new Hitbox(); + @SerialEntry + public Hitbox hitbox = new Hitbox(); - @SerialEntry - public TitleContainer titleContainer = new TitleContainer(); + @SerialEntry + public TitleContainer titleContainer = new TitleContainer(); - @SerialEntry - public TeleportOverlay teleportOverlay = new TeleportOverlay(); + @SerialEntry + public TeleportOverlay teleportOverlay = new TeleportOverlay(); - @SerialEntry - public FlameOverlay flameOverlay = new FlameOverlay(); + @SerialEntry + public FlameOverlay flameOverlay = new FlameOverlay(); - @SerialEntry - public List lockedSlots = new ArrayList<>(); + @SerialEntry + public List lockedSlots = new ArrayList<>(); - @SerialEntry - public ObjectOpenHashSet protectedItems = new ObjectOpenHashSet<>(); + @SerialEntry + public ObjectOpenHashSet protectedItems = new ObjectOpenHashSet<>(); - @SerialEntry - public Object2ObjectOpenHashMap customItemNames = new Object2ObjectOpenHashMap<>(); + @SerialEntry + public Object2ObjectOpenHashMap customItemNames = new Object2ObjectOpenHashMap<>(); - @SerialEntry - public Object2IntOpenHashMap customDyeColors = new Object2IntOpenHashMap<>(); + @SerialEntry + public Object2IntOpenHashMap customDyeColors = new Object2IntOpenHashMap<>(); - @SerialEntry - public Object2ObjectOpenHashMap customArmorTrims = new Object2ObjectOpenHashMap<>(); - } + @SerialEntry + public Object2ObjectOpenHashMap customArmorTrims = new Object2ObjectOpenHashMap<>(); + } - public static class TabHudConf { - @SerialEntry - public boolean tabHudEnabled = true; + public static class TabHudConf { + @SerialEntry + public boolean tabHudEnabled = true; - @SerialEntry - public int tabHudScale = 100; + @SerialEntry + public int tabHudScale = 100; - @SerialEntry - public boolean plainPlayerNames = false; + @SerialEntry + public boolean plainPlayerNames = false; - @SerialEntry - public NameSorting nameSorting = NameSorting.DEFAULT; - } + @SerialEntry + public NameSorting nameSorting = NameSorting.DEFAULT; + } - public enum NameSorting { - DEFAULT, ALPHABETICAL; + public enum NameSorting { + DEFAULT, ALPHABETICAL; - @Override - public String toString() { - return switch (this) { - case DEFAULT -> "Default"; - case ALPHABETICAL -> "Alphabetical"; - }; - } - } + @Override + public String toString() { + return switch (this) { + case DEFAULT -> "Default"; + case ALPHABETICAL -> "Alphabetical"; + }; + } + } - public static class Bars { - @SerialEntry - public boolean enableBars = true; + public static class Bars { + @SerialEntry + public boolean enableBars = true; - @SerialEntry - public BarPositions barPositions = new BarPositions(); - } + @SerialEntry + public BarPositions barPositions = new BarPositions(); + } - public static class BarPositions { - @SerialEntry - public BarPosition healthBarPosition = BarPosition.LAYER1; + public static class BarPositions { + @SerialEntry + public BarPosition healthBarPosition = BarPosition.LAYER1; - @SerialEntry - public BarPosition manaBarPosition = BarPosition.LAYER1; + @SerialEntry + public BarPosition manaBarPosition = BarPosition.LAYER1; - @SerialEntry - public BarPosition defenceBarPosition = BarPosition.LAYER1; + @SerialEntry + public BarPosition defenceBarPosition = BarPosition.LAYER1; - @SerialEntry - public BarPosition experienceBarPosition = BarPosition.LAYER1; + @SerialEntry + public BarPosition experienceBarPosition = BarPosition.LAYER1; - } + } - public enum BarPosition { - LAYER1, LAYER2, RIGHT, NONE; - - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.general.bars.barpositions." + name()); - } - - public int toInt() { - return switch (this) { - case LAYER1 -> 0; - case LAYER2 -> 1; - case RIGHT -> 2; - case NONE -> -1; - }; - } - } + public enum BarPosition { + LAYER1, LAYER2, RIGHT, NONE; - public static class Experiments { - @SerialEntry - public boolean enableChronomatronSolver = true; + @Override + public String toString() { + return I18n.translate("text.autoconfig.skyblocker.option.general.bars.barpositions." + name()); + } - @SerialEntry - public boolean enableSuperpairsSolver = true; + public int toInt() { + return switch (this) { + case LAYER1 -> 0; + case LAYER2 -> 1; + case RIGHT -> 2; + case NONE -> -1; + }; + } + } - @SerialEntry - public boolean enableUltrasequencerSolver = true; - } + public static class Experiments { + @SerialEntry + public boolean enableChronomatronSolver = true; - public static class Fishing { - @SerialEntry - public boolean enableFishingHelper = true; - } + @SerialEntry + public boolean enableSuperpairsSolver = true; - public static class FairySouls { - @SerialEntry - public boolean enableFairySoulsHelper = false; + @SerialEntry + public boolean enableUltrasequencerSolver = true; + } - @SerialEntry - public boolean highlightFoundSouls = true; + public static class Fishing { + @SerialEntry + public boolean enableFishingHelper = true; + } - @SerialEntry - public boolean highlightOnlyNearbySouls = false; - } + public static class FairySouls { + @SerialEntry + public boolean enableFairySoulsHelper = false; - public static class MythologicalRitual { - @SerialEntry - public boolean enableMythologicalRitualHelper = true; - } + @SerialEntry + public boolean highlightFoundSouls = true; - public static class ItemCooldown { - @SerialEntry - public boolean enableItemCooldowns = true; - } + @SerialEntry + public boolean highlightOnlyNearbySouls = false; + } - public static class Shortcuts { - @SerialEntry - public boolean enableShortcuts = true; + public static class MythologicalRitual { + @SerialEntry + public boolean enableMythologicalRitualHelper = true; + } - @SerialEntry - public boolean enableCommandShortcuts = true; + public static class ItemCooldown { + @SerialEntry + public boolean enableItemCooldowns = true; + } - @SerialEntry - public boolean enableCommandArgShortcuts = true; - } + public static class Shortcuts { + @SerialEntry + public boolean enableShortcuts = true; + + @SerialEntry + public boolean enableCommandShortcuts = true; + + @SerialEntry + public boolean enableCommandArgShortcuts = true; + } + + public static class Waypoints { + @SerialEntry + public boolean enableWaypoints = true; + + @SerialEntry + public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; + } - public static class Waypoints { - @SerialEntry - public boolean enableWaypoints = true; + public static class QuiverWarning { + @SerialEntry + public boolean enableQuiverWarning = true; - @SerialEntry - public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; - } + @SerialEntry + public boolean enableQuiverWarningInDungeons = true; - public static class QuiverWarning { - @SerialEntry - public boolean enableQuiverWarning = true; + @SerialEntry + public boolean enableQuiverWarningAfterDungeon = true; + } - @SerialEntry - public boolean enableQuiverWarningInDungeons = true; + public static class Hitbox { + @SerialEntry + public boolean oldFarmlandHitbox = false; - @SerialEntry - public boolean enableQuiverWarningAfterDungeon = true; - } + @SerialEntry + public boolean oldLeverHitbox = false; + } + + public static class TitleContainer { + @SerialEntry + public float titleContainerScale = 100; + + @SerialEntry + public int x = 540; + + @SerialEntry + public int y = 10; + + @SerialEntry + public Direction direction = Direction.HORIZONTAL; + + @SerialEntry + public Alignment alignment = Alignment.MIDDLE; + } - public static class Hitbox { - @SerialEntry - public boolean oldFarmlandHitbox = false; + public static class TeleportOverlay { + @SerialEntry + public boolean enableTeleportOverlays = true; - @SerialEntry - public boolean oldLeverHitbox = false; - } + @SerialEntry + public boolean enableWeirdTransmission = true; - public static class TitleContainer { - @SerialEntry - public float titleContainerScale = 100; + @SerialEntry + public boolean enableInstantTransmission = true; - @SerialEntry - public int x = 540; + @SerialEntry + public boolean enableEtherTransmission = true; - @SerialEntry - public int y = 10; + @SerialEntry + public boolean enableSinrecallTransmission = true; - @SerialEntry - public Direction direction = Direction.HORIZONTAL; + @SerialEntry + public boolean enableWitherImpact = true; + } - @SerialEntry - public Alignment alignment = Alignment.MIDDLE; - } + public static class FlameOverlay { + @SerialEntry + public float flameHeight = 0f; - public static class TeleportOverlay { - @SerialEntry - public boolean enableTeleportOverlays = true; + @SerialEntry + public float flameOpacity = 0f; + } - @SerialEntry - public boolean enableWeirdTransmission = true; + public enum Direction { + HORIZONTAL, VERTICAL; - @SerialEntry - public boolean enableInstantTransmission = true; + @Override + public String toString() { + return switch (this) { + case HORIZONTAL -> "Horizontal"; + case VERTICAL -> "Vertical"; + }; + } + } - @SerialEntry - public boolean enableEtherTransmission = true; + public enum Alignment { + LEFT, RIGHT, MIDDLE; - @SerialEntry - public boolean enableSinrecallTransmission = true; + @Override + public String toString() { + return switch (this) { + case LEFT -> "Left"; + case RIGHT -> "Right"; + case MIDDLE -> "Middle"; + }; + } + } - @SerialEntry - public boolean enableWitherImpact = true; - } + public static class RichPresence { + @SerialEntry + public boolean enableRichPresence = false; - public static class FlameOverlay { - @SerialEntry - public float flameHeight = 0f; + @SerialEntry + public Info info = Info.LOCATION; - @SerialEntry - public float flameOpacity = 0f; - } + @SerialEntry + public boolean cycleMode = false; - public enum Direction { - HORIZONTAL, VERTICAL; - - @Override - public String toString() { - return switch (this) { - case HORIZONTAL -> "Horizontal"; - case VERTICAL -> "Vertical"; - }; - } - } - - public enum Alignment { - LEFT, RIGHT, MIDDLE; - - @Override - public String toString() { - return switch (this) { - case LEFT -> "Left"; - case RIGHT -> "Right"; - case MIDDLE -> "Middle"; - }; - } - } - - public static class RichPresence { - @SerialEntry - public boolean enableRichPresence = false; - - @SerialEntry - public Info info = Info.LOCATION; - - @SerialEntry - public boolean cycleMode = false; - - @SerialEntry - public String customMessage = "Playing Skyblock"; - } + @SerialEntry + public String customMessage = "Playing Skyblock"; + } - public static class ItemList { - @SerialEntry - public boolean enableItemList = true; - } + public static class ItemList { + @SerialEntry + public boolean enableItemList = true; + } - public enum Average { - ONE_DAY, THREE_DAY, BOTH; + public enum Average { + ONE_DAY, THREE_DAY, BOTH; - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.general.itemTooltip.avg." + name()); - } - } + @Override + public String toString() { + return I18n.translate("text.autoconfig.skyblocker.option.general.itemTooltip.avg." + name()); + } + } - public static class ItemTooltip { - @SerialEntry - public boolean enableNPCPrice = true; + public static class ItemTooltip { + @SerialEntry + public boolean enableNPCPrice = true; - @SerialEntry - public boolean enableMotesPrice = true; + @SerialEntry + public boolean enableMotesPrice = true; - @SerialEntry - public boolean enableAvgBIN = true; + @SerialEntry + public boolean enableAvgBIN = true; - @SerialEntry - public Average avg = Average.THREE_DAY; + @SerialEntry + public Average avg = Average.THREE_DAY; - @SerialEntry - public boolean enableLowestBIN = true; + @SerialEntry + public boolean enableLowestBIN = true; - @SerialEntry - public boolean enableBazaarPrice = true; + @SerialEntry + public boolean enableBazaarPrice = true; - @SerialEntry - public boolean enableObtainedDate = true; + @SerialEntry + public boolean enableObtainedDate = true; - @SerialEntry - public boolean enableMuseumInfo = true; + @SerialEntry + public boolean enableMuseumInfo = true; - @SerialEntry - public boolean enableExoticTooltip = true; - } + @SerialEntry + public boolean enableExoticTooltip = true; + } - public static class ItemInfoDisplay { - @SerialEntry - public boolean attributeShardInfo = true; + public static class ItemInfoDisplay { + @SerialEntry + public boolean attributeShardInfo = true; - @SerialEntry - public boolean itemRarityBackgrounds = false; + @SerialEntry + public boolean itemRarityBackgrounds = false; - @SerialEntry - public RarityBackgroundStyle itemRarityBackgroundStyle = RarityBackgroundStyle.CIRCULAR; + @SerialEntry + public RarityBackgroundStyle itemRarityBackgroundStyle = RarityBackgroundStyle.CIRCULAR; - @SerialEntry - public float itemRarityBackgroundsOpacity = 1f; - } + @SerialEntry + public float itemRarityBackgroundsOpacity = 1f; + } +<<<<<<< HEAD public enum RarityBackgroundStyle { CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); +======= + public enum RarityBackgroundStyle { + CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); +>>>>>>> c9ef08ab (fix the indentation) - public final Identifier tex; + public final Identifier tex; - RarityBackgroundStyle(Identifier tex) { - this.tex = tex; - } + RarityBackgroundStyle(Identifier tex) { + this.tex = tex; + } - @Override - public String toString() { - return switch (this) { - case CIRCULAR -> "Circular"; - case SQUARE -> "Square"; - }; - } - } + @Override + public String toString() { + return switch (this) { + case CIRCULAR -> "Circular"; + case SQUARE -> "Square"; + }; + } + } - public static class WikiLookup { - @SerialEntry - public boolean enableWikiLookup = true; + public static class WikiLookup { + @SerialEntry + public boolean enableWikiLookup = true; - @SerialEntry - public boolean officialWiki = false; - } + @SerialEntry + public boolean officialWiki = false; + } - public static class ChestValue { - @SerialEntry - public boolean enableChestValue = true; + public static class ChestValue { + @SerialEntry + public boolean enableChestValue = true; - @SerialEntry - public Formatting color = Formatting.DARK_GREEN; + @SerialEntry + public Formatting color = Formatting.DARK_GREEN; - @SerialEntry - public Formatting incompleteColor = Formatting.BLUE; - } + @SerialEntry + public Formatting incompleteColor = Formatting.BLUE; + } - public static class SpecialEffects { - @SerialEntry - public boolean rareDungeonDropEffects = true; - } + public static class SpecialEffects { + @SerialEntry + public boolean rareDungeonDropEffects = true; + } - public static class Locations { - @SerialEntry - public Barn barn = new Barn(); + public static class Locations { + @SerialEntry + public Barn barn = new Barn(); - @SerialEntry - public Dungeons dungeons = new Dungeons(); + @SerialEntry + public Dungeons dungeons = new Dungeons(); - @SerialEntry - public DwarvenMines dwarvenMines = new DwarvenMines(); + @SerialEntry + public DwarvenMines dwarvenMines = new DwarvenMines(); - @SerialEntry - public Rift rift = new Rift(); + @SerialEntry + public Rift rift = new Rift(); - @SerialEntry - public SpidersDen spidersDen = new SpidersDen(); - } + @SerialEntry + public SpidersDen spidersDen = new SpidersDen(); + } - public static class Dungeons { - @SerialEntry - public SecretWaypoints secretWaypoints = new SecretWaypoints(); + public static class Dungeons { + @SerialEntry + public SecretWaypoints secretWaypoints = new SecretWaypoints(); - @SerialEntry - public DoorHighlight doorHighlight = new DoorHighlight(); + @SerialEntry + public DoorHighlight doorHighlight = new DoorHighlight(); - @SerialEntry - public DungeonScore dungeonScore = new DungeonScore(); + @SerialEntry + public DungeonScore dungeonScore = new DungeonScore(); - @SerialEntry - public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); + @SerialEntry + public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); +<<<<<<< HEAD @SerialEntry public MimicMessage mimicMessage = new MimicMessage(); @SerialEntry public boolean croesusHelper = true; +======= + @SerialEntry + public boolean croesusHelper = true; +>>>>>>> c9ef08ab (fix the indentation) - @SerialEntry - public boolean enableMap = true; + @SerialEntry + public boolean enableMap = true; - @SerialEntry - public float mapScaling = 1f; + @SerialEntry + public float mapScaling = 1f; - @SerialEntry - public int mapX = 2; + @SerialEntry + public int mapX = 2; - @SerialEntry - public int mapY = 2; + @SerialEntry + public int mapY = 2; - @SerialEntry - public boolean playerSecretsTracker = false; + @SerialEntry + public boolean playerSecretsTracker = false; - @SerialEntry - public boolean starredMobGlow = true; + @SerialEntry + public boolean starredMobGlow = true; - @SerialEntry - public boolean solveThreeWeirdos = true; + @SerialEntry + public boolean solveThreeWeirdos = true; - @SerialEntry - public boolean blazeSolver = true; + @SerialEntry + public boolean blazeSolver = true; - @SerialEntry - public boolean creeperSolver = true; + @SerialEntry + public boolean creeperSolver = true; - @SerialEntry - public boolean solveTrivia = true; + @SerialEntry + public boolean solveTrivia = true; - @SerialEntry - public boolean solveTicTacToe = true; + @SerialEntry + public boolean solveTicTacToe = true; - @SerialEntry - public boolean solveWaterboard = true; + @SerialEntry + public boolean solveWaterboard = true; - @SerialEntry - public boolean fireFreezeStaffTimer = true; + @SerialEntry + public boolean fireFreezeStaffTimer = true; - @SerialEntry - public boolean floor3GuardianHealthDisplay = true; + @SerialEntry + public boolean floor3GuardianHealthDisplay = true; +<<<<<<< HEAD @SerialEntry public boolean allowDroppingProtectedItems = false; @SerialEntry public LividColor lividColor = new LividColor(); +======= + @SerialEntry + public LividColor lividColor = new LividColor(); +>>>>>>> c9ef08ab (fix the indentation) - @SerialEntry - public Terminals terminals = new Terminals(); - } + @SerialEntry + public Terminals terminals = new Terminals(); + } - public static class SecretWaypoints { - @SerialEntry - public boolean enableRoomMatching = true; + public static class SecretWaypoints { + @SerialEntry + public boolean enableRoomMatching = true; - @SerialEntry - public boolean enableSecretWaypoints = true; + @SerialEntry + public boolean enableSecretWaypoints = true; - @SerialEntry - public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; + @SerialEntry + public Waypoint.Type waypointType = Waypoint.Type.WAYPOINT; - @SerialEntry - public boolean showSecretText = true; + @SerialEntry + public boolean showSecretText = true; - @SerialEntry - public boolean enableEntranceWaypoints = true; + @SerialEntry + public boolean enableEntranceWaypoints = true; - @SerialEntry - public boolean enableSuperboomWaypoints = true; + @SerialEntry + public boolean enableSuperboomWaypoints = true; - @SerialEntry - public boolean enableChestWaypoints = true; + @SerialEntry + public boolean enableChestWaypoints = true; - @SerialEntry - public boolean enableItemWaypoints = true; + @SerialEntry + public boolean enableItemWaypoints = true; - @SerialEntry - public boolean enableBatWaypoints = true; + @SerialEntry + public boolean enableBatWaypoints = true; - @SerialEntry - public boolean enableWitherWaypoints = true; + @SerialEntry + public boolean enableWitherWaypoints = true; - @SerialEntry - public boolean enableLeverWaypoints = true; + @SerialEntry + public boolean enableLeverWaypoints = true; - @SerialEntry - public boolean enableFairySoulWaypoints = true; + @SerialEntry + public boolean enableFairySoulWaypoints = true; - @SerialEntry - public boolean enableStonkWaypoints = true; + @SerialEntry + public boolean enableStonkWaypoints = true; - @SerialEntry - public boolean enableAotvWaypoints = true; + @SerialEntry + public boolean enableAotvWaypoints = true; - @SerialEntry - public boolean enablePearlWaypoints = true; + @SerialEntry + public boolean enablePearlWaypoints = true; - @SerialEntry - public boolean enableDefaultWaypoints = true; - } + @SerialEntry + public boolean enableDefaultWaypoints = true; + } - public static class DoorHighlight { - @SerialEntry - public boolean enableDoorHighlight = true; + public static class DoorHighlight { + @SerialEntry + public boolean enableDoorHighlight = true; - @SerialEntry - public Type doorHighlightType = Type.OUTLINED_HIGHLIGHT; + @SerialEntry + public Type doorHighlightType = Type.OUTLINED_HIGHLIGHT; +<<<<<<< HEAD public enum Type { HIGHLIGHT, OUTLINED_HIGHLIGHT, OUTLINE; +======= + public enum Type { + HIGHLIGHT, OUTLINED_HIGHLIGHT, OUTLINE; +>>>>>>> c9ef08ab (fix the indentation) - @Override - public String toString() { - return switch (this) { - case HIGHLIGHT -> "Highlight"; - case OUTLINED_HIGHLIGHT -> "Outlined Highlight"; - case OUTLINE -> "Outline"; - }; - } - } - } + @Override + public String toString() { + return switch (this) { + case HIGHLIGHT -> "Highlight"; + case OUTLINED_HIGHLIGHT -> "Outlined Highlight"; + case OUTLINE -> "Outline"; + }; + } + } + } - public static class DungeonScore { - @SerialEntry - public boolean enableDungeonScore270Message = false; + public static class DungeonScore { + @SerialEntry + public boolean enableDungeonScore270Message = false; - @SerialEntry - public boolean enableDungeonScore270Title = false; + @SerialEntry + public boolean enableDungeonScore270Title = false; - @SerialEntry - public boolean enableDungeonScore270Sound = false; + @SerialEntry + public boolean enableDungeonScore270Sound = false; - @SerialEntry - public String dungeonScore270Message = "270 Score Reached!"; + @SerialEntry + public String dungeonScore270Message = "270 Score Reached!"; - @SerialEntry - public boolean enableDungeonScore300Message = true; + @SerialEntry + public boolean enableDungeonScore300Message = true; - @SerialEntry - public boolean enableDungeonScore300Title = true; + @SerialEntry + public boolean enableDungeonScore300Title = true; - @SerialEntry - public boolean enableDungeonScore300Sound = true; + @SerialEntry + public boolean enableDungeonScore300Sound = true; +<<<<<<< HEAD @SerialEntry public String dungeonScore300Message = "300 Score Reached!"; @@ -773,33 +800,39 @@ public class SkyblockerConfig { @SerialEntry public float scoreScaling = 1f; } +======= + @SerialEntry + public String dungeonScore300Message = "300 Score Reached!"; + } +>>>>>>> c9ef08ab (fix the indentation) - public static class DungeonChestProfit { - @SerialEntry - public boolean enableProfitCalculator = true; + public static class DungeonChestProfit { + @SerialEntry + public boolean enableProfitCalculator = true; - @SerialEntry - public boolean includeKismet = false; + @SerialEntry + public boolean includeKismet = false; - @SerialEntry - public boolean includeEssence = true; + @SerialEntry + public boolean includeEssence = true; - @SerialEntry - public int neutralThreshold = 1000; + @SerialEntry + public int neutralThreshold = 1000; - @SerialEntry - public Formatting neutralColor = Formatting.DARK_GRAY; + @SerialEntry + public Formatting neutralColor = Formatting.DARK_GRAY; - @SerialEntry - public Formatting profitColor = Formatting.DARK_GREEN; + @SerialEntry + public Formatting profitColor = Formatting.DARK_GREEN; - @SerialEntry - public Formatting lossColor = Formatting.RED; + @SerialEntry + public Formatting lossColor = Formatting.RED; - @SerialEntry - public Formatting incompleteColor = Formatting.BLUE; - } + @SerialEntry + public Formatting incompleteColor = Formatting.BLUE; + } +<<<<<<< HEAD public static class MimicMessage { @SerialEntry public boolean sendMimicMessage = true; @@ -811,110 +844,116 @@ public class SkyblockerConfig { public static class LividColor { @SerialEntry public boolean enableLividColorGlow = true; +======= + public static class LividColor { + @SerialEntry + public boolean enableLividColorGlow = true; +>>>>>>> c9ef08ab (fix the indentation) - @SerialEntry - public boolean enableLividColorText = true; + @SerialEntry + public boolean enableLividColorText = true; - @SerialEntry - public boolean enableLividColorTitle = true; + @SerialEntry + public boolean enableLividColorTitle = true; - @SerialEntry - public String lividColorText = "The livid color is [color]"; - } + @SerialEntry + public String lividColorText = "The livid color is [color]"; + } - public static class Terminals { - @SerialEntry - public boolean solveColor = true; + public static class Terminals { + @SerialEntry + public boolean solveColor = true; - @SerialEntry - public boolean solveOrder = true; + @SerialEntry + public boolean solveOrder = true; - @SerialEntry - public boolean solveStartsWith = true; - } + @SerialEntry + public boolean solveStartsWith = true; + } - public static class DwarvenMines { - @SerialEntry - public boolean enableDrillFuel = true; + public static class DwarvenMines { + @SerialEntry + public boolean enableDrillFuel = true; - @SerialEntry - public boolean solveFetchur = true; + @SerialEntry + public boolean solveFetchur = true; - @SerialEntry - public boolean solvePuzzler = true; + @SerialEntry + public boolean solvePuzzler = true; - @SerialEntry - public DwarvenHud dwarvenHud = new DwarvenHud(); - } + @SerialEntry + public DwarvenHud dwarvenHud = new DwarvenHud(); + } - public static class DwarvenHud { - @SerialEntry - public boolean enabled = true; + public static class DwarvenHud { + @SerialEntry + public boolean enabled = true; - @SerialEntry - public DwarvenHudStyle style = DwarvenHudStyle.SIMPLE; + @SerialEntry + public DwarvenHudStyle style = DwarvenHudStyle.SIMPLE; - @SerialEntry - public boolean enableBackground = true; + @SerialEntry + public boolean enableBackground = true; - @SerialEntry - public int x = 10; + @SerialEntry + public int x = 10; - @SerialEntry - public int y = 10; - } + @SerialEntry + public int y = 10; + } - public enum DwarvenHudStyle { - SIMPLE, FANCY, CLASSIC; - - @Override - public String toString() { - return switch (this) { - case SIMPLE -> "Simple"; - case FANCY -> "Fancy"; - case CLASSIC -> "Classic"; - }; - } - } + public enum DwarvenHudStyle { + SIMPLE, FANCY, CLASSIC; - public static class Barn { - @SerialEntry - public boolean solveHungryHiker = true; + @Override + public String toString() { + return switch (this) { + case SIMPLE -> "Simple"; + case FANCY -> "Fancy"; + case CLASSIC -> "Classic"; + }; + } + } - @SerialEntry - public boolean solveTreasureHunter = true; - } + public static class Barn { + @SerialEntry + public boolean solveHungryHiker = true; - public static class Rift { - @SerialEntry - public boolean mirrorverseWaypoints = true; + @SerialEntry + public boolean solveTreasureHunter = true; + } - @SerialEntry - public boolean blobbercystGlow = true; + public static class Rift { + @SerialEntry + public boolean mirrorverseWaypoints = true; - @SerialEntry - public boolean enigmaSoulWaypoints = false; + @SerialEntry + public boolean blobbercystGlow = true; - @SerialEntry - public boolean highlightFoundEnigmaSouls = true; + @SerialEntry + public boolean enigmaSoulWaypoints = false; - @SerialEntry - public int mcGrubberStacks = 0; - } + @SerialEntry + public boolean highlightFoundEnigmaSouls = true; - public static class SpidersDen { - @SerialEntry - public Relics relics = new Relics(); - } + @SerialEntry + public int mcGrubberStacks = 0; + } - public static class Relics { - @SerialEntry - public boolean enableRelicsHelper = false; + public static class SpidersDen { + @SerialEntry + public Relics relics = new Relics(); + } - @SerialEntry - public boolean highlightFoundRelics = true; - } + public static class Relics { + @SerialEntry + public boolean enableRelicsHelper = false; + @SerialEntry + public boolean highlightFoundRelics = true; + } + +<<<<<<< HEAD public static class Slayer { @SerialEntry public VampireSlayer vampireSlayer = new VampireSlayer(); @@ -923,75 +962,97 @@ public class SkyblockerConfig { public static class VampireSlayer { @SerialEntry public boolean enableEffigyWaypoints = true; +======= + public static class Slayer { + @SerialEntry + public EndermanSlayer endermanSlayer = new EndermanSlayer(); - @SerialEntry - public boolean compactEffigyWaypoints; + @SerialEntry + public VampireSlayer vampireSlayer = new VampireSlayer(); + } - @SerialEntry - public int effigyUpdateFrequency = 5; + public static class EndermanSlayer { + @SerialEntry + public boolean highlightNukekubiHeads = true; - @SerialEntry - public boolean enableHolyIceIndicator = true; + @SerialEntry + public boolean highlightBeacons = true; + } - @SerialEntry - public int holyIceIndicatorTickDelay = 10; + public static class VampireSlayer { + @SerialEntry + public boolean enableEffigyWaypoints = true; +>>>>>>> c9ef08ab (fix the indentation) - @SerialEntry - public int holyIceUpdateFrequency = 5; + @SerialEntry + public boolean compactEffigyWaypoints; - @SerialEntry - public boolean enableHealingMelonIndicator = true; + @SerialEntry + public int effigyUpdateFrequency = 5; - @SerialEntry - public float healingMelonHealthThreshold = 4f; + @SerialEntry + public boolean enableHolyIceIndicator = true; - @SerialEntry - public boolean enableSteakStakeIndicator = true; + @SerialEntry + public int holyIceIndicatorTickDelay = 10; - @SerialEntry - public int steakStakeUpdateFrequency = 5; + @SerialEntry + public int holyIceUpdateFrequency = 5; - @SerialEntry - public boolean enableManiaIndicator = true; + @SerialEntry + public boolean enableHealingMelonIndicator = true; - @SerialEntry - public int maniaUpdateFrequency = 5; - } + @SerialEntry + public float healingMelonHealthThreshold = 4f; - public static class Messages { - @SerialEntry - public ChatFilterResult hideAbility = ChatFilterResult.PASS; + @SerialEntry + public boolean enableSteakStakeIndicator = true; - @SerialEntry - public ChatFilterResult hideHeal = ChatFilterResult.PASS; + @SerialEntry + public int steakStakeUpdateFrequency = 5; - @SerialEntry - public ChatFilterResult hideAOTE = ChatFilterResult.PASS; + @SerialEntry + public boolean enableManiaIndicator = true; - @SerialEntry - public ChatFilterResult hideImplosion = ChatFilterResult.PASS; + @SerialEntry + public int maniaUpdateFrequency = 5; + } - @SerialEntry - public ChatFilterResult hideMoltenWave = ChatFilterResult.PASS; + public static class Messages { + @SerialEntry + public ChatFilterResult hideAbility = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideAds = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideHeal = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideTeleportPad = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideAOTE = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideCombo = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideImplosion = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideAutopet = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideMoltenWave = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideShowOff = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideAds = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideToggleSkyMall = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideTeleportPad = ChatFilterResult.PASS; + + @SerialEntry + public ChatFilterResult hideCombo = ChatFilterResult.PASS; + + @SerialEntry + public ChatFilterResult hideAutopet = ChatFilterResult.PASS; + + @SerialEntry + public ChatFilterResult hideShowOff = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideToggleSkyMall = ChatFilterResult.PASS; + +<<<<<<< HEAD @SerialEntry public ChatFilterResult hideMimicKill = ChatFilterResult.PASS; @@ -1001,13 +1062,18 @@ public class SkyblockerConfig { @SerialEntry public boolean hideMana = false; } - - public enum Info { - PURSE, BITS, LOCATION; - - @Override - public String toString() { - return I18n.translate("text.autoconfig.skyblocker.option.richPresence.info." + name()); - } - } +======= + @SerialEntry + public boolean hideMana = false; + } +>>>>>>> c9ef08ab (fix the indentation) + + public enum Info { + PURSE, BITS, LOCATION; + + @Override + public String toString() { + return I18n.translate("text.autoconfig.skyblocker.option.richPresence.info." + name()); + } + } } -- cgit From 77f8cb5c7db674ddb066bf92f84c530e543dbc3e Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:43:25 -0500 Subject: guh --- .../hysky/skyblocker/config/SkyblockerConfig.java | 54 ----- .../config/categories/SlayersCategory.java | 2 + .../mixin/ClientPlayNetworkHandlerMixin.java | 9 +- .../skyblocker/skyblock/end/BeaconHighlighter.java | 4 +- .../hysky/skyblocker/skyblock/entity/MobGlow.java | 227 ++++++++++----------- 5 files changed, 116 insertions(+), 180 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 7d5c08d8..62e5ed90 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -156,16 +156,11 @@ public class SkyblockerConfig { @SerialEntry public boolean acceptReparty = true; -<<<<<<< HEAD @SerialEntry public boolean betterPartyFinder = true; @SerialEntry public boolean backpackPreviewWithoutShift = false; -======= - @SerialEntry - public boolean backpackPreviewWithoutShift = false; ->>>>>>> c9ef08ab (fix the indentation) @SerialEntry public boolean compactorDeletorPreview = true; @@ -538,14 +533,9 @@ public class SkyblockerConfig { public float itemRarityBackgroundsOpacity = 1f; } -<<<<<<< HEAD public enum RarityBackgroundStyle { CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); -======= - public enum RarityBackgroundStyle { - CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); ->>>>>>> c9ef08ab (fix the indentation) public final Identifier tex; @@ -616,16 +606,11 @@ public class SkyblockerConfig { @SerialEntry public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); -<<<<<<< HEAD @SerialEntry public MimicMessage mimicMessage = new MimicMessage(); @SerialEntry public boolean croesusHelper = true; -======= - @SerialEntry - public boolean croesusHelper = true; ->>>>>>> c9ef08ab (fix the indentation) @SerialEntry public boolean enableMap = true; @@ -669,16 +654,11 @@ public class SkyblockerConfig { @SerialEntry public boolean floor3GuardianHealthDisplay = true; -<<<<<<< HEAD @SerialEntry public boolean allowDroppingProtectedItems = false; @SerialEntry public LividColor lividColor = new LividColor(); -======= - @SerialEntry - public LividColor lividColor = new LividColor(); ->>>>>>> c9ef08ab (fix the indentation) @SerialEntry public Terminals terminals = new Terminals(); @@ -741,15 +721,10 @@ public class SkyblockerConfig { @SerialEntry public Type doorHighlightType = Type.OUTLINED_HIGHLIGHT; -<<<<<<< HEAD public enum Type { HIGHLIGHT, OUTLINED_HIGHLIGHT, OUTLINE; -======= - public enum Type { - HIGHLIGHT, OUTLINED_HIGHLIGHT, OUTLINE; ->>>>>>> c9ef08ab (fix the indentation) @Override public String toString() { @@ -784,7 +759,6 @@ public class SkyblockerConfig { @SerialEntry public boolean enableDungeonScore300Sound = true; -<<<<<<< HEAD @SerialEntry public String dungeonScore300Message = "300 Score Reached!"; @@ -800,11 +774,6 @@ public class SkyblockerConfig { @SerialEntry public float scoreScaling = 1f; } -======= - @SerialEntry - public String dungeonScore300Message = "300 Score Reached!"; - } ->>>>>>> c9ef08ab (fix the indentation) public static class DungeonChestProfit { @SerialEntry @@ -832,7 +801,6 @@ public class SkyblockerConfig { public Formatting incompleteColor = Formatting.BLUE; } -<<<<<<< HEAD public static class MimicMessage { @SerialEntry public boolean sendMimicMessage = true; @@ -844,11 +812,6 @@ public class SkyblockerConfig { public static class LividColor { @SerialEntry public boolean enableLividColorGlow = true; -======= - public static class LividColor { - @SerialEntry - public boolean enableLividColorGlow = true; ->>>>>>> c9ef08ab (fix the indentation) @SerialEntry public boolean enableLividColorText = true; @@ -953,16 +916,6 @@ public class SkyblockerConfig { public boolean highlightFoundRelics = true; } -<<<<<<< HEAD - public static class Slayer { - @SerialEntry - public VampireSlayer vampireSlayer = new VampireSlayer(); - } - - public static class VampireSlayer { - @SerialEntry - public boolean enableEffigyWaypoints = true; -======= public static class Slayer { @SerialEntry public EndermanSlayer endermanSlayer = new EndermanSlayer(); @@ -982,7 +935,6 @@ public class SkyblockerConfig { public static class VampireSlayer { @SerialEntry public boolean enableEffigyWaypoints = true; ->>>>>>> c9ef08ab (fix the indentation) @SerialEntry public boolean compactEffigyWaypoints; @@ -1052,7 +1004,6 @@ public class SkyblockerConfig { @SerialEntry public ChatFilterResult hideToggleSkyMall = ChatFilterResult.PASS; -<<<<<<< HEAD @SerialEntry public ChatFilterResult hideMimicKill = ChatFilterResult.PASS; @@ -1062,11 +1013,6 @@ public class SkyblockerConfig { @SerialEntry public boolean hideMana = false; } -======= - @SerialEntry - public boolean hideMana = false; - } ->>>>>>> c9ef08ab (fix the indentation) public enum Info { PURSE, BITS, LOCATION; diff --git a/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java index 15e6f4a6..19b30937 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java @@ -16,6 +16,8 @@ public class SlayersCategory { public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) { return ConfigCategory.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.category.slayer")) + + //Enderman Slayer .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.slayer.endermanSlayer")) .collapsed(true) diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java index 738c2165..e1a28262 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java @@ -3,7 +3,6 @@ package de.hysky.skyblocker.mixin; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.WrapWithCondition; import com.llamalad7.mixinextras.sugar.Local; -import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.skyblock.FishingHelper; import de.hysky.skyblocker.skyblock.dungeon.DungeonScore; import de.hysky.skyblocker.skyblock.dungeon.secrets.DungeonManager; @@ -11,6 +10,7 @@ import de.hysky.skyblocker.skyblock.end.BeaconHighlighter; import de.hysky.skyblocker.skyblock.waypoint.MythologicalRitual; import de.hysky.skyblocker.utils.SlayerUtils; import de.hysky.skyblocker.utils.Utils; +import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.entity.Entity; @@ -37,7 +37,7 @@ public abstract class ClientPlayNetworkHandlerMixin { FishingHelper.onSound(packet); } - @ModifyVariable(method = "onItemPickupAnimation", at = @At(value = "STORE", ordinal = 0)) + @ModifyVariable(method = "onItemPickupAnimation", at = @At(value = "STORE", ordinal = 0)) private ItemEntity skyblocker$onItemPickup(ItemEntity itemEntity, @Local LivingEntity collector) { DungeonManager.onItemPickup(itemEntity, collector, collector == MinecraftClient.getInstance().player); return itemEntity; @@ -81,12 +81,11 @@ public abstract class ClientPlayNetworkHandlerMixin { } @Inject(method = "onBlockUpdate", at = @At("RETURN")) private void skyblocker$onBlockUpdate(BlockUpdateS2CPacket packet, CallbackInfo ci) { - if(Utils.isInTheEnd() && SlayerUtils.isInSlayer()) { + if (Utils.isInTheEnd() && SlayerUtils.isInSlayer()) { BeaconHighlighter.beaconPositions.remove(packet.getPos()); - if(packet.getState().toString().contains("minecraft:beacon")) { + if (packet.getState().isOf(Blocks.BEACON)) { BeaconHighlighter.beaconPositions.add(packet.getPos()); } } - } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java index 65e9e639..d2269482 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/end/BeaconHighlighter.java @@ -11,11 +11,11 @@ import java.util.ArrayList; import java.util.List; public class BeaconHighlighter { - public static List beaconPositions = new ArrayList<>(); + public static final List beaconPositions = new ArrayList<>(); /** * Initializes the beacon highlighting system. - * `BeaconHighlighter::render` is called after translucent rendering. + * {@link BeaconHighlighter#render(WorldRenderContext)} is called after translucent rendering. */ public static void init() { WorldRenderEvents.AFTER_TRANSLUCENT.register(BeaconHighlighter::render); diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index 65ed9c03..75744097 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -1,12 +1,7 @@ package de.hysky.skyblocker.skyblock.entity; -import java.util.List; - -import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.skyblock.dungeon.LividColor; -import de.hysky.skyblocker.skyblock.itemlist.SkyblockCraftingRecipe; -import de.hysky.skyblocker.utils.Constants; import de.hysky.skyblocker.utils.Utils; import de.hysky.skyblocker.utils.render.culling.OcclusionCulling; import net.minecraft.entity.Entity; @@ -19,120 +14,114 @@ import net.minecraft.predicate.entity.EntityPredicates; import net.minecraft.util.Formatting; import net.minecraft.util.math.Box; import net.minecraft.world.World; -import org.apache.logging.log4j.LogManager; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import java.util.List; public class MobGlow { - public static boolean shouldMobGlow(Entity entity) { - Box box = entity.getBoundingBox(); - - if (!entity.isInvisible() && OcclusionCulling.getReducedCuller().isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) { - String name = entity.getName().getString(); - - // Dungeons - if (Utils.isInDungeons()) { - - // Minibosses - if (entity instanceof PlayerEntity) { - switch (name) { - case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": - return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", - "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": - return LividColor.shouldGlow(name); - } - } - - // Regular Mobs - if (!(entity instanceof ArmorStandEntity)) { - List armorStands = getArmorStands(entity.getWorld(), box); - - if (!armorStands.isEmpty() && armorStands.get(0).getName().getString().contains("✯")) - return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - } - - // Bats - return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow && entity instanceof BatEntity; - } - - // Rift - if (Utils.isInTheRift()) { - if (entity instanceof PlayerEntity) { - switch (name) { - // They have a space in their name for some reason... - case "Blobbercyst ": - return SkyblockerConfigManager.get().locations.rift.blobbercystGlow; - } - } - } - - - } - - // Enderman Slayer - // Highlights Nukekubi Heads - return SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads - && entity instanceof ArmorStandEntity - && isNukekubiHead((ArmorStandEntity) entity); - } - - private static boolean isNukekubiHead(ArmorStandEntity entity) { - for (ItemStack armorItem : entity.getArmorItems()) { - // hacky way to check if an item is a player head w/o - // some shenanigans - if (!armorItem.toString().startsWith("1 player_head")) - continue; - - if (armorItem.hasNbt()) { - assert armorItem.getNbt() != null; - // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id - // for the nukekubi head, compare against it to exclusively find - // armorstands that are nukekubi heads - if (armorItem.getNbt().contains("SkullOwner")) { - // get the texture of the nukekubi head item itself and - // compare it - var texture = armorItem - .getNbt() - .getCompound("SkullOwner") - .getCompound("Properties") - .getList("textures", NbtElement.COMPOUND_TYPE) - .getCompound(0) - .getString("Value"); - - return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); - - } - } - } - return false; - } - - private static List getArmorStands(World world, Box box) { - return world.getEntitiesByClass(ArmorStandEntity.class, box.expand(0, 2, 0), EntityPredicates.NOT_MOUNTED); - } - - public static int getGlowColor(Entity entity) { - String name = entity.getName().getString(); - - if (entity instanceof PlayerEntity) { - return switch (name) { - case "Lost Adventurer" -> 0xfee15c; - case "Shadow Assassin" -> 0x5b2cb2; - case "Diamond Guy" -> 0x57c2f7; - case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", - "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid" -> - LividColor.getGlowColor(name); - case "Blobbercyst " -> Formatting.GREEN.getColorValue(); - default -> 0xf57738; - }; - } - - // copypaste nukekebi head logic - if (entity instanceof ArmorStandEntity && isNukekubiHead((ArmorStandEntity) entity)) { - return 0x990099; - } - - return 0xf57738; - } + public static boolean shouldMobGlow(Entity entity) { + Box box = entity.getBoundingBox(); + + if (!entity.isInvisible() && OcclusionCulling.getReducedCuller().isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) { + String name = entity.getName().getString(); + + // Dungeons + if (Utils.isInDungeons()) { + + // Minibosses + if (entity instanceof PlayerEntity) { + switch (name) { + case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; + case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", + "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": return LividColor.shouldGlow(name); + } + } + + // Regular Mobs + if (!(entity instanceof ArmorStandEntity)) { + List armorStands = getArmorStands(entity.getWorld(), box); + + if (!armorStands.isEmpty() && armorStands.get(0).getName().getString().contains("✯")) return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; + } + + // Bats + return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow && entity instanceof BatEntity; + } + + // Rift + if (Utils.isInTheRift()) { + if (entity instanceof PlayerEntity) { + switch (name) { + // They have a space in their name for some reason... + case "Blobbercyst ": return SkyblockerConfigManager.get().locations.rift.blobbercystGlow; + } + } + } + + + } + + // Enderman Slayer + // Highlights Nukekubi Heads + return SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads + && entity instanceof ArmorStandEntity + && isNukekubiHead((ArmorStandEntity) entity); + } + + private static boolean isNukekubiHead(ArmorStandEntity entity) { + for (ItemStack armorItem : entity.getArmorItems()) { + // hacky way to check if an item is a player head w/o + // some shenanigans + if (!armorItem.toString().startsWith("1 player_head")) + continue; + + if (armorItem.hasNbt()) { + assert armorItem.getNbt() != null; + // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id + // for the nukekubi head, compare against it to exclusively find + // armorstands that are nukekubi heads + if (armorItem.getNbt().contains("SkullOwner")) { + // get the texture of the nukekubi head item itself and + // compare it + var texture = armorItem + .getNbt() + .getCompound("SkullOwner") + .getCompound("Properties") + .getList("textures", NbtElement.COMPOUND_TYPE) + .getCompound(0) + .getString("Value"); + + return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); + + } + } + } + return false; + } + + private static List getArmorStands(World world, Box box) { + return world.getEntitiesByClass(ArmorStandEntity.class, box.expand(0, 2, 0), EntityPredicates.NOT_MOUNTED); + } + + public static int getGlowColor(Entity entity) { + String name = entity.getName().getString(); + + if (entity instanceof PlayerEntity) { + return switch (name) { + case "Lost Adventurer" -> 0xfee15c; + case "Shadow Assassin" -> 0x5b2cb2; + case "Diamond Guy" -> 0x57c2f7; + case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", + "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid" -> LividColor.getGlowColor(name); + case "Blobbercyst " -> Formatting.GREEN.getColorValue(); + default -> 0xf57738; + }; + } + + // copypaste nukekebi head logic + if (entity instanceof ArmorStandEntity && isNukekubiHead((ArmorStandEntity) entity)) { + return 0x990099; + } + + return 0xf57738; + } } -- cgit From 5f781ecb8e3546a60f5745710e79c0ee922fb8c1 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:58:38 -0500 Subject: Refactor MobGlow --- .../hysky/skyblocker/skyblock/entity/MobGlow.java | 122 ++++++++++----------- 1 file changed, 59 insertions(+), 63 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index 75744097..a831ddab 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -9,6 +9,7 @@ import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.entity.passive.BatEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtElement; import net.minecraft.predicate.entity.EntityPredicates; import net.minecraft.util.Formatting; @@ -21,80 +22,53 @@ public class MobGlow { public static boolean shouldMobGlow(Entity entity) { Box box = entity.getBoundingBox(); - if (!entity.isInvisible() && OcclusionCulling.getReducedCuller().isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) { + if (OcclusionCulling.getReducedCuller().isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) { String name = entity.getName().getString(); - // Dungeons - if (Utils.isInDungeons()) { + if (!entity.isInvisible()) { - // Minibosses - if (entity instanceof PlayerEntity) { - switch (name) { - case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", - "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": return LividColor.shouldGlow(name); + // Dungeons + if (Utils.isInDungeons()) { + + // Minibosses + if (entity instanceof PlayerEntity) { + switch (name) { + case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; + case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", + "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": return LividColor.shouldGlow(name); + } } - } - // Regular Mobs - if (!(entity instanceof ArmorStandEntity)) { - List armorStands = getArmorStands(entity.getWorld(), box); + // Regular Mobs + if (!(entity instanceof ArmorStandEntity)) { + List armorStands = getArmorStands(entity.getWorld(), box); - if (!armorStands.isEmpty() && armorStands.get(0).getName().getString().contains("✯")) return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - } + if (!armorStands.isEmpty() && armorStands.get(0).getName().getString().contains("✯")) + return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; + } - // Bats - return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow && entity instanceof BatEntity; - } + // Bats + return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow && entity instanceof BatEntity; + } - // Rift - if (Utils.isInTheRift()) { - if (entity instanceof PlayerEntity) { - switch (name) { - // They have a space in their name for some reason... - case "Blobbercyst ": return SkyblockerConfigManager.get().locations.rift.blobbercystGlow; + // Rift + if (Utils.isInTheRift()) { + if (entity instanceof PlayerEntity) { + switch (name) { + // They have a space in their name for some reason... + case "Blobbercyst ": return SkyblockerConfigManager.get().locations.rift.blobbercystGlow; + } } } } - + // Enderman Slayer + // Highlights Nukekubi Heads + return SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads + && entity instanceof ArmorStandEntity armorStandEntity + && isNukekubiHead(armorStandEntity); } - // Enderman Slayer - // Highlights Nukekubi Heads - return SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads - && entity instanceof ArmorStandEntity - && isNukekubiHead((ArmorStandEntity) entity); - } - - private static boolean isNukekubiHead(ArmorStandEntity entity) { - for (ItemStack armorItem : entity.getArmorItems()) { - // hacky way to check if an item is a player head w/o - // some shenanigans - if (!armorItem.toString().startsWith("1 player_head")) - continue; - - if (armorItem.hasNbt()) { - assert armorItem.getNbt() != null; - // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id - // for the nukekubi head, compare against it to exclusively find - // armorstands that are nukekubi heads - if (armorItem.getNbt().contains("SkullOwner")) { - // get the texture of the nukekubi head item itself and - // compare it - var texture = armorItem - .getNbt() - .getCompound("SkullOwner") - .getCompound("Properties") - .getList("textures", NbtElement.COMPOUND_TYPE) - .getCompound(0) - .getString("Value"); - - return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); - - } - } - } return false; } @@ -118,10 +92,32 @@ public class MobGlow { } // copypaste nukekebi head logic - if (entity instanceof ArmorStandEntity && isNukekubiHead((ArmorStandEntity) entity)) { - return 0x990099; - } + if (entity instanceof ArmorStandEntity armorStandEntity && isNukekubiHead(armorStandEntity)) return 0x990099; return 0xf57738; } + + private static boolean isNukekubiHead(ArmorStandEntity entity) { + for (ItemStack armorItem : entity.getArmorItems()) { + // hacky way to check if an item is a player head w/o + // some shenanigans + if (!armorItem.toString().startsWith("1 player_head")) + continue; + + // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id for the nukekubi head, + // compare against it to exclusively find armorstands that are nukekubi heads + NbtCompound skullOwner = armorItem.getSubNbt("SkullOwner"); + if (skullOwner != null) { + // get the texture of the nukekubi head item itself and compare it + String texture = skullOwner + .getCompound("Properties") + .getList("textures", NbtElement.COMPOUND_TYPE) + .getCompound(0) + .getString("Value"); + + return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="); + } + } + return false; + } } -- cgit From 062e43220c96997e5877759203f36c77b74dcd5b Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:45:19 -0500 Subject: Refactor ClientPlayNetworkHandlerMixin --- .../hysky/skyblocker/config/SkyblockerConfig.java | 174 ++++++++++----------- .../mixin/ClientPlayNetworkHandlerMixin.java | 53 +++---- 2 files changed, 113 insertions(+), 114 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 62e5ed90..358a6635 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -55,47 +55,47 @@ public class SkyblockerConfig { @SerialEntry public QuickNavItem button3 = new QuickNavItem(true, new ItemData("bone"), "Pets(:? \\(\\d+\\/\\d+\\))?", "/pets"); - /* REGEX Explanation - * "Wardrobe" : simple match on letters - * " \\([12]\\/2\\)" : match on the page either " (1/2)" or " (2/2)" - */ - @SerialEntry - public QuickNavItem button4 = new QuickNavItem(true, - new ItemData("leather_chestplate", 1, "tag:{display:{color:8991416}}"), "Wardrobe \\([12]/2\\)", - "/wardrobe"); - - @SerialEntry - public QuickNavItem button5 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-2081424676,-57521078,-2073572414,158072763],Properties:{textures:[{Value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}}}"), - "Sack of Sacks", "/sacks"); - - /* REGEX Explanation - * "(?:Rift )?" : optional match on the non-capturing group "Rift " - * "Storage" : simple match on letters - * "(?: \\([12]\\/2\\))?" : optional match on the non-capturing group " (1/2)" or " (2/2)" - */ - @SerialEntry - public QuickNavItem button6 = new QuickNavItem(true, new ItemData("ender_chest"), - "(?:Rift )?Storage(?: \\(1/2\\))?", "/storage"); - - @SerialEntry - public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), - "none", "/hub"); - - @SerialEntry - public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), - "none", "/warp dungeon_hub"); - - @SerialEntry - public QuickNavItem button9 = new QuickNavItem(true, new ItemData("player_head", 1, - "tag:{SkullOwner:{Id:[I;-562285948,532499670,-1705302742,775653035],Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjVkZjU1NTkyNjQzMGQ1ZDc1YWRlZDIxZGQ5NjE5Yjc2YzViN2NhMmM3ZjU0MDE0NDA1MjNkNTNhOGJjZmFhYiJ9fX0=\"}]}}}"), - "Visit prtl", "/visit prtl"); - - @SerialEntry - public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant Item", - "/etable"); + /* REGEX Explanation + * "Wardrobe" : simple match on letters + * " \\([12]\\/2\\)" : match on the page either " (1/2)" or " (2/2)" + */ + @SerialEntry + public QuickNavItem button4 = new QuickNavItem(true, + new ItemData("leather_chestplate", 1, "tag:{display:{color:8991416}}"), "Wardrobe \\([12]/2\\)", + "/wardrobe"); + + @SerialEntry + public QuickNavItem button5 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;-2081424676,-57521078,-2073572414,158072763],Properties:{textures:[{Value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}}}"), + "Sack of Sacks", "/sacks"); + + /* REGEX Explanation + * "(?:Rift )?" : optional match on the non-capturing group "Rift " + * "Storage" : simple match on letters + * "(?: \\([12]\\/2\\))?" : optional match on the non-capturing group " (1/2)" or " (2/2)" + */ + @SerialEntry + public QuickNavItem button6 = new QuickNavItem(true, new ItemData("ender_chest"), + "(?:Rift )?Storage(?: \\(1/2\\))?", "/storage"); + + @SerialEntry + public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), + "none", "/hub"); + + @SerialEntry + public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), + "none", "/warp dungeon_hub"); + + @SerialEntry + public QuickNavItem button9 = new QuickNavItem(true, new ItemData("player_head", 1, + "tag:{SkullOwner:{Id:[I;-562285948,532499670,-1705302742,775653035],Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjVkZjU1NTkyNjQzMGQ1ZDc1YWRlZDIxZGQ5NjE5Yjc2YzViN2NhMmM3ZjU0MDE0NDA1MjNkNTNhOGJjZmFhYiJ9fX0=\"}]}}}"), + "Visit prtl", "/visit prtl"); + + @SerialEntry + public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant Item", + "/etable"); @SerialEntry @@ -156,11 +156,11 @@ public class SkyblockerConfig { @SerialEntry public boolean acceptReparty = true; - @SerialEntry - public boolean betterPartyFinder = true; + @SerialEntry + public boolean betterPartyFinder = true; - @SerialEntry - public boolean backpackPreviewWithoutShift = false; + @SerialEntry + public boolean backpackPreviewWithoutShift = false; @SerialEntry public boolean compactorDeletorPreview = true; @@ -533,9 +533,9 @@ public class SkyblockerConfig { public float itemRarityBackgroundsOpacity = 1f; } - public enum RarityBackgroundStyle { - CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), - SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); + public enum RarityBackgroundStyle { + CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), + SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); public final Identifier tex; @@ -606,11 +606,11 @@ public class SkyblockerConfig { @SerialEntry public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); - @SerialEntry - public MimicMessage mimicMessage = new MimicMessage(); + @SerialEntry + public MimicMessage mimicMessage = new MimicMessage(); - @SerialEntry - public boolean croesusHelper = true; + @SerialEntry + public boolean croesusHelper = true; @SerialEntry public boolean enableMap = true; @@ -654,11 +654,11 @@ public class SkyblockerConfig { @SerialEntry public boolean floor3GuardianHealthDisplay = true; - @SerialEntry - public boolean allowDroppingProtectedItems = false; + @SerialEntry + public boolean allowDroppingProtectedItems = false; - @SerialEntry - public LividColor lividColor = new LividColor(); + @SerialEntry + public LividColor lividColor = new LividColor(); @SerialEntry public Terminals terminals = new Terminals(); @@ -721,10 +721,10 @@ public class SkyblockerConfig { @SerialEntry public Type doorHighlightType = Type.OUTLINED_HIGHLIGHT; - public enum Type { - HIGHLIGHT, - OUTLINED_HIGHLIGHT, - OUTLINE; + public enum Type { + HIGHLIGHT, + OUTLINED_HIGHLIGHT, + OUTLINE; @Override public String toString() { @@ -759,21 +759,21 @@ public class SkyblockerConfig { @SerialEntry public boolean enableDungeonScore300Sound = true; - @SerialEntry - public String dungeonScore300Message = "300 Score Reached!"; + @SerialEntry + public String dungeonScore300Message = "300 Score Reached!"; - @SerialEntry - public boolean enableScoreHUD = true; + @SerialEntry + public boolean enableScoreHUD = true; - @SerialEntry - public int scoreX = 29; + @SerialEntry + public int scoreX = 29; - @SerialEntry - public int scoreY = 134; + @SerialEntry + public int scoreY = 134; - @SerialEntry - public float scoreScaling = 1f; - } + @SerialEntry + public float scoreScaling = 1f; + } public static class DungeonChestProfit { @SerialEntry @@ -801,17 +801,17 @@ public class SkyblockerConfig { public Formatting incompleteColor = Formatting.BLUE; } - public static class MimicMessage { - @SerialEntry - public boolean sendMimicMessage = true; + public static class MimicMessage { + @SerialEntry + public boolean sendMimicMessage = true; - @SerialEntry - public String mimicMessage = "Mimic dead!"; - } + @SerialEntry + public String mimicMessage = "Mimic dead!"; + } - public static class LividColor { - @SerialEntry - public boolean enableLividColorGlow = true; + public static class LividColor { + @SerialEntry + public boolean enableLividColorGlow = true; @SerialEntry public boolean enableLividColorText = true; @@ -1004,15 +1004,15 @@ public class SkyblockerConfig { @SerialEntry public ChatFilterResult hideToggleSkyMall = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideMimicKill = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideMimicKill = ChatFilterResult.PASS; - @SerialEntry - public ChatFilterResult hideDeath = ChatFilterResult.PASS; + @SerialEntry + public ChatFilterResult hideDeath = ChatFilterResult.PASS; - @SerialEntry - public boolean hideMana = false; - } + @SerialEntry + public boolean hideMana = false; + } public enum Info { PURSE, BITS, LOCATION; diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java index e1a28262..1f56fe34 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java @@ -17,8 +17,8 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityStatuses; import net.minecraft.entity.ItemEntity; import net.minecraft.entity.LivingEntity; -import net.minecraft.network.packet.s2c.play.EntityStatusS2CPacket; import net.minecraft.network.packet.s2c.play.BlockUpdateS2CPacket; +import net.minecraft.network.packet.s2c.play.EntityStatusS2CPacket; import net.minecraft.network.packet.s2c.play.ParticleS2CPacket; import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket; import net.minecraft.util.Identifier; @@ -31,10 +31,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ClientPlayNetworkHandler.class) public abstract class ClientPlayNetworkHandlerMixin { - - @Inject(method = "onPlaySound", at = @At("RETURN")) - private void skyblocker$onPlaySound(PlaySoundS2CPacket packet, CallbackInfo ci) { - FishingHelper.onSound(packet); + @Inject(method = "onBlockUpdate", at = @At("RETURN")) + private void skyblocker$onBlockUpdate(BlockUpdateS2CPacket packet, CallbackInfo ci) { + if (Utils.isInTheEnd() && SlayerUtils.isInSlayer()) { + BeaconHighlighter.beaconPositions.remove(packet.getPos()); + if (packet.getState().isOf(Blocks.BEACON)) { + BeaconHighlighter.beaconPositions.add(packet.getPos()); + } + } } @ModifyVariable(method = "onItemPickupAnimation", at = @At(value = "STORE", ordinal = 0)) @@ -48,14 +52,25 @@ public abstract class ClientPlayNetworkHandlerMixin { return !Utils.isOnHypixel(); } + @ModifyExpressionValue(method = "onEntityStatus", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/EntityStatusS2CPacket;getEntity(Lnet/minecraft/world/World;)Lnet/minecraft/entity/Entity;")) + private Entity skyblocker$onEntityDeath(Entity entity, @Local(argsOnly = true) EntityStatusS2CPacket packet) { + if (packet.getStatus() == EntityStatuses.PLAY_DEATH_SOUND_OR_ADD_PROJECTILE_HIT_PARTICLES) DungeonScore.handleEntityDeath(entity); + return entity; + } + @WrapWithCondition(method = "onPlayerList", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false)) private boolean skyblocker$cancelPlayerListWarning(Logger instance, String format, Object arg1, Object arg2) { return !Utils.isOnHypixel(); } - @WrapWithCondition(method = "onTeam", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;[Ljava/lang/Object;)V", remap = false)) - private boolean skyblocker$cancelTeamWarning(Logger instance, String format, Object... arg) { - return !Utils.isOnHypixel(); + @Inject(method = "onPlaySound", at = @At("RETURN")) + private void skyblocker$onPlaySound(PlaySoundS2CPacket packet, CallbackInfo ci) { + FishingHelper.onSound(packet); + } + + @WrapWithCondition(method = "warnOnUnknownPayload", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false)) + private boolean skyblocker$dropBadlionPacketWarnings(Logger instance, String message, Object identifier) { + return !(Utils.isOnHypixel() && ((Identifier) identifier).getNamespace().equals("badlion")); } @WrapWithCondition(method = { "onScoreboardScoreUpdate", "onScoreboardScoreReset" }, at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false)) @@ -63,29 +78,13 @@ public abstract class ClientPlayNetworkHandlerMixin { return !Utils.isOnHypixel(); } - @WrapWithCondition(method = "warnOnUnknownPayload", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false)) - private boolean skyblocker$dropBadlionPacketWarnings(Logger instance, String message, Object identifier) { - return !(Utils.isOnHypixel() && ((Identifier) identifier).getNamespace().equals("badlion")); + @WrapWithCondition(method = "onTeam", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;[Ljava/lang/Object;)V", remap = false)) + private boolean skyblocker$cancelTeamWarning(Logger instance, String format, Object... arg) { + return !Utils.isOnHypixel(); } @Inject(method = "onParticle", at = @At("RETURN")) private void skyblocker$onParticle(ParticleS2CPacket packet, CallbackInfo ci) { MythologicalRitual.onParticle(packet); } - - @ModifyExpressionValue(method = "onEntityStatus", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/EntityStatusS2CPacket;getEntity(Lnet/minecraft/world/World;)Lnet/minecraft/entity/Entity;")) - private Entity skyblocker$onEntityDeath(Entity entity, @Local(argsOnly = true) EntityStatusS2CPacket packet) { - if (packet.getStatus() == EntityStatuses.PLAY_DEATH_SOUND_OR_ADD_PROJECTILE_HIT_PARTICLES) - DungeonScore.handleEntityDeath(entity); - return entity; - } - @Inject(method = "onBlockUpdate", at = @At("RETURN")) - private void skyblocker$onBlockUpdate(BlockUpdateS2CPacket packet, CallbackInfo ci) { - if (Utils.isInTheEnd() && SlayerUtils.isInSlayer()) { - BeaconHighlighter.beaconPositions.remove(packet.getPos()); - if (packet.getState().isOf(Blocks.BEACON)) { - BeaconHighlighter.beaconPositions.add(packet.getPos()); - } - } - } } -- cgit From b0c70044006f40542487209954d59349fe12e9e7 Mon Sep 17 00:00:00 2001 From: akarahdev Date: Tue, 23 Jan 2024 16:30:18 -0500 Subject: add extra check --- src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/de/hysky/skyblocker') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index a831ddab..d0d58606 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -2,6 +2,7 @@ package de.hysky.skyblocker.skyblock.entity; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.skyblock.dungeon.LividColor; +import de.hysky.skyblocker.utils.SlayerUtils; import de.hysky.skyblocker.utils.Utils; import de.hysky.skyblocker.utils.render.culling.OcclusionCulling; import net.minecraft.entity.Entity; @@ -65,6 +66,7 @@ public class MobGlow { // Enderman Slayer // Highlights Nukekubi Heads return SkyblockerConfigManager.get().slayer.endermanSlayer.highlightNukekubiHeads + && SlayerUtils.isInSlayer() && entity instanceof ArmorStandEntity armorStandEntity && isNukekubiHead(armorStandEntity); } -- cgit