From 65efe2fa271273d9ea0fd681f0dbf933d12fdecf Mon Sep 17 00:00:00 2001 From: cech12 Date: Sun, 30 Jun 2024 09:29:13 +0200 Subject: [PATCH] updated to Minecraft 1.21 (Fabric 0.100.3+1.21, Neoforge 21.0.42-beta, Forge 51.0.18) - updated Cloth Config support (15.0.127) (Fabric/Quilt) - updated ModMenu support (11.0.1) (Fabric/Quilt) - updated JEI support (19.0.0.11) (Forge & NeoForge) - updated REI support (16.0.729) (Fabric/Quilt & NeoForge) - updated The One Probe support (1.21_neo-12.0.0) (NeoForge) --- .github/workflows/cicd-workflow.yml | 14 ++++---- CHANGELOG.md | 9 +++++ .../java/de/cech12/solarcooker/Constants.java | 2 +- .../blockentity/SolarCookerBlockEntity.java | 26 +++++++------- .../SolarCookerBlockEntityRenderer.java | 24 ++++++------- .../solarcooker/client/SolarCookerScreen.java | 6 ++-- .../inventory/SolarCookerContainer.java | 15 +++++--- .../solarcooker/jei/SolarCookerJEIPlugin.java | 4 +-- .../solarcooker/jei/SolarCookingCategory.java | 3 +- .../platform/services/IConfigHelper.java | 4 +-- .../tags/{blocks => block}/mineable/axe.json | 0 .../{blocks => block}/mineable/pickaxe.json | 0 .../building_blocks/diamond_block.json | 0 .../recipes/decorations/reflector.json | 0 .../blocks/reflector.json | 0 .../blocks/shining_diamond_block.json | 0 .../blocks/solar_cooker.json | 0 .../{recipes => recipe}/diamond_block.json | 0 .../solar_cooker_shining.json | 0 common/src/main/resources/pack.mcmeta | 2 +- .../shining_diamond_block.json | 0 .../recipes/decorations/solar_cooker.json | 0 .../{recipes => recipe}/reflector.json | 0 .../shining_diamond_block.json | 0 .../{recipes => recipe}/solar_cooker.json | 0 .../shining_diamond_block.json | 0 .../recipes/decorations/solar_cooker.json | 0 .../{recipes => recipe}/reflector.json | 0 .../shining_diamond_block.json | 0 .../{recipes => recipe}/solar_cooker.json | 0 gradle.properties | 34 +++++++++---------- neoforge/build.gradle | 10 ++++-- .../cech12/solarcooker/compat/TOPCompat.java | 2 +- .../shining_diamond_block.json | 0 .../recipes/decorations/solar_cooker.json | 0 .../{recipes => recipe}/reflector.json | 0 .../shining_diamond_block.json | 0 .../{recipes => recipe}/solar_cooker.json | 0 38 files changed, 88 insertions(+), 67 deletions(-) rename common/src/main/resources/data/minecraft/tags/{blocks => block}/mineable/axe.json (100%) rename common/src/main/resources/data/minecraft/tags/{blocks => block}/mineable/pickaxe.json (100%) rename common/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/building_blocks/diamond_block.json (100%) rename common/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/decorations/reflector.json (100%) rename common/src/main/resources/data/solarcooker/{loot_tables => loot_table}/blocks/reflector.json (100%) rename common/src/main/resources/data/solarcooker/{loot_tables => loot_table}/blocks/shining_diamond_block.json (100%) rename common/src/main/resources/data/solarcooker/{loot_tables => loot_table}/blocks/solar_cooker.json (100%) rename common/src/main/resources/data/solarcooker/{recipes => recipe}/diamond_block.json (100%) rename common/src/main/resources/data/solarcooker/tags/{blocks => block}/solar_cooker_shining.json (100%) rename fabric/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/building_blocks/shining_diamond_block.json (100%) rename fabric/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/decorations/solar_cooker.json (100%) rename fabric/src/main/resources/data/solarcooker/{recipes => recipe}/reflector.json (100%) rename fabric/src/main/resources/data/solarcooker/{recipes => recipe}/shining_diamond_block.json (100%) rename fabric/src/main/resources/data/solarcooker/{recipes => recipe}/solar_cooker.json (100%) rename forge/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/building_blocks/shining_diamond_block.json (100%) rename forge/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/decorations/solar_cooker.json (100%) rename forge/src/main/resources/data/solarcooker/{recipes => recipe}/reflector.json (100%) rename forge/src/main/resources/data/solarcooker/{recipes => recipe}/shining_diamond_block.json (100%) rename forge/src/main/resources/data/solarcooker/{recipes => recipe}/solar_cooker.json (100%) rename neoforge/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/building_blocks/shining_diamond_block.json (100%) rename neoforge/src/main/resources/data/solarcooker/{advancements => advancement}/recipes/decorations/solar_cooker.json (100%) rename neoforge/src/main/resources/data/solarcooker/{recipes => recipe}/reflector.json (100%) rename neoforge/src/main/resources/data/solarcooker/{recipes => recipe}/shining_diamond_block.json (100%) rename neoforge/src/main/resources/data/solarcooker/{recipes => recipe}/solar_cooker.json (100%) diff --git a/.github/workflows/cicd-workflow.yml b/.github/workflows/cicd-workflow.yml index e7bd9a8..0794c0c 100644 --- a/.github/workflows/cicd-workflow.yml +++ b/.github/workflows/cicd-workflow.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: push: branches: [ "*" ] - tags: ["1.20*"] + tags: ["1.21*"] pull_request: branches: [ "*" ] @@ -51,7 +51,7 @@ jobs: title-prefix: forge- curseforge-id: 436874 game-versions: | - 1.20.6 + 1.21 release-type: release loaders: | forge @@ -69,7 +69,7 @@ jobs: title-prefix: forge- modrinth-id: IsSapAeq game-versions: | - 1.20.6 + 1.21 release-type: release loaders: | forge @@ -87,7 +87,7 @@ jobs: title-prefix: neoforge- curseforge-id: 436874 game-versions: | - 1.20.6 + 1.21 release-type: release loaders: | neoforge @@ -105,7 +105,7 @@ jobs: title-prefix: neoforge- modrinth-id: IsSapAeq game-versions: | - 1.20.6 + 1.21 release-type: release loaders: | neoforge @@ -123,7 +123,7 @@ jobs: title-prefix: fabric- curseforge-id: 436874 game-versions: | - 1.20.6 + 1.21 release-type: release loaders: | fabric @@ -142,7 +142,7 @@ jobs: title-prefix: fabric- modrinth-id: IsSapAeq game-versions: | - 1.20.6 + 1.21 release-type: release loaders: | fabric diff --git a/CHANGELOG.md b/CHANGELOG.md index 9daa3ff..911dd53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/). +## [1.21-4.0.0.0] - 2024-06-30 +### Changed +- updated to Minecraft 1.21 (Fabric 0.100.3+1.21, Neoforge 21.0.42-beta, Forge 51.0.18) +- updated Cloth Config support (15.0.127) (Fabric/Quilt) +- updated ModMenu support (11.0.1) (Fabric/Quilt) +- updated JEI support (19.0.0.11) (Forge & NeoForge) +- updated REI support (16.0.729) (Fabric/Quilt & NeoForge) +- updated The One Probe support (1.21_neo-12.0.0) (NeoForge) + ## [1.20.6-3.2.0.0] - 2024-06-30 ### Changed - updated to Minecraft 1.20.6 (Fabric 0.98.0+1.20.6, NeoForge 20.6.119, Forge 50.1.9) diff --git a/common/src/main/java/de/cech12/solarcooker/Constants.java b/common/src/main/java/de/cech12/solarcooker/Constants.java index f652ade..8194007 100644 --- a/common/src/main/java/de/cech12/solarcooker/Constants.java +++ b/common/src/main/java/de/cech12/solarcooker/Constants.java @@ -51,7 +51,7 @@ public class Constants { private Constants() {} public static ResourceLocation id(String name) { - return new ResourceLocation(MOD_ID, name); + return ResourceLocation.fromNamespaceAndPath(MOD_ID, name); } } \ No newline at end of file diff --git a/common/src/main/java/de/cech12/solarcooker/blockentity/SolarCookerBlockEntity.java b/common/src/main/java/de/cech12/solarcooker/blockentity/SolarCookerBlockEntity.java index b979438..91f9da5 100644 --- a/common/src/main/java/de/cech12/solarcooker/blockentity/SolarCookerBlockEntity.java +++ b/common/src/main/java/de/cech12/solarcooker/blockentity/SolarCookerBlockEntity.java @@ -14,6 +14,7 @@ import net.minecraft.core.Direction; import net.minecraft.core.HolderLookup; import net.minecraft.core.NonNullList; +import net.minecraft.core.RegistryAccess; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.Connection; import net.minecraft.network.chat.Component; @@ -35,9 +36,9 @@ import net.minecraft.world.inventory.StackedContentsCompatible; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.AbstractCookingRecipe; -import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.item.crafting.SingleRecipeInput; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BaseContainerBlockEntity; @@ -213,13 +214,13 @@ public static void tick(Level level, BlockPos pos, BlockState state, SolarCooker boolean isSunlit = entity.isSunlit(); if (isSunlit && !entity.items.get(INPUT).isEmpty()) { RecipeHolder recipe = entity.getRecipe(); - if (entity.canSmelt(recipe)) { + if (entity.canSmelt(level.registryAccess(), recipe)) { entity.cookTime++; if (entity.cookTime == entity.cookTimeTotal) { entity.cookTime = 0; entity.cookTimeTotal = entity.getRecipeCookTime(); if (!level.isClientSide) { - entity.smeltItem(recipe); + entity.smeltItem(level.registryAccess(), recipe); dirty = true; } } @@ -246,7 +247,7 @@ public static void tick(Level level, BlockPos pos, BlockState state, SolarCooker } public boolean shouldLidBeOpen() { - return this.numPlayersUsing > 0 || (this.canSmelt(getRecipe()) && this.isSunlit()); + return this.numPlayersUsing > 0 || (this.canSmelt(this.getLevel().registryAccess(), getRecipe()) && this.isSunlit()); } private void calculateLidAngle() { @@ -329,9 +330,9 @@ private void playSound(SoundEvent soundIn) { } } - protected boolean canSmelt(@Nullable RecipeHolder recipe) { + protected boolean canSmelt(RegistryAccess registryAccess, @Nullable RecipeHolder recipe) { if (!this.items.get(INPUT).isEmpty() && recipe != null) { - ItemStack recipeOutput = ((Recipe) recipe.value()).assemble(this, this.getLevel().registryAccess()); + ItemStack recipeOutput = recipe.value().getResultItem(registryAccess); if (!recipeOutput.isEmpty()) { ItemStack output = this.items.get(OUTPUT); if (output.isEmpty()) return true; @@ -342,10 +343,10 @@ protected boolean canSmelt(@Nullable RecipeHolder recipe) { return false; } - private void smeltItem(@Nullable RecipeHolder recipe) { - if (recipe != null && this.canSmelt(recipe)) { + private void smeltItem(RegistryAccess registryAccess, @Nullable RecipeHolder recipe) { + if (recipe != null && this.canSmelt(registryAccess, recipe)) { ItemStack itemstack = this.items.get(INPUT); - ItemStack itemstack1 = ((Recipe) recipe.value()).assemble(this, this.getLevel().registryAccess()); + ItemStack itemstack1 = recipe.value().getResultItem(registryAccess); ItemStack itemstack2 = this.items.get(OUTPUT); if (itemstack2.isEmpty()) { this.items.set(1, itemstack1.copy()); @@ -380,14 +381,15 @@ protected RecipeHolder getRecipe() { if (input.isEmpty() || input == failedMatch) { return null; } - if (this.level != null && curRecipe != null && curRecipe.value().matches(this, level)) { + SingleRecipeInput recipeInput = new SingleRecipeInput(input); + if (this.level != null && curRecipe != null && curRecipe.value().matches(recipeInput, level)) { return curRecipe; } else { RecipeHolder rec = null; if (this.level != null) { - rec = this.level.getRecipeManager().getRecipeFor((RecipeType) this.specificRecipeType, this, this.level).orElse(null); + rec = this.level.getRecipeManager().getRecipeFor((RecipeType) this.specificRecipeType, recipeInput, this.level).orElse(null); if (rec == null && Services.CONFIG.areVanillaRecipesEnabled()) { - rec = this.level.getRecipeManager().getRecipesFor((RecipeType) Services.CONFIG.getRecipeType(), this, this.level) + rec = this.level.getRecipeManager().getRecipesFor((RecipeType) Services.CONFIG.getRecipeType(), recipeInput, this.level) .stream().filter(abstractCookingRecipe -> Services.CONFIG.isRecipeAllowed(abstractCookingRecipe.id())).findFirst().orElse(null); } } diff --git a/common/src/main/java/de/cech12/solarcooker/client/SolarCookerBlockEntityRenderer.java b/common/src/main/java/de/cech12/solarcooker/client/SolarCookerBlockEntityRenderer.java index 734b1ec..c338355 100644 --- a/common/src/main/java/de/cech12/solarcooker/client/SolarCookerBlockEntityRenderer.java +++ b/common/src/main/java/de/cech12/solarcooker/client/SolarCookerBlockEntityRenderer.java @@ -1,37 +1,37 @@ package de.cech12.solarcooker.client; -import de.cech12.solarcooker.Constants; -import de.cech12.solarcooker.block.AbstractSolarCookerBlock; -import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; +import de.cech12.solarcooker.Constants; +import de.cech12.solarcooker.block.AbstractSolarCookerBlock; +import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.ChestBlock; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; -import net.minecraft.world.item.ItemStack; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.ChestBlock; +import net.minecraft.world.level.block.state.BlockState; import javax.annotation.Nonnull; public class SolarCookerBlockEntityRenderer implements BlockEntityRenderer { - public static final ResourceLocation TEXTURE = new ResourceLocation(Constants.MOD_ID, "textures/entity/solar_cooker.png"); + public static final ResourceLocation TEXTURE = Constants.id("textures/entity/solar_cooker.png"); private static final LayerDefinition innerCube = createInnerLayerDefinition(); diff --git a/common/src/main/java/de/cech12/solarcooker/client/SolarCookerScreen.java b/common/src/main/java/de/cech12/solarcooker/client/SolarCookerScreen.java index 98346ca..631c65d 100644 --- a/common/src/main/java/de/cech12/solarcooker/client/SolarCookerScreen.java +++ b/common/src/main/java/de/cech12/solarcooker/client/SolarCookerScreen.java @@ -4,14 +4,14 @@ import de.cech12.solarcooker.inventory.SolarCookerContainer; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; -import net.minecraft.world.entity.player.Inventory; -import net.minecraft.resources.ResourceLocation; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import javax.annotation.Nonnull; public class SolarCookerScreen extends AbstractContainerScreen { - private static final ResourceLocation guiTexture = new ResourceLocation(Constants.MOD_ID, "textures/gui/container/solar_cooker.png"); + private static final ResourceLocation guiTexture = Constants.id("textures/gui/container/solar_cooker.png"); public SolarCookerScreen(SolarCookerContainer screenContainer, Inventory inv, Component titleIn) { super(screenContainer, inv, titleIn); diff --git a/common/src/main/java/de/cech12/solarcooker/inventory/SolarCookerContainer.java b/common/src/main/java/de/cech12/solarcooker/inventory/SolarCookerContainer.java index 3be0353..91ed1db 100644 --- a/common/src/main/java/de/cech12/solarcooker/inventory/SolarCookerContainer.java +++ b/common/src/main/java/de/cech12/solarcooker/inventory/SolarCookerContainer.java @@ -4,13 +4,17 @@ import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; import de.cech12.solarcooker.platform.Services; import net.minecraft.world.Container; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.SimpleContainer; -import net.minecraft.world.inventory.*; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerData; +import net.minecraft.world.inventory.SimpleContainerData; +import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.AbstractCookingRecipe; import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.item.crafting.SingleRecipeInput; import net.minecraft.world.level.Level; import javax.annotation.Nonnull; @@ -113,11 +117,12 @@ public void setItem(int slotID, int stateId, @Nonnull ItemStack stack) { protected boolean hasRecipe(ItemStack stack) { if (this.world != null) { - if (this.world.getRecipeManager().getRecipeFor(this.specificRecipeType, new SimpleContainer(stack), this.world).isPresent()) { + SingleRecipeInput recipeInput = new SingleRecipeInput(stack); + if (this.world.getRecipeManager().getRecipeFor(this.specificRecipeType, recipeInput, this.world).isPresent()) { return true; } if (Services.CONFIG.areVanillaRecipesEnabled()) { - return this.world.getRecipeManager().getRecipesFor(Services.CONFIG.getRecipeType(), new SimpleContainer(stack), this.world) + return this.world.getRecipeManager().getRecipesFor(Services.CONFIG.getRecipeType(), recipeInput, this.world) .stream().anyMatch(abstractCookingRecipe -> Services.CONFIG.isRecipeAllowed(abstractCookingRecipe.id())); } } diff --git a/common/src/main/java/de/cech12/solarcooker/jei/SolarCookerJEIPlugin.java b/common/src/main/java/de/cech12/solarcooker/jei/SolarCookerJEIPlugin.java index 6584f6c..76f56d5 100644 --- a/common/src/main/java/de/cech12/solarcooker/jei/SolarCookerJEIPlugin.java +++ b/common/src/main/java/de/cech12/solarcooker/jei/SolarCookerJEIPlugin.java @@ -11,10 +11,10 @@ import mezz.jei.api.registration.IRecipeRegistration; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeManager; -import net.minecraft.resources.ResourceLocation; import javax.annotation.Nonnull; import java.util.stream.Collectors; @@ -27,7 +27,7 @@ public class SolarCookerJEIPlugin implements IModPlugin { @Override @Nonnull public ResourceLocation getPluginUid() { - return new ResourceLocation(Constants.MOD_ID, "plugin_" + Constants.MOD_ID); + return Constants.id("plugin_" + Constants.MOD_ID); } @Override diff --git a/common/src/main/java/de/cech12/solarcooker/jei/SolarCookingCategory.java b/common/src/main/java/de/cech12/solarcooker/jei/SolarCookingCategory.java index 57a2dd9..acf9569 100644 --- a/common/src/main/java/de/cech12/solarcooker/jei/SolarCookingCategory.java +++ b/common/src/main/java/de/cech12/solarcooker/jei/SolarCookingCategory.java @@ -6,7 +6,6 @@ import mezz.jei.api.helpers.IGuiHelper; import mezz.jei.api.recipe.RecipeType; import mezz.jei.library.plugins.vanilla.cooking.AbstractCookingCategory; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.crafting.RecipeHolder; import javax.annotation.Nonnull; @@ -21,7 +20,7 @@ public SolarCookingCategory(IGuiHelper guiHelper) { @Nonnull public RecipeType> getRecipeType() { Class> holderClass = (Class>) (Object) RecipeHolder.class; - return new RecipeType<>(new ResourceLocation(Constants.MOD_ID, Constants.SOLAR_COOKING_NAME), holderClass); + return new RecipeType<>(Constants.id(Constants.SOLAR_COOKING_NAME), holderClass); } } diff --git a/common/src/main/java/de/cech12/solarcooker/platform/services/IConfigHelper.java b/common/src/main/java/de/cech12/solarcooker/platform/services/IConfigHelper.java index 45d9518..6a9e526 100644 --- a/common/src/main/java/de/cech12/solarcooker/platform/services/IConfigHelper.java +++ b/common/src/main/java/de/cech12/solarcooker/platform/services/IConfigHelper.java @@ -92,10 +92,10 @@ default boolean isRecipeAllowed(final ResourceLocation id) { if (!configValue.isEmpty()) { String[] ids = configValue.split(","); if (ids.length < 1) { - return !(new ResourceLocation(configValue).equals(id)); + return !(ResourceLocation.parse(configValue).equals(id)); } else { for (String recipeId : ids) { - if (new ResourceLocation(recipeId.trim()).equals(id)) { + if (ResourceLocation.parse(recipeId.trim()).equals(id)) { return false; } } diff --git a/common/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json b/common/src/main/resources/data/minecraft/tags/block/mineable/axe.json similarity index 100% rename from common/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json rename to common/src/main/resources/data/minecraft/tags/block/mineable/axe.json diff --git a/common/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/common/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json similarity index 100% rename from common/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json rename to common/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json diff --git a/common/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/diamond_block.json b/common/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/diamond_block.json similarity index 100% rename from common/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/diamond_block.json rename to common/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/diamond_block.json diff --git a/common/src/main/resources/data/solarcooker/advancements/recipes/decorations/reflector.json b/common/src/main/resources/data/solarcooker/advancement/recipes/decorations/reflector.json similarity index 100% rename from common/src/main/resources/data/solarcooker/advancements/recipes/decorations/reflector.json rename to common/src/main/resources/data/solarcooker/advancement/recipes/decorations/reflector.json diff --git a/common/src/main/resources/data/solarcooker/loot_tables/blocks/reflector.json b/common/src/main/resources/data/solarcooker/loot_table/blocks/reflector.json similarity index 100% rename from common/src/main/resources/data/solarcooker/loot_tables/blocks/reflector.json rename to common/src/main/resources/data/solarcooker/loot_table/blocks/reflector.json diff --git a/common/src/main/resources/data/solarcooker/loot_tables/blocks/shining_diamond_block.json b/common/src/main/resources/data/solarcooker/loot_table/blocks/shining_diamond_block.json similarity index 100% rename from common/src/main/resources/data/solarcooker/loot_tables/blocks/shining_diamond_block.json rename to common/src/main/resources/data/solarcooker/loot_table/blocks/shining_diamond_block.json diff --git a/common/src/main/resources/data/solarcooker/loot_tables/blocks/solar_cooker.json b/common/src/main/resources/data/solarcooker/loot_table/blocks/solar_cooker.json similarity index 100% rename from common/src/main/resources/data/solarcooker/loot_tables/blocks/solar_cooker.json rename to common/src/main/resources/data/solarcooker/loot_table/blocks/solar_cooker.json diff --git a/common/src/main/resources/data/solarcooker/recipes/diamond_block.json b/common/src/main/resources/data/solarcooker/recipe/diamond_block.json similarity index 100% rename from common/src/main/resources/data/solarcooker/recipes/diamond_block.json rename to common/src/main/resources/data/solarcooker/recipe/diamond_block.json diff --git a/common/src/main/resources/data/solarcooker/tags/blocks/solar_cooker_shining.json b/common/src/main/resources/data/solarcooker/tags/block/solar_cooker_shining.json similarity index 100% rename from common/src/main/resources/data/solarcooker/tags/blocks/solar_cooker_shining.json rename to common/src/main/resources/data/solarcooker/tags/block/solar_cooker_shining.json diff --git a/common/src/main/resources/pack.mcmeta b/common/src/main/resources/pack.mcmeta index 0566f34..b835ba9 100644 --- a/common/src/main/resources/pack.mcmeta +++ b/common/src/main/resources/pack.mcmeta @@ -3,6 +3,6 @@ "description": { "text": "${mod_id} resources" }, - "pack_format": 41 + "pack_format": 48 } } \ No newline at end of file diff --git a/fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json b/fabric/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/shining_diamond_block.json similarity index 100% rename from fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json rename to fabric/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/shining_diamond_block.json diff --git a/fabric/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json b/fabric/src/main/resources/data/solarcooker/advancement/recipes/decorations/solar_cooker.json similarity index 100% rename from fabric/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json rename to fabric/src/main/resources/data/solarcooker/advancement/recipes/decorations/solar_cooker.json diff --git a/fabric/src/main/resources/data/solarcooker/recipes/reflector.json b/fabric/src/main/resources/data/solarcooker/recipe/reflector.json similarity index 100% rename from fabric/src/main/resources/data/solarcooker/recipes/reflector.json rename to fabric/src/main/resources/data/solarcooker/recipe/reflector.json diff --git a/fabric/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json b/fabric/src/main/resources/data/solarcooker/recipe/shining_diamond_block.json similarity index 100% rename from fabric/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json rename to fabric/src/main/resources/data/solarcooker/recipe/shining_diamond_block.json diff --git a/fabric/src/main/resources/data/solarcooker/recipes/solar_cooker.json b/fabric/src/main/resources/data/solarcooker/recipe/solar_cooker.json similarity index 100% rename from fabric/src/main/resources/data/solarcooker/recipes/solar_cooker.json rename to fabric/src/main/resources/data/solarcooker/recipe/solar_cooker.json diff --git a/forge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json b/forge/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/shining_diamond_block.json similarity index 100% rename from forge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json rename to forge/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/shining_diamond_block.json diff --git a/forge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json b/forge/src/main/resources/data/solarcooker/advancement/recipes/decorations/solar_cooker.json similarity index 100% rename from forge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json rename to forge/src/main/resources/data/solarcooker/advancement/recipes/decorations/solar_cooker.json diff --git a/forge/src/main/resources/data/solarcooker/recipes/reflector.json b/forge/src/main/resources/data/solarcooker/recipe/reflector.json similarity index 100% rename from forge/src/main/resources/data/solarcooker/recipes/reflector.json rename to forge/src/main/resources/data/solarcooker/recipe/reflector.json diff --git a/forge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json b/forge/src/main/resources/data/solarcooker/recipe/shining_diamond_block.json similarity index 100% rename from forge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json rename to forge/src/main/resources/data/solarcooker/recipe/shining_diamond_block.json diff --git a/forge/src/main/resources/data/solarcooker/recipes/solar_cooker.json b/forge/src/main/resources/data/solarcooker/recipe/solar_cooker.json similarity index 100% rename from forge/src/main/resources/data/solarcooker/recipes/solar_cooker.json rename to forge/src/main/resources/data/solarcooker/recipe/solar_cooker.json diff --git a/gradle.properties b/gradle.properties index 4801000..b14ba9d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # Project group=de.cech12.solarcooker -mod_version=3.2.0.0 +mod_version=4.0.0.0 mod_id=solarcooker mod_name=Solar Cooker mod_author=Cech12 @@ -15,37 +15,37 @@ description=A mod which adds a Solar Cooker. # Common java_version=21 -minecraft_version=1.20.6 -minecraft_version_range=[1.20.6, 1.21) +minecraft_version=1.21 +minecraft_version_range=[1.21, 1.22) # Fabric -fabric_version=0.98.0+1.20.6 +fabric_version=0.100.3+1.21 fabric_loader_version=0.15.11 -cloth_config_version=14.0.126 -mod_menu_version=10.0.0 +cloth_config_version=15.0.127 +mod_menu_version=11.0.1 # Forge -forge_version=50.1.9 -forge_version_range=[50.1.9,) +forge_version=51.0.18 +forge_version_range=[51.0.18,) forge_loader_version_range=[50,) # NeoForge -neoforge_version=20.6.119 -neoforge_version_range=[20.6.119,) +neoforge_version=21.0.42-beta +neoforge_version_range=[21.0.42-beta,) neoforge_loader_version_range=[2,) # jei -jei_version=18.0.0.65 -jei_version_range=[18.0.0.65,) +jei_version=19.0.0.11 +jei_version_range=[19.0.0.11,) # rei -rei_version=15.0.728 -rei_version_range=[15.0.728,) -architectury_version=12.1.3 +rei_version=16.0.729 +rei_version_range=[16.0.729,) +architectury_version=13.0.2 #the one probe -top_version=1.20.5_neo-11.1.1-2 -top_version_range=[1.20.5_neo-11.1.1,) +top_version=1.21_neo-12.0.0-1 +top_version_range=[1.21_neo-12.0.0,) # Gradle org.gradle.jvmargs=-Xmx3G diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 3a1c718..dabd9e7 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -1,7 +1,7 @@ plugins { id 'idea' id 'maven-publish' - id 'net.neoforged.gradle.userdev' version '[7.0.105, 7.2)' + id 'net.neoforged.gradle.userdev' version '7.0.150' id 'java-library' } base { @@ -83,7 +83,13 @@ tasks.withType(ProcessResources).matching(notNeoTask).configureEach { from project(":common").sourceSets.main.resources } -test.onlyIf { false } //disable tests +//disable tests +test.onlyIf { false } +tasks.configureEach { task -> + if (task.name.startsWith("testJunit")) { + task.enabled = false + } +} publishing { publications { diff --git a/neoforge/src/main/java/de/cech12/solarcooker/compat/TOPCompat.java b/neoforge/src/main/java/de/cech12/solarcooker/compat/TOPCompat.java index 71f376b..66978cd 100644 --- a/neoforge/src/main/java/de/cech12/solarcooker/compat/TOPCompat.java +++ b/neoforge/src/main/java/de/cech12/solarcooker/compat/TOPCompat.java @@ -32,7 +32,7 @@ public Void apply(ITheOneProbe probe) { probe.registerProvider(new IProbeInfoProvider() { @Override public ResourceLocation getID() { - return new ResourceLocation(Constants.MOD_ID, "solarcookerinfo"); + return Constants.id("solarcookerinfo"); } @Override diff --git a/neoforge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json b/neoforge/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/shining_diamond_block.json similarity index 100% rename from neoforge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json rename to neoforge/src/main/resources/data/solarcooker/advancement/recipes/building_blocks/shining_diamond_block.json diff --git a/neoforge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json b/neoforge/src/main/resources/data/solarcooker/advancement/recipes/decorations/solar_cooker.json similarity index 100% rename from neoforge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json rename to neoforge/src/main/resources/data/solarcooker/advancement/recipes/decorations/solar_cooker.json diff --git a/neoforge/src/main/resources/data/solarcooker/recipes/reflector.json b/neoforge/src/main/resources/data/solarcooker/recipe/reflector.json similarity index 100% rename from neoforge/src/main/resources/data/solarcooker/recipes/reflector.json rename to neoforge/src/main/resources/data/solarcooker/recipe/reflector.json diff --git a/neoforge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json b/neoforge/src/main/resources/data/solarcooker/recipe/shining_diamond_block.json similarity index 100% rename from neoforge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json rename to neoforge/src/main/resources/data/solarcooker/recipe/shining_diamond_block.json diff --git a/neoforge/src/main/resources/data/solarcooker/recipes/solar_cooker.json b/neoforge/src/main/resources/data/solarcooker/recipe/solar_cooker.json similarity index 100% rename from neoforge/src/main/resources/data/solarcooker/recipes/solar_cooker.json rename to neoforge/src/main/resources/data/solarcooker/recipe/solar_cooker.json