mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
1e39773b53
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9d0221aa API to get client side view distance. 9be7f0ea SPIGOT-4395: Additions to PlayerBedEnterEvent. 01e534c6 Minor cosmetic cleanups to imports etc CraftBukkit Changes:96c461b3
API to get client side view distance.e2785f4e
Remove note about development builda8000588
SPIGOT-4395: Additions to PlayerBedEnterEvent. Spigot Changes: 117d4f7e Rebuild patches
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
From bd67d12c59ebdc3c413e0720f60be09cee775342 Mon Sep 17 00:00:00 2001
|
|
From: Brokkonaut <hannos17@gmx.de>
|
|
Date: Sat, 30 Jun 2018 05:45:39 +0200
|
|
Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the
|
|
projectile has hit
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
index 65544c1bb2..2e39a988bc 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -898,7 +898,7 @@ public class CraftEventFactory {
|
|
hitBlock = entity.getBukkitEntity().getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
|
}
|
|
|
|
- ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), position.entity == null ? null : position.entity.getBukkitEntity(), hitBlock);
|
|
+ ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), position.entity == null ? null : position.entity.getBukkitEntity(), hitBlock, position.direction == null ? null : CraftBlock.notchToBlockFace(position.direction)); // Paper - add BlockFace parameter
|
|
entity.world.getServer().getPluginManager().callEvent(event);
|
|
return event;
|
|
}
|
|
--
|
|
2.19.1
|
|
|