From 18e88e329883612bfc17c89fd9cc6c13e6f1223b Mon Sep 17 00:00:00 2001 From: AndyNoob Date: Fri, 8 Nov 2024 11:20:40 -0800 Subject: [PATCH 1/3] Change ItemStackMixin#preventBreak to target ItemStack#shrink --- src/main/java/com/bibireden/playerex/mixin/ItemStackMixin.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/bibireden/playerex/mixin/ItemStackMixin.java b/src/main/java/com/bibireden/playerex/mixin/ItemStackMixin.java index 84d9a257..b0258fec 100644 --- a/src/main/java/com/bibireden/playerex/mixin/ItemStackMixin.java +++ b/src/main/java/com/bibireden/playerex/mixin/ItemStackMixin.java @@ -80,10 +80,9 @@ public void preventDamage(int amount, RandomSource random, ServerPlayer user, Ca } } - @Inject(method = "hurtAndBreak(ILnet/minecraft/world/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;getItem()Lnet/minecraft/world/item/Item;"), cancellable = true) + @Inject(method = "hurtAndBreak(ILnet/minecraft/world/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;shrink(I)V"), cancellable = true) public void preventBreak(int amount, T entity, Consumer onBroken, CallbackInfo ci) { if (!PlayerEX.CONFIG.getFeatureSettings().getItemBreakingEnabled()) return; - ItemStack stack = (ItemStack)(Object)this; if (stack.getItem().builtInRegistryHolder().is(PlayerEXTags.UNBREAKABLE_ITEMS)) { if (!PlayerEXUtil.isBroken(stack)) { From d8cc1898c11db8843dd6e1cfda1ca841ba0a2bea Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 9 Nov 2024 00:14:46 -0600 Subject: [PATCH 2/3] [fix] update github build action --- .github/workflows/audit-pr-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/audit-pr-build.yml b/.github/workflows/audit-pr-build.yml index 35c8a840..32e6eeb9 100644 --- a/.github/workflows/audit-pr-build.yml +++ b/.github/workflows/audit-pr-build.yml @@ -12,11 +12,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: validate gradle wrapper uses: gradle/wrapper-validation-action@v1 - name: setup jdk ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} - name: make gradle wrapper executable @@ -26,7 +26,7 @@ jobs: run: ./gradlew build - name: capture build artifacts if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Artifacts path: build/libs/ From 054960f3cdb149d1e50b87d0d124aadbf34b9c37 Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 9 Nov 2024 00:21:37 -0600 Subject: [PATCH 3/3] [chore] add changelog entry & `beta.12` --- CHANGELOG.md | 13 +++---------- gradle.properties | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3638c51..00590ceb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,3 @@ -**Ensure you back up your playerex config before updating to this version and using it!** - -## Additions 💖 -- Added a `LifecycleConfig` enum on the playerex config: `ON_TICK` | `ON_EVERY_SECOND`. - - This has been applied to Health Regeneration, and you can adjust it in the config. Default is `ON_EVERY_SECOND`. - -## Changes 🌽 -- Rearranged the config in its entirety. -- Everything is nested and opened by default. -- Everything labeled in `AdvancedSettings` has been adjusted to reflect better in their respective components internally. \ No newline at end of file +## Fixes 🌽 +- Resolved a mixin target for Forge users (on Sinytra) that caused items to break immediately. + - Thank you **`AndyNoob` https://github.com/AndyNoob** for this contribution. \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 0e65b829..3194e9f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ parchment_version=1.20.1:2023.09.03 quilt_mappings_version=23 # Mod Properties -mod_version=4.0.0+1.20.1-beta.11 +mod_version=4.0.0+1.20.1-beta.12 maven_group=com.bibireden.playerex archives_base_name=playerex-directors-cut