Skip to content

Commit

Permalink
[v2.5.1+1.20] support minecraft 1.20.2 (#66)
Browse files Browse the repository at this point in the history
* bump up fabric loom/gradle/minecraft version

* updated support versions

* bump up mod version
  • Loading branch information
Aton-Kish committed Dec 11, 2023
1 parent 85269d7 commit baaa46b
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 198 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ jobs:
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
21, # Current Java LTS
]
# and run on both Linux and Windows
os: [ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: "microsoft"
Expand All @@ -32,7 +33,7 @@ jobs:
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v3
with:
name: Artifacts
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
publish:
runs-on: ubuntu-22.04
env:
JAVA_VERSION: 17
JAVA_VERSION: 21
steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: checkout mcmod repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: Aton-Kish/mcmod
ref: maven
Expand All @@ -22,7 +22,7 @@ jobs:
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "microsoft"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ jobs:
release:
runs-on: ubuntu-22.04
env:
JAVA_VERSION: 17
JAVA_VERSION: 21
ORG_GRADLE_PROJECT_curseforge_token: ${{ secrets.CURSEFORGE_TOKEN }}
ORG_GRADLE_PROJECT_modrinth_token: ${{ secrets.MODRINTH_TOKEN }}
steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "microsoft"
Expand Down
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.3-SNAPSHOT"
id "fabric-loom" version "1.4-SNAPSHOT"
id "maven-publish"
id "com.matthewprenger.cursegradle" version "1.4.0"
id "com.modrinth.minotaur" version "2.+"
Expand Down Expand Up @@ -86,6 +86,10 @@ dependencies {
modImplementation "com.misterpemodder:shulkerboxtooltip-fabric:${project.shulker_box_tooltip_version}"
}

loom {
accessWidenerPath = file("src/main/resources/${project.mod_id}.accesswidener")
}

processResources {
inputs.property "version", project.version

Expand Down Expand Up @@ -150,8 +154,7 @@ curseforge {

addGameVersion "Fabric"
addGameVersion "Java 17"
addGameVersion "1.20"
addGameVersion "1.20.1"
addGameVersion "1.20.2"

relations {
requiredDependency "fabric-api"
Expand All @@ -175,7 +178,7 @@ modrinth {
versionType = "release"
changelog = "[v${project.version}](https://github.com/Aton-Kish/reinforced-shulker-boxes/releases/tag/v" + java.net.URLEncoder.encode(project.version, "UTF-8") + ")"

gameVersions = ["1.20", "1.20.1"]
gameVersions = ["1.20.2"]
loaders = ["fabric"]

dependencies {
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.14.22
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.2
loader_version=0.15.1

# Mod Properties
mod_version=2.5.0+1.20
mod_version=2.5.1+1.20
mod_id=reinfshulker
maven_group=atonkish.reinfshulker
archives_base_name=reinforced-shulker-boxes

# Dependencies
fabric_version=0.87.0+1.20.1
reinforced_core_version=3.1.2+1.20
reinforced_chests_version=2.4.2+1.20
fabric_version=0.91.2+1.20.2
reinforced_core_version=3.1.3+1.20
reinforced_chests_version=2.4.3+1.20
quick_shulker_version=1.4.0-1.20
shulker_box_tooltip_version=4.0.3+1.20
shulker_box_tooltip_version=4.0.7+1.20.2
# Quick Shulker deps
shulkerutils_version=1.0.4-1.19

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
@Nullable
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state,
BlockEntityType<T> type) {
return checkType(type, ModBlockEntityType.REINFORCED_SHULKER_BOX_MAP.get(this.material),
return ReinforcedShulkerBoxBlock.validateTicker(type,
ModBlockEntityType.REINFORCED_SHULKER_BOX_MAP.get(this.material),
ReinforcedShulkerBoxBlockEntity::tick);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraft.recipe.SpecialCraftingRecipe;
import net.minecraft.recipe.book.CraftingRecipeCategory;
import net.minecraft.registry.DynamicRegistryManager;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;

import org.jetbrains.annotations.Nullable;
Expand All @@ -19,8 +18,8 @@
import atonkish.reinfshulker.block.ReinforcedShulkerBoxBlock;

public class ReinforcedShulkerBoxColoringRecipe extends SpecialCraftingRecipe {
public ReinforcedShulkerBoxColoringRecipe(Identifier identifier, CraftingRecipeCategory category) {
super(identifier, category);
public ReinforcedShulkerBoxColoringRecipe(CraftingRecipeCategory craftingRecipeCategory) {
super(craftingRecipeCategory);
}

@Override
Expand Down
Loading

0 comments on commit baaa46b

Please sign in to comment.