summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorAdam Tanner <adam@adamtanner.org>2011-01-22 00:39:58 +0800
committerVictor Danell <victor.danell@gmail.com>2011-01-22 00:43:04 +0800
commit5555265e9b31b9fda756d002eed69fedc80527b7 (patch)
tree2cdc180d3de4bc55d2d78c3b44be9f60dd127161 /src/main/java/net/minecraft/server
parent2106eeef5017fd23e81b062f51b986dd759b2556 (diff)
downloadcraftbukkit-5555265e9b31b9fda756d002eed69fedc80527b7.tar
craftbukkit-5555265e9b31b9fda756d002eed69fedc80527b7.tar.gz
craftbukkit-5555265e9b31b9fda756d002eed69fedc80527b7.tar.lz
craftbukkit-5555265e9b31b9fda756d002eed69fedc80527b7.tar.xz
craftbukkit-5555265e9b31b9fda756d002eed69fedc80527b7.zip
Explosion remembers its Location.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/Explosion.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 8154670d..e8a65dc8 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -11,6 +11,8 @@ import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
+import org.bukkit.Location;
+
// CraftBukkit end
import java.util.*;
@@ -27,6 +29,10 @@ public class Explosion {
public float f;
public Set g;
+ // CraftBukkit
+ // Retain where the explosion happened because the Entity no longer exists after explosion.
+ private Location location;
+
public Explosion(World world, Entity entity, double d1, double d2, double d3, float f1) {
a = false;
h = new Random();
@@ -37,6 +43,8 @@ public class Explosion {
b = d1;
c = d2;
d = d3;
+
+ location = entity.getBukkitEntity().getLocation();
}
public void a() {
@@ -192,7 +200,7 @@ public class Explosion {
}
org.bukkit.event.Event.Type eventType = EntityExplodeEvent.Type.ENTITY_EXPLODE;
- EntityExplodeEvent eee = new EntityExplodeEvent(eventType, splode, blocklist);
+ EntityExplodeEvent eee = new EntityExplodeEvent(eventType, splode, location, blocklist);
server.getPluginManager().callEvent(eee);
if (eee.isCancelled()) {