diff --git a/PATCHED.md b/PATCHED.md index 9dcadcc9..f1907627 100644 --- a/PATCHED.md +++ b/PATCHED.md @@ -70,6 +70,7 @@ | Basic | [MC-123450](https://bugs.mojang.com/browse/MC-123450) | Item frames play sounds when the item within them is read from NBT | | Basic | [MC-129909](https://bugs.mojang.com/browse/MC-129909) | Players in spectator mode continue to consume foods and liquids shortly after switching game modes | | Basic | [MC-132878](https://bugs.mojang.com/browse/MC-132878) | Armor stands destroyed by explosions/lava/fire don't produce particles | +| Basic | [MC-134110](https://bugs.mojang.com/browse/MC-134110) | Structure mirroring breaking apart double chests | | Basic | [MC-147659](https://bugs.mojang.com/browse/MC-147659) | Some witch huts spawn the incorrect cat | | Basic | [MC-139041](https://bugs.mojang.com/browse/MC-139041) | The sounds of fishing bobbers aren't controlled by the "Players" sound slider | | Basic | [MC-155509](https://bugs.mojang.com/browse/MC-155509) | Puffed pufferfish can hurt the player while dying | diff --git a/src/main/java/dev/isxander/debugify/mixins/basic/mc134110/ChestBlockMixin.java b/src/main/java/dev/isxander/debugify/mixins/basic/mc134110/ChestBlockMixin.java new file mode 100644 index 00000000..0d82b3aa --- /dev/null +++ b/src/main/java/dev/isxander/debugify/mixins/basic/mc134110/ChestBlockMixin.java @@ -0,0 +1,22 @@ +package dev.isxander.debugify.mixins.basic.mc134110; + +import com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import dev.isxander.debugify.fixes.BugFix; +import dev.isxander.debugify.fixes.FixCategory; +import net.minecraft.world.level.block.ChestBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.state.BlockState; +import org.spongepowered.asm.mixin.Mixin; + +import static net.minecraft.world.level.block.ChestBlock.TYPE; + +@BugFix(id = "MC-134110", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Structure mirroring breaking apart double chests") +@Mixin(ChestBlock.class) +public class ChestBlockMixin { + @WrapMethod(method = "mirror") + private BlockState fixChestRotations(BlockState blockState, Mirror mirror, Operation original) { + BlockState result = original.call(blockState, mirror); + return mirror == Mirror.NONE ? result : result.setValue(TYPE, result.getValue(TYPE).getOpposite()); + } +} diff --git a/src/main/resources/assets/debugify/lang/en_us.json b/src/main/resources/assets/debugify/lang/en_us.json index e211d947..c068726a 100644 --- a/src/main/resources/assets/debugify/lang/en_us.json +++ b/src/main/resources/assets/debugify/lang/en_us.json @@ -68,6 +68,7 @@ "debugify.fix_explanation.mc-121903": "Adds NBT tag 'LastExecuted' to command blocks to save and load their last executed property.", "debugify.fix_explanation.mc-124117": "Sends players packets to update all their effects, their experience and their abilities after cross dimensional teleport.", "debugify.fix_explanation.mc-132878": "Spawns breaking particles when armour stands are hurt.", + "debugify.fix_explanation.mc-134110": "Correctly rotates double chests when a structure that is mirrored is placed.", "debugify.fix_explanation.mc-135971": "Overrides CTRL+Q behaviour in crafting slot to repeatedly CTRL+Q until there are no items left in the crafting slot.", "debugify.fix_explanation.mc-155509": "Checks if the pufferfish is alive before attempting to sting the player.", "debugify.fix_explanation.mc-159283": "Casts 32-bit integers to 64-bit equivalents to prevent integer overflow at high X and Z values.", diff --git a/src/main/resources/debugify.mixins.json b/src/main/resources/debugify.mixins.json index ee145e88..0cabcfd1 100644 --- a/src/main/resources/debugify.mixins.json +++ b/src/main/resources/debugify.mixins.json @@ -18,6 +18,7 @@ "basic.mc123450.ItemFrameMixin", "basic.mc129909.ServerPlayerMixin", "basic.mc132878.ArmorStandMixin", + "basic.mc134110.ChestBlockMixin", "basic.mc147659.CatSpawnerMixin", "basic.mc139041.FishingRodItemMixin", "basic.mc155509.PufferfishMixin",