summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshartte <shartte@users.noreply.github.com>2024-06-13 23:32:54 +0200
committerGitHub <noreply@github.com>2024-06-13 23:32:54 +0200
commit6b865f6fd0bd171ea2dc280086b93f0a2e289ba6 (patch)
tree54c34b775be9a77883be59e6edd2de179a1c0ce6 /src
parentf515fca9aff757dc7bd8ea87d68fc1a92c390bb4 (diff)
Update to 1.21 (#71)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/example/examplemod/Config.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/example/examplemod/Config.java b/src/main/java/com/example/examplemod/Config.java
index 7f5aa8b..d70d1eb 100644
--- a/src/main/java/com/example/examplemod/Config.java
+++ b/src/main/java/com/example/examplemod/Config.java
@@ -45,7 +45,7 @@ public class Config
private static boolean validateItemName(final Object obj)
{
- return obj instanceof String itemName && BuiltInRegistries.ITEM.containsKey(new ResourceLocation(itemName));
+ return obj instanceof String itemName && BuiltInRegistries.ITEM.containsKey(ResourceLocation.parse(itemName));
}
@SubscribeEvent
@@ -57,7 +57,7 @@ public class Config
// convert the list of strings into a set of items
items = ITEM_STRINGS.get().stream()
- .map(itemName -> BuiltInRegistries.ITEM.get(new ResourceLocation(itemName)))
+ .map(itemName -> BuiltInRegistries.ITEM.get(ResourceLocation.parse(itemName)))
.collect(Collectors.toSet());
}
}