summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityFlying.java
diff options
context:
space:
mode:
authorAndrew Ardill <andrew.ardill@gmail.com>2011-01-17 11:03:19 +0800
committerDinner Bone <dinnerbone@dinnerbone.com>2011-01-18 00:13:32 +0800
commit5209e17e1bd0e0803035c697c1ec10c49831dfdb (patch)
tree849b2a1cae93687c886a0f55d63b0e93fb636cea /src/main/java/net/minecraft/server/EntityFlying.java
parent5f2c8108b776ab5710adfe597574fb0b7e929e36 (diff)
downloadcraftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar
craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar.gz
craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar.lz
craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar.xz
craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.zip
Adding all Entities into CraftBukkit.
These are needed to properly allow for determining class type, in accordance with current practice.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityFlying.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityFlying.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFlying.java b/src/main/java/net/minecraft/server/EntityFlying.java
new file mode 100644
index 00000000..165d24b7
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EntityFlying.java
@@ -0,0 +1,67 @@
+package net.minecraft.server;
+
+public class EntityFlying extends EntityLiving {
+
+ public EntityFlying(World world) {
+ super(world);
+ }
+
+ protected void a(float f) {}
+
+ public void c(float f, float f1) {
+ if (v()) {
+ a(f, f1, 0.02F);
+ c(s, t, u);
+ s *= 0.80000001192092896D;
+ t *= 0.80000001192092896D;
+ u *= 0.80000001192092896D;
+ } else if (x()) {
+ a(f, f1, 0.02F);
+ c(s, t, u);
+ s *= 0.5D;
+ t *= 0.5D;
+ u *= 0.5D;
+ } else {
+ float f2 = 0.91F;
+
+ if (A) {
+ f2 = 0.5460001F;
+ int i = l.a(MathHelper.b(p), MathHelper.b(z.b) - 1, MathHelper.b(r));
+
+ if (i > 0) {
+ f2 = Block.m[i].bu * 0.91F;
+ }
+ }
+ float f3 = 0.1627714F / (f2 * f2 * f2);
+
+ a(f, f1, A ? 0.1F * f3 : 0.02F);
+ f2 = 0.91F;
+ if (A) {
+ f2 = 0.5460001F;
+ int j = l.a(MathHelper.b(p), MathHelper.b(z.b) - 1, MathHelper.b(r));
+
+ if (j > 0) {
+ f2 = Block.m[j].bu * 0.91F;
+ }
+ }
+ c(s, t, u);
+ s *= f2;
+ t *= f2;
+ u *= f2;
+ }
+ bl = bm;
+ double d = p - m;
+ double d1 = r - o;
+ float f4 = MathHelper.a(d * d + d1 * d1) * 4F;
+
+ if (f4 > 1.0F) {
+ f4 = 1.0F;
+ }
+ bm += (f4 - bm) * 0.4F;
+ bn += bm;
+ }
+
+ public boolean m() {
+ return false;
+ }
+}