aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/isxander/yacl3/gui/utils/ItemRegistryHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/isxander/yacl3/gui/utils/ItemRegistryHelper.java')
-rw-r--r--src/main/java/dev/isxander/yacl3/gui/utils/ItemRegistryHelper.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/dev/isxander/yacl3/gui/utils/ItemRegistryHelper.java b/src/main/java/dev/isxander/yacl3/gui/utils/ItemRegistryHelper.java
index 3c4f03a..bb6c664 100644
--- a/src/main/java/dev/isxander/yacl3/gui/utils/ItemRegistryHelper.java
+++ b/src/main/java/dev/isxander/yacl3/gui/utils/ItemRegistryHelper.java
@@ -1,6 +1,7 @@
package dev.isxander.yacl3.gui.utils;
+import dev.isxander.yacl3.platform.YACLPlatform;
import net.minecraft.ResourceLocationException;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
@@ -26,7 +27,7 @@ public final class ItemRegistryHelper {
*/
public static boolean isRegisteredItem(String identifier) {
try {
- ResourceLocation itemIdentifier = new ResourceLocation(identifier.toLowerCase());
+ ResourceLocation itemIdentifier = YACLPlatform.parseRl(identifier.toLowerCase());
return BuiltInRegistries.ITEM.containsKey(itemIdentifier);
} catch (ResourceLocationException e) {
return false;
@@ -43,7 +44,7 @@ public final class ItemRegistryHelper {
*/
public static Item getItemFromName(String identifier, Item defaultItem) {
try {
- ResourceLocation itemIdentifier = new ResourceLocation(identifier.toLowerCase());
+ ResourceLocation itemIdentifier = YACLPlatform.parseRl(identifier.toLowerCase());
if (BuiltInRegistries.ITEM.containsKey(itemIdentifier)) {
return BuiltInRegistries.ITEM.get(itemIdentifier);
}