PaperMC/patches/server/0575-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch

20 lines
1.1 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com>
Date: Tue, 2 Feb 2021 09:17:59 +0100
Subject: [PATCH] stop firing pressure plate EntityInteractEvent for ignored
entities
diff --git a/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java b/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java
2022-12-07 21:16:54 +01:00
index f2fad4c349e6b484c76886ae1cf6315b6fadd446..11507b85216b528d02bdb95ec1fa13a1ca8d3643 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java
2022-12-07 21:16:54 +01:00
@@ -74,6 +74,7 @@ public class PressurePlateBlock extends BasePressurePlateBlock {
2021-06-11 14:02:28 +02:00
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
+ if (entity.isIgnoringBlockTriggers()) continue; // Paper - don't call event for ignored entities
// CraftBukkit start - Call interact event when turning on a pressure plate
if (this.getSignalForState(world.getBlockState(pos)) == 0) {