Skip to content

Commit

Permalink
Added Rule: portalGeneralItemDupeFix
Browse files Browse the repository at this point in the history
  • Loading branch information
FxMorin committed Jun 1, 2021
1 parent 79a7edc commit e75dca7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/carpetfixes/CarpetFixesSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected MobEntity_portalGeneralItemMixin(EntityType<? extends LivingEntity> 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));
Expand Down

0 comments on commit e75dca7

Please sign in to comment.