Archiviert
13
0

Addition of all Entity classes.

Each Entity creates a corresponding instance of a Craft Entity, to be
used whenever sending instances to an event handler with
getBukkitEntity().
Dieser Commit ist enthalten in:
Andrew Ardill 2011-01-17 16:17:16 +08:00 committet von Dinner Bone
Ursprung 431f2f62cf
Commit 6a3b096fb8
24 geänderte Dateien mit 154 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -1,9 +1,16 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftAnimals;
public abstract class EntityAnimals extends EntityCreature implements IAnimals {
public EntityAnimals(World world) {
super(world);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftAnimals(server, this);
//CraftBukkit end
}
protected float a(int i, int j, int k) {

Datei anzeigen

@ -2,6 +2,10 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftAnimals;
import org.bukkit.craftbukkit.entity.CraftChicken;
public class EntityChicken extends EntityAnimals {
public boolean a;
@ -22,6 +26,10 @@ public class EntityChicken extends EntityAnimals {
a(0.3F, 0.4F);
aZ = 4;
am = W.nextInt(6000) + 6000;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftChicken(server, this);
//CraftBukkit end
}
public void o() {

Datei anzeigen

@ -1,11 +1,18 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftCow;
public class EntityCow extends EntityAnimals {
public EntityCow(World world) {
super(world);
aP = "/mob/cow.png";
a(0.9F, 1.3F);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftCow(server, this);
//CraftBukkit end
}
public void a(NBTTagCompound nbttagcompound) {

Datei anzeigen

@ -2,6 +2,9 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftCreature;
public class EntityCreature extends EntityLiving {
private PathEntity a;
@ -11,6 +14,10 @@ public class EntityCreature extends EntityLiving {
public EntityCreature(World world) {
super(world);
e = false;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftCreature(server, this);
//CraftBukkit end
}
protected void d() {

Datei anzeigen

@ -2,6 +2,9 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftCreeper;
public class EntityCreeper extends EntityMobs {
int a;
@ -10,6 +13,10 @@ public class EntityCreeper extends EntityMobs {
public EntityCreeper(World world) {
super(world);
aP = "/mob/creeper.png";
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftCreeper(server, this);
//CraftBukkit end
}
protected void a() {

Datei anzeigen

@ -1,5 +1,8 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftFallingSand;
public class EntityFallingSand extends Entity {
public int a;
@ -25,6 +28,10 @@ public class EntityFallingSand extends Entity {
m = d;
n = d1;
o = d2;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftFallingSand(server, this);
//CraftBukkit end
}
protected void a() {}

Datei anzeigen

@ -1,9 +1,16 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftFlying;
public class EntityFlying extends EntityLiving {
public EntityFlying(World world) {
super(world);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftFlying(server, this);
//CraftBukkit end
}
protected void a(float f) {}

Datei anzeigen

@ -3,6 +3,10 @@ package net.minecraft.server;
import java.util.List;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftAnimals;
import org.bukkit.craftbukkit.entity.CraftGhast;
public class EntityGhast extends EntityFlying implements IMobs {
public int a;
@ -24,6 +28,10 @@ public class EntityGhast extends EntityFlying implements IMobs {
aP = "/mob/ghast.png";
a(4F, 4F);
ae = true;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftGhast(server, this);
//CraftBukkit end
}
protected void d() {

Datei anzeigen

@ -2,6 +2,10 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftAnimals;
import org.bukkit.craftbukkit.entity.CraftItem;
public class EntityItem extends Entity {
public ItemStack a;
@ -25,6 +29,10 @@ public class EntityItem extends Entity {
t = 0.20000000298023224D;
u = (float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D);
M = false;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftItem(server, this);
//CraftBukkit end
}
public EntityItem(World world) {

Datei anzeigen

@ -3,6 +3,10 @@ package net.minecraft.server;
import java.util.List;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftAnimals;
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
public abstract class EntityLiving extends Entity {
public int aF;
@ -93,6 +97,10 @@ public abstract class EntityLiving extends Entity {
aG = (float) Math.random() * 12398F;
v = (float) (Math.random() * 3.1415927410125732D * 2D);
S = 0.5F;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftLivingEntity(server, this);
//CraftBukkit end
}
protected void a() {}

Datei anzeigen

@ -6,6 +6,7 @@ import java.util.Random;
import org.bukkit.craftbukkit.entity.CraftEntity;
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.entity.CraftMinecart;
import org.bukkit.craftbukkit.entity.CraftMonster;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.event.entity.EntityDamageByBlockEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
@ -22,7 +23,7 @@ public class EntityMobs extends EntityCreature implements IMobs {
aZ = 20;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftLivingEntity(server, this);
this.bukkitEntity = new CraftMonster(server, this);
//CraftBukkit end
}

Datei anzeigen

@ -2,6 +2,9 @@ package net.minecraft.server;
import java.util.*;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftPainting;
public class EntityPainting extends Entity {
private int f;
@ -17,6 +20,10 @@ public class EntityPainting extends Entity {
a = 0;
H = 0.0F;
a(0.5F, 0.5F);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftPainting(server, this);
//CraftBukkit end
}
public EntityPainting(World world, int i, int j, int k, int l) {

Datei anzeigen

@ -1,11 +1,18 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftPig;
public class EntityPig extends EntityAnimals {
public EntityPig(World world) {
super(world);
aP = "/mob/pig.png";
a(0.9F, 0.9F);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftPig(server, this);
//CraftBukkit end
}
protected void a() {

Datei anzeigen

@ -3,6 +3,9 @@ package net.minecraft.server;
import java.util.List;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftPigZombie;
public class EntityPigZombie extends EntityZombie {
private int a;
@ -17,6 +20,10 @@ public class EntityPigZombie extends EntityZombie {
bC = 0.5F;
c = 5;
ae = true;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftPigZombie(server, this);
//CraftBukkit end
}
public void b_() {

Datei anzeigen

@ -3,9 +3,7 @@ package net.minecraft.server;
import java.util.List;
import java.util.Random;
// CraftBukkit start
import org.bukkit.craftbukkit.entity.CraftEntity;
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
@ -53,7 +51,7 @@ public abstract class EntityPlayer extends EntityLiving {
aP = "/mob/char.png";
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftLivingEntity(server, this);
this.bukkitEntity = new CraftHumanEntity(server, this);
//CraftBukkit end
}

Datei anzeigen

@ -2,6 +2,9 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftSheep;
public class EntitySheep extends EntityAnimals {
public static final float a[][] = {
@ -44,6 +47,10 @@ public class EntitySheep extends EntityAnimals {
super(world);
aP = "/mob/sheep.png";
a(0.9F, 1.3F);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftSheep(server, this);
//CraftBukkit end
}
protected void a() {

Datei anzeigen

@ -2,8 +2,7 @@ package net.minecraft.server;
import java.util.Random;
// CraftBukkit start
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.entity.CraftSkeleton;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.event.Event.Type;
import org.bukkit.event.entity.EntityCombustEvent;
@ -18,7 +17,7 @@ public class EntitySkeleton extends EntityMobs {
aP = "/mob/skeleton.png";
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftLivingEntity(server, this);
this.bukkitEntity = new CraftSkeleton(server, this);
//CraftBukkit end
}

Datei anzeigen

@ -2,6 +2,10 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftSkeleton;
import org.bukkit.craftbukkit.entity.CraftSlime;
public class EntitySlime extends EntityLiving implements IMobs {
public float a;
@ -18,6 +22,10 @@ public class EntitySlime extends EntityLiving implements IMobs {
H = 0.0F;
d = W.nextInt(20) + 10;
a(c);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftSlime(server, this);
//CraftBukkit end
}
public void a(int j) {

Datei anzeigen

@ -2,6 +2,9 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftSpider;
public class EntitySpider extends EntityMobs {
public EntitySpider(World world) {
@ -9,6 +12,10 @@ public class EntitySpider extends EntityMobs {
aP = "/mob/spider.png";
a(1.4F, 0.9F);
bC = 0.8F;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftSpider(server, this);
//CraftBukkit end
}
public double k() {

Datei anzeigen

@ -2,6 +2,9 @@ package net.minecraft.server;
import java.util.Random;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftSquid;
public class EntitySquid extends EntityWaterMob {
public float a;
@ -38,6 +41,10 @@ public class EntitySquid extends EntityWaterMob {
aP = "/mob/squid.png";
a(0.95F, 0.95F);
ap = (1.0F / (W.nextFloat() + 1.0F)) * 0.2F;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftSquid(server, this);
//CraftBukkit end
}
public void a(NBTTagCompound nbttagcompound) {

Datei anzeigen

@ -1,5 +1,9 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftSkeleton;
import org.bukkit.craftbukkit.entity.CraftTNTPrimed;
public class EntityTNTPrimed extends Entity {
public int a;
@ -10,6 +14,10 @@ public class EntityTNTPrimed extends Entity {
i = true;
a(0.98F, 0.98F);
H = J / 2.0F;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftTNTPrimed(server, this);
//CraftBukkit end
}
public EntityTNTPrimed(World world, double d1, double d2, double d3) {

Datei anzeigen

@ -1,9 +1,16 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftWaterMob;
public class EntityWaterMob extends EntityCreature implements IAnimals {
public EntityWaterMob(World world) {
super(world);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftWaterMob(server, this);
//CraftBukkit end
}
public boolean d_() {

Datei anzeigen

@ -1,9 +1,6 @@
package net.minecraft.server;
import java.util.Random;
// CraftBukkit start
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.entity.CraftZombie;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.event.Event.Type;
import org.bukkit.event.entity.EntityCombustEvent;
@ -18,7 +15,7 @@ public class EntityZombie extends EntityMobs {
c = 5;
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftLivingEntity(server, this);
this.bukkitEntity = new CraftZombie(server, this);
//CraftBukkit end
}

Datei anzeigen

@ -1,5 +1,8 @@
package net.minecraft.server;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftGiant;
public class EntityZombieSimple extends EntityMobs {
public EntityZombieSimple(World world) {
@ -10,6 +13,10 @@ public class EntityZombieSimple extends EntityMobs {
aZ *= 10;
H *= 6F;
a(I * 6F, J * 6F);
//CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftGiant(server, this);
//CraftBukkit end
}
protected float a(int i, int j, int k) {