diff --git a/build.gradle b/build.gradle index a09dc3916..b2d835b1b 100644 --- a/build.gradle +++ b/build.gradle @@ -118,8 +118,8 @@ repositories { } } maven { - name = "Progwm16 maven - JEI" - url = 'https://dvs1.progwml6.com/files/maven' + name = "JEI" + url = 'https://maven.blamejared.com/' content { includeGroup "mezz.jei" } diff --git a/gradle.properties b/gradle.properties index b27e463cc..80975e036 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -mod_version=1.1.1 -mc_version=1.19.3 +mod_version=1.3.0 +mc_version=1.19.4 -forge_version=1.19.3-44.0.41 +forge_version=1.19.4-45.0.23 mapping_channel=parchment #postfix is target mc version, optional prefix is source parchment mc version -mapping_version=2022.12.18-1.19.3 +mapping_version=1.19.3-2023.03.12-1.19.4 -jei_mc_version=1.19.2 -jei_version=11.4.0.290 +jei_mc_version=1.19.4 +jei_version=TODO -modonomicon_mc_version=1.19.3 -modonomicon_version=1.21.1 \ No newline at end of file +modonomicon_mc_version=1.19.4 +modonomicon_version=1.30.0 \ No newline at end of file diff --git a/src/generated/resources/.cache/3fa62e6e7a071b2d9f296990c67d7a2df0006913 b/src/generated/resources/.cache/3fa62e6e7a071b2d9f296990c67d7a2df0006913 index 5ad654278..af7e7441c 100644 --- a/src/generated/resources/.cache/3fa62e6e7a071b2d9f296990c67d7a2df0006913 +++ b/src/generated/resources/.cache/3fa62e6e7a071b2d9f296990c67d7a2df0006913 @@ -1,6 +1,6 @@ -// 1.19.3 2022-12-29T16:42:22.2946482 Books: theurgy -3287d72d9197e6412d6b92503b2b0f7d9852c62e data/theurgy/modonomicon/books/the_hermetica/book.json -3cc6bc5ae9a4a1c221e74249ae1a59bfdb630c6e data/theurgy/modonomicon/books/the_hermetica/categories/getting_started.json +// 1.19.4 2023-03-24T12:16:26.3108537 Books: theurgy +ead61475fc866f8eb903a6d99236808a0383fd5a data/theurgy/modonomicon/books/the_hermetica/book.json +3a4b111882abf1b08df5ba3159faf2cab89f3c3e data/theurgy/modonomicon/books/the_hermetica/categories/getting_started.json 28ae6dbc76158bf163aa0d3ca564f6158642ef69 data/theurgy/modonomicon/books/the_hermetica/entries/getting_started/about_mod.json a0e4e1feea258fbe6056fe84085269f292cf4941 data/theurgy/modonomicon/books/the_hermetica/entries/getting_started/divination_rod.json 40b96909739d7276b24a3549b02d3c78f5008ef1 data/theurgy/modonomicon/books/the_hermetica/entries/getting_started/intro.json diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index 301fc3f16..d6a09e5d4 100644 --- a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1 +1 @@ -// 1.19.3 2022-12-29T16:42:22.299647 Recipes +// 1.19.4 2023-03-24T12:16:26.3158551 Recipes diff --git a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 index c423432bb..8fb47d00b 100644 --- a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 +++ b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 @@ -1,2 +1,2 @@ -// 1.19.3 2023-01-26T16:00:51.8837322 Languages: en_us +// 1.19.4 2023-03-24T12:16:26.3168543 Languages: en_us c4aafb954b9115b0e09bc0089c008b1ee741dc94 assets/theurgy/lang/en_us.json diff --git a/src/generated/resources/.cache/ccca92a6eec5aee95a4f810971c250f8552738a4 b/src/generated/resources/.cache/ccca92a6eec5aee95a4f810971c250f8552738a4 index bc14fb303..3ad34ab42 100644 --- a/src/generated/resources/.cache/ccca92a6eec5aee95a4f810971c250f8552738a4 +++ b/src/generated/resources/.cache/ccca92a6eec5aee95a4f810971c250f8552738a4 @@ -1,4 +1,4 @@ -// 1.19.3 2023-01-26T16:00:51.8797337 Item Models: theurgy +// 1.19.4 2023-03-24T12:16:26.3138507 Item Models: theurgy e0f7b66a84e6588f01abbbce75b1803ffe5d46e2 assets/theurgy/models/item/alchemical_sulfur.json 14a2ccdc5007ad52d74e22c1018a1a2d767df32f assets/theurgy/models/item/divination_rod_t1.json 56cbd2e62794dbad75babc62f07448c34813b99c assets/theurgy/models/item/divination_rod_t1_0.json diff --git a/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/book.json b/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/book.json index ff02c38de..7eb402c44 100644 --- a/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/book.json +++ b/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/book.json @@ -2,11 +2,57 @@ "auto_add_read_conditions": true, "book_content_texture": "modonomicon:textures/gui/book_content.png", "book_overview_texture": "modonomicon:textures/gui/book_overview.png", + "book_text_offset_width": 0, + "book_text_offset_x": 0, + "book_text_offset_y": 0, + "bottom_frame_overlay": { + "frame_height": 8, + "frame_width": 72, + "frame_x_offset": 0, + "frame_y_offset": -4, + "texture": "modonomicon:textures/gui/book_frame_bottom_overlay.png", + "texture_height": 256, + "texture_width": 256 + }, + "category_button_icon_scale": 1.0, + "category_button_x_offset": 0, + "category_button_y_offset": 0, "crafting_texture": "modonomicon:textures/gui/crafting_textures.png", "creative_tab": "modonomicon:modonomicon", "default_title_color": 0, + "frame_texture": "modonomicon:textures/gui/book_frame.png", "generate_book_item": true, + "left_frame_overlay": { + "frame_height": 70, + "frame_width": 7, + "frame_x_offset": 3, + "frame_y_offset": 0, + "texture": "modonomicon:textures/gui/book_frame_left_overlay.png", + "texture_height": 256, + "texture_width": 256 + }, "model": "theurgy:the_hermetica_icon", "name": "book.theurgy.the_hermetica.name", - "tooltip": "book.theurgy.the_hermetica.tooltip" + "read_all_button_y_offset": 0, + "right_frame_overlay": { + "frame_height": 70, + "frame_width": 8, + "frame_x_offset": -4, + "frame_y_offset": 0, + "texture": "modonomicon:textures/gui/book_frame_right_overlay.png", + "texture_height": 256, + "texture_width": 256 + }, + "search_button_x_offset": 0, + "search_button_y_offset": 0, + "tooltip": "book.theurgy.the_hermetica.tooltip", + "top_frame_overlay": { + "frame_height": 7, + "frame_width": 72, + "frame_x_offset": 0, + "frame_y_offset": 4, + "texture": "modonomicon:textures/gui/book_frame_top_overlay.png", + "texture_height": 256, + "texture_width": 256 + } } \ No newline at end of file diff --git a/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/categories/getting_started.json b/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/categories/getting_started.json index 360dccb2f..184218aaf 100644 --- a/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/categories/getting_started.json +++ b/src/generated/resources/data/theurgy/modonomicon/books/the_hermetica/categories/getting_started.json @@ -1,5 +1,8 @@ { "background": "modonomicon:textures/gui/dark_slate_seamless.png", + "background_height": 512, + "background_parallax_layers": [], + "background_width": 512, "entry_textures": "modonomicon:textures/gui/entry_textures.png", "icon": "theurgy:the_hermetica_icon", "name": "book.theurgy.the_hermetica.getting_started.name", diff --git a/src/main/java/com/klikli_dev/theurgy/client/render/SulfurBEWLR.java b/src/main/java/com/klikli_dev/theurgy/client/render/SulfurBEWLR.java index 795e9a1e0..41a878b6e 100644 --- a/src/main/java/com/klikli_dev/theurgy/client/render/SulfurBEWLR.java +++ b/src/main/java/com/klikli_dev/theurgy/client/render/SulfurBEWLR.java @@ -14,9 +14,9 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; public class SulfurBEWLR extends BlockEntityWithoutLevelRenderer { @@ -34,12 +34,12 @@ public static SulfurBEWLR get() { return instance; } - private static boolean isLeftHand(ItemTransforms.TransformType type) { - return type == ItemTransforms.TransformType.FIRST_PERSON_LEFT_HAND || type == ItemTransforms.TransformType.THIRD_PERSON_LEFT_HAND; + private static boolean isLeftHand(ItemDisplayContext displayContext) { + return displayContext == ItemDisplayContext.FIRST_PERSON_LEFT_HAND || displayContext == ItemDisplayContext.THIRD_PERSON_LEFT_HAND; } @Override - public void renderByItem(ItemStack sulfurStack, ItemTransforms.TransformType pTransformType, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) { + public void renderByItem(ItemStack sulfurStack, ItemDisplayContext displayContext, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) { var renderSource = ClientConfig.get().rendering.renderSulfurSourceItem.get(); @@ -53,23 +53,23 @@ public void renderByItem(ItemStack sulfurStack, ItemTransforms.TransformType pTr BakedModel model = itemRenderer.getModel(jarStack, null, null, 0); - var flatLighting = pTransformType == ItemTransforms.TransformType.GUI && !model.usesBlockLight(); + var flatLighting = displayContext == ItemDisplayContext.GUI && !model.usesBlockLight(); if (flatLighting) Lighting.setupForFlatItems(); - itemRenderer.render(jarStack, pTransformType, isLeftHand(pTransformType), pPoseStack, pBuffer, pPackedLight, pPackedOverlay, model); + itemRenderer.render(jarStack, displayContext, isLeftHand(displayContext), pPoseStack, pBuffer, pPackedLight, pPackedOverlay, model); //note: if we reset to 3d item light here it ignores it above and renders dark .. idk why //if we render the source we render a text-less clean label and the source item on top of the jar stack - if(renderSource){ - this.renderLabel(sulfurStack, pTransformType, pPoseStack, pBuffer, pPackedLight, pPackedOverlay); - this.renderContainedItem(sulfurStack, pTransformType, pPoseStack, pBuffer, pPackedLight, pPackedOverlay); + if (renderSource) { + this.renderLabel(sulfurStack, displayContext, pPoseStack, pBuffer, pPackedLight, pPackedOverlay); + this.renderContainedItem(sulfurStack, displayContext, pPoseStack, pBuffer, pPackedLight, pPackedOverlay); } } - public void renderLabel(ItemStack sulfurStack, ItemTransforms.TransformType pTransformType, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) { + public void renderLabel(ItemStack sulfurStack, ItemDisplayContext displayContext, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) { ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); @@ -79,7 +79,7 @@ public void renderLabel(ItemStack sulfurStack, ItemTransforms.TransformType pTra //now apply the transform to the label to make it look right in-world -> because below we render with gui transform which would mess it up //despite this returning a model (self in fact) it actually modifies the pose stack, hence the pushPose above! - labelModel.applyTransform(pTransformType, pPoseStack, isLeftHand(pTransformType)); + labelModel.applyTransform(displayContext, pPoseStack, isLeftHand(displayContext)); pPoseStack.pushPose(); @@ -90,7 +90,7 @@ public void renderLabel(ItemStack sulfurStack, ItemTransforms.TransformType pTra pPoseStack.scale(1F, 1F, 0.01F); //flatten item Lighting.setupForFlatItems(); //always render label flat - itemRenderer.render(labelStack, ItemTransforms.TransformType.GUI, isLeftHand(pTransformType), pPoseStack, pBuffer, pPackedLight, pPackedOverlay, labelModel); + itemRenderer.render(labelStack, ItemDisplayContext.GUI, isLeftHand(displayContext), pPoseStack, pBuffer, pPackedLight, pPackedOverlay, labelModel); //note: if we reset to 3d item light here it ignores it above and renders dark .. idk why pPoseStack.popPose(); @@ -98,7 +98,7 @@ public void renderLabel(ItemStack sulfurStack, ItemTransforms.TransformType pTra pPoseStack.popPose(); } - public void renderContainedItem(ItemStack sulfurStack, ItemTransforms.TransformType pTransformType, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) { + public void renderContainedItem(ItemStack sulfurStack, ItemDisplayContext displayContext, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) { ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); @@ -112,7 +112,7 @@ public void renderContainedItem(ItemStack sulfurStack, ItemTransforms.TransformT //now apply the transform to the contained item to make it look right in-world -> because below we render with gui transform which would mess it up //despite this returning a model (self in fact) it actually modifies the pose stack, hence the pushPose above! - labelModel.applyTransform(pTransformType, pPoseStack, isLeftHand(pTransformType)); //reuse the label transform to simulate flat items even if the contained item is 3d + labelModel.applyTransform(displayContext, pPoseStack, isLeftHand(displayContext)); //reuse the label transform to simulate flat items even if the contained item is 3d pPoseStack.pushPose(); @@ -125,7 +125,7 @@ public void renderContainedItem(ItemStack sulfurStack, ItemTransforms.TransformT pPoseStack.scale(0.74F, 0.74F, 0.01F); //flatten item Lighting.setupForFlatItems(); //always render "labeled" item flat - itemRenderer.render(containedStack, ItemTransforms.TransformType.GUI, isLeftHand(pTransformType), pPoseStack, pBuffer, pPackedLight, pPackedOverlay, containedModel); + itemRenderer.render(containedStack, ItemDisplayContext.GUI, isLeftHand(displayContext), pPoseStack, pBuffer, pPackedLight, pPackedOverlay, containedModel); //note: if we reset to 3d item light here it ignores it above and renders dark .. idk why pPoseStack.popPose(); diff --git a/src/main/java/com/klikli_dev/theurgy/client/scanner/Scanner.java b/src/main/java/com/klikli_dev/theurgy/client/scanner/Scanner.java index 40b966e18..b0d55ad6b 100644 --- a/src/main/java/com/klikli_dev/theurgy/client/scanner/Scanner.java +++ b/src/main/java/com/klikli_dev/theurgy/client/scanner/Scanner.java @@ -53,8 +53,8 @@ public void initialize(Player player, Vec3 center, float radius, int totalTicks) this.center = center; this.radius = radius; this.radiusSquared = this.radius * this.radius; - this.min = new BlockPos(center).offset(-this.radius, -this.radius, -this.radius); - this.max = new BlockPos(center).offset(this.radius, this.radius, this.radius); + this.min = BlockPos.containing(center).offset(-Mth.ceil(this.radius), Mth.ceil(-this.radius), Mth.ceil(-this.radius)); + this.max = BlockPos.containing(center).offset(Mth.ceil(this.radius), Mth.ceil(this.radius), Mth.ceil(this.radius)); this.x = this.min.getX(); this.y = this.min.getY() - 1;//first move next increments this to min.getY(); this.z = this.min.getZ(); diff --git a/src/main/java/com/klikli_dev/theurgy/datagen/TheurgyBookProvider.java b/src/main/java/com/klikli_dev/theurgy/datagen/TheurgyBookProvider.java index 57b6eae6d..95e93f090 100644 --- a/src/main/java/com/klikli_dev/theurgy/datagen/TheurgyBookProvider.java +++ b/src/main/java/com/klikli_dev/theurgy/datagen/TheurgyBookProvider.java @@ -10,7 +10,6 @@ import com.klikli_dev.modonomicon.api.datagen.BookProvider; import com.klikli_dev.modonomicon.api.datagen.book.BookModel; import com.klikli_dev.theurgy.datagen.book.GettingStartedCategoryProvider; -import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraftforge.common.data.LanguageProvider; @@ -35,17 +34,17 @@ private BookModel makeTheHermetica() { int categorySortNum = 1; var gettingStartedCategory = new GettingStartedCategoryProvider().make(helper, this.lang).withSortNumber(categorySortNum++); - var book = BookModel.builder() - .withId(this.modLoc("the_hermetica")) - .withName(helper.bookName()) + var book = BookModel.create( + this.modLoc("the_hermetica"), + helper.bookName() + ) .withTooltip(helper.bookTooltip()) .withCategories( - gettingStartedCategory.build() + gettingStartedCategory ) .withGenerateBookItem(true) .withModel(this.modLoc("the_hermetica_icon")) - .withAutoAddReadConditions(true) - .build(); + .withAutoAddReadConditions(true); return book; } } diff --git a/src/main/java/com/klikli_dev/theurgy/datagen/book/GettingStartedCategoryProvider.java b/src/main/java/com/klikli_dev/theurgy/datagen/book/GettingStartedCategoryProvider.java index 0bc1f0337..a5bc440c6 100644 --- a/src/main/java/com/klikli_dev/theurgy/datagen/book/GettingStartedCategoryProvider.java +++ b/src/main/java/com/klikli_dev/theurgy/datagen/book/GettingStartedCategoryProvider.java @@ -22,7 +22,7 @@ public class GettingStartedCategoryProvider { - public BookCategoryModel.Builder make(BookLangHelper helper, LanguageProvider lang) { + public BookCategoryModel make(BookLangHelper helper, LanguageProvider lang) { helper.category("getting_started"); lang.add(helper.categoryName(), "Getting Started"); @@ -48,9 +48,10 @@ public BookCategoryModel.Builder make(BookLangHelper helper, LanguageProvider la //TODO: higer tier div rod entries explaining how they work - return BookCategoryModel.builder() - .withId(Theurgy.loc((helper.category))) - .withName(helper.categoryName()) + return BookCategoryModel.create( + Theurgy.loc(helper.category), + helper.categoryName() + ) .withIcon(ItemRegistry.THE_HERMETICA_ICON.get()) .withEntries( introEntry.build(), @@ -201,8 +202,8 @@ private BookEntryModel.Builder makeDivinationRodEntry(BookLangHelper helper, Lan .build(); lang.add(helper.pageText(), """ - The most basic tier of divination rods, brittle and limited in it's application, but powerful nonetheless. - """); + The most basic tier of divination rods, brittle and limited in it's application, but powerful nonetheless. + """); helper.page("supported_blocks"); var supported_blocks = BookTextPageModel.builder() diff --git a/src/main/java/com/klikli_dev/theurgy/item/AlchemicalSulfurItem.java b/src/main/java/com/klikli_dev/theurgy/item/AlchemicalSulfurItem.java index d13f3138c..62b8151a4 100644 --- a/src/main/java/com/klikli_dev/theurgy/item/AlchemicalSulfurItem.java +++ b/src/main/java/com/klikli_dev/theurgy/item/AlchemicalSulfurItem.java @@ -91,8 +91,8 @@ public static void registerCreativeModeTabs(AlchemicalSulfurItem item, CreativeM if (level != null) { var recipeManager = level.getRecipeManager(); recipeManager.getRecipes().forEach((recipe) -> { - if (recipe.getResultItem() != null && recipe.getResultItem().getItem() == item) { - output.accept(recipe.getResultItem().copy()); + if (recipe.getResultItem(level.registryAccess()) != null && recipe.getResultItem(level.registryAccess()).getItem() == item) { + output.accept(recipe.getResultItem(level.registryAccess()).copy()); } }); } diff --git a/src/main/java/com/klikli_dev/theurgy/item/DivinationRodItem.java b/src/main/java/com/klikli_dev/theurgy/item/DivinationRodItem.java index 5e97b3fa4..d61e390b3 100644 --- a/src/main/java/com/klikli_dev/theurgy/item/DivinationRodItem.java +++ b/src/main/java/com/klikli_dev/theurgy/item/DivinationRodItem.java @@ -399,7 +399,7 @@ protected void spawnResultParticle(BlockPos result, Level level, LivingEntity en var dir = dist.normalize(); var to = dist.length() <= visualizationRange ? resultVec : from.add(dir.scale(visualizationRange)); - if (level.isLoaded(new BlockPos(to)) && level.isLoaded(new BlockPos(from)) && level.isClientSide) { + if (level.isLoaded(BlockPos.containing(to)) && level.isLoaded(BlockPos.containing(from)) && level.isClientSide) { FollowProjectile aoeProjectile = new FollowProjectile(level, from, to); DistHelper.spawnEntityClientSide(level, aoeProjectile); } @@ -439,8 +439,8 @@ public static void registerCreativeModeTabs(DivinationRodItem item, CreativeMode if (level != null) { var recipeManager = level.getRecipeManager(); recipeManager.getRecipes().forEach((recipe) -> { - if (recipe.getResultItem() != null && recipe.getResultItem().getItem() == item) { - output.accept(recipe.getResultItem().copy()); + if (recipe.getResultItem(level.registryAccess()) != null && recipe.getResultItem(level.registryAccess()).getItem() == item) { + output.accept(recipe.getResultItem(level.registryAccess()).copy()); } }); } diff --git a/src/main/java/com/klikli_dev/theurgy/recipe/DivinationRodRecipe.java b/src/main/java/com/klikli_dev/theurgy/recipe/DivinationRodRecipe.java index 131ea8c95..673408ab6 100644 --- a/src/main/java/com/klikli_dev/theurgy/recipe/DivinationRodRecipe.java +++ b/src/main/java/com/klikli_dev/theurgy/recipe/DivinationRodRecipe.java @@ -12,6 +12,7 @@ import com.klikli_dev.theurgy.config.ServerConfig; import com.klikli_dev.theurgy.registry.RecipeRegistry; import net.minecraft.core.NonNullList; +import net.minecraft.core.RegistryAccess; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.CraftingContainer; @@ -34,9 +35,9 @@ public RecipeSerializer getSerializer() { } @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess registryAccess) { - var result = super.getResultItem(); + var result = super.getResultItem(registryAccess); var resultTag = result.getOrCreateTag(); @@ -74,8 +75,8 @@ public ItemStack getResultItem() { } @Override - public ItemStack assemble(CraftingContainer pInv) { - var result = this.getResultItem().copy(); + public ItemStack assemble(CraftingContainer pInv, RegistryAccess registryAccess) { + var result = this.getResultItem(registryAccess).copy(); var resultTag = result.getOrCreateTag(); @@ -110,7 +111,7 @@ public ItemStack assemble(CraftingContainer pInv) { } } - return super.assemble(pInv); + return super.assemble(pInv, registryAccess); } public ResourceLocation translateToBlock(ResourceLocation sourceId) { @@ -173,13 +174,15 @@ public static class Serializer implements RecipeSerializer public DivinationRodRecipe fromJson(ResourceLocation pRecipeId, JsonObject pJson) { var shapedRecipe = RecipeSerializer.SHAPED_RECIPE.fromJson(pRecipeId, pJson); - return new DivinationRodRecipe(pRecipeId, shapedRecipe.getGroup(), shapedRecipe.getWidth(), shapedRecipe.getHeight(), shapedRecipe.getIngredients(), shapedRecipe.getResultItem()); + //we can pass null here because shapeless recipe does not use the registryacess + return new DivinationRodRecipe(pRecipeId, shapedRecipe.getGroup(), shapedRecipe.getWidth(), shapedRecipe.getHeight(), shapedRecipe.getIngredients(), shapedRecipe.getResultItem(null)); } public DivinationRodRecipe fromNetwork(ResourceLocation pRecipeId, FriendlyByteBuf pBuffer) { var shapedRecipe = RecipeSerializer.SHAPED_RECIPE.fromNetwork(pRecipeId, pBuffer); - return new DivinationRodRecipe(pRecipeId, shapedRecipe.getGroup(), shapedRecipe.getWidth(), shapedRecipe.getHeight(), shapedRecipe.getIngredients(), shapedRecipe.getResultItem()); + //we can pass null here because shapeless recipe does not use the registryacess + return new DivinationRodRecipe(pRecipeId, shapedRecipe.getGroup(), shapedRecipe.getWidth(), shapedRecipe.getHeight(), shapedRecipe.getIngredients(), shapedRecipe.getResultItem(null)); } public void toNetwork(FriendlyByteBuf pBuffer, DivinationRodRecipe pRecipe) { diff --git a/src/main/java/com/klikli_dev/theurgy/registry/ItemRegistry.java b/src/main/java/com/klikli_dev/theurgy/registry/ItemRegistry.java index 41a48b4f3..ef5aea605 100644 --- a/src/main/java/com/klikli_dev/theurgy/registry/ItemRegistry.java +++ b/src/main/java/com/klikli_dev/theurgy/registry/ItemRegistry.java @@ -72,7 +72,7 @@ public static void onRegisterCreativeModeTabs(CreativeModeTabEvent.Register even (builder) -> { builder.icon(() -> new ItemStack(EMPTY_JAR.get())) .title(Component.translatable(TheurgyConstants.I18n.ITEM_GROUP)).build(); - builder.displayItems((featureFlagSet, output, hasPermission) -> { + builder.displayItems((params, output) -> { output.accept(EMPTY_JAR.get()); AlchemicalSulfurItem.DistHelper.registerCreativeModeTabs(ALCHEMICAL_SULFUR.get(), output);