diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-01-30 16:15:17 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-01-30 16:15:24 +0100 |
commit | b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1 (patch) | |
tree | 6fd5368cbcc0f2b922570827034d3f57a994b66f /src/main/java/net/minecraft/server/EntityFlying.java | |
parent | 75ba9a0f2570798d9012e4f4377d903cd2904785 (diff) | |
download | craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar.gz craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar.lz craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar.xz craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.zip |
Reworked getEntity; Hi instanceof, bay 16 classes
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityFlying.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityFlying.java | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFlying.java b/src/main/java/net/minecraft/server/EntityFlying.java deleted file mode 100644 index faa58552..00000000 --- a/src/main/java/net/minecraft/server/EntityFlying.java +++ /dev/null @@ -1,81 +0,0 @@ -package net.minecraft.server; - -// CraftBukkit start -import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.entity.CraftFlying; -// CraftBukkit end - -public class EntityFlying extends EntityLiving { - - public EntityFlying(World world) { - super(world); - - // CraftBukkit start - CraftServer server = ((WorldServer) this.world).getServer(); - this.bukkitEntity = new CraftFlying(server, this); - // CraftBukkit end - } - - protected void a(float f) {} - - public void c(float f, float f1) { - if (this.v()) { - this.a(f, f1, 0.02F); - this.c(this.motX, this.motY, this.motZ); - this.motX *= 0.800000011920929D; - this.motY *= 0.800000011920929D; - this.motZ *= 0.800000011920929D; - } else if (this.x()) { - this.a(f, f1, 0.02F); - this.c(this.motX, this.motY, this.motZ); - this.motX *= 0.5D; - this.motY *= 0.5D; - this.motZ *= 0.5D; - } else { - float f2 = 0.91F; - - if (this.onGround) { - f2 = 0.54600006F; - int i = this.world.getTypeId(MathHelper.b(this.locX), MathHelper.b(this.boundingBox.b) - 1, MathHelper.b(this.locZ)); - - if (i > 0) { - f2 = Block.byId[i].frictionFactor * 0.91F; - } - } - - float f3 = 0.16277136F / (f2 * f2 * f2); - - this.a(f, f1, this.onGround ? 0.1F * f3 : 0.02F); - f2 = 0.91F; - if (this.onGround) { - f2 = 0.54600006F; - int j = this.world.getTypeId(MathHelper.b(this.locX), MathHelper.b(this.boundingBox.b) - 1, MathHelper.b(this.locZ)); - - if (j > 0) { - f2 = Block.byId[j].frictionFactor * 0.91F; - } - } - - this.c(this.motX, this.motY, this.motZ); - this.motX *= (double) f2; - this.motY *= (double) f2; - this.motZ *= (double) f2; - } - - this.bl = this.bm; - double d0 = this.locX - this.lastX; - double d1 = this.locZ - this.lastZ; - float f4 = MathHelper.a(d0 * d0 + d1 * d1) * 4.0F; - - if (f4 > 1.0F) { - f4 = 1.0F; - } - - this.bm += (f4 - this.bm) * 0.4F; - this.bn += this.bm; - } - - public boolean m() { - return false; - } -} |