diff --git a/.github/workflows/cicd-workflow.yml b/.github/workflows/cicd-workflow.yml index 9431fa4..e7bd9a8 100644 --- a/.github/workflows/cicd-workflow.yml +++ b/.github/workflows/cicd-workflow.yml @@ -15,19 +15,19 @@ jobs: name: Build uses: cech12/MinecraftModActions/.github/workflows/build.yml@main with: - java-version: 17 + java-version: 21 # gametest: # needs: build # name: Game Test # uses: cech12/MinecraftModActions/.github/workflows/gametest.yml@main # with: -# java-version: 17 +# java-version: 21 codeql: needs: build name: CodeQL uses: cech12/MinecraftModActions/.github/workflows/codeql-analysis.yml@main with: - java-version: 17 + java-version: 21 publish-github: # needs: [ gametest, codeql ] needs: codeql @@ -35,7 +35,7 @@ jobs: name: Publish Github uses: cech12/MinecraftModActions/.github/workflows/multi-publish-github.yml@main with: - java-version: 17 + java-version: 21 mod-name: Solar Cooker mod-id: solarcooker secrets: @@ -46,12 +46,12 @@ jobs: name: Publish Forge on Curseforge uses: cech12/MinecraftModActions/.github/workflows/publish-curseforge.yml@main with: - java-version: 17 + java-version: 21 subproject: forge title-prefix: forge- curseforge-id: 436874 game-versions: | - 1.20.4 + 1.20.6 release-type: release loaders: | forge @@ -64,12 +64,12 @@ jobs: name: Publish Forge on Modrinth uses: cech12/MinecraftModActions/.github/workflows/publish-modrinth.yml@main with: - java-version: 17 + java-version: 21 subproject: forge title-prefix: forge- modrinth-id: IsSapAeq game-versions: | - 1.20.4 + 1.20.6 release-type: release loaders: | forge @@ -82,12 +82,12 @@ jobs: name: Publish Neoforge on Curseforge uses: cech12/MinecraftModActions/.github/workflows/publish-curseforge.yml@main with: - java-version: 17 + java-version: 21 subproject: neoforge title-prefix: neoforge- curseforge-id: 436874 game-versions: | - 1.20.4 + 1.20.6 release-type: release loaders: | neoforge @@ -100,12 +100,12 @@ jobs: name: Publish Neoforge on Modrinth uses: cech12/MinecraftModActions/.github/workflows/publish-modrinth.yml@main with: - java-version: 17 + java-version: 21 subproject: neoforge title-prefix: neoforge- modrinth-id: IsSapAeq game-versions: | - 1.20.4 + 1.20.6 release-type: release loaders: | neoforge @@ -118,12 +118,12 @@ jobs: name: Publish Fabric on Curseforge uses: cech12/MinecraftModActions/.github/workflows/publish-curseforge.yml@main with: - java-version: 17 + java-version: 21 subproject: fabric title-prefix: fabric- curseforge-id: 436874 game-versions: | - 1.20.4 + 1.20.6 release-type: release loaders: | fabric @@ -137,12 +137,12 @@ jobs: name: Publish Fabric on Modrinth uses: cech12/MinecraftModActions/.github/workflows/publish-modrinth.yml@main with: - java-version: 17 + java-version: 21 subproject: fabric title-prefix: fabric- modrinth-id: IsSapAeq game-versions: | - 1.20.4 + 1.20.6 release-type: release loaders: | fabric diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a2b3b1f..145a806 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -10,4 +10,4 @@ jobs: name: Analyze uses: cech12/MinecraftModActions/.github/workflows/codeql-analysis.yml@main with: - java-version: 17 + java-version: 21 diff --git a/.github/workflows/update-gradle-wrapper.yml b/.github/workflows/update-gradle-wrapper.yml index a8bd100..30c13ff 100644 --- a/.github/workflows/update-gradle-wrapper.yml +++ b/.github/workflows/update-gradle-wrapper.yml @@ -10,6 +10,6 @@ jobs: name: Update Gradle Wrapper uses: cech12/MinecraftModActions/.github/workflows/update-gradle-wrapper.yml@main with: - java-version: 17 + java-version: 21 secrets: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 056dd72..9daa3ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ 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.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) +- updated Cloth Config support (14.0.126) (Fabric/Quilt) +- updated ModMenu support (10.0.0) (Fabric/Quilt) +- updated JEI support (18.0.0.65) (Forge & NeoForge) +- updated REI support (15.0.728) (Fabric/Quilt & NeoForge) +- updated The One Probe support (1.20.5_neo-11.1.1) (NeoForge) + +### Removed +- removed REI support for Forge + ## [1.20.4-3.1.2.1] - 2024-06-04 ### Fixed - fixed version checking at mod loader startup for Roughly Enough Items (all loaders) diff --git a/build.gradle b/build.gradle index d4e483a..6e6c644 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ subprojects { version "$project.minecraft_version-$project.mod_version" - java.toolchain.languageVersion = JavaLanguageVersion.of(17) + java.toolchain.languageVersion = JavaLanguageVersion.of(java_version) //java.withSourcesJar() //java.withJavadocJar() @@ -49,15 +49,11 @@ subprojects { maven { url "https://maven.architectury.dev/" } } - tasks.withType(JavaCompile).configureEach { - it.options.encoding = 'UTF-8' - it.options.getRelease().set(17) - } - processResources { def expandProps = [ "version": version, "group": project.group, //Else we target the task's group. + "java_version": java_version, "minecraft_version": minecraft_version, "minecraft_version_range": minecraft_version_range, "forge_version": forge_version, @@ -85,7 +81,7 @@ subprojects { "top_version_range": top_version_range ] - filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', '*.mixins.json']) { + filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/neoforge.mods.toml', 'META-INF/mods.toml', '*.mixins.json']) { expand expandProps } inputs.properties(expandProps) diff --git a/common/src/main/java/de/cech12/solarcooker/CommonLoader.java b/common/src/main/java/de/cech12/solarcooker/CommonLoader.java index eb578ce..e47e4a6 100644 --- a/common/src/main/java/de/cech12/solarcooker/CommonLoader.java +++ b/common/src/main/java/de/cech12/solarcooker/CommonLoader.java @@ -1,7 +1,6 @@ package de.cech12.solarcooker; import de.cech12.solarcooker.platform.Services; -import net.minecraft.resources.ResourceLocation; /** * A static class for all loaders which initializes everything which is used by all loaders. @@ -15,10 +14,6 @@ public static void init() { Services.CONFIG.init(); } - public static ResourceLocation id(String name) { - return new ResourceLocation(Constants.MOD_ID, name); - } - private CommonLoader() {} } diff --git a/common/src/main/java/de/cech12/solarcooker/Constants.java b/common/src/main/java/de/cech12/solarcooker/Constants.java index 6c70f11..f652ade 100644 --- a/common/src/main/java/de/cech12/solarcooker/Constants.java +++ b/common/src/main/java/de/cech12/solarcooker/Constants.java @@ -3,6 +3,7 @@ import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; import de.cech12.solarcooker.crafting.SolarCookingRecipe; import de.cech12.solarcooker.inventory.SolarCookerContainer; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.MenuType; import net.minecraft.world.item.Item; import net.minecraft.world.item.crafting.RecipeType; @@ -49,4 +50,8 @@ public class Constants { private Constants() {} + public static ResourceLocation id(String name) { + return new ResourceLocation(MOD_ID, name); + } + } \ No newline at end of file diff --git a/common/src/main/java/de/cech12/solarcooker/ModTags.java b/common/src/main/java/de/cech12/solarcooker/ModTags.java index 11bce32..3a5048e 100644 --- a/common/src/main/java/de/cech12/solarcooker/ModTags.java +++ b/common/src/main/java/de/cech12/solarcooker/ModTags.java @@ -1,7 +1,6 @@ package de.cech12.solarcooker; import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.level.block.Block; @@ -14,7 +13,7 @@ public static class Blocks { public static final TagKey SOLAR_COOKER_SHINING = tag("solar_cooker_shining"); private static TagKey tag(@Nonnull String name) { - return TagKey.create(Registries.BLOCK, new ResourceLocation(Constants.MOD_ID, name)); + return TagKey.create(Registries.BLOCK, Constants.id(name)); } } } diff --git a/common/src/main/java/de/cech12/solarcooker/block/AbstractSolarCookerBlock.java b/common/src/main/java/de/cech12/solarcooker/block/AbstractSolarCookerBlock.java index 9e89b69..846bdba 100644 --- a/common/src/main/java/de/cech12/solarcooker/block/AbstractSolarCookerBlock.java +++ b/common/src/main/java/de/cech12/solarcooker/block/AbstractSolarCookerBlock.java @@ -1,35 +1,32 @@ package de.cech12.solarcooker.block; import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.RenderShape; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.BaseEntityBlock; -import net.minecraft.world.level.block.HorizontalDirectionalBlock; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.world.Containers; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraft.world.level.block.state.properties.DirectionProperty; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.InteractionResult; -import net.minecraft.core.Direction; -import net.minecraft.world.InteractionHand; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.HorizontalDirectionalBlock; import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.Rotation; -import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraft.world.phys.Vec3; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Level; import javax.annotation.Nonnull; @@ -47,39 +44,25 @@ protected AbstractSolarCookerBlock(BlockBehaviour.Properties properties) { @Override @Nonnull - public InteractionResult use(@Nonnull BlockState state, Level worldIn, @Nonnull BlockPos pos, @Nonnull Player player, @Nonnull InteractionHand handIn, @Nonnull BlockHitResult hit) { - if (worldIn.isClientSide) { + protected InteractionResult useWithoutItem(@Nonnull BlockState state, Level level, @Nonnull BlockPos pos, @Nonnull Player player, @Nonnull BlockHitResult hit) { + if (level.isClientSide) { return InteractionResult.SUCCESS; } else { - this.interactWith(worldIn, pos, player); + this.interactWith(level, pos, player); return InteractionResult.CONSUME; } } /** - * Interface for handling interaction with blocks that impliment AbstractFurnaceBlock. Called in onBlockActivated + * Interface for handling interaction with blocks that implement AbstractFurnaceBlock. Called in onBlockActivated * inside AbstractFurnaceBlock. */ - protected abstract void interactWith(Level worldIn, BlockPos pos, Player player); + protected abstract void interactWith(Level level, BlockPos pos, Player player); public BlockState getStateForPlacement(BlockPlaceContext context) { return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); } - /** - * Called by ItemBlocks after a block is set in the world - */ - @Override - public void setPlacedBy(@Nonnull Level worldIn, @Nonnull BlockPos pos, @Nonnull BlockState state, LivingEntity placer, ItemStack stack) { - if (stack.hasCustomHoverName()) { - BlockEntity tileentity = worldIn.getBlockEntity(pos); - if (tileentity instanceof SolarCookerBlockEntity) { - ((SolarCookerBlockEntity)tileentity).setCustomName(stack.getHoverName()); - } - } - - } - @Override @Deprecated public void onRemove(BlockState state, @Nonnull Level worldIn, @Nonnull BlockPos pos, BlockState newState, boolean isMoving) { diff --git a/common/src/main/java/de/cech12/solarcooker/block/ReflectorBlock.java b/common/src/main/java/de/cech12/solarcooker/block/ReflectorBlock.java index b0778a6..326c686 100644 --- a/common/src/main/java/de/cech12/solarcooker/block/ReflectorBlock.java +++ b/common/src/main/java/de/cech12/solarcooker/block/ReflectorBlock.java @@ -2,9 +2,10 @@ import de.cech12.solarcooker.Constants; import net.minecraft.ChatFormatting; -import net.minecraft.core.Direction; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.context.BlockPlaceContext; @@ -21,7 +22,6 @@ import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; @@ -132,8 +132,8 @@ public List getDrops(@Nonnull BlockState state, @Nonnull LootParams.B } @Override - public void appendHoverText(@Nonnull ItemStack stack, @Nullable BlockGetter worldIn, @Nonnull List tooltip, @Nonnull TooltipFlag flagIn) { - super.appendHoverText(stack, worldIn, tooltip, flagIn); + public void appendHoverText(@Nonnull ItemStack stack, @Nonnull Item.TooltipContext context, @Nonnull List tooltip, @Nonnull TooltipFlag flag) { + super.appendHoverText(stack, context, tooltip, flag); tooltip.add(Component.translatable("item.solarcooker.reflector.description").withStyle(ChatFormatting.BLUE)); } diff --git a/common/src/main/java/de/cech12/solarcooker/block/ShiningDiamondBlock.java b/common/src/main/java/de/cech12/solarcooker/block/ShiningDiamondBlock.java index 74a1d85..b3ae04d 100644 --- a/common/src/main/java/de/cech12/solarcooker/block/ShiningDiamondBlock.java +++ b/common/src/main/java/de/cech12/solarcooker/block/ShiningDiamondBlock.java @@ -1,14 +1,13 @@ package de.cech12.solarcooker.block; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.item.ItemStack; -import net.minecraft.network.chat.Component; import net.minecraft.ChatFormatting; -import net.minecraft.world.level.BlockGetter; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.block.Block; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; public class ShiningDiamondBlock extends Block { @@ -18,8 +17,8 @@ public ShiningDiamondBlock(Properties properties) { } @Override - public void appendHoverText(@Nonnull ItemStack stack, @Nullable BlockGetter worldIn, @Nonnull List tooltip, @Nonnull TooltipFlag flagIn) { - super.appendHoverText(stack, worldIn, tooltip, flagIn); + public void appendHoverText(@Nonnull ItemStack stack, @Nonnull Item.TooltipContext context, @Nonnull List tooltip, @Nonnull TooltipFlag flag) { + super.appendHoverText(stack, context, tooltip, flag); tooltip.add(Component.translatable("item.solarcooker.shining_diamond_block.description").withStyle(ChatFormatting.BLUE)); } diff --git a/common/src/main/java/de/cech12/solarcooker/block/SolarCookerBlock.java b/common/src/main/java/de/cech12/solarcooker/block/SolarCookerBlock.java index d21a51b..ea3940b 100644 --- a/common/src/main/java/de/cech12/solarcooker/block/SolarCookerBlock.java +++ b/common/src/main/java/de/cech12/solarcooker/block/SolarCookerBlock.java @@ -4,25 +4,24 @@ import de.cech12.solarcooker.Constants; import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; import de.cech12.solarcooker.platform.Services; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; import net.minecraft.util.RandomSource; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.entity.player.Player; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.sounds.SoundSource; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.Level; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import net.minecraft.world.level.block.state.BlockBehaviour; - public class SolarCookerBlock extends AbstractSolarCookerBlock { public static final MapCodec CODEC = simpleCodec(SolarCookerBlock::new); @@ -54,8 +53,8 @@ public BlockEntityTicker getTicker(@Nonnull Level lev * inside AbstractSolarCookerBlock. */ @Override - protected void interactWith(Level worldIn, @Nonnull BlockPos pos, @Nonnull Player player) { - BlockEntity blockEntity = worldIn.getBlockEntity(pos); + protected void interactWith(Level level, @Nonnull BlockPos pos, @Nonnull Player player) { + BlockEntity blockEntity = level.getBlockEntity(pos); if (blockEntity instanceof SolarCookerBlockEntity && player instanceof ServerPlayer) { player.openMenu((SolarCookerBlockEntity) blockEntity); } 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 290a8e2..b979438 100644 --- a/common/src/main/java/de/cech12/solarcooker/blockentity/SolarCookerBlockEntity.java +++ b/common/src/main/java/de/cech12/solarcooker/blockentity/SolarCookerBlockEntity.java @@ -1,49 +1,50 @@ package de.cech12.solarcooker.blockentity; +import com.google.common.collect.Lists; import de.cech12.solarcooker.Constants; import de.cech12.solarcooker.ModTags; import de.cech12.solarcooker.block.AbstractSolarCookerBlock; import de.cech12.solarcooker.block.ReflectorBlock; import de.cech12.solarcooker.block.SolarCookerBlock; -import com.google.common.collect.Lists; import de.cech12.solarcooker.inventory.SolarCookerContainer; import de.cech12.solarcooker.platform.Services; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.Connection; import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.util.Mth; +import net.minecraft.world.ContainerHelper; +import net.minecraft.world.WorldlyContainer; +import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.player.StackedContents; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ContainerData; import net.minecraft.world.inventory.RecipeCraftingHolder; -import net.minecraft.world.item.crafting.RecipeHolder; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.LidBlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.entity.ExperienceOrb; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.StackedContentsCompatible; -import net.minecraft.world.WorldlyContainer; -import net.minecraft.world.ContainerHelper; 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.entity.player.StackedContents; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.Connection; -import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BaseContainerBlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraft.core.Direction; -import net.minecraft.core.NonNullList; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.sounds.SoundSource; -import net.minecraft.sounds.SoundEvent; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.core.BlockPos; -import net.minecraft.util.Mth; +import net.minecraft.world.level.block.entity.LidBlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; -import net.minecraft.world.level.Level; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -172,26 +173,26 @@ public int getCookTimeTotal() { } @Override - public void load(@Nonnull CompoundTag nbtIn) { - super.load(nbtIn); + protected void loadAdditional(@Nonnull CompoundTag compound, @Nonnull HolderLookup.Provider provider) { + super.loadAdditional(compound, provider); this.items = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); - ContainerHelper.loadAllItems(nbtIn, this.items); - this.cookTime = nbtIn.getInt("CookTime"); - this.cookTimeTotal = nbtIn.getInt("CookTimeTotal"); + ContainerHelper.loadAllItems(compound, this.items, provider); + this.cookTime = compound.getInt("CookTime"); + this.cookTimeTotal = compound.getInt("CookTimeTotal"); } @Override - protected void saveAdditional(@Nonnull CompoundTag compound) { - super.saveAdditional(compound); + protected void saveAdditional(@Nonnull CompoundTag compound, @Nonnull HolderLookup.Provider provider) { + super.saveAdditional(compound, provider); compound.putInt("CookTime", this.cookTime); compound.putInt("CookTimeTotal", this.cookTimeTotal); - ContainerHelper.saveAllItems(compound, this.items); + ContainerHelper.saveAllItems(compound, this.items, provider); } @Override @Nonnull - public CompoundTag getUpdateTag() { - return this.saveWithoutMetadata(); + public CompoundTag getUpdateTag(@Nonnull HolderLookup.Provider provider) { + return this.saveWithoutMetadata(provider); } @Nullable @@ -201,8 +202,8 @@ public ClientboundBlockEntityDataPacket getUpdatePacket() { } //@Override //overrides a Forge / Neoforge method ?! TODO - public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { - this.load(pkt.getTag()); + public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider lookupProvider) { + this.loadAdditional(pkt.getTag(), lookupProvider); } public static void tick(Level level, BlockPos pos, BlockState state, SolarCookerBlockEntity entity) { @@ -469,6 +470,12 @@ public boolean isEmpty() { return true; } + @Override + @Nonnull + protected NonNullList getItems() { + return this.items; + } + /** * Returns the stack in the given slot. */ @@ -496,13 +503,18 @@ public ItemStack removeItemNoUpdate(int index) { return ContainerHelper.takeItem(this.items, index); } + @Override + protected void setItems(@Nonnull NonNullList nonNullList) { + this.items = nonNullList; + } + /** * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). */ @Override public void setItem(int index, ItemStack stack) { ItemStack itemstack = this.items.get(index); - boolean flag = !stack.isEmpty() && ItemStack.isSameItemSameTags(itemstack, stack); + boolean flag = !stack.isEmpty() && ItemStack.isSameItemSameComponents(itemstack, stack); this.items.set(index, stack); if (stack.getCount() > this.getMaxStackSize()) { stack.setCount(this.getMaxStackSize()); diff --git a/common/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/diamond_block.json b/common/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/diamond_block.json index 5e45f66..373f525 100644 --- a/common/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/diamond_block.json +++ b/common/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/diamond_block.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "solarcooker:shining_diamond_block" - ] + "items": "solarcooker:shining_diamond_block" } ] } diff --git a/common/src/main/resources/data/solarcooker/advancements/recipes/decorations/reflector.json b/common/src/main/resources/data/solarcooker/advancements/recipes/decorations/reflector.json index b01e5e7..7da98ce 100644 --- a/common/src/main/resources/data/solarcooker/advancements/recipes/decorations/reflector.json +++ b/common/src/main/resources/data/solarcooker/advancements/recipes/decorations/reflector.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "solarcooker:solar_cooker" - ] + "items": "solarcooker:solar_cooker" } ] } diff --git a/common/src/main/resources/data/solarcooker/recipes/diamond_block.json b/common/src/main/resources/data/solarcooker/recipes/diamond_block.json index 1b5850d..b4e96f1 100644 --- a/common/src/main/resources/data/solarcooker/recipes/diamond_block.json +++ b/common/src/main/resources/data/solarcooker/recipes/diamond_block.json @@ -7,6 +7,6 @@ } ], "result": { - "item": "minecraft:diamond_block" + "id": "minecraft:diamond_block" } } \ No newline at end of file diff --git a/common/src/main/resources/pack.mcmeta b/common/src/main/resources/pack.mcmeta index add527b..0566f34 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": 15 + "pack_format": 41 } } \ No newline at end of file diff --git a/fabric/src/main/java/de/cech12/solarcooker/FabricSolarCookerMod.java b/fabric/src/main/java/de/cech12/solarcooker/FabricSolarCookerMod.java index 4673e54..039b06d 100644 --- a/fabric/src/main/java/de/cech12/solarcooker/FabricSolarCookerMod.java +++ b/fabric/src/main/java/de/cech12/solarcooker/FabricSolarCookerMod.java @@ -7,10 +7,21 @@ import de.cech12.solarcooker.init.ModRecipeTypes; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.world.item.CreativeModeTabs; public class FabricSolarCookerMod implements ModInitializer { + public record SolarCookerData(boolean empty) { + public static final StreamCodec CODEC = StreamCodec.composite( + ByteBufCodecs.BOOL, + SolarCookerData::empty, + SolarCookerData::new + ); + } + @Override public void onInitialize() { ModBlocks.init(); diff --git a/fabric/src/main/java/de/cech12/solarcooker/block/FabricSolarCookerBlock.java b/fabric/src/main/java/de/cech12/solarcooker/block/FabricSolarCookerBlock.java index 73a0041..0d27125 100644 --- a/fabric/src/main/java/de/cech12/solarcooker/block/FabricSolarCookerBlock.java +++ b/fabric/src/main/java/de/cech12/solarcooker/block/FabricSolarCookerBlock.java @@ -1,9 +1,9 @@ package de.cech12.solarcooker.block; +import de.cech12.solarcooker.FabricSolarCookerMod; import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory; import net.minecraft.core.BlockPos; -import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerPlayer; import net.minecraft.stats.Stats; @@ -23,13 +23,13 @@ public FabricSolarCookerBlock(Properties builder) { } @Override - protected void interactWith(Level worldIn, @NotNull BlockPos pos, @NotNull Player player) { - BlockEntity blockEntity = worldIn.getBlockEntity(pos); + protected void interactWith(Level level, @NotNull BlockPos pos, @NotNull Player player) { + BlockEntity blockEntity = level.getBlockEntity(pos); if (blockEntity instanceof SolarCookerBlockEntity container) { - player.openMenu(new ExtendedScreenHandlerFactory() { + player.openMenu(new ExtendedScreenHandlerFactory<>() { @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf data) { - //do nothing + public Object getScreenOpeningData(ServerPlayer player) { + return new FabricSolarCookerMod.SolarCookerData(false); } @Nonnull diff --git a/fabric/src/main/java/de/cech12/solarcooker/init/ModBlockEntityTypes.java b/fabric/src/main/java/de/cech12/solarcooker/init/ModBlockEntityTypes.java index 2ae3050..35cfc82 100644 --- a/fabric/src/main/java/de/cech12/solarcooker/init/ModBlockEntityTypes.java +++ b/fabric/src/main/java/de/cech12/solarcooker/init/ModBlockEntityTypes.java @@ -1,6 +1,5 @@ package de.cech12.solarcooker.init; -import de.cech12.solarcooker.CommonLoader; import de.cech12.solarcooker.Constants; import de.cech12.solarcooker.blockentity.SolarCookerBlockEntity; import net.minecraft.core.Registry; @@ -18,7 +17,7 @@ public final class ModBlockEntityTypes { public static void init() {} private static BlockEntityType register(String name, BlockEntityType.Builder blockEntityTypeBuilder) { - return Registry.register(BuiltInRegistries.BLOCK_ENTITY_TYPE, CommonLoader.id(name), blockEntityTypeBuilder.build(null)); + return Registry.register(BuiltInRegistries.BLOCK_ENTITY_TYPE, Constants.id(name), blockEntityTypeBuilder.build(null)); } } diff --git a/fabric/src/main/java/de/cech12/solarcooker/init/ModBlocks.java b/fabric/src/main/java/de/cech12/solarcooker/init/ModBlocks.java index 5ade5b7..c90056d 100644 --- a/fabric/src/main/java/de/cech12/solarcooker/init/ModBlocks.java +++ b/fabric/src/main/java/de/cech12/solarcooker/init/ModBlocks.java @@ -1,15 +1,14 @@ package de.cech12.solarcooker.init; -import de.cech12.solarcooker.CommonLoader; import de.cech12.solarcooker.Constants; import de.cech12.solarcooker.block.FabricSolarCookerBlock; import de.cech12.solarcooker.block.ReflectorBlock; import de.cech12.solarcooker.block.ShiningDiamondBlock; import net.minecraft.core.Registry; import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.MapColor; public final class ModBlocks { @@ -27,7 +26,7 @@ public final class ModBlocks { public static void init() {} private static Block register(String name, Block block) { - return Registry.register(BuiltInRegistries.BLOCK, CommonLoader.id(name), block); + return Registry.register(BuiltInRegistries.BLOCK, Constants.id(name), block); } } \ No newline at end of file diff --git a/fabric/src/main/java/de/cech12/solarcooker/init/ModItems.java b/fabric/src/main/java/de/cech12/solarcooker/init/ModItems.java index 5d6c30e..9c5c2ed 100644 --- a/fabric/src/main/java/de/cech12/solarcooker/init/ModItems.java +++ b/fabric/src/main/java/de/cech12/solarcooker/init/ModItems.java @@ -1,6 +1,5 @@ package de.cech12.solarcooker.init; -import de.cech12.solarcooker.CommonLoader; import de.cech12.solarcooker.Constants; import net.minecraft.core.Registry; import net.minecraft.core.registries.BuiltInRegistries; @@ -25,7 +24,7 @@ public class ModItems { public static void init() {} private static Item register(String name, Supplier block) { - return Registry.register(BuiltInRegistries.ITEM, CommonLoader.id(name), new BlockItem(block.get(), new Item.Properties())); + return Registry.register(BuiltInRegistries.ITEM, Constants.id(name), new BlockItem(block.get(), new Item.Properties())); } } diff --git a/fabric/src/main/java/de/cech12/solarcooker/init/ModMenuTypes.java b/fabric/src/main/java/de/cech12/solarcooker/init/ModMenuTypes.java index 6b13a8b..a553146 100644 --- a/fabric/src/main/java/de/cech12/solarcooker/init/ModMenuTypes.java +++ b/fabric/src/main/java/de/cech12/solarcooker/init/ModMenuTypes.java @@ -1,7 +1,7 @@ package de.cech12.solarcooker.init; -import de.cech12.solarcooker.CommonLoader; import de.cech12.solarcooker.Constants; +import de.cech12.solarcooker.FabricSolarCookerMod; import de.cech12.solarcooker.inventory.SolarCookerContainer; import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType; import net.minecraft.core.Registry; @@ -11,7 +11,7 @@ public class ModMenuTypes { - private static final MenuType SOLAR_COOKER_MENU_TYPE = register(Constants.SOLAR_COOKER_MENU_NAME, new ExtendedScreenHandlerType<>((pWindowID, pInventory, pData) -> new SolarCookerContainer(Constants.SOLAR_COOKING_RECIPE_TYPE.get(), pWindowID, pInventory))); + private static final MenuType SOLAR_COOKER_MENU_TYPE = register(Constants.SOLAR_COOKER_MENU_NAME, new ExtendedScreenHandlerType<>((pWindowID, pInventory, pData) -> new SolarCookerContainer(Constants.SOLAR_COOKING_RECIPE_TYPE.get(), pWindowID, pInventory), FabricSolarCookerMod.SolarCookerData.CODEC)); static { Constants.SOLAR_COOKER_MENU_TYPE = () -> SOLAR_COOKER_MENU_TYPE; @@ -19,8 +19,8 @@ public class ModMenuTypes { public static void init() {} - private static MenuType register(String name, ExtendedScreenHandlerType screenHandlerType) { - return Registry.register(BuiltInRegistries.MENU, CommonLoader.id(name), screenHandlerType); + private static MenuType register(String name, ExtendedScreenHandlerType screenHandlerType) { + return Registry.register(BuiltInRegistries.MENU, Constants.id(name), screenHandlerType); } } diff --git a/fabric/src/main/java/de/cech12/solarcooker/init/ModRecipeTypes.java b/fabric/src/main/java/de/cech12/solarcooker/init/ModRecipeTypes.java index 52d0544..9be14f9 100644 --- a/fabric/src/main/java/de/cech12/solarcooker/init/ModRecipeTypes.java +++ b/fabric/src/main/java/de/cech12/solarcooker/init/ModRecipeTypes.java @@ -1,6 +1,5 @@ package de.cech12.solarcooker.init; -import de.cech12.solarcooker.CommonLoader; import de.cech12.solarcooker.Constants; import de.cech12.solarcooker.crafting.SolarCookingRecipe; import net.minecraft.core.Registry; @@ -22,10 +21,10 @@ public class ModRecipeTypes { public static void init() {} private static RecipeType registerRecipe(String name) { - return Registry.register(BuiltInRegistries.RECIPE_TYPE, CommonLoader.id(name), new RecipeType<>() {}); + return Registry.register(BuiltInRegistries.RECIPE_TYPE, Constants.id(name), new RecipeType<>() {}); } private static RecipeSerializer registerSerializer(String name, RecipeSerializer serializer) { - return Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, CommonLoader.id(name), serializer); + return Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Constants.id(name), serializer); } } diff --git a/fabric/src/main/resources/data/c/tags/items/wooden_chests.json b/fabric/src/main/resources/data/c/tags/items/wooden_chests.json deleted file mode 100644 index 86533f9..0000000 --- a/fabric/src/main/resources/data/c/tags/items/wooden_chests.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "values": [ - "minecraft:chest", - "minecraft:trapped_chest" - ] -} \ 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/advancements/recipes/building_blocks/shining_diamond_block.json index cf077bc..efcc482 100644 --- a/fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json +++ b/fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:diamond_block" - ] + "items": "#c:storage_blocks/diamond" } ] } diff --git a/fabric/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json b/fabric/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json index d44cdd2..415c439 100644 --- a/fabric/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json +++ b/fabric/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json @@ -11,7 +11,7 @@ "conditions": { "items": [ { - "tag": "c:wooden_chests" + "items": "#c:chests/wooden" } ] } diff --git a/fabric/src/main/resources/data/solarcooker/recipes/reflector.json b/fabric/src/main/resources/data/solarcooker/recipes/reflector.json index 69e86c1..c2e749f 100644 --- a/fabric/src/main/resources/data/solarcooker/recipes/reflector.json +++ b/fabric/src/main/resources/data/solarcooker/recipes/reflector.json @@ -11,13 +11,13 @@ "tag": "c:glass_panes" }, "I": { - "tag": "c:iron_ingots" + "tag": "c:ingots/iron" }, "S": { "tag": "minecraft:wooden_slabs" } }, "result": { - "item": "solarcooker:reflector" + "id": "solarcooker:reflector" } } \ No newline at end of file diff --git a/fabric/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json b/fabric/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json index 773535f..afc438c 100644 --- a/fabric/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json +++ b/fabric/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json @@ -2,9 +2,11 @@ "type": "solarcooker:solarcooking", "category": "misc", "ingredient": { - "item": "minecraft:diamond_block" + "tag": "c:storage_blocks/diamond" + }, + "result": { + "id": "solarcooker:shining_diamond_block" }, - "result": "solarcooker:shining_diamond_block", "experience": 0.3, "cookingtime": 3000 } \ No newline at end of file diff --git a/fabric/src/main/resources/data/solarcooker/recipes/solar_cooker.json b/fabric/src/main/resources/data/solarcooker/recipes/solar_cooker.json index 55eb3bd..eb3fa37 100644 --- a/fabric/src/main/resources/data/solarcooker/recipes/solar_cooker.json +++ b/fabric/src/main/resources/data/solarcooker/recipes/solar_cooker.json @@ -11,13 +11,13 @@ "tag": "c:glass_panes" }, "I": { - "tag": "c:iron_ingots" + "tag": "c:ingots/iron" }, "C": { - "tag": "c:wooden_chests" + "tag": "c:chests/wooden" } }, "result": { - "item": "solarcooker:solar_cooker" + "id": "solarcooker:solar_cooker" } } \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 9d3c9d0..cee3fff 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -33,13 +33,13 @@ ] }, "depends": { - "java": ">=17", + "java": ">=${java_version}", "minecraft": ">=${minecraft_version}", "fabricloader": ">=${fabric_loader_version}", "fabric-api": ">=${fabric_version}", "cloth-config": ">=${cloth_config_version}" }, - "recommends": { + "suggests": { "modmenu": ">=${mod_menu_version}", "jei": ">=${jei_version}", "roughlyenoughitems": ">=${rei_version}" diff --git a/forge/build.gradle b/forge/build.gradle index 37269cb..24f7dce 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -1,7 +1,7 @@ plugins { id 'idea' id 'maven-publish' - id 'net.minecraftforge.gradle' version '[6.0.16,6.2)' + id 'net.minecraftforge.gradle' version '[6.0.24,6.2)' id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' } base { @@ -15,6 +15,7 @@ base { minecraft { mappings channel: 'official', version: minecraft_version + reobf = false copyIdeResources = true //Calls processResources when in dev @@ -63,17 +64,14 @@ dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" compileOnly project(":common") annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT:processor") + //temporary necessary: + implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } } - compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")) - testCompileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")) - compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-lib:${jei_version}")) - testCompileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-lib:${jei_version}")) - //runtimeOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")) - - compileOnly fg.deobf("me.shedaniel:RoughlyEnoughItems-api-forge:$rei_version") - runtimeOnly fg.deobf("me.shedaniel:RoughlyEnoughItems-forge:$rei_version") - implementation fg.deobf("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}") - implementation fg.deobf("dev.architectury:architectury-forge:${architectury_version}") + compileOnly "mezz.jei:jei-${minecraft_version}-common-api:${jei_version}" + testCompileOnly "mezz.jei:jei-${minecraft_version}-common-api:${jei_version}" + compileOnly "mezz.jei:jei-${minecraft_version}-lib:${jei_version}" + testCompileOnly "mezz.jei:jei-${minecraft_version}-lib:${jei_version}" + runtimeOnly "mezz.jei:jei-${minecraft_version}-forge:${jei_version}" } tasks.withType(JavaCompile).configureEach { @@ -90,8 +88,6 @@ processResources { from project(":common").sourceSets.main.resources } -jar.finalizedBy('reobfJar') - publishing { publications { mavenJava(MavenPublication) { diff --git a/forge/src/main/java/de/cech12/solarcooker/ForgeSolarCookerMod.java b/forge/src/main/java/de/cech12/solarcooker/ForgeSolarCookerMod.java index 90f3a7f..ee51c9c 100644 --- a/forge/src/main/java/de/cech12/solarcooker/ForgeSolarCookerMod.java +++ b/forge/src/main/java/de/cech12/solarcooker/ForgeSolarCookerMod.java @@ -7,13 +7,9 @@ import de.cech12.solarcooker.init.ModItems; import de.cech12.solarcooker.init.ModMenuTypes; import de.cech12.solarcooker.init.ModRecipeTypes; -import de.cech12.solarcooker.inventory.SolarCookerContainer; import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; -import net.minecraft.world.inventory.MenuType; import net.minecraft.world.item.CreativeModeTabs; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.BuildCreativeModeTabContentsEvent; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -37,10 +33,9 @@ public ForgeSolarCookerMod() { CommonLoader.init(); } - @OnlyIn(Dist.CLIENT) @SubscribeEvent public static void onClientRegister(FMLClientSetupEvent event) { - MenuScreens.register((MenuType) Constants.SOLAR_COOKER_MENU_TYPE.get(), SolarCookerScreen::new); + MenuScreens.register(Constants.SOLAR_COOKER_MENU_TYPE.get(), SolarCookerScreen::new); BlockEntityRenderers.register(Constants.SOLAR_COOKER_ENTITY_TYPE.get(), SolarCookerBlockEntityRenderer::new); } diff --git a/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookerReiClientPlugin.java b/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookerReiClientPlugin.java deleted file mode 100644 index 46f10f9..0000000 --- a/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookerReiClientPlugin.java +++ /dev/null @@ -1,40 +0,0 @@ -package de.cech12.solarcooker.rei; - -import de.cech12.solarcooker.Constants; -import de.cech12.solarcooker.crafting.SolarCookingRecipe; -import de.cech12.solarcooker.platform.Services; -import me.shedaniel.rei.api.client.plugins.REIClientPlugin; -import me.shedaniel.rei.api.client.registry.category.CategoryRegistry; -import me.shedaniel.rei.api.client.registry.display.DisplayRegistry; -import me.shedaniel.rei.api.common.display.DisplaySerializerRegistry; -import me.shedaniel.rei.api.common.util.EntryStacks; -import me.shedaniel.rei.forge.REIPluginClient; -import net.minecraft.world.item.crafting.AbstractCookingRecipe; - -import java.util.Objects; - -@SuppressWarnings("unused") -@REIPluginClient -public class SolarCookerReiClientPlugin implements REIClientPlugin { - - @Override - public void registerCategories(CategoryRegistry registry) { - registry.add(new SolarCookingReiDisplayCategory()); - registry.addWorkstations(SolarCookingReiDisplayCategory.ID, EntryStacks.of(Constants.SOLAR_COOKER_BLOCK.get())); - } - - @Override - public void registerDisplaySerializer(DisplaySerializerRegistry registry) { - registry.register(SolarCookingReiDisplayCategory.ID, SolarCookingReiDisplay.getSerializer()); - } - - @Override - public void registerDisplays(DisplayRegistry registry) { - registry.registerRecipeFiller(SolarCookingRecipe.class, Constants.SOLAR_COOKING_RECIPE_TYPE.get(), SolarCookingReiDisplay::new); - if (Services.CONFIG.areVanillaRecipesEnabled()) { - registry.registerRecipeFiller(AbstractCookingRecipe.class, type -> Objects.equals(Services.CONFIG.getRecipeType(), type), - recipeHolder -> Services.CONFIG.isRecipeAllowed(recipeHolder.id()), SolarCookingReiDisplay::new); - } - } - -} diff --git a/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookingReiDisplay.java b/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookingReiDisplay.java deleted file mode 100644 index 4cb0f96..0000000 --- a/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookingReiDisplay.java +++ /dev/null @@ -1,62 +0,0 @@ -package de.cech12.solarcooker.rei; - -import de.cech12.solarcooker.crafting.SolarCookingRecipe; -import de.cech12.solarcooker.platform.Services; -import me.shedaniel.rei.api.common.category.CategoryIdentifier; -import me.shedaniel.rei.api.common.display.basic.BasicDisplay; -import me.shedaniel.rei.api.common.entry.EntryIngredient; -import me.shedaniel.rei.api.common.registry.RecipeManagerContext; -import me.shedaniel.rei.api.common.util.EntryIngredients; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.world.item.crafting.AbstractCookingRecipe; -import net.minecraft.world.item.crafting.RecipeHolder; - -import java.util.Collections; -import java.util.List; -import java.util.Optional; - -public class SolarCookingReiDisplay extends BasicDisplay { - - private final float xp; - private final double cookTime; - - public SolarCookingReiDisplay(RecipeHolder recipe) { - this(EntryIngredients.ofIngredients( - recipe.value().getIngredients()), - Collections.singletonList(EntryIngredients.of(recipe.value().getResultItem(null))), - recipe, - recipe.value().getExperience(), - recipe.value() instanceof SolarCookingRecipe ? recipe.value().getCookingTime() : (recipe.value().getCookingTime() * Services.CONFIG.getCookTimeFactor())); - } - - public SolarCookingReiDisplay(List input, List output, CompoundTag tag) { - this(input, output, RecipeManagerContext.getInstance().byId(tag, "location"), - tag.getFloat("xp"), tag.getDouble("cookTime")); - } - - public SolarCookingReiDisplay(List input, List output, RecipeHolder recipe, float xp, double cookTime) { - super(input, output, Optional.ofNullable(recipe).map(RecipeHolder::id)); - this.xp = xp; - this.cookTime = cookTime; - } - - public static Serializer getSerializer() { - return BasicDisplay.Serializer.ofRecipeLess(SolarCookingReiDisplay::new, (display, tag) -> { - tag.putFloat("xp", display.xp); - tag.putDouble("cookTime", display.cookTime); - }); - } - - @Override - public CategoryIdentifier getCategoryIdentifier() { - return SolarCookingReiDisplayCategory.ID; - } - - public double getCookTime() { - return cookTime; - } - - public float getXp() { - return xp; - } -} diff --git a/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookingReiDisplayCategory.java b/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookingReiDisplayCategory.java deleted file mode 100644 index 2754092..0000000 --- a/forge/src/main/java/de/cech12/solarcooker/rei/SolarCookingReiDisplayCategory.java +++ /dev/null @@ -1,68 +0,0 @@ -package de.cech12.solarcooker.rei; - -import com.google.common.collect.Lists; -import de.cech12.solarcooker.Constants; -import me.shedaniel.math.Point; -import me.shedaniel.math.Rectangle; -import me.shedaniel.rei.api.client.gui.DisplayRenderer; -import me.shedaniel.rei.api.client.gui.Renderer; -import me.shedaniel.rei.api.client.gui.SimpleDisplayRenderer; -import me.shedaniel.rei.api.client.gui.widgets.Widget; -import me.shedaniel.rei.api.client.gui.widgets.Widgets; -import me.shedaniel.rei.api.client.registry.display.DisplayCategory; -import me.shedaniel.rei.api.common.category.CategoryIdentifier; -import me.shedaniel.rei.api.common.entry.EntryStack; -import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes; -import net.minecraft.network.chat.Component; -import net.minecraft.world.item.ItemStack; - -import java.text.DecimalFormat; -import java.util.Collections; -import java.util.List; - -public class SolarCookingReiDisplayCategory implements DisplayCategory { - - public static final CategoryIdentifier ID = CategoryIdentifier.of(Constants.MOD_ID, Constants.SOLAR_COOKING_NAME); - - @Override - public CategoryIdentifier getCategoryIdentifier() { - return ID; - } - - @Override - public Component getTitle() { - return Component.translatable("block.solarcooker.solar_cooker"); - } - - @Override - public Renderer getIcon() { - return EntryStack.of(VanillaEntryTypes.ITEM, new ItemStack(Constants.SOLAR_COOKER_ITEM.get())); - } - - @Override - public int getDisplayHeight() { - return 49; - } - - @Override - public DisplayRenderer getDisplayRenderer(SolarCookingReiDisplay display) { - return SimpleDisplayRenderer.from(Collections.singletonList(display.getInputEntries().get(0)), display.getOutputEntries()); - } - - @Override - public List setupDisplay(SolarCookingReiDisplay display, Rectangle bounds) { - Point startPoint = new Point(bounds.getCenterX() - 41, bounds.y + 10); - double cookingTime = display.getCookTime(); - DecimalFormat df = new DecimalFormat("###.##"); - List widgets = Lists.newArrayList(); - widgets.add(Widgets.createRecipeBase(bounds)); - widgets.add(Widgets.createResultSlotBackground(new Point(startPoint.x + 61, startPoint.y + 9))); - widgets.add(Widgets.createBurningFire(new Point(startPoint.x + 1, startPoint.y + 20)).animationDurationMS(10000.0)); - widgets.add(Widgets.createLabel(new Point(bounds.x + bounds.width - 5, bounds.y + 5), Component.translatable("category.rei.cooking.time&xp", new Object[]{df.format(display.getXp()), df.format(cookingTime / 20.0)})).noShadow().rightAligned().color(-12566464, -4473925)); - widgets.add(Widgets.createArrow(new Point(startPoint.x + 24, startPoint.y + 8)).animationDurationTicks(cookingTime)); - widgets.add(Widgets.createSlot(new Point(startPoint.x + 61, startPoint.y + 9)).entries(display.getOutputEntries().get(0)).disableBackground().markOutput()); - widgets.add(Widgets.createSlot(new Point(startPoint.x + 1, startPoint.y + 1)).entries(display.getInputEntries().get(0)).markInput()); - return widgets; - } - -} diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 1b175d4..c41d43d 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -28,11 +28,4 @@ mandatory=false versionRange="${jei_version_range}" referralUrl="https://github.com/mezz/JustEnoughItems" ordering="NONE" -side="BOTH" -[[dependencies.${mod_id}]] -modId="roughlyenoughitems" -mandatory=false -versionRange="${rei_version_range}" -referralUrl="https://github.com/shedaniel/RoughlyEnoughItems" -ordering="NONE" side="BOTH" \ No newline at end of file diff --git a/forge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json b/forge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json index 74b6a6a..6e3b489 100644 --- a/forge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json +++ b/forge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json @@ -11,7 +11,7 @@ "conditions": { "items": [ { - "tag": "forge:storage_blocks/diamond" + "items": "#forge:storage_blocks/diamond" } ] } diff --git a/forge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json b/forge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json index 2655bad..bf801a0 100644 --- a/forge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json +++ b/forge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json @@ -11,7 +11,7 @@ "conditions": { "items": [ { - "tag": "forge:chests/wooden" + "items": "#forge:chests/wooden" } ] } diff --git a/forge/src/main/resources/data/solarcooker/recipes/reflector.json b/forge/src/main/resources/data/solarcooker/recipes/reflector.json index b238591..dfe54ca 100644 --- a/forge/src/main/resources/data/solarcooker/recipes/reflector.json +++ b/forge/src/main/resources/data/solarcooker/recipes/reflector.json @@ -18,6 +18,6 @@ } }, "result": { - "item": "solarcooker:reflector" + "id": "solarcooker:reflector" } } \ No newline at end of file diff --git a/forge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json b/forge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json index 398f5a9..dc55c5f 100644 --- a/forge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json +++ b/forge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json @@ -4,7 +4,9 @@ "ingredient": { "tag": "forge:storage_blocks/diamond" }, - "result": "solarcooker:shining_diamond_block", + "result": { + "id": "solarcooker:shining_diamond_block" + }, "experience": 0.3, "cookingtime": 3000 } \ No newline at end of file diff --git a/forge/src/main/resources/data/solarcooker/recipes/solar_cooker.json b/forge/src/main/resources/data/solarcooker/recipes/solar_cooker.json index 95ab5b7..de6fdad 100644 --- a/forge/src/main/resources/data/solarcooker/recipes/solar_cooker.json +++ b/forge/src/main/resources/data/solarcooker/recipes/solar_cooker.json @@ -18,6 +18,6 @@ } }, "result": { - "item": "solarcooker:solar_cooker" + "id": "solarcooker:solar_cooker" } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 5c7b5bd..4801000 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # Project group=de.cech12.solarcooker -mod_version=3.1.2.1 +mod_version=3.2.0.0 mod_id=solarcooker mod_name=Solar Cooker mod_author=Cech12 @@ -14,37 +14,38 @@ mod_issue_tracker=https://github.com/cech12/SolarCooker/issues description=A mod which adds a Solar Cooker. # Common -minecraft_version=1.20.4 -minecraft_version_range=[1.20.4, 1.21) +java_version=21 +minecraft_version=1.20.6 +minecraft_version_range=[1.20.6, 1.21) # Fabric -fabric_version=0.96.11+1.20.4 -fabric_loader_version=0.15.7 -cloth_config_version=13.0.121 -mod_menu_version=9.0.0 +fabric_version=0.98.0+1.20.6 +fabric_loader_version=0.15.11 +cloth_config_version=14.0.126 +mod_menu_version=10.0.0 # Forge -forge_version=49.0.38 -forge_version_range=[49.0.38,) -forge_loader_version_range=[49,) +forge_version=50.1.9 +forge_version_range=[50.1.9,) +forge_loader_version_range=[50,) # NeoForge -neoforge_version=20.4.225 -neoforge_version_range=[20.4.225,) -neoforge_loader_version_range=[1,) +neoforge_version=20.6.119 +neoforge_version_range=[20.6.119,) +neoforge_loader_version_range=[2,) # jei -jei_version=17.3.0.49 -jei_version_range=[17.3.0.49,) +jei_version=18.0.0.65 +jei_version_range=[18.0.0.65,) # rei -rei_version=14.1.727 -rei_version_range=[14.1.727,) -architectury_version=11.1.17 +rei_version=15.0.728 +rei_version_range=[15.0.728,) +architectury_version=12.1.3 #the one probe -top_version=1.20.4_neo-11.0.2-3 -top_version_range=[1.20.4_neo-11.0.2,) +top_version=1.20.5_neo-11.1.1-2 +top_version_range=[1.20.5_neo-11.1.1,) # Gradle org.gradle.jvmargs=-Xmx3G diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 7e8154c..3a1c718 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.81' + id 'net.neoforged.gradle.userdev' version '[7.0.105, 7.2)' id 'java-library' } base { @@ -83,6 +83,8 @@ tasks.withType(ProcessResources).matching(notNeoTask).configureEach { from project(":common").sourceSets.main.resources } +test.onlyIf { false } //disable tests + publishing { publications { mavenJava(MavenPublication) { diff --git a/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java b/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java index dd3284a..bf3bf29 100644 --- a/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java +++ b/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java @@ -8,23 +8,22 @@ import de.cech12.solarcooker.init.ModItems; import de.cech12.solarcooker.init.ModMenuTypes; import de.cech12.solarcooker.init.ModRecipeTypes; -import de.cech12.solarcooker.inventory.SolarCookerContainer; -import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; -import net.minecraft.world.inventory.MenuType; import net.minecraft.world.item.CreativeModeTabs; import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.ModList; +import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.fml.common.Mod; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import net.neoforged.neoforge.capabilities.Capabilities; import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; +import net.neoforged.neoforge.client.event.RegisterMenuScreensEvent; import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent; import net.neoforged.neoforge.items.wrapper.SidedInvWrapper; @Mod(Constants.MOD_ID) -@Mod.EventBusSubscriber(modid= Constants.MOD_ID, bus= Mod.EventBusSubscriber.Bus.MOD) +@EventBusSubscriber(modid= Constants.MOD_ID, bus= EventBusSubscriber.Bus.MOD) public class NeoForgeSolarCookerMod { public NeoForgeSolarCookerMod(IEventBus eventBus) { @@ -44,10 +43,14 @@ public NeoForgeSolarCookerMod(IEventBus eventBus) { @SubscribeEvent public static void onClientRegister(FMLClientSetupEvent event) { - MenuScreens.register((MenuType) Constants.SOLAR_COOKER_MENU_TYPE.get(), SolarCookerScreen::new); BlockEntityRenderers.register(Constants.SOLAR_COOKER_ENTITY_TYPE.get(), SolarCookerBlockEntityRenderer::new); } + @SubscribeEvent + public static void onMenuScreenRegister(RegisterMenuScreensEvent event) { + event.register(Constants.SOLAR_COOKER_MENU_TYPE.get(), SolarCookerScreen::new); + } + @SubscribeEvent public static void registerCapabilities(RegisterCapabilitiesEvent event) { event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, Constants.SOLAR_COOKER_ENTITY_TYPE.get(), SidedInvWrapper::new); 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 019ba57..71f376b 100644 --- a/neoforge/src/main/java/de/cech12/solarcooker/compat/TOPCompat.java +++ b/neoforge/src/main/java/de/cech12/solarcooker/compat/TOPCompat.java @@ -9,7 +9,6 @@ import mcjty.theoneprobe.api.ITheOneProbe; import mcjty.theoneprobe.api.ProbeMode; import mcjty.theoneprobe.apiimpl.styles.ProgressStyle; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; @@ -39,20 +38,15 @@ public ResourceLocation getID() { @Override public void addProbeInfo(ProbeMode probeMode, IProbeInfo iProbeInfo, Player player, Level level, BlockState blockState, IProbeHitData iProbeHitData) { BlockEntity blockEntity = level.getBlockEntity(iProbeHitData.getPos()); - if (!(blockEntity instanceof SolarCookerBlockEntity)) { - return; - } - CompoundTag nbt = blockEntity.getUpdateTag(); - if (!nbt.contains("CookTime") || !nbt.contains("CookTimeTotal")) { - return; - } - final int cookTime = nbt.getInt("CookTime"); - final int cookTimeTotal = nbt.getInt("CookTimeTotal"); - if (cookTime > 0) { - iProbeInfo.progress(cookTime, cookTimeTotal, new ProgressStyle() - .suffix(Component.literal(" / " + cookTimeTotal)) - .alignment(ElementAlignment.ALIGN_CENTER) - ); + if (blockEntity instanceof SolarCookerBlockEntity solarCookerBlockEntity) { + final int cookTime = solarCookerBlockEntity.getCookTime(); + final int cookTimeTotal = solarCookerBlockEntity.getCookTimeTotal(); + if (cookTime > 0) { + iProbeInfo.progress(cookTime, cookTimeTotal, new ProgressStyle() + .suffix(Component.literal(" / " + cookTimeTotal)) + .alignment(ElementAlignment.ALIGN_CENTER) + ); + } } } }); diff --git a/neoforge/src/main/java/de/cech12/solarcooker/platform/NeoForgeConfigHelper.java b/neoforge/src/main/java/de/cech12/solarcooker/platform/NeoForgeConfigHelper.java index cf9561b..5bdb779 100644 --- a/neoforge/src/main/java/de/cech12/solarcooker/platform/NeoForgeConfigHelper.java +++ b/neoforge/src/main/java/de/cech12/solarcooker/platform/NeoForgeConfigHelper.java @@ -56,7 +56,7 @@ public class NeoForgeConfigHelper implements IConfigHelper { @Override public void init() { - ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, SERVER_CONFIG); + ModLoadingContext.get().getActiveContainer().registerConfig(ModConfig.Type.SERVER, SERVER_CONFIG); Path path = FMLPaths.GAMEDIR.get().resolve(FMLConfig.defaultConfigPath()).resolve(Constants.MOD_ID + "-server.toml"); final CommentedFileConfig configData = CommentedFileConfig.builder(path).sync().autosave().writingMode(WritingMode.REPLACE).build(); configData.load(); diff --git a/neoforge/src/main/resources/META-INF/mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml similarity index 100% rename from neoforge/src/main/resources/META-INF/mods.toml rename to neoforge/src/main/resources/META-INF/neoforge.mods.toml diff --git a/neoforge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json b/neoforge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json index 74b6a6a..efcc482 100644 --- a/neoforge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json +++ b/neoforge/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json @@ -11,7 +11,7 @@ "conditions": { "items": [ { - "tag": "forge:storage_blocks/diamond" + "items": "#c:storage_blocks/diamond" } ] } diff --git a/neoforge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json b/neoforge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json index 2655bad..415c439 100644 --- a/neoforge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json +++ b/neoforge/src/main/resources/data/solarcooker/advancements/recipes/decorations/solar_cooker.json @@ -11,7 +11,7 @@ "conditions": { "items": [ { - "tag": "forge:chests/wooden" + "items": "#c:chests/wooden" } ] } diff --git a/neoforge/src/main/resources/data/solarcooker/recipes/reflector.json b/neoforge/src/main/resources/data/solarcooker/recipes/reflector.json index b238591..c2e749f 100644 --- a/neoforge/src/main/resources/data/solarcooker/recipes/reflector.json +++ b/neoforge/src/main/resources/data/solarcooker/recipes/reflector.json @@ -8,16 +8,16 @@ ], "key": { "G": { - "tag": "forge:glass_panes" + "tag": "c:glass_panes" }, "I": { - "tag": "forge:ingots/iron" + "tag": "c:ingots/iron" }, "S": { "tag": "minecraft:wooden_slabs" } }, "result": { - "item": "solarcooker:reflector" + "id": "solarcooker:reflector" } } \ No newline at end of file diff --git a/neoforge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json b/neoforge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json index 398f5a9..afc438c 100644 --- a/neoforge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json +++ b/neoforge/src/main/resources/data/solarcooker/recipes/shining_diamond_block.json @@ -2,9 +2,11 @@ "type": "solarcooker:solarcooking", "category": "misc", "ingredient": { - "tag": "forge:storage_blocks/diamond" + "tag": "c:storage_blocks/diamond" + }, + "result": { + "id": "solarcooker:shining_diamond_block" }, - "result": "solarcooker:shining_diamond_block", "experience": 0.3, "cookingtime": 3000 } \ No newline at end of file diff --git a/neoforge/src/main/resources/data/solarcooker/recipes/solar_cooker.json b/neoforge/src/main/resources/data/solarcooker/recipes/solar_cooker.json index 95ab5b7..eb3fa37 100644 --- a/neoforge/src/main/resources/data/solarcooker/recipes/solar_cooker.json +++ b/neoforge/src/main/resources/data/solarcooker/recipes/solar_cooker.json @@ -8,16 +8,16 @@ ], "key": { "G": { - "tag": "forge:glass_panes" + "tag": "c:glass_panes" }, "I": { - "tag": "forge:ingots/iron" + "tag": "c:ingots/iron" }, "C": { - "tag": "forge:chests/wooden" + "tag": "c:chests/wooden" } }, "result": { - "item": "solarcooker:solar_cooker" + "id": "solarcooker:solar_cooker" } } \ No newline at end of file