summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorsunkid <sunkid@iminurnetz.com>2011-06-14 11:03:29 -0700
committerEvilSeph <evilseph@unaligned.org>2011-06-17 16:55:00 -0400
commitfadd962b9c5457bac3bcb0379f3575592ab7178d (patch)
treee7b68d0e79bfa02bf8196b2133bad0bdc20ed9e9 /src/main/java/net/minecraft/server
parent10fb5dc843b9edb0d8086615c2db749623664044 (diff)
downloadcraftbukkit-fadd962b9c5457bac3bcb0379f3575592ab7178d.tar
craftbukkit-fadd962b9c5457bac3bcb0379f3575592ab7178d.tar.gz
craftbukkit-fadd962b9c5457bac3bcb0379f3575592ab7178d.tar.lz
craftbukkit-fadd962b9c5457bac3bcb0379f3575592ab7178d.tar.xz
craftbukkit-fadd962b9c5457bac3bcb0379f3575592ab7178d.zip
Added the implementation of the concept of an Explosive.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/EntityFireball.java6
-rw-r--r--src/main/java/net/minecraft/server/EntityTNTPrimed.java9
2 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index 3b63884c..0973c990 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -5,6 +5,7 @@ import java.util.List;
// CraftBukkit start
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftEntity;
+import org.bukkit.entity.Explosive;
import org.bukkit.event.entity.EntityDamageByProjectileEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
@@ -26,6 +27,9 @@ public class EntityFireball extends Entity {
public double d;
public double e;
+ public float yield = 1; // CraftBukkit
+ public boolean isIncendiary = true; // CraftBukkit
+
public EntityFireball(World world) {
super(world);
this.b(1.0F, 1.0F);
@@ -151,7 +155,7 @@ public class EntityFireball extends Entity {
CraftServer server = ((WorldServer) this.world).getServer();
- ExplosionPrimeEvent event = new ExplosionPrimeEvent(CraftEntity.getEntity(server, this), 1.0F, true);
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent((Explosive) CraftEntity.getEntity(server, this));
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 997ef48d..9fd69995 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -3,12 +3,15 @@ package net.minecraft.server;
// CraftBukkit start
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftEntity;
+import org.bukkit.entity.Explosive;
import org.bukkit.event.entity.ExplosionPrimeEvent;
// CraftBukkit end
public class EntityTNTPrimed extends Entity {
public int a;
+ public float yield = 4; // CraftBukkit
+ public boolean isIncendiary = false; // CraftBukkit
public EntityTNTPrimed(World world) {
super(world);
@@ -72,12 +75,12 @@ public class EntityTNTPrimed extends Entity {
}
private void explode() {
- float f = 4.0F;
-
// CraftBukkit start
+ // float f = 4.0F;
+
CraftServer server = ((WorldServer) this.world).getServer();
- ExplosionPrimeEvent event = new ExplosionPrimeEvent(CraftEntity.getEntity(server, this), f, false);
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent((Explosive) CraftEntity.getEntity(server, this));
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {