Strip raytracing for EntityLiving#hasLineOfSight
Co-authored-by: Paul Sauve <paul@technove.co>
This commit is contained in:
parent
33bec7f20a
commit
72e87abc2d
959 changed files with 476 additions and 277 deletions
30
patches/server/0353-add-hand-to-BlockMultiPlaceEvent.patch
Normal file
30
patches/server/0353-add-hand-to-BlockMultiPlaceEvent.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Trigary <trigary0@gmail.com>
|
||||
Date: Sun, 1 Mar 2020 22:43:24 +0100
|
||||
Subject: [PATCH] add hand to BlockMultiPlaceEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index eaca76dfec9cbe3cbb9972a0c9cf30599816fcda..ee7a7b80f96712830ea92daefb4454df70def170 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -399,13 +399,18 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
org.bukkit.inventory.ItemStack item;
|
||||
+ // Paper start - add hand to BlockMultiPlaceEvent
|
||||
+ EquipmentSlot equipmentSlot;
|
||||
if (hand == InteractionHand.MAIN_HAND) {
|
||||
item = player.getInventory().getItemInMainHand();
|
||||
+ equipmentSlot = EquipmentSlot.HAND;
|
||||
} else {
|
||||
item = player.getInventory().getItemInOffHand();
|
||||
+ equipmentSlot = EquipmentSlot.OFF_HAND;
|
||||
}
|
||||
|
||||
- BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild);
|
||||
+ BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild, equipmentSlot);
|
||||
+ // Paper end
|
||||
craftServer.getPluginManager().callEvent(event);
|
||||
|
||||
return event;
|
Loading…
Add table
Add a link
Reference in a new issue