3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

stop firing pressure plate EntityInteractEvent for ignored entities (fixes #4962)

Dieser Commit ist enthalten in:
Trigary 2021-02-02 09:29:55 +01:00 committet von MiniDigger | Martin
Ursprung 7d56f38ed0
Commit be16879144

Datei anzeigen

@ -0,0 +1,19 @@
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/server/BlockPressurePlateBinary.java b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
index ef79fbb628c4eaffe9d34de6129d6e833aac7c76..2e1dbd4786f77a8822d039206000799b927ff24c 100644
--- a/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
+++ b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
@@ -67,6 +67,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
+ if (entity.isIgnoreBlockTrigger()) continue; // Paper - don't call event for ignored entities
// CraftBukkit start - Call interact event when turning on a pressure plate
if (this.getPower(world.getType(blockposition)) == 0) {