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
2 changed files with 3 additions and 1 deletions

View File

@@ -53,7 +53,7 @@
+ if (!cancelledEmitterHook) { // Paper - Call BlockRedstoneEvent
emitState(level, pos, flag2, flag3, flag, flag1);
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);
if (shouldNotifyNeighbours) {
notifyNeighbors(block, level, pos, direction);