Skip to content

Commit

Permalink
updated to Minecraft 1.20.6 (Fabric 0.98.0+1.20.6, NeoForge 20.6.119,…
Browse files Browse the repository at this point in the history
… 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 REI support for Forge
  • Loading branch information
cech12 committed Jun 30, 2024
1 parent a0d7b90 commit b71581e
Show file tree
Hide file tree
Showing 53 changed files with 247 additions and 432 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/cicd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ 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
if: startsWith(github.ref, 'refs/tags/')
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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
name: Analyze
uses: cech12/MinecraftModActions/.github/workflows/codeql-analysis.yml@main
with:
java-version: 17
java-version: 21
2 changes: 1 addition & 1 deletion .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 3 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions common/src/main/java/de/cech12/solarcooker/CommonLoader.java
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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() {}

}
5 changes: 5 additions & 0 deletions common/src/main/java/de/cech12/solarcooker/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -49,4 +50,8 @@ public class Constants {

private Constants() {}

public static ResourceLocation id(String name) {
return new ResourceLocation(MOD_ID, name);
}

}
3 changes: 1 addition & 2 deletions common/src/main/java/de/cech12/solarcooker/ModTags.java
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -14,7 +13,7 @@ public static class Blocks {
public static final TagKey<Block> SOLAR_COOKER_SHINING = tag("solar_cooker_shining");

private static TagKey<Block> tag(@Nonnull String name) {
return TagKey.create(Registries.BLOCK, new ResourceLocation(Constants.MOD_ID, name));
return TagKey.create(Registries.BLOCK, Constants.id(name));
}
}
}
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -132,8 +132,8 @@ public List<ItemStack> getDrops(@Nonnull BlockState state, @Nonnull LootParams.B
}

@Override
public void appendHoverText(@Nonnull ItemStack stack, @Nullable BlockGetter worldIn, @Nonnull List<Component> tooltip, @Nonnull TooltipFlag flagIn) {
super.appendHoverText(stack, worldIn, tooltip, flagIn);
public void appendHoverText(@Nonnull ItemStack stack, @Nonnull Item.TooltipContext context, @Nonnull List<Component> tooltip, @Nonnull TooltipFlag flag) {
super.appendHoverText(stack, context, tooltip, flag);
tooltip.add(Component.translatable("item.solarcooker.reflector.description").withStyle(ChatFormatting.BLUE));
}

Expand Down
Loading

0 comments on commit b71581e

Please sign in to comment.