diff --git a/src/main/java/carpetfixes/CFSettings.java b/src/main/java/carpetfixes/CFSettings.java index c1fb317..b415c59 100644 --- a/src/main/java/carpetfixes/CFSettings.java +++ b/src/main/java/carpetfixes/CFSettings.java @@ -1461,6 +1461,12 @@ other bugs, except they deserve a category of their own (for sorting purposes... ) public static boolean reIntroducePistonTranslocation = false; + //By FX - PR0CESS + @Rule( + categories = {REINTRODUCE} + ) + public static boolean reIntroduceTrapdoorUpdateSkipping = false; + /* diff --git a/src/main/java/carpetfixes/mixins/reIntroduced/RedstoneWireBlock_skipperMixin.java b/src/main/java/carpetfixes/mixins/reIntroduced/RedstoneWireBlock_skipperMixin.java new file mode 100644 index 0000000..6de5fb0 --- /dev/null +++ b/src/main/java/carpetfixes/mixins/reIntroduced/RedstoneWireBlock_skipperMixin.java @@ -0,0 +1,22 @@ +package carpetfixes.mixins.reIntroduced; + +import carpetfixes.CFSettings; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import net.minecraft.block.RedstoneWireBlock; +import net.minecraft.block.TrapdoorBlock; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.Constant; + +@Mixin(RedstoneWireBlock.class) +public class RedstoneWireBlock_skipperMixin { + + @WrapOperation( + method = "getRenderConnectionType(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;" + + "Lnet/minecraft/util/math/Direction;Z)Lnet/minecraft/block/enums/WireConnection;", + constant = @Constant(classValue = TrapdoorBlock.class) + ) + private boolean trapdoorUpdateSkipping(Object obj, Operation original) { + return !CFSettings.reIntroduceTrapdoorUpdateSkipping && original.call(obj); + } +} diff --git a/src/main/resources/assets/carpet-fixes/lang/en_us.json b/src/main/resources/assets/carpet-fixes/lang/en_us.json index 898b1c2..f71ba17 100644 --- a/src/main/resources/assets/carpet-fixes/lang/en_us.json +++ b/src/main/resources/assets/carpet-fixes/lang/en_us.json @@ -331,6 +331,8 @@ "carpet-fixes.rule.reIntroduceVeryAggressiveSaving.desc": "Re-introduces very aggressive saving by removing the chunk save cooldown that was added in 22w05a", "carpet-fixes.rule.reIntroduceZeroTickFarms.desc": "Re-introduces zero tick farms", "carpet-fixes.rule.reIntroduceZeroTickFarms.extra": "Reverts [MC-113809](https://bugs.mojang.com/browse/MC-113809) from 20w12a", + "carpet-fixes.rule.reIntroduceTrapdoorUpdateSkipping.desc": "Re-introduces compact update skippers using trapdoors", + "carpet-fixes.rule.reIntroduceTrapdoorUpdateSkipping.extra": "This was patched in 1.20", "carpet-fixes.rule.recordWorldEventFix.desc": "Fixes record world events being sent at the wrong time, causing multiple disks to play at the same time", "carpet-fixes.rule.recordWorldEventFix.extra": "[MC-112245](https://bugs.mojang.com/browse/MC-112245)", "carpet-fixes.rule.redstoneComponentUpdateOrderOnBreakFix.desc": "Fixes redstone torch/repeater/comparator update order when being broken, causing incorrect update order", diff --git a/src/main/resources/carpet-fixes.mixins.json b/src/main/resources/carpet-fixes.mixins.json index 99b4062..2eaeca3 100644 --- a/src/main/resources/carpet-fixes.mixins.json +++ b/src/main/resources/carpet-fixes.mixins.json @@ -282,6 +282,7 @@ "reIntroduced.PistonBlockEntity_translocationMixin", "reIntroduced.PlayerManager_LlamaRidingDupeMixin", "reIntroduced.PlayerManager_LlamaRidingDupeMixin_VMPCompat", + "reIntroduced.RedstoneWireBlock_skipperMixin", "reIntroduced.ScreenHandler_itemShadowingMixin", "reIntroduced.ServerWorld_zeroTickMixin", "reIntroduced.TargetBlock_PermanentlyPoweredMixin",