PaperMC/patches/server/0575-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch
Jake Potrebic afe633df08
convert API/server tests to mockito (#8848)
* convert API tests to mockito

* convert server tests to mockito

* add co-author
2023-02-15 13:27:40 -08:00

19 lines
1.1 KiB
Diff

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
index f2fad4c349e6b484c76886ae1cf6315b6fadd446..11507b85216b528d02bdb95ec1fa13a1ca8d3643 100644
--- a/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java
@@ -74,6 +74,7 @@ public class PressurePlateBlock extends BasePressurePlateBlock {
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) {