From a89426aa40f61e67d393f338f743e1efd2e80f2a Mon Sep 17 00:00:00 2001 From: Samsuik Date: Wed, 25 Dec 2024 22:57:14 +0000 Subject: [PATCH] Fix tnt dupers that use coral blocks --- .../world/level/block/piston/PistonBaseBlock.java.patch | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sakura-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch b/sakura-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch index 7671b9f..f67b3a4 100644 --- a/sakura-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch +++ b/sakura-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch @@ -1,12 +1,15 @@ --- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java -@@ -392,6 +_,11 @@ +@@ -392,6 +_,14 @@ for (int i1 = toPush.size() - 1; i1 >= 0; i1--) { // Paper start - fix a variety of piston desync dupes boolean allowDesync = io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPistonDuplication; + // Sakura start - configure tnt duplication -+ if (level.sakuraConfig().technical.allowTNTDuplication && list.get(i1).is(Blocks.TNT)) { -+ allowDesync = true; ++ if (level.sakuraConfig().technical.allowTNTDuplication) { ++ final BlockState movedState = list.get(i1); ++ if (movedState.is(Blocks.TNT) || movedState.getBlock() instanceof net.minecraft.world.level.block.BaseCoralPlantTypeBlock) { ++ allowDesync = true; ++ } + } + // Sakura end - configure tnt duplication BlockPos blockPos2;