From 95a38421519af165344b2b5a05c9898ce3b7e8a1 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Fri, 31 Mar 2023 02:19:41 -0400 Subject: Add adjustable dungeon map scaling --- src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java | 1 + .../java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index 21322c81..d41a1062 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -252,6 +252,7 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Gui.Tooltip() public final boolean croesusHelper = true; public final boolean enableMap = true; + public final float mapScaling = 1f; public final boolean solveThreeWeirdos = true; public final boolean blazesolver = true; public final boolean solveTrivia = true; diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java index e0158bc5..dda8da41 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonMap.java @@ -1,5 +1,8 @@ package me.xmrvizzy.skyblocker.skyblock.dungeon; +import org.apache.commons.lang3.StringUtils; + +import me.xmrvizzy.skyblocker.config.SkyblockerConfig; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.MapRenderer; import net.minecraft.client.render.VertexConsumerProvider; @@ -8,7 +11,6 @@ import net.minecraft.item.FilledMapItem; import net.minecraft.item.ItemStack; import net.minecraft.item.map.MapState; import net.minecraft.nbt.NbtCompound; -import org.apache.commons.lang3.StringUtils; public class DungeonMap { @@ -25,11 +27,12 @@ public class DungeonMap { VertexConsumerProvider.Immediate vertices = client.getBufferBuilders().getEffectVertexConsumers(); MapRenderer map = client.gameRenderer.getMapRenderer(); MapState state = FilledMapItem.getMapState(mapid, client.world); + float scaling = SkyblockerConfig.get().locations.dungeons.mapScaling; if (state == null) return; matrices.push(); matrices.translate(2, 2, 0); - matrices.scale(1, 1, 0); + matrices.scale(scaling, scaling, 0f); map.draw( matrices, vertices, mapid, state, false, 15728880); vertices.draw(); matrices.pop(); -- cgit From 447b0558aa57b4fae036186a58e980f2969b5890 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Fri, 31 Mar 2023 02:44:16 -0400 Subject: Remove final modifier --- src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index d41a1062..35786397 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -252,7 +252,7 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Gui.Tooltip() public final boolean croesusHelper = true; public final boolean enableMap = true; - public final float mapScaling = 1f; + public float mapScaling = 1f; public final boolean solveThreeWeirdos = true; public final boolean blazesolver = true; public final boolean solveTrivia = true; -- cgit From 682bb4acccb7bc2aba0ee3cd1a152cfb6662207a Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 18:02:05 +0200 Subject: create the treasure hunter solver --- .../skyblocker/chat/ChatMessageListener.java | 2 + .../skyblocker/config/SkyblockerConfig.java | 8 +++ .../skyblocker/skyblock/barn/TreasureHunter.java | 60 ++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java b/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java index 2e23bf31..28c5331c 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java +++ b/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java @@ -7,6 +7,7 @@ import me.xmrvizzy.skyblocker.skyblock.dungeon.ThreeWeirdos; import me.xmrvizzy.skyblocker.skyblock.dungeon.Trivia; import me.xmrvizzy.skyblocker.skyblock.dwarven.Fetchur; import me.xmrvizzy.skyblocker.skyblock.dwarven.Puzzler; +import me.xmrvizzy.skyblocker.skyblock.barn.TreasureHunter; import net.fabricmc.fabric.api.event.Event; import net.fabricmc.fabric.api.event.EventFactory; import net.minecraft.text.Text; @@ -30,6 +31,7 @@ public interface ChatMessageListener { new Reparty(), new ThreeWeirdos(), new Trivia(), + new TreasureHunter(), // Filters new AbilityFilter(), new AdFilter(), diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index a13f86b3..8e56d218 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -246,6 +246,10 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Category("dwarvenmines") @ConfigEntry.Gui.CollapsibleObject() public DwarvenMines dwarvenMines = new DwarvenMines(); + + @ConfigEntry.Category("barn") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public Barn barn = new Barn(); } public static class Dungeons { @@ -280,6 +284,10 @@ public class SkyblockerConfig implements ConfigData { public int y = 10; } + public static class Barn { + public boolean solveTreasureHunter = true; + } + public static class Messages { @ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON) public ChatFilterResult hideAbility = ChatFilterResult.PASS; diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java new file mode 100644 index 00000000..faf20c08 --- /dev/null +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -0,0 +1,60 @@ +package me.xmrvizzy.skyblocker.skyblock.barn; + +import me.xmrvizzy.skyblocker.chat.ChatFilterResult; +import me.xmrvizzy.skyblocker.chat.ChatPatternListener; +import me.xmrvizzy.skyblocker.config.SkyblockerConfig; +import net.minecraft.client.MinecraftClient; +import net.minecraft.text.Text; + +import java.util.HashMap; +import java.util.Map; +import java.util.regex.Matcher; + +public class TreasureHunter extends ChatPatternListener { + + private static final Map locations; + + public TreasureHunter() { super("^§e\\[NPC] Treasure Hunter§f: ([a-zA-Z, '\\-.]*)$"); } + + @Override + public ChatFilterResult state() { + return SkyblockerConfig.get().locations.barn.solveTreasureHunter ? ChatFilterResult.FILTER : ChatFilterResult.PASS; + } + + @Override + public boolean onMatch(Text message, Matcher matcher) { + MinecraftClient client = MinecraftClient.getInstance(); + if (client.player == null) return false; + String hint = matcher.group(1); + String location = locations.getOrDefault(hint, hint); + client.player.sendMessage(Text.of("§e[NPC] Treasure Hunter§f: " + location), false); + return true; + } + + static { + locations = new HashMap<>(); + locations.put("There's a treasure chest somewhere in a small cave in the gorge.", "256 70 -490"); + locations.put("I was in the desert earlier, and I saw something near a red sand rock.", "357 82 -319"); + locations.put("There's this guy who collects animals to experiment on, I think I saw something near his house.", "259 184 -564"); + locations.put("There's a small house in the gorge, I saw some treasure near there.", "297 87 -562"); + locations.put("There's this guy who says he has the best sheep in the world. I think I saw something around his hut.", "392 85 -372"); + locations.put("I spotted something by an odd looking mushroom on one of the ledges in the Mushroom Gorge, you should check it out.", "305 73 -557"); + locations.put("There are some small ruins out in the desert, might want to check it out.", "320 102 -471"); + locations.put("Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there.", "234 56 -410"); + locations.put("There some old stone structures in the Mushroom Gorge, give it a look.", "223 54 -503"); + locations.put("In the Mushroom Gorge where blue meets the ceiling and floor, you will find what you are looking for.", "205 42 -527"); + locations.put("There was a haystack with a crop greener than usual around it, I think there is something near there.", "334 82 -389"); + locations.put("There's a single piece of tall grass growing in the desert, I saw something there.", "283 76 -363"); + locations.put("I saw some treasure by a cow skull near the village.", "141 77 -397"); + locations.put("Near a melon patch inside a tunnel in the mountain I spotted something.", "257 100 -569"); + locations.put("I saw something near a farmer's cart, you should check it out.", "155 90 -591"); + locations.put("I remember there was a stone pillar made only of cobblestone in the oasis, could be something there.", "122 66 -409"); + locations.put("I thought I saw something near the smallest stone pillar in the oasis.", "94 65 -455"); + locations.put("I found something by a mossy stone pillar in the oasis, you should taking a look.", "179 93 -537"); + locations.put("Down in the glowing Mushroom Cave, there was a weird looking mushroom, check it out.", "182 44 -451"); + locations.put("Something caught my eye by the red sand near the bridge over the gorge.", "306 105 -489"); + locations.put("I seem to recall seeing something near the well in the village.", "170 77 -375"); + locations.put("I was down near the lower oasis yesterday, I think I saw something under the bridge.", "142 69 -448"); + locations.put("I was at the upper oasis today, I recall seeing something on the cobblestone stepping stones.", "188 77 -459"); + } +} \ No newline at end of file -- cgit From 40708e905c703e912761a00b4caf0d6f8c080524 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 18:13:08 +0200 Subject: smol changes --- src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java | 2 +- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index 8e56d218..7559902a 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -248,7 +248,7 @@ public class SkyblockerConfig implements ConfigData { public DwarvenMines dwarvenMines = new DwarvenMines(); @ConfigEntry.Category("barn") - @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + @ConfigEntry.Gui.CollapsibleObject() public Barn barn = new Barn(); } diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index faf20c08..2fd5d4d3 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -27,7 +27,7 @@ public class TreasureHunter extends ChatPatternListener { if (client.player == null) return false; String hint = matcher.group(1); String location = locations.getOrDefault(hint, hint); - client.player.sendMessage(Text.of("§e[NPC] Treasure Hunter§f: " + location), false); + client.player.sendMessage(Text.of("§e[NPC] Treasure Hunter§f: Go mine around " + location), false); return true; } -- cgit From a44f7bf5336204ff2b39398d8750f0a25331ceb4 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 21:09:42 +0200 Subject: try to fix the regex --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index 2fd5d4d3..a146cc81 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -14,7 +14,7 @@ public class TreasureHunter extends ChatPatternListener { private static final Map locations; - public TreasureHunter() { super("^§e\\[NPC] Treasure Hunter§f: ([a-zA-Z, '\\-.]*)$"); } + public TreasureHunter() { super("^§e\\[NPC] Treasure Hunter§f: ([a-zA-Z, '\\-]*)\\.$"); } @Override public ChatFilterResult state() { -- cgit From 9d49b7f872091d8a04e12d5c80175a727a6ce82c Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 21:20:49 +0200 Subject: final fix --- .../skyblocker/skyblock/barn/TreasureHunter.java | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index a146cc81..8bbfeeb3 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -33,28 +33,28 @@ public class TreasureHunter extends ChatPatternListener { static { locations = new HashMap<>(); - locations.put("There's a treasure chest somewhere in a small cave in the gorge.", "256 70 -490"); - locations.put("I was in the desert earlier, and I saw something near a red sand rock.", "357 82 -319"); - locations.put("There's this guy who collects animals to experiment on, I think I saw something near his house.", "259 184 -564"); - locations.put("There's a small house in the gorge, I saw some treasure near there.", "297 87 -562"); - locations.put("There's this guy who says he has the best sheep in the world. I think I saw something around his hut.", "392 85 -372"); - locations.put("I spotted something by an odd looking mushroom on one of the ledges in the Mushroom Gorge, you should check it out.", "305 73 -557"); - locations.put("There are some small ruins out in the desert, might want to check it out.", "320 102 -471"); - locations.put("Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there.", "234 56 -410"); - locations.put("There some old stone structures in the Mushroom Gorge, give it a look.", "223 54 -503"); - locations.put("In the Mushroom Gorge where blue meets the ceiling and floor, you will find what you are looking for.", "205 42 -527"); - locations.put("There was a haystack with a crop greener than usual around it, I think there is something near there.", "334 82 -389"); - locations.put("There's a single piece of tall grass growing in the desert, I saw something there.", "283 76 -363"); - locations.put("I saw some treasure by a cow skull near the village.", "141 77 -397"); - locations.put("Near a melon patch inside a tunnel in the mountain I spotted something.", "257 100 -569"); - locations.put("I saw something near a farmer's cart, you should check it out.", "155 90 -591"); - locations.put("I remember there was a stone pillar made only of cobblestone in the oasis, could be something there.", "122 66 -409"); - locations.put("I thought I saw something near the smallest stone pillar in the oasis.", "94 65 -455"); - locations.put("I found something by a mossy stone pillar in the oasis, you should taking a look.", "179 93 -537"); - locations.put("Down in the glowing Mushroom Cave, there was a weird looking mushroom, check it out.", "182 44 -451"); - locations.put("Something caught my eye by the red sand near the bridge over the gorge.", "306 105 -489"); - locations.put("I seem to recall seeing something near the well in the village.", "170 77 -375"); - locations.put("I was down near the lower oasis yesterday, I think I saw something under the bridge.", "142 69 -448"); - locations.put("I was at the upper oasis today, I recall seeing something on the cobblestone stepping stones.", "188 77 -459"); + locations.put("There's a treasure chest somewhere in a small cave in the gorge", "256 70 -490"); + locations.put("I was in the desert earlier, and I saw something near a red sand rock", "357 82 -319"); + locations.put("There's this guy who collects animals to experiment on, I think I saw something near his house", "259 184 -564"); + locations.put("There's a small house in the gorge, I saw some treasure near there", "297 87 -562"); + locations.put("There's this guy who says he has the best sheep in the world. I think I saw something around his hut", "392 85 -372"); + locations.put("I spotted something by an odd looking mushroom on one of the ledges in the Mushroom Gorge, you should check it out", "305 73 -557"); + locations.put("There are some small ruins out in the desert, might want to check it out", "320 102 -471"); + locations.put("Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there", "234 56 -410"); + locations.put("There some old stone structures in the Mushroom Gorge, give it a look", "223 54 -503"); + locations.put("In the Mushroom Gorge where blue meets the ceiling and floor, you will find what you are looking for", "205 42 -527"); + locations.put("There was a haystack with a crop greener than usual around it, I think there is something near there", "334 82 -389"); + locations.put("There's a single piece of tall grass growing in the desert, I saw something there", "283 76 -363"); + locations.put("I saw some treasure by a cow skull near the village", "141 77 -397"); + locations.put("Near a melon patch inside a tunnel in the mountain I spotted something", "257 100 -569"); + locations.put("I saw something near a farmer's cart, you should check it out", "155 90 -591"); + locations.put("I remember there was a stone pillar made only of cobblestone in the oasis, could be something there", "122 66 -409"); + locations.put("I thought I saw something near the smallest stone pillar in the oasis", "94 65 -455"); + locations.put("I found something by a mossy stone pillar in the oasis, you should taking a look", "179 93 -537"); + locations.put("Down in the glowing Mushroom Cave, there was a weird looking mushroom, check it out", "182 44 -451"); + locations.put("Something caught my eye by the red sand near the bridge over the gorge", "306 105 -489"); + locations.put("I seem to recall seeing something near the well in the village", "170 77 -375"); + locations.put("I was down near the lower oasis yesterday, I think I saw something under the bridge", "142 69 -448"); + locations.put("I was at the upper oasis today, I recall seeing something on the cobblestone stepping stones", "188 77 -459"); } } \ No newline at end of file -- cgit From f34a7eb51e12ce45f4424bfd6ae583870435c35a Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 21:31:34 +0200 Subject: final fix fr this time thanks for this part ! Co-Authored-By: ExternalTime <84183548+ExternalTime@users.noreply.github.com> --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index 8bbfeeb3..731f746e 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -26,7 +26,8 @@ public class TreasureHunter extends ChatPatternListener { MinecraftClient client = MinecraftClient.getInstance(); if (client.player == null) return false; String hint = matcher.group(1); - String location = locations.getOrDefault(hint, hint); + String location = locations.get(hint); + if (location == null) return false; client.player.sendMessage(Text.of("§e[NPC] Treasure Hunter§f: Go mine around " + location), false); return true; } -- cgit From 71df5972db63a032efe919d6620cc98054a90e4a Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 21:42:29 +0200 Subject: fix one sentence which is wrong on the official wiki --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index 731f746e..b7718cd1 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -42,7 +42,7 @@ public class TreasureHunter extends ChatPatternListener { locations.put("I spotted something by an odd looking mushroom on one of the ledges in the Mushroom Gorge, you should check it out", "305 73 -557"); locations.put("There are some small ruins out in the desert, might want to check it out", "320 102 -471"); locations.put("Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there", "234 56 -410"); - locations.put("There some old stone structures in the Mushroom Gorge, give it a look", "223 54 -503"); + locations.put("There are some old stone structures in the Mushroom Gorge, give them a look", "223 54 -503"); locations.put("In the Mushroom Gorge where blue meets the ceiling and floor, you will find what you are looking for", "205 42 -527"); locations.put("There was a haystack with a crop greener than usual around it, I think there is something near there", "334 82 -389"); locations.put("There's a single piece of tall grass growing in the desert, I saw something there", "283 76 -363"); -- cgit From 02563e9af133fb92951e37ed9c54d9609c8597b4 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 22:14:54 +0200 Subject: fix official wiki again --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index b7718cd1..1612badb 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -51,7 +51,7 @@ public class TreasureHunter extends ChatPatternListener { locations.put("I saw something near a farmer's cart, you should check it out", "155 90 -591"); locations.put("I remember there was a stone pillar made only of cobblestone in the oasis, could be something there", "122 66 -409"); locations.put("I thought I saw something near the smallest stone pillar in the oasis", "94 65 -455"); - locations.put("I found something by a mossy stone pillar in the oasis, you should taking a look", "179 93 -537"); + locations.put("I found something by a mossy stone pillar in the oasis, you should take a look", "179 93 -537"); locations.put("Down in the glowing Mushroom Cave, there was a weird looking mushroom, check it out", "182 44 -451"); locations.put("Something caught my eye by the red sand near the bridge over the gorge", "306 105 -489"); locations.put("I seem to recall seeing something near the well in the village", "170 77 -375"); -- cgit From 255c60e9e9334c74e6a2f62445aedf7596ccecf4 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 8 Apr 2023 22:22:07 +0200 Subject: modified the regex to make more sense i moved back the dot in the group 1 (but outside of the [] this time and added back dots at the end of the strings in hashmap) --- .../skyblocker/skyblock/barn/TreasureHunter.java | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index 1612badb..e7c8ff36 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -14,7 +14,7 @@ public class TreasureHunter extends ChatPatternListener { private static final Map locations; - public TreasureHunter() { super("^§e\\[NPC] Treasure Hunter§f: ([a-zA-Z, '\\-]*)\\.$"); } + public TreasureHunter() { super("^§e\\[NPC] Treasure Hunter§f: ([a-zA-Z, '\\-]*\\.)$"); } @Override public ChatFilterResult state() { @@ -34,28 +34,28 @@ public class TreasureHunter extends ChatPatternListener { static { locations = new HashMap<>(); - locations.put("There's a treasure chest somewhere in a small cave in the gorge", "256 70 -490"); - locations.put("I was in the desert earlier, and I saw something near a red sand rock", "357 82 -319"); - locations.put("There's this guy who collects animals to experiment on, I think I saw something near his house", "259 184 -564"); - locations.put("There's a small house in the gorge, I saw some treasure near there", "297 87 -562"); - locations.put("There's this guy who says he has the best sheep in the world. I think I saw something around his hut", "392 85 -372"); - locations.put("I spotted something by an odd looking mushroom on one of the ledges in the Mushroom Gorge, you should check it out", "305 73 -557"); - locations.put("There are some small ruins out in the desert, might want to check it out", "320 102 -471"); - locations.put("Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there", "234 56 -410"); - locations.put("There are some old stone structures in the Mushroom Gorge, give them a look", "223 54 -503"); - locations.put("In the Mushroom Gorge where blue meets the ceiling and floor, you will find what you are looking for", "205 42 -527"); - locations.put("There was a haystack with a crop greener than usual around it, I think there is something near there", "334 82 -389"); - locations.put("There's a single piece of tall grass growing in the desert, I saw something there", "283 76 -363"); - locations.put("I saw some treasure by a cow skull near the village", "141 77 -397"); - locations.put("Near a melon patch inside a tunnel in the mountain I spotted something", "257 100 -569"); - locations.put("I saw something near a farmer's cart, you should check it out", "155 90 -591"); - locations.put("I remember there was a stone pillar made only of cobblestone in the oasis, could be something there", "122 66 -409"); - locations.put("I thought I saw something near the smallest stone pillar in the oasis", "94 65 -455"); - locations.put("I found something by a mossy stone pillar in the oasis, you should take a look", "179 93 -537"); - locations.put("Down in the glowing Mushroom Cave, there was a weird looking mushroom, check it out", "182 44 -451"); - locations.put("Something caught my eye by the red sand near the bridge over the gorge", "306 105 -489"); - locations.put("I seem to recall seeing something near the well in the village", "170 77 -375"); - locations.put("I was down near the lower oasis yesterday, I think I saw something under the bridge", "142 69 -448"); - locations.put("I was at the upper oasis today, I recall seeing something on the cobblestone stepping stones", "188 77 -459"); + locations.put("There's a treasure chest somewhere in a small cave in the gorge.", "256 70 -490"); + locations.put("I was in the desert earlier, and I saw something near a red sand rock.", "357 82 -319"); + locations.put("There's this guy who collects animals to experiment on, I think I saw something near his house.", "259 184 -564"); + locations.put("There's a small house in the gorge, I saw some treasure near there.", "297 87 -562"); + locations.put("There's this guy who says he has the best sheep in the world. I think I saw something around his hut.", "392 85 -372"); + locations.put("I spotted something by an odd looking mushroom on one of the ledges in the Mushroom Gorge, you should check it out.", "305 73 -557"); + locations.put("There are some small ruins out in the desert, might want to check it out.", "320 102 -471"); + locations.put("Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there.", "234 56 -410"); + locations.put("There are some old stone structures in the Mushroom Gorge, give them a look.", "223 54 -503"); + locations.put("In the Mushroom Gorge where blue meets the ceiling and floor, you will find what you are looking for.", "205 42 -527"); + locations.put("There was a haystack with a crop greener than usual around it, I think there is something near there.", "334 82 -389"); + locations.put("There's a single piece of tall grass growing in the desert, I saw something there.", "283 76 -363"); + locations.put("I saw some treasure by a cow skull near the village.", "141 77 -397"); + locations.put("Near a melon patch inside a tunnel in the mountain I spotted something.", "257 100 -569"); + locations.put("I saw something near a farmer's cart, you should check it out.", "155 90 -591"); + locations.put("I remember there was a stone pillar made only of cobblestone in the oasis, could be something there.", "122 66 -409"); + locations.put("I thought I saw something near the smallest stone pillar in the oasis.", "94 65 -455"); + locations.put("I found something by a mossy stone pillar in the oasis, you should take a look.", "179 93 -537"); + locations.put("Down in the glowing Mushroom Cave, there was a weird looking mushroom, check it out.", "182 44 -451"); + locations.put("Something caught my eye by the red sand near the bridge over the gorge.", "306 105 -489"); + locations.put("I seem to recall seeing something near the well in the village.", "170 77 -375"); + locations.put("I was down near the lower oasis yesterday, I think I saw something under the bridge.", "142 69 -448"); + locations.put("I was at the upper oasis today, I recall seeing something on the cobblestone stepping stones.", "188 77 -459"); } } \ No newline at end of file -- cgit From da9b635382694f996a3ff695aec48a57d0b04c25 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sun, 9 Apr 2023 01:02:53 +0200 Subject: Hungry Hiker solver --- .../skyblocker/chat/ChatMessageListener.java | 2 + .../skyblocker/config/SkyblockerConfig.java | 1 + .../skyblocker/skyblock/barn/HungryHiker.java | 47 ++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java b/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java index 28c5331c..9ee87f2b 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java +++ b/src/main/java/me/xmrvizzy/skyblocker/chat/ChatMessageListener.java @@ -2,6 +2,7 @@ package me.xmrvizzy.skyblocker.chat; import me.xmrvizzy.skyblocker.chat.filters.*; import me.xmrvizzy.skyblocker.skyblock.api.ApiKeyListener; +import me.xmrvizzy.skyblocker.skyblock.barn.HungryHiker; import me.xmrvizzy.skyblocker.skyblock.dungeon.Reparty; import me.xmrvizzy.skyblocker.skyblock.dungeon.ThreeWeirdos; import me.xmrvizzy.skyblocker.skyblock.dungeon.Trivia; @@ -32,6 +33,7 @@ public interface ChatMessageListener { new ThreeWeirdos(), new Trivia(), new TreasureHunter(), + new HungryHiker(), // Filters new AbilityFilter(), new AdFilter(), diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index 7559902a..3d507301 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -286,6 +286,7 @@ public class SkyblockerConfig implements ConfigData { public static class Barn { public boolean solveTreasureHunter = true; + public boolean solveHungryHiker = true; } public static class Messages { diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java new file mode 100644 index 00000000..0ff487bf --- /dev/null +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java @@ -0,0 +1,47 @@ +package me.xmrvizzy.skyblocker.skyblock.barn; + +import me.xmrvizzy.skyblocker.chat.ChatFilterResult; +import me.xmrvizzy.skyblocker.chat.ChatPatternListener; +import me.xmrvizzy.skyblocker.config.SkyblockerConfig; +import net.minecraft.client.MinecraftClient; +import net.minecraft.text.Text; + +import java.util.HashMap; +import java.util.Map; +import java.util.regex.Matcher; + +public class HungryHiker extends ChatPatternListener { + + private static final Map foods; + + public HungryHiker() { super("^§e\\[NPC] Hungry Hiker§f: (The food I want is|(I asked for) food that is) ([a-zA-Z, '\\-]*\\.)$"); } + + @Override + public ChatFilterResult state() { + return SkyblockerConfig.get().locations.barn.solveHungryHiker ? ChatFilterResult.FILTER : ChatFilterResult.PASS; + } + + @Override + public boolean onMatch(Text message, Matcher matcher) { + MinecraftClient client = MinecraftClient.getInstance(); + if (client.player == null) return false; + String foodDescription = matcher.group(3); + String food = foods.get(foodDescription); + if (food == null) return false; + String middlePartOfTheMessageToSend = matcher.group(2) != null ? matcher.group(2) : matcher.group(1); + client.player.sendMessage(Text.of("§e[NPC] Hungry Hiker§f: " + middlePartOfTheMessageToSend + " " + food), false); + return true; + } + + static { + foods = new HashMap<>(); + foods.put("from a cow.", Text.translatable("item.minecraft.cooked_beef").getString()); + foods.put("from a fowl.", Text.translatable("item.minecraft.cooked_chicken").getString()); + foods.put("red on the inside, green on the outside.", Text.translatable("item.minecraft.melon_slice").getString()); + foods.put("a cooked potato.", Text.translatable("item.minecraft.baked_potato").getString()); + foods.put("a stew.", Text.translatable("item.minecraft.rabbit_stew").getString()); + foods.put("a grilled meat.", Text.translatable("item.minecraft.cooked_porkchop").getString()); + foods.put("red and crunchy.", Text.translatable("item.minecraft.apple").getString()); + foods.put("made of wheat.", Text.translatable("item.minecraft.bread").getString()); + } +} -- cgit From 8abac9f8babb5ffa1c2c0d38bd54cc0788ae1b87 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sun, 9 Apr 2023 01:47:23 +0200 Subject: Change order Sort Additions alphabetically for easier findability --- .../java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index 3d507301..80a8cc64 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -239,6 +239,10 @@ public class SkyblockerConfig implements ConfigData { } public static class Locations { + @ConfigEntry.Category("barn") + @ConfigEntry.Gui.CollapsibleObject() + public Barn barn = new Barn(); + @ConfigEntry.Category("dungeons") @ConfigEntry.Gui.CollapsibleObject() public Dungeons dungeons = new Dungeons(); @@ -246,10 +250,6 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Category("dwarvenmines") @ConfigEntry.Gui.CollapsibleObject() public DwarvenMines dwarvenMines = new DwarvenMines(); - - @ConfigEntry.Category("barn") - @ConfigEntry.Gui.CollapsibleObject() - public Barn barn = new Barn(); } public static class Dungeons { @@ -285,8 +285,8 @@ public class SkyblockerConfig implements ConfigData { } public static class Barn { - public boolean solveTreasureHunter = true; public boolean solveHungryHiker = true; + public boolean solveTreasureHunter = true; } public static class Messages { @@ -325,4 +325,4 @@ public class SkyblockerConfig implements ConfigData { public static SkyblockerConfig get() { return AutoConfig.getConfigHolder(SkyblockerConfig.class).getConfig(); } -} \ No newline at end of file +} -- cgit From d3ceb45bb6e27be2f8ab6d30dfa6944aad65c2ea Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Mon, 10 Apr 2023 12:52:08 +0200 Subject: Update TreasureHunter.java --- .../java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index e7c8ff36..41b42bad 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -40,7 +40,7 @@ public class TreasureHunter extends ChatPatternListener { locations.put("There's a small house in the gorge, I saw some treasure near there.", "297 87 -562"); locations.put("There's this guy who says he has the best sheep in the world. I think I saw something around his hut.", "392 85 -372"); locations.put("I spotted something by an odd looking mushroom on one of the ledges in the Mushroom Gorge, you should check it out.", "305 73 -557"); - locations.put("There are some small ruins out in the desert, might want to check it out.", "320 102 -471"); + locations.put("There are some small ruins out in the desert, might want to check them out.", "320 102 -471"); locations.put("Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there.", "234 56 -410"); locations.put("There are some old stone structures in the Mushroom Gorge, give them a look.", "223 54 -503"); locations.put("In the Mushroom Gorge where blue meets the ceiling and floor, you will find what you are looking for.", "205 42 -527"); @@ -58,4 +58,4 @@ public class TreasureHunter extends ChatPatternListener { locations.put("I was down near the lower oasis yesterday, I think I saw something under the bridge.", "142 69 -448"); locations.put("I was at the upper oasis today, I recall seeing something on the cobblestone stepping stones.", "188 77 -459"); } -} \ No newline at end of file +} -- cgit From 00c7bd2c0fb2243d1e9a4dd52fde124890ab990f Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Thu, 13 Apr 2023 21:03:27 +0200 Subject: change regex this msg can't be picked up otherwise : Some dirt was kicked up by the water pool in the overgrown Mushroom Cave. Have a look over there. --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index 41b42bad..c32847eb 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -14,7 +14,7 @@ public class TreasureHunter extends ChatPatternListener { private static final Map locations; - public TreasureHunter() { super("^§e\\[NPC] Treasure Hunter§f: ([a-zA-Z, '\\-]*\\.)$"); } + public TreasureHunter() { super("^§e\\[NPC] Treasure Hunter§f: ([a-zA-Z, '\\-\\.]*)$"); } @Override public ChatFilterResult state() { -- cgit From 515f7fcf6f284030538ca57142a39c32e045d95e Mon Sep 17 00:00:00 2001 From: msg-programs Date: Sat, 15 Apr 2023 17:05:05 +0200 Subject: Add option to hide empty tooltips in inventories. Hypixel's inventory menus sometimes use items with empty names. When the game draws the tooltip for such an item, a small dark rectangle is seen. Mixin into the function that draws tooltips and disable it when that is the case. --- .../skyblocker/config/SkyblockerConfig.java | 1 + .../me/xmrvizzy/skyblocker/mixin/ScreenMixin.java | 26 ++++++++++++++++++++++ .../resources/assets/skyblocker/lang/en_us.json | 1 + src/main/resources/skyblocker.mixins.json | 3 ++- 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index a13f86b3..05ffc2e9 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -124,6 +124,7 @@ public class SkyblockerConfig implements ConfigData { public static class General { public boolean enableUpdateNotification = true; public boolean backpackPreviewWithoutShift = false; + public boolean hideEmptyTooltips = true; @ConfigEntry.Gui.Excluded public String apiKey; diff --git a/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java new file mode 100644 index 00000000..01f0f2a9 --- /dev/null +++ b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java @@ -0,0 +1,26 @@ +package me.xmrvizzy.skyblocker.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import me.xmrvizzy.skyblocker.config.SkyblockerConfig; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.item.ItemStack; +import net.minecraft.text.Text; + +@Mixin(Screen.class) +public abstract class ScreenMixin { + + @Inject(at = @At("HEAD"), method = "renderTooltip(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/item/ItemStack;II)V", cancellable = true) + public void skyblocker$renderTooltip(MatrixStack matrices, ItemStack itemStack, int x, int y, CallbackInfo ci) { + Text stackName = itemStack.getName(); + String strName = stackName.getString(); + if (SkyblockerConfig.get().general.hideEmptyTooltips && strName.equals(" ")) { + ci.cancel(); + } + } + +} diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 8e7e4041..c0ee7809 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -95,6 +95,7 @@ "skyblocker.update.update_message_end" : " §ato find out about latest features.", "skyblocker.update.hover_text": "Open Modrinth", "text.autoconfig.skyblocker.option.general.enableUpdateNotification": "Update Notification", + "text.autoconfig.skyblocker.option.general.hideEmptyTooltips": "Hide empty tooltips in inventory menus", "skyblocker.api.got_key": "§b[§6Skyblocker§b] §2Automatically set your API key!" } diff --git a/src/main/resources/skyblocker.mixins.json b/src/main/resources/skyblocker.mixins.json index fc37cfb0..4a6be779 100644 --- a/src/main/resources/skyblocker.mixins.json +++ b/src/main/resources/skyblocker.mixins.json @@ -16,7 +16,8 @@ "HandledScreenMixin", "InventoryScreenMixin", "RecipeBookWidgetAccessor", - "HandledScreenAccessor" + "HandledScreenAccessor", + "ScreenMixin" ], "injectors": { "defaultRequire": 1 -- cgit From 75c3b99d14176998789ea0152a02f91c67400d73 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sat, 15 Apr 2023 17:35:18 +0200 Subject: change coord slightly change coord cause better --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index c32847eb..895354c2 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -34,7 +34,7 @@ public class TreasureHunter extends ChatPatternListener { static { locations = new HashMap<>(); - locations.put("There's a treasure chest somewhere in a small cave in the gorge.", "256 70 -490"); + locations.put("There's a treasure chest somewhere in a small cave in the gorge.", "258 70 -492"); locations.put("I was in the desert earlier, and I saw something near a red sand rock.", "357 82 -319"); locations.put("There's this guy who collects animals to experiment on, I think I saw something near his house.", "259 184 -564"); locations.put("There's a small house in the gorge, I saw some treasure near there.", "297 87 -562"); -- cgit From 2938e28e06e33c29e79197b4f473760e3f9e32b7 Mon Sep 17 00:00:00 2001 From: msg-programs Date: Sun, 16 Apr 2023 10:21:02 +0200 Subject: Add missing check for if the player is on skyblock --- src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java index 01f0f2a9..14aa8868 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java +++ b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java @@ -6,6 +6,8 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import me.xmrvizzy.skyblocker.config.SkyblockerConfig; +import me.xmrvizzy.skyblocker.utils.Utils; + import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.item.ItemStack; @@ -18,7 +20,7 @@ public abstract class ScreenMixin { public void skyblocker$renderTooltip(MatrixStack matrices, ItemStack itemStack, int x, int y, CallbackInfo ci) { Text stackName = itemStack.getName(); String strName = stackName.getString(); - if (SkyblockerConfig.get().general.hideEmptyTooltips && strName.equals(" ")) { + if (Utils.isOnSkyblock && SkyblockerConfig.get().general.hideEmptyTooltips && strName.equals(" ")) { ci.cancel(); } } -- cgit From 978359c800d5b98b28e6c987a43074bcfc10a4cf Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Mon, 17 Apr 2023 18:37:34 +0200 Subject: fix Official wiki being wrong again no FR i'm gonna get angry at some point, there are so many errors in it... --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java index 0ff487bf..e1ee7756 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java @@ -36,7 +36,7 @@ public class HungryHiker extends ChatPatternListener { static { foods = new HashMap<>(); foods.put("from a cow.", Text.translatable("item.minecraft.cooked_beef").getString()); - foods.put("from a fowl.", Text.translatable("item.minecraft.cooked_chicken").getString()); + foods.put("meat from a fowl.", Text.translatable("item.minecraft.cooked_chicken").getString()); foods.put("red on the inside, green on the outside.", Text.translatable("item.minecraft.melon_slice").getString()); foods.put("a cooked potato.", Text.translatable("item.minecraft.baked_potato").getString()); foods.put("a stew.", Text.translatable("item.minecraft.rabbit_stew").getString()); -- cgit From fb2e183e0bbcd9f519b740235cf90182cc33e84b Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Wed, 19 Apr 2023 23:44:20 +0200 Subject: fix missing dots at end of sentences --- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java | 2 +- src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java index e1ee7756..b0f0445a 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/HungryHiker.java @@ -29,7 +29,7 @@ public class HungryHiker extends ChatPatternListener { String food = foods.get(foodDescription); if (food == null) return false; String middlePartOfTheMessageToSend = matcher.group(2) != null ? matcher.group(2) : matcher.group(1); - client.player.sendMessage(Text.of("§e[NPC] Hungry Hiker§f: " + middlePartOfTheMessageToSend + " " + food), false); + client.player.sendMessage(Text.of("§e[NPC] Hungry Hiker§f: " + middlePartOfTheMessageToSend + " " + food + "."), false); return true; } diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java index 895354c2..ad5db522 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/barn/TreasureHunter.java @@ -28,7 +28,7 @@ public class TreasureHunter extends ChatPatternListener { String hint = matcher.group(1); String location = locations.get(hint); if (location == null) return false; - client.player.sendMessage(Text.of("§e[NPC] Treasure Hunter§f: Go mine around " + location), false); + client.player.sendMessage(Text.of("§e[NPC] Treasure Hunter§f: Go mine around " + location + "."), false); return true; } -- cgit From 1579fd9396b151690fbd1cafd8e02f919dd5256c Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Sun, 23 Apr 2023 22:50:20 -0400 Subject: There is now 240 fairy souls! --- src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java index 81bee4ba..10a2e413 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java @@ -69,7 +69,7 @@ public class Trivia extends ChatPatternListener { answers.put("What is the status of Storm?", new String[]{"The Wither Lords"}); answers.put("What is the status of Necron?", new String[]{"The Wither Lords"}); answers.put("What is the status of Maxor, Storm, Goldor and Necron?", new String[]{"The Wither Lords"}); - answers.put("How many total Fairy Souls are there?", new String[]{"239 Fairy Souls"}); + answers.put("How many total Fairy Souls are there?", new String[]{"240 Fairy Souls"}); answers.put("How many Fairy Souls are there in Spider's Den?", new String[]{"19 Fairy Souls"}); answers.put("How many Fairy Souls are there in The End?", new String[]{"12 Fairy Souls"}); answers.put("How many Fairy Souls are there in The Farming Islands?", new String[]{"20 Fairy Souls"}); -- cgit