diff --git a/build.gradle.kts b/build.gradle.kts index 4d327b80f..9ea4ff6b2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "8.1.1" apply false - id("io.papermc.paperweight.patcher") version "1.5.7-SNAPSHOT" + id("io.papermc.paperweight.patcher") version "1.5.9-SNAPSHOT" } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" diff --git a/patches/server/0040-Configurable-fix-tripwire-dupe.patch b/patches/server/0040-Configurable-fix-tripwire-dupe.patch new file mode 100644 index 000000000..70b21c19d --- /dev/null +++ b/patches/server/0040-Configurable-fix-tripwire-dupe.patch @@ -0,0 +1,68 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> +Date: Sun, 18 Feb 2024 16:00:43 -0500 +Subject: [PATCH] Configurable fix tripwire dupe + + +diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java +index eb1ecbbb5c0f887ee1c7de85a6137f2f182b3fc0..602952934e49227c9aa96ffc0b7342e85791cecb 100644 +--- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java +@@ -78,7 +78,7 @@ public class TripWireBlock extends Block { + public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent adjacent tripwires from updating + if (!moved && !state.is(newState.getBlock())) { +- this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true), world.galeConfig().gameplayMechanics.fixes.tripwireDuping); // Paper - fix state inconsistency // Gale - Leaf - make tripwire duping fix configurable ++ this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true), true); // Paper - fix state inconsistency // Gale - Leaf - make tripwire duping fix configurable // Leaf - Configurable fix tripwire dupe + } + } + +diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +index 004dce26ff073f1de52a84cd425c4f60fdab5e50..a02d4233c9dbb4e37532c3ab6c20bb1cdfbdceef 100644 +--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +@@ -147,7 +147,7 @@ public class TripWireHookBlock extends Block { + boolean flag7 = (Boolean) iblockdata2.getValue(TripWireBlock.POWERED); + + flag5 |= flag6 && flag7; +- if (k != i || !tripWireBeingRemoved || !flag6) // Paper - don't update the tripwire again if being removed and not disarmed ++ if (!org.dreeam.leaf.LeafConfig.fixTripwireDupe || k != i || !tripWireBeingRemoved || !flag6) // Paper - don't update the tripwire again if being removed and not disarmed // Leaf - Configurable fix tripwire dupe + aiblockdata[k] = iblockdata2; + if (k == i) { + world.scheduleTick(pos, (Block) this, 10); +@@ -182,7 +182,7 @@ public class TripWireHookBlock extends Block { + + this.emitState(world, pos, flag4, flag5, flag2, flag3); + if (!beingRemoved) { +- if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate ++ if (!org.dreeam.leaf.LeafConfig.fixTripwireDupe || world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate // Leaf - Configurable fix tripwire dupe + world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); + if (flag1) { + this.notifyNeighbors(world, pos, enumdirection); +diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java +index bf4c5ce82ecee2e7040d6cea173df7827606a8b8..f24c52777e3f73a6b432d4b407e32217bcd6e038 100644 +--- a/src/main/java/org/dreeam/leaf/LeafConfig.java ++++ b/src/main/java/org/dreeam/leaf/LeafConfig.java +@@ -288,4 +288,9 @@ public class LeafConfig { + gg.pufferfish.pufferfish.sentry.SentryManager.init(); + } + } ++ ++ public static boolean fixTripwireDupe = true; ++ private static void tripwireDupe() { ++ fixTripwireDupe = getBoolean("gameplay.fix-tripwire-dupe", fixTripwireDupe); ++ } + } +diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +index 582640872ead7b9b4107fa5cc8f4e204b9d8bcc7..5d51c4609cbdebbd3ab5d8df051f3ec00862de8d 100644 +--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java ++++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +@@ -107,7 +107,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { + public class Fixes extends ConfigurationPart { + + public boolean sandDuping = true; // Gale - Purpur - make sand duping fix configurable +- public boolean tripwireDuping = true; // Gale - Leaf - make tripwire duping fix configurable ++ //public boolean tripwireDuping = true; // Gale - Leaf - make tripwire duping fix configurable // Leaf - Move to leaf config + public boolean broadcastCritAnimationsAsTheEntityBeingCritted = false; // Gale - MultiPaper - broadcast crit animations as the entity being critted + public boolean keepMooshroomRotationAfterShearing = true; // Gale - Purpur - fix cow rotation when shearing mooshroom + public boolean checkCanChangeDimensionsBeforeUseEndGateway = false; // Gale - Purpur - end gateway should check if entity can use portal