Add skipTripwireHookPlacementValidation (#12091)

This allows for the configuration of tripwire hook duping.
This commit is contained in:
Owen 2025-02-10 17:04:38 -05:00 committed by GitHub
parent cafef9ce9b
commit fa5824e4c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,7 @@
+ if (!cancelledEmitterHook) { // Paper - Call BlockRedstoneEvent + if (!cancelledEmitterHook) { // Paper - Call BlockRedstoneEvent
emitState(level, pos, flag2, flag3, flag, flag1); emitState(level, pos, flag2, flag3, flag, flag1);
if (!attaching) { if (!attaching) {
+ if (level.getBlockState(pos).is(Blocks.TRIPWIRE_HOOK)) // Paper - Validate tripwire hook placement before update + if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.skipTripwireHookPlacementValidation || level.getBlockState(pos).is(Blocks.TRIPWIRE_HOOK)) // Paper - Validate tripwire hook placement before update
level.setBlock(pos, blockState1.setValue(FACING, direction), 3); level.setBlock(pos, blockState1.setValue(FACING, direction), 3);
if (shouldNotifyNeighbours) { if (shouldNotifyNeighbours) {
notifyNeighbors(block, level, pos, direction); notifyNeighbors(block, level, pos, direction);

View File

@ -171,6 +171,8 @@ public class GlobalConfiguration extends ConfigurationPart {
public class UnsupportedSettings extends ConfigurationPart { public class UnsupportedSettings extends ConfigurationPart {
@Comment("This setting allows for exploits related to end portals, for example sand duping") @Comment("This setting allows for exploits related to end portals, for example sand duping")
public boolean allowUnsafeEndPortalTeleportation = false; public boolean allowUnsafeEndPortalTeleportation = false;
@Comment("This setting controls the ability to enable dupes related to tripwires.")
public boolean skipTripwireHookPlacementValidation = false;
@Comment("This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.") @Comment("This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.")
public boolean allowPermanentBlockBreakExploits = false; public boolean allowPermanentBlockBreakExploits = false;
@Comment("This setting controls if player should be able to use TNT duplication, but this also allows duplicating carpet, rails and potentially other items") @Comment("This setting controls if player should be able to use TNT duplication, but this also allows duplicating carpet, rails and potentially other items")