From de940e3352029d140543379a5f4f9e41af6baa42 Mon Sep 17 00:00:00 2001 From: LatvianModder Date: Thu, 27 Jun 2024 20:12:04 +0300 Subject: [PATCH] Updated neo --- gradle.properties | 2 +- .../mods/kubejs/fluid/KubeJSFluidIngredients.java | 7 ++----- .../mods/kubejs/ingredient/KubeJSIngredients.java | 10 ++++------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/gradle.properties b/gradle.properties index 26b597b2d..9cabb3c9f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ modrinth_id=umyGl7zF minecraft_version=1.21 mod_version=2100.7.0 -neoforge_version=21.0.40-beta +neoforge_version=21.0.42-beta parchment_version=2024.06.23 rhino_version=2100.2.5-build.32 architectury_version=13.0.2 diff --git a/src/main/java/dev/latvian/mods/kubejs/fluid/KubeJSFluidIngredients.java b/src/main/java/dev/latvian/mods/kubejs/fluid/KubeJSFluidIngredients.java index 810723dc2..c41a8d7d4 100644 --- a/src/main/java/dev/latvian/mods/kubejs/fluid/KubeJSFluidIngredients.java +++ b/src/main/java/dev/latvian/mods/kubejs/fluid/KubeJSFluidIngredients.java @@ -1,7 +1,6 @@ package dev.latvian.mods.kubejs.fluid; import dev.latvian.mods.kubejs.KubeJS; -import net.minecraft.network.codec.StreamCodec; import net.neoforged.neoforge.fluids.crafting.FluidIngredientType; import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.NeoForgeRegistries; @@ -11,8 +10,6 @@ public interface KubeJSFluidIngredients { DeferredRegister> REGISTRY = DeferredRegister.create(NeoForgeRegistries.FLUID_INGREDIENT_TYPES, KubeJS.MOD_ID); - // TODO: Report to NeoForge that stream codec should be - Supplier> REGEX = REGISTRY.register("regex", () -> new FluidIngredientType<>(RegExFluidIngredient.CODEC, (StreamCodec) RegExFluidIngredient.STREAM_CODEC)); - - Supplier> NAMESPACE = REGISTRY.register("namespace", () -> new FluidIngredientType<>(NamespaceFluidIngredient.CODEC, (StreamCodec) NamespaceFluidIngredient.STREAM_CODEC)); + Supplier> REGEX = REGISTRY.register("regex", () -> new FluidIngredientType<>(RegExFluidIngredient.CODEC, RegExFluidIngredient.STREAM_CODEC)); + Supplier> NAMESPACE = REGISTRY.register("namespace", () -> new FluidIngredientType<>(NamespaceFluidIngredient.CODEC, NamespaceFluidIngredient.STREAM_CODEC)); } diff --git a/src/main/java/dev/latvian/mods/kubejs/ingredient/KubeJSIngredients.java b/src/main/java/dev/latvian/mods/kubejs/ingredient/KubeJSIngredients.java index 08a2637d3..a08455bdd 100644 --- a/src/main/java/dev/latvian/mods/kubejs/ingredient/KubeJSIngredients.java +++ b/src/main/java/dev/latvian/mods/kubejs/ingredient/KubeJSIngredients.java @@ -1,7 +1,6 @@ package dev.latvian.mods.kubejs.ingredient; import dev.latvian.mods.kubejs.KubeJS; -import net.minecraft.network.codec.StreamCodec; import net.neoforged.neoforge.common.crafting.IngredientType; import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.NeoForgeRegistries; @@ -11,10 +10,9 @@ public interface KubeJSIngredients { DeferredRegister> REGISTRY = DeferredRegister.create(NeoForgeRegistries.Keys.INGREDIENT_TYPES, KubeJS.MOD_ID); - // FIXME: Neo bug - Supplier> WILDCARD = REGISTRY.register("wildcard", () -> new IngredientType<>(WildcardIngredient.CODEC, (StreamCodec) WildcardIngredient.STREAM_CODEC)); - Supplier> TAG = REGISTRY.register("tag", () -> new IngredientType<>(TagIngredient.CODEC, (StreamCodec) TagIngredient.STREAM_CODEC)); - Supplier> NAMESPACE = REGISTRY.register("namespace", () -> new IngredientType<>(NamespaceIngredient.CODEC, (StreamCodec) NamespaceIngredient.STREAM_CODEC)); - Supplier> REGEX = REGISTRY.register("regex", () -> new IngredientType<>(RegExIngredient.CODEC, (StreamCodec) RegExIngredient.STREAM_CODEC)); + Supplier> WILDCARD = REGISTRY.register("wildcard", () -> new IngredientType<>(WildcardIngredient.CODEC, WildcardIngredient.STREAM_CODEC)); + Supplier> TAG = REGISTRY.register("tag", () -> new IngredientType<>(TagIngredient.CODEC, TagIngredient.STREAM_CODEC)); + Supplier> NAMESPACE = REGISTRY.register("namespace", () -> new IngredientType<>(NamespaceIngredient.CODEC, NamespaceIngredient.STREAM_CODEC)); + Supplier> REGEX = REGISTRY.register("regex", () -> new IngredientType<>(RegExIngredient.CODEC, RegExIngredient.STREAM_CODEC)); Supplier> CREATIVE_TAB = REGISTRY.register("creative_tab", () -> new IngredientType<>(CreativeTabIngredient.CODEC, CreativeTabIngredient.STREAM_CODEC)); }