mirror of
https://github.com/Samsuik/Sakura.git
synced 2026-01-04 15:31:43 +00:00
Add config option to enable TNT duplication
This commit is contained in:
23
patches/server/0079-Configure-TNT-duplication.patch
Normal file
23
patches/server/0079-Configure-TNT-duplication.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samsuik <kfian294ma4@gmail.com>
|
||||
Date: Mon, 11 Nov 2024 19:20:44 +0000
|
||||
Subject: [PATCH] Configure TNT duplication
|
||||
|
||||
Adds a configuration option to enable TNT duplication.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
index 6146c786730b2cd5e5883acbe19d1eecff68e7e3..53065b89ffcbfbf00fd1f16800e4421e24f93d32 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
@@ -453,6 +453,11 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
for (j = list.size() - 1; j >= 0; --j) {
|
||||
// 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 (world.sakuraConfig().technical.allowTNTDuplication && list1.get(j).is(Blocks.TNT)) {
|
||||
+ allowDesync = true;
|
||||
+ }
|
||||
+ // Sakura end - configure tnt duplication
|
||||
BlockPos oldPos = blockposition3 = (BlockPos) list.get(j);
|
||||
iblockdata1 = allowDesync ? world.getBlockState(oldPos) : null;
|
||||
// Paper end - fix a variety of piston desync dupes
|
||||
Reference in New Issue
Block a user