diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-06-14 22:24:22 -0700 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-06-14 22:24:22 -0700 |
commit | ee81f0ac1cb848609a755a875f5df0f5d51fa881 (patch) | |
tree | 76522b793e92f971f324be7935710c4b3b59ba1f /src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java | |
parent | 15a3b944d13e54f4241df78b199403d414b9bd69 (diff) | |
download | Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.tar.gz Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.tar.bz2 Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.zip |
Initial port to 1.19.
Disabled Config Menus for Forge support until it has a 1.19 version.
Disabled AutoRegistry since Forge broke it.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java b/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java index 7c12330..cfbc203 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java @@ -20,6 +20,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Rarity; import net.minecraft.world.item.TooltipFlag; +import net.minecraftforge.registries.ForgeRegistries; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; @@ -150,7 +151,7 @@ public class Selectors @SuppressWarnings("deprecation") public static boolean itemMatches(ItemStack item, String selector) { - String itemResourceLocation = item.getItem().getRegistryName().toString(); + String itemResourceLocation = ForgeRegistries.ITEMS.getKey(item.getItem()).toString(); // Item ID if (selector.equals(itemResourceLocation) || selector.equals(itemResourceLocation.replace("minecraft:", ""))) { |