From c8e6e2f41bcd9159712c928310ea3228e2362a85 Mon Sep 17 00:00:00 2001 From: samolego <34912839+samolego@users.noreply.github.com> Date: Thu, 25 Nov 2021 21:58:46 +0100 Subject: [PATCH] 1.18-rc1 --- .github/workflows/build.yml | 2 +- .github/workflows/javadoc.yml | 4 ++-- .github/workflows/release.yml | 2 +- gradle.properties | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- .../mixin/duplication/ItemStackMixin_SavePatch.java | 10 ---------- 6 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a0bcae..b064c12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: # Use these Java versions - java: [16] + java: [17] # and run on both Linux and Windows os: [ubuntu-20.04, windows-latest] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index b40056b..8ff0196 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -11,10 +11,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 + - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 16 + java-version: 17 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 237420d..b18779c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 16 + java-version: 17 - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/gradle.properties b/gradle.properties index 61116dd..77c1559 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties -minecraft_version=1.18-pre1 -yarn_mappings=1.18-pre1+build.3 +minecraft_version=1.18-rc1 +yarn_mappings=1.18-rc1+build.1 loader_version=0.12.5 #Fabric api -fabric_version=0.42.2+1.18 +fabric_version=0.43.1+1.18 # Mod Properties -mod_version = 0.4.1 +mod_version = 0.4.2 maven_group = org.samo_lego archives_base_name = golfiv diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f80bbf..f0df5a4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https://services.gradle.org/distributions-snapshots/gradle-7.4-20211124232407+0000-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/org/samo_lego/golfiv/mixin/duplication/ItemStackMixin_SavePatch.java b/src/main/java/org/samo_lego/golfiv/mixin/duplication/ItemStackMixin_SavePatch.java index f2a3d0d..9682235 100644 --- a/src/main/java/org/samo_lego/golfiv/mixin/duplication/ItemStackMixin_SavePatch.java +++ b/src/main/java/org/samo_lego/golfiv/mixin/duplication/ItemStackMixin_SavePatch.java @@ -17,22 +17,14 @@ public abstract class ItemStackMixin_SavePatch { @Shadow public abstract void setCount(int count); - @Shadow public abstract String getTranslationKey(); - @Shadow public abstract Item getItem(); - @Shadow public abstract int getCount(); - @Inject(method = "writeNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/nbt/NbtCompound;", at = @At("HEAD"), cancellable = true) private void writeStack(NbtCompound nbt, CallbackInfoReturnable cir) { if(golfConfig.duplication.patchItemSave) { - System.out.println("Saving " + this.getTranslationKey()); - ItemStack copy = ((ItemStack) (Object) this).copy(); this.setCount(0); - System.out.println("This: " + this.getCount() + " vs copy: " + copy); - Identifier identifier = Registry.ITEM.getId(copy.getItem()); nbt.putString("id", identifier.toString()); nbt.putByte("Count", (byte)copy.getCount()); @@ -40,8 +32,6 @@ private void writeStack(NbtCompound nbt, CallbackInfoReturnable cir nbt.put("tag", copy.getNbt().copy()); } - System.out.println(nbt); - cir.setReturnValue(nbt); } }