Package com.ticxo.modelengine.api.entity
Class BukkitEntity
java.lang.Object
com.ticxo.modelengine.api.entity.BukkitEntity
- All Implemented Interfaces:
BaseEntity<org.bukkit.entity.Entity>,DataIO
- Direct Known Subclasses:
BukkitPlayer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BodyRotationControllerprotected final BukkitEntityDataprotected final EntityHandlerprotected intprotected booleanprotected final LookControllerprotected final MoveControllerprotected final org.bukkit.entity.Entity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BukkitEntityDatacreateEntityData(org.bukkit.entity.Entity original) org.bukkit.util.BoundingBoxgetData()intintfloatfloatdoubleorg.bukkit.entity.EntityintgetUUID()floatfloatfloatfloatgetYRot()booleanbooleanhurt(HitboxEntity hitbox, @Nullable org.bukkit.entity.HumanEntity player, Object nmsDamageCause, float damage) interact(HitboxEntity hitbox, org.bukkit.entity.HumanEntity player, org.bukkit.inventory.EquipmentSlot slot) interact(org.bukkit.entity.HumanEntity player, org.bukkit.inventory.EquipmentSlot slot) booleanisAlive()booleanisFlying()booleanbooleanbooleanbooleanisOnFire()booleanbooleanbooleanbooleanvoidvoidRe-syncs lookup and base visibility after the backing entity changes world.voidvoidvoidsetCollidableWith(org.bukkit.entity.Entity entity, boolean flag) voidsetForcedAlive(boolean flag) voidsetMaxStepHeight(double stepHeight) voidsetRenderRadius(int radius) voidsetVisible(boolean flag) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ticxo.modelengine.api.entity.BaseEntity
getLocation, getPassengers
-
Field Details
-
entityHandler
-
original
protected final org.bukkit.entity.Entity original -
data
-
bodyRotationController
-
moveController
-
lookController
-
isVisible
protected boolean isVisible -
entityId
protected int entityId
-
-
Constructor Details
-
BukkitEntity
public BukkitEntity(org.bukkit.entity.Entity original)
-
-
Method Details
-
createEntityData
-
registerData
public void registerData()- Specified by:
registerDatain interfaceBaseEntity<org.bukkit.entity.Entity>
-
setVisible
public void setVisible(boolean flag) - Specified by:
setVisiblein interfaceBaseEntity<org.bukkit.entity.Entity>
-
onWorldChanged
public void onWorldChanged()Re-syncs lookup and base visibility after the backing entity changes world. A cross-dimension teleport recreates the NMS entity with a new network id; the packet interceptor keys base-hiding on that id, so without re-keying the base (e.g. a MythicMob's pig/husk) becomes visible. Re-key the id, then re-assert the hide for current trackers in case the new spawn already slipped through. -
isRemoved
public boolean isRemoved()- Specified by:
isRemovedin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isAlive
public boolean isAlive()- Specified by:
isAlivein interfaceBaseEntity<org.bukkit.entity.Entity>
-
isForcedAlive
public boolean isForcedAlive()- Specified by:
isForcedAlivein interfaceBaseEntity<org.bukkit.entity.Entity>
-
setForcedAlive
public void setForcedAlive(boolean flag) - Specified by:
setForcedAlivein interfaceBaseEntity<org.bukkit.entity.Entity>
-
getEntityId
public int getEntityId()- Specified by:
getEntityIdin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getUUID
- Specified by:
getUUIDin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getMaxStepHeight
public double getMaxStepHeight()- Specified by:
getMaxStepHeightin interfaceBaseEntity<org.bukkit.entity.Entity>
-
setMaxStepHeight
public void setMaxStepHeight(double stepHeight) - Specified by:
setMaxStepHeightin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getRenderRadius
public int getRenderRadius()- Specified by:
getRenderRadiusin interfaceBaseEntity<org.bukkit.entity.Entity>
-
setRenderRadius
public void setRenderRadius(int radius) - Specified by:
setRenderRadiusin interfaceBaseEntity<org.bukkit.entity.Entity>
-
setCollidableWith
public void setCollidableWith(org.bukkit.entity.Entity entity, boolean flag) - Specified by:
setCollidableWithin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isGlowing
public boolean isGlowing()- Specified by:
isGlowingin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getGlowColor
public int getGlowColor()- Specified by:
getGlowColorin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isOnFire
public boolean isOnFire()- Specified by:
isOnFirein interfaceBaseEntity<org.bukkit.entity.Entity>
-
hurt
public boolean hurt(@Nullable @Nullable org.bukkit.entity.HumanEntity player, Object nmsDamageCause, float damage) - Specified by:
hurtin interfaceBaseEntity<org.bukkit.entity.Entity>
-
hurt
public boolean hurt(HitboxEntity hitbox, @Nullable @Nullable org.bukkit.entity.HumanEntity player, Object nmsDamageCause, float damage) - Specified by:
hurtin interfaceBaseEntity<org.bukkit.entity.Entity>
-
interact
public EntityHandler.InteractionResult interact(org.bukkit.entity.HumanEntity player, org.bukkit.inventory.EquipmentSlot slot) - Specified by:
interactin interfaceBaseEntity<org.bukkit.entity.Entity>
-
interact
public EntityHandler.InteractionResult interact(HitboxEntity hitbox, org.bukkit.entity.HumanEntity player, org.bukkit.inventory.EquipmentSlot slot) - Specified by:
interactin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getYRot
public float getYRot()- Specified by:
getYRotin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getYHeadRot
public float getYHeadRot()- Specified by:
getYHeadRotin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getXHeadRot
public float getXHeadRot()- Specified by:
getXHeadRotin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getYBodyRot
public float getYBodyRot()- Specified by:
getYBodyRotin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isWalking
public boolean isWalking()- Specified by:
isWalkingin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isStrafing
public boolean isStrafing()- Specified by:
isStrafingin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isJumping
public boolean isJumping()- Specified by:
isJumpingin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isFlying
public boolean isFlying()- Specified by:
isFlyingin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getHealth
public float getHealth()- Specified by:
getHealthin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getMaxHealth
public float getMaxHealth()- Specified by:
getMaxHealthin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getBoundingBox
public org.bukkit.util.BoundingBox getBoundingBox()- Specified by:
getBoundingBoxin interfaceBaseEntity<org.bukkit.entity.Entity>
-
save
- Specified by:
savein interfaceBaseEntity<org.bukkit.entity.Entity>- Specified by:
savein interfaceDataIO
-
load
- Specified by:
loadin interfaceBaseEntity<org.bukkit.entity.Entity>- Specified by:
loadin interfaceDataIO
-
getOriginal
public org.bukkit.entity.Entity getOriginal()- Specified by:
getOriginalin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getData
- Specified by:
getDatain interfaceBaseEntity<org.bukkit.entity.Entity>
-
getBodyRotationController
- Specified by:
getBodyRotationControllerin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getMoveController
- Specified by:
getMoveControllerin interfaceBaseEntity<org.bukkit.entity.Entity>
-
getLookController
- Specified by:
getLookControllerin interfaceBaseEntity<org.bukkit.entity.Entity>
-
isVisible
public boolean isVisible()- Specified by:
isVisiblein interfaceBaseEntity<org.bukkit.entity.Entity>
-