9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-24 01:09:16 +00:00

Fix tnt dupers that use coral blocks

This commit is contained in:
Samsuik
2024-12-25 22:57:14 +00:00
parent 6b8f6d3d79
commit a89426aa40

View File

@@ -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;