mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
created getBukkitEntity() in minecraft.server.Entity
This returns a protected field that is set in the constructor of each minecraft.server.Entity to a new CraftEntity of some specific type.
This commit is contained in:
committed by
Dinner Bone
parent
95cb03b50e
commit
2de3e2e7e4
@@ -77,6 +77,8 @@ public abstract class Entity {
|
||||
public int ah;
|
||||
public int ai;
|
||||
public int aj;
|
||||
|
||||
protected org.bukkit.entity.Entity bukkitEntity; //CraftBukkit
|
||||
|
||||
public Entity(World world) {
|
||||
g = a++;
|
||||
@@ -116,6 +118,8 @@ public abstract class Entity {
|
||||
a(0.0D, 0.0D, 0.0D);
|
||||
af.a(0, ((Byte.valueOf((byte) 0))));
|
||||
a();
|
||||
|
||||
bukkitEntity = null; //CraftBukkit
|
||||
}
|
||||
|
||||
protected abstract void a();
|
||||
@@ -952,4 +956,10 @@ public abstract class Entity {
|
||||
af.b(0, ((Byte.valueOf((byte) (byte0 & ~(1 << i1))))));
|
||||
}
|
||||
}
|
||||
|
||||
//CraftBukkit start
|
||||
public org.bukkit.entity.Entity getBukkitEntity(){
|
||||
return this.bukkitEntity;
|
||||
}
|
||||
//CraftBukkit end
|
||||
}
|
||||
|
Reference in New Issue
Block a user