Fixed an issue with armor trim material application

This commit is contained in:
Jules 2024-11-03 22:16:55 +01:00
parent 259707c0fc
commit 3cb01e5bc1

View File

@ -42,7 +42,7 @@ public class TrimMaterialStat extends ChooseStat implements GemStoneStat {
public void whenApplied(@NotNull ItemStackBuilder item, @NotNull StringData data) { public void whenApplied(@NotNull ItemStackBuilder item, @NotNull StringData data) {
if (!(item.getMeta() instanceof ArmorMeta)) return; if (!(item.getMeta() instanceof ArmorMeta)) return;
@Nullable TrimMaterial material = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft(data.toString().toLowerCase())); @Nullable TrimMaterial material = Registry.TRIM_MATERIAL.get(TrimPatternStat.fixNamespacedKey(data.toString().toLowerCase()));
if (material == null) return; if (material == null) return;
final ArmorMeta meta = (ArmorMeta) item.getMeta(); final ArmorMeta meta = (ArmorMeta) item.getMeta();