Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Updating to 1.18.2 #2

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
# Use these Java versions
java: [
16 # Latest version
17 # Latest version
]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-latest]
Expand All @@ -32,7 +32,7 @@ jobs:
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '16' }} # Only upload artifacts built Java 16 on one OS
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built Java 16 on one OS
uses: actions/upload-artifact@v2
with:
name: Artifacts
Expand Down
14 changes: 10 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand Down Expand Up @@ -46,6 +46,10 @@ dependencies {

}

loom {
accessWidenerPath = file("src/main/resources/supershulkers.accesswidener")
}

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

Expand All @@ -61,8 +65,8 @@ tasks.withType(JavaCompile).configureEach {
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
// Minecraft 1.18 upwards uses Java 17.
it.options.release = 17
}

java {
Expand Down Expand Up @@ -98,3 +102,5 @@ publishing {
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
}
}


12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx1G -Dlog4j.skipJansi=true

# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.59
loader_version=0.11.6
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.4
loader_version=0.14.22

# Mod Properties
mod_version = 0.2.0
mod_version = 0.3.2
maven_group = is.rmob
archives_base_name = supershulkers

# Dependencies
fabric_version=0.40.1+1.17
carpet_core_version=1.4.45+v210825
fabric_version=0.76.0+1.18.2
carpet_core_version=1.4.69+v220331
fabric_asm_version=v2.3
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,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public void recoverEnchantmentsFromTag(NbtCompound tag, CallbackInfo ci) {
/**
* Output enchantment data to BET.
*/
@Inject(method = "writeNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/nbt/NbtCompound;", at = @At("RETURN"))
public void putEnchantsIntoTag(NbtCompound tag, CallbackInfoReturnable<NbtCompound> cir) {
@Inject(method = "Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V", at = @At("RETURN"))
public void putEnchantsIntoTag(NbtCompound tag, CallbackInfo ci) {
LOGGER.trace("hijacking writeNbt ({})", tag);

if (!this.getEnchantments().isEmpty()) {
Expand Down
8 changes: 5 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
"supershulkers.mixins.json"
],

"accessWidener" : "supershulkers.accesswidener",

"depends": {
"fabricloader": ">=0.11.3",
"fabricloader": ">=0.14.22",
"fabric": "*",
"minecraft": "1.17.x",
"java": ">=16"
"minecraft": "1.18.x",
"java": ">=17"
}
}
2 changes: 2 additions & 0 deletions src/main/resources/supershulkers.accesswidener
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
accessWidener v2 named
extendable class net/minecraft/enchantment/EnchantmentTarget
2 changes: 1 addition & 1 deletion src/main/resources/supershulkers.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "is.rmob.supershulkers.mixin",
"compatibilityLevel": "JAVA_16",
"compatibilityLevel": "JAVA_17",
"mixins": [],
"client": [
"BlockItemMixin",
Expand Down