This commit is contained in:
filoghost 2019-06-04 15:24:46 +02:00
parent 270f426a44
commit ff4102599c
3 changed files with 13 additions and 10 deletions

View File

@ -41,9 +41,10 @@ import net.minecraft.server.v1_14_R1.Vec3D;
import net.minecraft.server.v1_14_R1.World;
public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorStand {
private boolean lockTick;
private HologramLine parentPiece;
private CraftEntity customBukkitEntity;
public EntityNMSArmorStand(World world, HologramLine parentPiece) {
super(EntityTypes.ARMOR_STAND, world);
@ -203,10 +204,10 @@ public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorSta
@Override
public CraftEntity getBukkitEntity() {
if (super.bukkitEntity == null) {
super.bukkitEntity = new CraftNMSArmorStand(super.world.getServer(), this);
if (customBukkitEntity == null) {
customBukkitEntity = new CraftNMSArmorStand(super.world.getServer(), this);
}
return super.bukkitEntity;
return customBukkitEntity;
}
@Override

View File

@ -48,6 +48,7 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
private boolean lockTick;
private ItemLine parentPiece;
private ItemPickupManager itemPickupManager;
private CraftEntity customBukkitEntity;
public EntityNMSItem(World world, ItemLine piece, ItemPickupManager itemPickupManager) {
super(EntityTypes.ITEM, world);
@ -158,10 +159,10 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
@Override
public CraftEntity getBukkitEntity() {
if (super.bukkitEntity == null) {
super.bukkitEntity = new CraftNMSItem(super.world.getServer(), this);
if (customBukkitEntity == null) {
customBukkitEntity = new CraftNMSItem(super.world.getServer(), this);
}
return super.bukkitEntity;
return customBukkitEntity;
}
@Override

View File

@ -44,6 +44,7 @@ public class EntityNMSSlime extends EntitySlime implements NMSSlime {
private boolean lockTick;
private HologramLine parentPiece;
private CraftEntity customBukkitEntity;
public EntityNMSSlime(World world, HologramLine parentPiece) {
super(EntityTypes.SLIME, world);
@ -171,10 +172,10 @@ public class EntityNMSSlime extends EntitySlime implements NMSSlime {
@Override
public CraftEntity getBukkitEntity() {
if (super.bukkitEntity == null) {
super.bukkitEntity = new CraftNMSSlime(super.world.getServer(), this);
if (customBukkitEntity == null) {
customBukkitEntity = new CraftNMSSlime(super.world.getServer(), this);
}
return super.bukkitEntity;
return customBukkitEntity;
}
@Override