Class BukkitEntity

java.lang.Object
com.ticxo.modelengine.api.entity.BukkitEntity
All Implemented Interfaces:
BaseEntity<org.bukkit.entity.Entity>, DataIO
Direct Known Subclasses:
BukkitPlayer

public class BukkitEntity extends Object implements BaseEntity<org.bukkit.entity.Entity>
  • Field Details

    • entityHandler

      protected final EntityHandler entityHandler
    • original

      protected final org.bukkit.entity.Entity original
    • data

      protected final BukkitEntityData data
    • bodyRotationController

      protected final BodyRotationController bodyRotationController
    • moveController

      protected final MoveController moveController
    • lookController

      protected final LookController lookController
    • isVisible

      protected boolean isVisible
  • Constructor Details

    • BukkitEntity

      public BukkitEntity(org.bukkit.entity.Entity original)
  • Method Details

    • createEntityData

      protected BukkitEntityData createEntityData(org.bukkit.entity.Entity original)
    • setVisible

      public void setVisible(boolean flag)
      Specified by:
      setVisible in interface BaseEntity<org.bukkit.entity.Entity>
    • isRemoved

      public boolean isRemoved()
      Specified by:
      isRemoved in interface BaseEntity<org.bukkit.entity.Entity>
    • isAlive

      public boolean isAlive()
      Specified by:
      isAlive in interface BaseEntity<org.bukkit.entity.Entity>
    • isForcedAlive

      public boolean isForcedAlive()
      Specified by:
      isForcedAlive in interface BaseEntity<org.bukkit.entity.Entity>
    • setForcedAlive

      public void setForcedAlive(boolean flag)
      Specified by:
      setForcedAlive in interface BaseEntity<org.bukkit.entity.Entity>
    • getEntityId

      public int getEntityId()
      Specified by:
      getEntityId in interface BaseEntity<org.bukkit.entity.Entity>
    • getUUID

      public UUID getUUID()
      Specified by:
      getUUID in interface BaseEntity<org.bukkit.entity.Entity>
    • getMaxStepHeight

      public double getMaxStepHeight()
      Specified by:
      getMaxStepHeight in interface BaseEntity<org.bukkit.entity.Entity>
    • setMaxStepHeight

      public void setMaxStepHeight(double stepHeight)
      Specified by:
      setMaxStepHeight in interface BaseEntity<org.bukkit.entity.Entity>
    • getRenderRadius

      public int getRenderRadius()
      Specified by:
      getRenderRadius in interface BaseEntity<org.bukkit.entity.Entity>
    • setRenderRadius

      public void setRenderRadius(int radius)
      Specified by:
      setRenderRadius in interface BaseEntity<org.bukkit.entity.Entity>
    • setCollidableWith

      public void setCollidableWith(org.bukkit.entity.Entity entity, boolean flag)
      Specified by:
      setCollidableWith in interface BaseEntity<org.bukkit.entity.Entity>
    • hurt

      public boolean hurt(@Nullable @Nullable org.bukkit.entity.HumanEntity player, Object nmsDamageCause, float damage)
      Specified by:
      hurt in interface BaseEntity<org.bukkit.entity.Entity>
    • interact

      public EntityHandler.InteractionResult interact(org.bukkit.entity.HumanEntity player, org.bukkit.inventory.EquipmentSlot slot)
      Specified by:
      interact in interface BaseEntity<org.bukkit.entity.Entity>
    • getYRot

      public float getYRot()
      Specified by:
      getYRot in interface BaseEntity<org.bukkit.entity.Entity>
    • getYHeadRot

      public float getYHeadRot()
      Specified by:
      getYHeadRot in interface BaseEntity<org.bukkit.entity.Entity>
    • getXHeadRot

      public float getXHeadRot()
      Specified by:
      getXHeadRot in interface BaseEntity<org.bukkit.entity.Entity>
    • getYBodyRot

      public float getYBodyRot()
      Specified by:
      getYBodyRot in interface BaseEntity<org.bukkit.entity.Entity>
    • isWalking

      public boolean isWalking()
      Specified by:
      isWalking in interface BaseEntity<org.bukkit.entity.Entity>
    • isStrafing

      public boolean isStrafing()
      Specified by:
      isStrafing in interface BaseEntity<org.bukkit.entity.Entity>
    • isJumping

      public boolean isJumping()
      Specified by:
      isJumping in interface BaseEntity<org.bukkit.entity.Entity>
    • isFlying

      public boolean isFlying()
      Specified by:
      isFlying in interface BaseEntity<org.bukkit.entity.Entity>
    • save

      public void save(SavedData data)
      Specified by:
      save in interface BaseEntity<org.bukkit.entity.Entity>
      Specified by:
      save in interface DataIO
    • load

      public void load(SavedData data)
      Specified by:
      load in interface BaseEntity<org.bukkit.entity.Entity>
      Specified by:
      load in interface DataIO
    • getOriginal

      public org.bukkit.entity.Entity getOriginal()
      Specified by:
      getOriginal in interface BaseEntity<org.bukkit.entity.Entity>
    • getData

      public BukkitEntityData getData()
      Specified by:
      getData in interface BaseEntity<org.bukkit.entity.Entity>
    • getBodyRotationController

      public BodyRotationController getBodyRotationController()
      Specified by:
      getBodyRotationController in interface BaseEntity<org.bukkit.entity.Entity>
    • getMoveController

      public MoveController getMoveController()
      Specified by:
      getMoveController in interface BaseEntity<org.bukkit.entity.Entity>
    • getLookController

      public LookController getLookController()
      Specified by:
      getLookController in interface BaseEntity<org.bukkit.entity.Entity>
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface BaseEntity<org.bukkit.entity.Entity>