Paper/patches/server/0577-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch
Nassim Jahnke 20503beee5
Remove guardian beam render issue workaround
Messing with game time sent to the client isn't worth the trouble whenever it may be used by the client now and in the future for such a small issue. Mojang, plz fix
2022-12-15 14:19:09 +01: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 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) {