Skip to content

Commit

Permalink
[v2.5.3+1.20.4] fixed fense bug (#72)
Browse files Browse the repository at this point in the history
* updated github actions

* bump deps

* replaced deprecated type

* fixed #69

* bump mod version to v2.5.3+1.20.4
  • Loading branch information
Aton-Kish committed May 4, 2024
1 parent 5861c00 commit 106b8a7
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 39 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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.+"
Expand Down Expand Up @@ -118,7 +118,8 @@ jar {
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,7 +22,7 @@ public static BlockEntityType<ReinforcedShulkerBoxBlockEntity> 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<ReinforcedShulkerBoxBlockEntity> builder = FabricBlockEntityTypeBuilder
BlockEntityType.Builder<ReinforcedShulkerBoxBlockEntity> builder = BlockEntityType.Builder
.create(ModBlockEntityType.createBlockEntityTypeFactory(material), blocks);
BlockEntityType<ReinforcedShulkerBoxBlockEntity> blockEntityType = ModBlockEntityType
.create(namespace, id, builder);
Expand All @@ -35,12 +33,12 @@ public static BlockEntityType<ReinforcedShulkerBoxBlockEntity> registerMaterial(
}

private static BlockEntityType<ReinforcedShulkerBoxBlockEntity> create(String namespace, String id,
FabricBlockEntityTypeBuilder<ReinforcedShulkerBoxBlockEntity> builder) {
BlockEntityType.Builder<ReinforcedShulkerBoxBlockEntity> builder) {
return Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(namespace, id),
builder.build(null));
}

private static FabricBlockEntityTypeBuilder.Factory<ReinforcedShulkerBoxBlockEntity> createBlockEntityTypeFactory(
private static BlockEntityType.BlockEntityFactory<ReinforcedShulkerBoxBlockEntity> createBlockEntityTypeFactory(
ReinforcingMaterial material) {
return (BlockPos blockPos, BlockState blockState) -> new ReinforcedShulkerBoxBlockEntity(material, blockPos,
blockState);
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/data/minecraft/tags/blocks/shulker_boxes.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down

0 comments on commit 106b8a7

Please sign in to comment.