From 37365dd77a5f706ae8b5fa60655482e407ef2193 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Fri, 5 Apr 2024 04:43:12 -0400 Subject: Custom Animated Dyes --- src/main/resources/assets/skyblocker/lang/en_us.json | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index dd44b8fe..104163db 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -545,6 +545,14 @@ "skyblocker.customArmorTrims.added": "§fSet a custom armor trim for your currently held item!", "skyblocker.customArmorTrims.noItemUuid": "§cYou must be holding an item that has a uuid in order to set a custom armor trim!", "skyblocker.customArmorTrims.unableToSetTrim": "§cUnable to set a custom armor trim :( (Are you in skyblock?, are you holding an item?)", + + "skyblocker.customAnimatedDyes.invalidHex": "§cAn invalid HEX color code was supplied!", + "skyblocker.customAnimatedDyes.notDyeable": "§cThis item isn't a dyeable armor piece!", + "skyblocker.customAnimatedDyes.removed": "Removed this item's custom animated dye.", + "skyblocker.customAnimatedDyes.neverHad": "This item doesn't have a custom animated dye set, but why not add one? ;)", + "skyblocker.customAnimatedDyes.added": "Set a custom animated dye for your currently held item!", + "skyblocker.customAnimatedDyes.noItemUuid": "§cYou must be holding an item that has a uuid in order to set a custom animated dye.", + "skyblocker.customAnimatedDyes.unableToSetDye": "§cUnable to set a custom animated dye :( (Are you in skyblock?, are you holding an item?)", "skyblocker.quiverWarning.50Left": "You only have 50 Arrows left in your Quiver!", "skyblocker.quiverWarning.10Left": "You only have 10 Arrows left in your Quiver!", @@ -564,6 +572,7 @@ "skyblocker.tips.customItemNames": "Customize the names of your items with /skyblocker custom renameItem", "skyblocker.tips.customArmorDyeColors": "Apply a custom dye color to your leather armour with /skyblocker custom dyeColor", "skyblocker.tips.customArmorTrims": "You can set custom armor trims on your armor using /skyblocker custom armorTrim.", + "skyblocker.tips.customAnimatedDyes": "You can apply a custom animated dye to your leather armour with /skyblocker custom animatedDye!", "skyblocker.tips.fancyTabExtraInfo": "Did you know you can see extra info on our fancy tab menu when holding N or M?", "skyblocker.tips.helpCommand": "Use command /skyblocker help and you might find some more nifty features!", "skyblocker.tips.discordRichPresence": "Use Discord Rich Presence to show your friends how loaded you are!", -- cgit From 72f269cc871c252c72ce52d553ca7ff2e74dfda4 Mon Sep 17 00:00:00 2001 From: olim Date: Mon, 8 Apr 2024 16:45:41 +0100 Subject: add ability to share crystal waypoint locations --- .../skyblock/dwarven/CrystalsLocationsManager.java | 27 ++++++++++++++++++++++ .../resources/assets/skyblocker/lang/en_us.json | 1 + 2 files changed, 28 insertions(+) (limited to 'src/main/resources/assets') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java index f43574ab..560cb1a3 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java @@ -9,6 +9,7 @@ import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.utils.Constants; import de.hysky.skyblocker.utils.Utils; +import de.hysky.skyblocker.utils.scheduler.MessageScheduler; import de.hysky.skyblocker.utils.scheduler.Scheduler; import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; @@ -40,6 +41,7 @@ import org.slf4j.Logger; import static com.mojang.brigadier.arguments.StringArgumentType.getString; import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument; import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal; +import static net.minecraft.command.CommandSource.suggestMatching; public class CrystalsLocationsManager { private static final Logger LOGGER = LogUtils.getLogger(); @@ -113,9 +115,16 @@ public class CrystalsLocationsManager { .then(literal("crystalWaypoints") .then(argument("pos", BlockPosArgumentType.blockPos()) .then(argument("place", StringArgumentType.greedyString()) + .suggests((context, builder) -> suggestMatching(WAYPOINT_LOCATIONS.keySet(), builder)) .executes(context -> addWaypointFromCommand(context.getSource(), getString(context, "place"), context.getArgument("pos", PosArgument.class))) ) ) + .then(literal("share") + .then(argument("place",StringArgumentType.greedyString()) + .suggests((context, builder) -> suggestMatching(WAYPOINT_LOCATIONS.keySet(), builder)) + .executes(context -> shareWaypoint(getString(context, "place"))) + ) + ) ) ); } @@ -159,6 +168,24 @@ public class CrystalsLocationsManager { return Command.SINGLE_SUCCESS; } + public static int shareWaypoint(String place) { + if (activeWaypoints.containsKey(place)) { + BlockPos location = activeWaypoints.get(place).pos; + MessageScheduler.INSTANCE.sendMessageAfterCooldown(Constants.PREFIX.get().getString()+ " " + place + ": " + location.getX() + ", " + location.getY() + ", " + location.getZ()); + } + else { + //send fail message + if (CLIENT.player == null || CLIENT.getNetworkHandler() == null) { + return 0; + } + MutableText failMessage = Constants.PREFIX.get(); + failMessage.append(Text.translatable("text.autoconfig.skyblocker.option.locations.dwarvenMines.crystalsWaypoints.shareFail").withColor(Color.RED.getRGB())); + CLIENT.player.sendMessage(failMessage, false); + } + + return Command.SINGLE_SUCCESS; + } + private static void addCustomWaypoint(String waypointName, BlockPos pos) { CrystalsWaypoint.Category category = WAYPOINT_LOCATIONS.get(waypointName); diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 84409b9f..cb3c265b 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -344,6 +344,7 @@ "text.autoconfig.skyblocker.option.locations.dwarvenMines.crystalsWaypoints.enabled.@Tooltip": "Show a waypoint (waypoint selected in general/waypoints) at important areas in the crystal hollows e.g. Jungle Temple and Fairy Grotto. ", "text.autoconfig.skyblocker.option.locations.dwarvenMines.crystalsWaypoints.findInChat": "Find Waypoints In Chat", "text.autoconfig.skyblocker.option.locations.dwarvenMines.crystalsWaypoints.findInChat.@Tooltip": "When in crystal hollows read the chat to see if coordinates are sent and extract these to show as waypoint or on the map", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.crystalsWaypoints.shareFail": "Can only share waypoints you have found.", "text.autoconfig.skyblocker.option.locations.rift": "The Rift", "text.autoconfig.skyblocker.option.locations.rift.mirrorverseWaypoints": "Enable Mirrorverse Waypoints", -- cgit