Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
6d41af029c
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: 3e2858f6 SPIGOT-4352: MoistureChangeEvent 5466e281 Add BlockDispenseArmorEvent CraftBukkit Changes:3123a069
SPIGOT-4352: MoistureChangeEvent226db0ea
Add BlockDispenseArmorEventcd367fa4
Fix bad thread safety in ChunkRegionLoader3f5ca5f2
SPIGOT-4355: Improve cancelling VehicleEnterEvent Spigot Changes: 145a37ae Rebuild patches 3f2423cc Rebuild patches
24 Zeilen
1.3 KiB
Diff
24 Zeilen
1.3 KiB
Diff
From c5e7c1fea11313a52ac0d87c6e543f4db56a847c 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 c344c8a9ca..15ae4cb8ea 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -838,7 +838,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.18.0
|
|
|