From 017f6a8ab043167dee8cfbd72b33d8f04e957251 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sat, 2 Oct 2021 12:12:12 +0100 Subject: [PATCH] Fixed miscellaneous bugs --- .../main/java/com/willfp/reforges/effects/Effect.java | 10 +++++++++- .../reforges/conditions/conditions/ConditionInBiome.kt | 6 +++++- eco-core/core-plugin/src/main/resources/reforges.json | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/reforges/effects/Effect.java b/eco-core/core-plugin/src/main/java/com/willfp/reforges/effects/Effect.java index 1b3f248..8a940a3 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/reforges/effects/Effect.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/reforges/effects/Effect.java @@ -23,7 +23,6 @@ public abstract class Effect implements Listener, Watcher { /** * The effect ID. */ - @Getter private final String id; /** @@ -36,6 +35,15 @@ public abstract class Effect implements Listener, Watcher { Effects.addNewEffect(this); } + /** + * Get the effect ID. + * + * @return The ID. + */ + public String getId() { + return id; + } + /** * Generate a UUID with a specified index. * diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/conditions/conditions/ConditionInBiome.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/conditions/conditions/ConditionInBiome.kt index d593bf6..abf2955 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/conditions/conditions/ConditionInBiome.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/conditions/conditions/ConditionInBiome.kt @@ -25,6 +25,10 @@ class ConditionInBiome: Condition("in_biome") { } override fun isConditionMet(player: Player, config: JSONConfig): Boolean { - return config.getStrings("biomes").contains(player.world.getBiome(player.location).name.lowercase()) + return config.getStrings("biomes").contains(player.world.getBiome( + player.location.blockX, + player.location.blockY, + player.location.blockZ + ).name.lowercase()) } } \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/reforges.json b/eco-core/core-plugin/src/main/resources/reforges.json index 3bf56fc..0b098f6 100644 --- a/eco-core/core-plugin/src/main/resources/reforges.json +++ b/eco-core/core-plugin/src/main/resources/reforges.json @@ -254,7 +254,7 @@ "id": "prospecting", "name": "Prospecting", "description": [ - "&a+5% &fChance to get &e2$&f for mining a block" + "&a+5% &fChance to get &e\u00242&f for mining a block" ], "targets": [ "pickaxe" @@ -303,7 +303,7 @@ "id": "rich", "name": "Rich", "description": [ - "&a+50$ &fFor each mob kill" + "&a+\u002450 &fFor each mob kill" ], "targets": [ "trident",