diff --git a/build.gradle.kts b/build.gradle.kts index f9fe734..e92c830 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { allprojects { - version = "2.3.3.3" + version = "2.3.3.4" apply() apply(plugin = "java") diff --git a/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/font/WidthManagerImpl.java b/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/font/WidthManagerImpl.java index f742372..54209ae 100644 --- a/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/font/WidthManagerImpl.java +++ b/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/font/WidthManagerImpl.java @@ -29,6 +29,7 @@ import net.kyori.adventure.text.minimessage.internal.parser.node.ElementNode; import net.kyori.adventure.text.minimessage.internal.parser.node.TagNode; import net.kyori.adventure.text.minimessage.internal.parser.node.ValueNode; import net.kyori.adventure.text.minimessage.tag.Inserting; +import net.kyori.adventure.text.minimessage.tag.Tag; import net.momirealms.customnameplates.api.CustomNameplatesPlugin; import net.momirealms.customnameplates.api.manager.WidthManager; import net.momirealms.customnameplates.api.mechanic.background.BackGround; @@ -907,7 +908,6 @@ public class WidthManagerImpl implements WidthManager { ElementNode node = (ElementNode) MiniMessage.miniMessage().deserializeToTree(text); ArrayList> list = new ArrayList<>(); nodeToStringInfo(node, list, Key.of("minecraft", "default"), false); - int totalLength = 0; for (Tuple element : list) { FontData data = getFontData(element.getMid()); @@ -936,7 +936,11 @@ public class WidthManagerImpl implements WidthManager { } else if (node instanceof TagNode tagNode) { if (tagNode.tag() instanceof Inserting inserting) { Component component = inserting.value(); - isBold = component.hasDecoration(TextDecoration.BOLD); + if (component.decoration(TextDecoration.BOLD) == TextDecoration.State.TRUE) { + isBold = true; + } else if (component.decoration(TextDecoration.BOLD) == TextDecoration.State.FALSE) { + isBold = false; + } var key = component.font(); if (key != null) { font = net.momirealms.customnameplates.common.Key.of(key.namespace(), key.value()); diff --git a/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/requirement/RequirementManagerImpl.java b/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/requirement/RequirementManagerImpl.java index 285b8c1..a9c958f 100644 --- a/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/requirement/RequirementManagerImpl.java +++ b/paper/src/main/java/net/momirealms/customnameplates/paper/mechanic/requirement/RequirementManagerImpl.java @@ -378,7 +378,8 @@ public class RequirementManagerImpl implements RequirementManager { return condition -> { String currentWeather; World world = Objects.requireNonNull(condition.getOfflinePlayer().getPlayer()).getWorld(); - if (world.isThundering()) currentWeather = "thunder"; + if (world.hasStorm()) currentWeather = "rainstorm"; + else if (world.isThundering()) currentWeather = "thunder"; else if (world.isClearWeather()) currentWeather = "clear"; else currentWeather = "rain"; for (String weather : weathers) diff --git a/paper/src/main/resources/configs/font-width-data.yml b/paper/src/main/resources/configs/font-width-data.yml index 5fe48c7..2740277 100644 --- a/paper/src/main/resources/configs/font-width-data.yml +++ b/paper/src/main/resources/configs/font-width-data.yml @@ -28,6 +28,16 @@ minecraft:asciillager: - asciillager customcrops:default: + default: 8 + template-loading-sequence: [] + values: + 뀁: -2 + 뀂: 4 + 뀃: 6 + 뀄: 6 + 뀅: 4 + +minecraft:customcrops: default: 8 template-loading-sequence: [] values: