mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 16:18:02 +01:00
0ae3b1c14e
--- work/Bukkit Submodule work/Bukkit 3aee9dbd0..0828ce366: > Add SpawnReason.SHEARING > SPIGOT-4339: Add EntityTransformEvent --- work/CraftBukkit Submodule work/CraftBukkit 17ff1e046..c2035aa1d: > Add some missing CreatureSpawnEvent.SpawnReason calls > SPIGOT-4339: Add EntityTransformEvent --- work/Spigot Submodule work/Spigot 947a8e7fd..5696c83c1: > Rebuild patches
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From 0beca9cb188e31784710a1483c321cf24f989d37 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 246bd118..a7d335d3 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -908,7 +908,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.17.1
|
|
|