Paper/patches/unapplied/server/0573-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch
2023-06-07 19:06:55 +02:00

20 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 ed4a954a07e69d36c61e69137a4907a43270942b..e47938e8353c9ada6e20d94fc4f129a419cad731 100644
--- a/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PressurePlateBlock.java
@@ -59,6 +59,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) {