summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ardill <andrew.ardill@gmail.com>2011-11-29 18:32:16 +1100
committerAndrew Ardill <andrew.ardill@gmail.com>2011-11-29 18:32:16 +1100
commit2b751111d29dfafd6dad0102912703cf780d66c7 (patch)
treecbbefda29021b5e15977dc269c93b8f626b1940f
parent3da00ee41adf0ecfc31d5c330c281a8d5fe8a7b1 (diff)
downloadcraftbukkit-2b751111d29dfafd6dad0102912703cf780d66c7.tar
craftbukkit-2b751111d29dfafd6dad0102912703cf780d66c7.tar.gz
craftbukkit-2b751111d29dfafd6dad0102912703cf780d66c7.tar.lz
craftbukkit-2b751111d29dfafd6dad0102912703cf780d66c7.tar.xz
craftbukkit-2b751111d29dfafd6dad0102912703cf780d66c7.zip
Add EntitySmallFireball.java from nms
-rw-r--r--src/main/java/net/minecraft/server/EntitySmallFireball.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySmallFireball.java b/src/main/java/net/minecraft/server/EntitySmallFireball.java
new file mode 100644
index 00000000..b3673b8f
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EntitySmallFireball.java
@@ -0,0 +1,67 @@
+package net.minecraft.server;
+
+public class EntitySmallFireball extends EntityFireball {
+
+ public EntitySmallFireball(World world) {
+ super(world);
+ this.b(0.3125F, 0.3125F);
+ }
+
+ public EntitySmallFireball(World world, EntityLiving entityliving, double d0, double d1, double d2) {
+ super(world, entityliving, d0, d1, d2);
+ this.b(0.3125F, 0.3125F);
+ }
+
+ protected void a(MovingObjectPosition movingobjectposition) {
+ if (!this.world.isStatic) {
+ if (movingobjectposition.entity != null) {
+ if (!movingobjectposition.entity.ax() && movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 5)) {
+ movingobjectposition.entity.j(5);
+ }
+ } else {
+ int i = movingobjectposition.b;
+ int j = movingobjectposition.c;
+ int k = movingobjectposition.d;
+
+ switch (movingobjectposition.face) {
+ case 0:
+ --j;
+ break;
+
+ case 1:
+ ++j;
+ break;
+
+ case 2:
+ --k;
+ break;
+
+ case 3:
+ ++k;
+ break;
+
+ case 4:
+ --i;
+ break;
+
+ case 5:
+ ++i;
+ }
+
+ if (this.world.isEmpty(i, j, k)) {
+ this.world.setTypeId(i, j, k, Block.FIRE.id);
+ }
+ }
+
+ this.die();
+ }
+ }
+
+ public boolean e_() {
+ return false;
+ }
+
+ public boolean damageEntity(DamageSource damagesource, int i) {
+ return false;
+ }
+}