diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1f8ab8d..9a5a289 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,30 +11,27 @@ jobs: matrix: # Use these Java versions java: [ - 17, # Current Java LTS & minimum supported by Minecraft + 17, # 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 }} + runs-on: ubuntu-22.04 steps: - name: checkout repository uses: actions/checkout@v4 - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: setup jdk ${{ matrix.java }} uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} distribution: "microsoft" - name: make gradle wrapper executable - if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew - name: build run: ./gradlew build - name: capture build artifacts - if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS - uses: actions/upload-artifact@v3 + if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6ce3faa..36a8eac 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -20,7 +20,7 @@ jobs: token: ${{ secrets.API_TOKEN_GITHUB }} path: build/maven - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: setup jdk ${{ env.JAVA_VERSION }} uses: actions/setup-java@v4 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4774f44..0b00553 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,7 +15,7 @@ jobs: - name: checkout repository uses: actions/checkout@v4 - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: setup jdk ${{ env.JAVA_VERSION }} uses: actions/setup-java@v4 with: @@ -26,7 +26,7 @@ jobs: - name: release run: ./gradlew build curseforge modrinth - name: capture build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ diff --git a/build.gradle b/build.gradle index b53a444..48e74cd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "fabric-loom" version "1.4-SNAPSHOT" + id "fabric-loom" version "1.6-SNAPSHOT" id "maven-publish" id "com.matthewprenger.cursegradle" version "1.4.0" id "com.modrinth.minotaur" version "2.+" @@ -118,7 +118,8 @@ jar { // configure the maven publication publishing { publications { - mavenJava(MavenPublication) { + create("mavenJava", MavenPublication) { + artifactId = project.archives_base_name from components.java } } diff --git a/gradle.properties b/gradle.properties index d8cc961..78cbf69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,21 +5,21 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop minecraft_version=1.20.4 - yarn_mappings=1.20.4+build.1 - loader_version=0.15.1 + yarn_mappings=1.20.4+build.3 + loader_version=0.15.10 # Mod Properties - mod_version=2.5.2+1.20 + mod_version=2.5.3+1.20.4 mod_id=reinfshulker maven_group=atonkish.reinfshulker archives_base_name=reinforced-shulker-boxes # Dependencies - fabric_version=0.91.1+1.20.4 - reinforced_core_version=3.1.3+1.20 - reinforced_chests_version=2.4.3+1.20 + fabric_version=0.97.0+1.20.4 + reinforced_core_version=3.1.4+1.20.4 + reinforced_chests_version=2.4.5+1.20.4 quick_shulker_version=1.4.0-1.20 - shulker_box_tooltip_version=4.0.7+1.20.2 + shulker_box_tooltip_version=4.0.8+1.20.4 # Quick Shulker deps shulkerutils_version=1.0.4-1.19 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c..e644113 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1af9e09..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew.bat b/gradlew.bat index 6689b85..7101f8e 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/src/main/java/atonkish/reinfshulker/block/entity/ModBlockEntityType.java b/src/main/java/atonkish/reinfshulker/block/entity/ModBlockEntityType.java index 3ea0115..d7ddf46 100644 --- a/src/main/java/atonkish/reinfshulker/block/entity/ModBlockEntityType.java +++ b/src/main/java/atonkish/reinfshulker/block/entity/ModBlockEntityType.java @@ -3,8 +3,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; - import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntityType; @@ -24,7 +22,7 @@ public static BlockEntityType registerMaterial( if (!REINFORCED_SHULKER_BOX_MAP.containsKey(material)) { String id = material.getName() + "_shulker_box"; Block[] blocks = ModBlocks.REINFORCED_SHULKER_BOX_MAP.get(material).values().toArray(new Block[0]); - FabricBlockEntityTypeBuilder builder = FabricBlockEntityTypeBuilder + BlockEntityType.Builder builder = BlockEntityType.Builder .create(ModBlockEntityType.createBlockEntityTypeFactory(material), blocks); BlockEntityType blockEntityType = ModBlockEntityType .create(namespace, id, builder); @@ -35,12 +33,12 @@ public static BlockEntityType registerMaterial( } private static BlockEntityType create(String namespace, String id, - FabricBlockEntityTypeBuilder builder) { + BlockEntityType.Builder builder) { return Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(namespace, id), builder.build(null)); } - private static FabricBlockEntityTypeBuilder.Factory createBlockEntityTypeFactory( + private static BlockEntityType.BlockEntityFactory createBlockEntityTypeFactory( ReinforcingMaterial material) { return (BlockPos blockPos, BlockState blockState) -> new ReinforcedShulkerBoxBlockEntity(material, blockPos, blockState); diff --git a/src/main/resources/data/minecraft/tags/blocks/shulker_boxes.json b/src/main/resources/data/minecraft/tags/blocks/shulker_boxes.json new file mode 100644 index 0000000..a98d8a7 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/shulker_boxes.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "#reinfshulker:copper_shulker_boxes", + "#reinfshulker:iron_shulker_boxes", + "#reinfshulker:gold_shulker_boxes", + "#reinfshulker:diamond_shulker_boxes", + "#reinfshulker:netherite_shulker_boxes" + ] +} + \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index be1160f..13c00ae 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -39,10 +39,10 @@ ], "depends": { - "fabricloader": ">=0.15.0", - "fabric-api": "*", + "fabricloader": ">=0.15.10", "minecraft": "~1.20.3", - "java": ">=17" + "java": ">=17", + "fabric-api": "*" }, "suggests": { "modmenu": "*",