mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 03:35:51 -07:00
Adding all Entities into CraftBukkit.
These are needed to properly allow for determining class type, in accordance with current practice.
This commit is contained in:
committed by
Dinner Bone
parent
5f2c8108b7
commit
5209e17e1b
79
src/main/java/net/minecraft/server/EntitySpider.java
Normal file
79
src/main/java/net/minecraft/server/EntitySpider.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EntitySpider extends EntityMobs {
|
||||
|
||||
public EntitySpider(World world) {
|
||||
super(world);
|
||||
aP = "/mob/spider.png";
|
||||
a(1.4F, 0.9F);
|
||||
bC = 0.8F;
|
||||
}
|
||||
|
||||
public double k() {
|
||||
return (double) J * 0.75D - 0.5D;
|
||||
}
|
||||
|
||||
protected Entity l() {
|
||||
float f1 = b(1.0F);
|
||||
|
||||
if (f1 < 0.5F) {
|
||||
double d = 16D;
|
||||
|
||||
return ((Entity) (l.a(((Entity) (this)), d)));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected String e() {
|
||||
return "mob.spider";
|
||||
}
|
||||
|
||||
protected String f() {
|
||||
return "mob.spider";
|
||||
}
|
||||
|
||||
protected String g() {
|
||||
return "mob.spiderdeath";
|
||||
}
|
||||
|
||||
protected void a(Entity entity, float f1) {
|
||||
float f2 = b(1.0F);
|
||||
|
||||
if (f2 > 0.5F && W.nextInt(100) == 0) {
|
||||
this.d = null;
|
||||
return;
|
||||
}
|
||||
if (f1 > 2.0F && f1 < 6F && W.nextInt(10) == 0) {
|
||||
if (A) {
|
||||
double d = entity.p - p;
|
||||
double d1 = entity.r - r;
|
||||
float f3 = MathHelper.a(d * d + d1 * d1);
|
||||
|
||||
s = (d / (double) f3) * 0.5D * 0.80000001192092896D + s * 0.20000000298023224D;
|
||||
u = (d1 / (double) f3) * 0.5D * 0.80000001192092896D + u * 0.20000000298023224D;
|
||||
t = 0.40000000596046448D;
|
||||
}
|
||||
} else {
|
||||
super.a(entity, f1);
|
||||
}
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
super.a(nbttagcompound);
|
||||
}
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
}
|
||||
|
||||
protected int h() {
|
||||
return Item.I.ba;
|
||||
}
|
||||
|
||||
public boolean m() {
|
||||
return B;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user