3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 04:50:06 +01:00

Fix NPE from location incorrectly being implemented in Explosion.

Dieser Commit ist enthalten in:
speakeasy 2011-01-22 11:29:47 +08:00 committet von Warren
Ursprung 8c91ee9c51
Commit 10f46b5fea

Datei anzeigen

@ -29,10 +29,6 @@ public class Explosion {
public float f; public float f;
public Set g; 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) { public Explosion(World world, Entity entity, double d1, double d2, double d3, float f1) {
a = false; a = false;
h = new Random(); h = new Random();
@ -44,7 +40,6 @@ public class Explosion {
c = d2; c = d2;
d = d3; d = d3;
location = entity.getBukkitEntity().getLocation();
} }
public void a() { public void a() {
@ -189,6 +184,7 @@ public class Explosion {
Server server = ((WorldServer) i).getServer(); Server server = ((WorldServer) i).getServer();
CraftWorld world = ((WorldServer) i).getWorld(); CraftWorld world = ((WorldServer) i).getWorld();
org.bukkit.entity.Entity splode = (e == null) ? null : e.getBukkitEntity(); org.bukkit.entity.Entity splode = (e == null) ? null : e.getBukkitEntity();
Location location = new Location(world, b, c, d);
List<org.bukkit.block.Block> blocklist = new ArrayList<org.bukkit.block.Block>(); List<org.bukkit.block.Block> blocklist = new ArrayList<org.bukkit.block.Block>();
for (int j = arraylist.size() - 1; j >= 0; j--) { for (int j = arraylist.size() - 1; j >= 0; j--) {