From e75dca79e08ae4159f11215ec610c8231b311371 Mon Sep 17 00:00:00 2001 From: FX Date: Tue, 1 Jun 2021 00:25:15 -0400 Subject: [PATCH] Added Rule: `portalGeneralItemDupeFix` --- README.md | 7 +++++++ src/main/java/carpetfixes/CarpetFixesSettings.java | 2 +- .../mixins/dupeFixes/Mob_portalGeneralItemMixin.java | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 376b10dc..e2034a79 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,13 @@ Fixes target blocks being permanently powered when moved by pistons * Categories: `CARPETFIXES`,`BACKPORT` * Fixes: [MC-173244](https://bugs.mojang.com/browse/MC-173244) +## portalGeneralItemDupeFix +Fixes general item dupe using dolphins, and some other dimension change dupes +* Type: `boolean` +* Default value: `false` +* Required options: `false`,`true` +* Categories: `CARPETFIXES`,`BUGFIX`,`BACKPORT` + ## shulkerTeleportFix Shulkers do not teleport correctly when going through a portal * Type: `boolean` diff --git a/src/main/java/carpetfixes/CarpetFixesSettings.java b/src/main/java/carpetfixes/CarpetFixesSettings.java index 910cb518..f690c0c7 100644 --- a/src/main/java/carpetfixes/CarpetFixesSettings.java +++ b/src/main/java/carpetfixes/CarpetFixesSettings.java @@ -273,7 +273,7 @@ public enum PresetSettings { //By FX - PR0CESS @Rule( - desc = "Fixes general item dupe using dolphins and some other dimension change dupes", + desc = "Fixes general item dupe using dolphins, and some other dimension change dupes", category = {CARPETFIXES,BUGFIX,BACKPORT} ) public static boolean portalGeneralItemDupeFix = true; diff --git a/src/main/java/carpetfixes/mixins/dupeFixes/Mob_portalGeneralItemMixin.java b/src/main/java/carpetfixes/mixins/dupeFixes/Mob_portalGeneralItemMixin.java index 9791a1b4..19a9eb50 100644 --- a/src/main/java/carpetfixes/mixins/dupeFixes/Mob_portalGeneralItemMixin.java +++ b/src/main/java/carpetfixes/mixins/dupeFixes/Mob_portalGeneralItemMixin.java @@ -16,7 +16,7 @@ protected MobEntity_portalGeneralItemMixin(EntityType en super(entityType, world); } - @Inject(method="Lnet/minecraft/entity/mob/MobEntity;method_30076()V",at=@At("RETURN")) + @Inject(method= "method_30076()V",at=@At("RETURN")) protected void stopGeneralItemDupes(CallbackInfo ci) { if (CarpetFixesSettings.portalGeneralItemDupeFix) { this.getItemsEquipped().forEach(lvt0 -> lvt0.setCount(0));