From eee4b1fe4a95a18147476dac4623268dc8863b0a Mon Sep 17 00:00:00 2001 From: Buuz135 Date: Thu, 11 Jul 2024 16:55:04 +0200 Subject: [PATCH] Fixed fabric loading, closes #107 --- .../java/com/hrznstudio/emojiful/EmojifulFabric.java | 11 ++++++++++- gradle.properties | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Fabric/src/main/java/com/hrznstudio/emojiful/EmojifulFabric.java b/Fabric/src/main/java/com/hrznstudio/emojiful/EmojifulFabric.java index 3cd73d9..fdb695d 100644 --- a/Fabric/src/main/java/com/hrznstudio/emojiful/EmojifulFabric.java +++ b/Fabric/src/main/java/com/hrznstudio/emojiful/EmojifulFabric.java @@ -11,13 +11,22 @@ import net.minecraft.client.gui.screens.ChatScreen; import net.minecraft.client.gui.screens.InBedChatScreen; import net.minecraft.client.gui.screens.Screen; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; public class EmojifulFabric implements ModInitializer { - public static final RecipeType EMOJI_RECIPE_TYPE = RecipeType.register(Constants.MOD_ID + ":emoji_recipe_type"); + public static final RecipeType EMOJI_RECIPE_TYPE = Registry.register(BuiltInRegistries.RECIPE_TYPE, + ResourceLocation.fromNamespaceAndPath(Constants.MOD_ID, "emoji_recipe_type"), new RecipeType() { + @Override + public String toString() { + return "emoji_recipe_type"; + } + }); public static final RecipeSerializer EMOJI_RECIPE_SERIALIZER = RecipeSerializer.register(Constants.MOD_ID + ":emoji_recipe", new EmojiRecipeSerializer()); @Override diff --git a/gradle.properties b/gradle.properties index df4c1a1..092bd43 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Project -version=5.1.1 +version=5.1.2 group=com.hrznstudio.emojiful #Parchment