mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-09 06:50:32 +08:00
e8c82f4eee
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: 0399d9d6 SPIGOT-5341: Add Material.isAir 547f5709 SPIGOT-5353: Expand explosion API by adding source entity CraftBukkit Changes:7deb3728
SPIGOT-5309: Call cancelled EntityDamageEvent when damaging invisible armor stands46351e17
SPIGOT-5341: Add Material.isAir683bae06
SPIGOT-5342: Lore lost when deserializing items with no version storedc2d12011
SPIGOT-5353: Expand explosion API by adding source entity
27 lines
1.4 KiB
Diff
27 lines
1.4 KiB
Diff
From 5e701e3ec843d8589968c7e24eb5708c1cb89a97 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 20 Jun 2018 23:17:24 -0400
|
|
Subject: [PATCH] Expand Explosions API
|
|
|
|
Add Entity as a Source capability, and add more API choices, and on Location.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index 515f94aa5d..5db2a4cca2 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -859,6 +859,11 @@ public class CraftWorld implements World {
|
|
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
|
|
return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled;
|
|
}
|
|
+ // Paper start
|
|
+ public boolean createExplosion(Entity source, Location loc, float power, boolean setFire, boolean breakBlocks) {
|
|
+ return !world.createExplosion(source != null ? ((org.bukkit.craftbukkit.entity.CraftEntity) source).getHandle() : null, loc.getX(), loc.getY(), loc.getZ(), power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled;
|
|
+ }
|
|
+ // Paper end
|
|
|
|
@Override
|
|
public boolean createExplosion(Location loc, float power) {
|
|
--
|
|
2.23.0
|
|
|