Package com.ticxo.modelengine.api.entity
Class Dummy
java.lang.Object
com.ticxo.modelengine.api.entity.Dummy
- All Implemented Interfaces:
BaseEntity<Object>
Default implementation of
This is mainly used to spawn player-specific models, inanimate objects, or extended to implement custom logic.
Since this wrapper does not exist in the world, it would not automatically add or remove players from the list of viewers. Use
BaseEntity that does not wrap anything and have all aspects controllable.This is mainly used to spawn player-specific models, inanimate objects, or extended to implement custom logic.
Since this wrapper does not exist in the world, it would not automatically add or remove players from the list of viewers. Use
ManualRangeManager to modify the viewer list.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDo not use this constructor unless you know what you are doing.
UseModelEngineAPI.createDummy()orModelEngineAPI.createDummy(UUID)instead. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the target becomes invisible.
For bukkit entities and players, useEntityHandler.broadcastDespawnPacket(BaseEntity, boolean)voidCalled when the target becomes visible again.
For bukkit entities and players, useEntityHandler.broadcastSpawnPacket(BaseEntity, boolean)org.bukkit.inventory.ItemStackgetItemInSlot(org.bukkit.inventory.EquipmentSlot slot) Get the wrapped target.Get the step height of this entity.org.bukkit.WorldgetWorld()Get the world of this entity.booleanonHurt(IDamageSource damageSource, float damage) Called when a sub-hitbox of this entity detects an attack.
For default bukkit behavior, useEntityHandler.hurt(Entity, IDamageSource, float).voidonInteract(org.bukkit.entity.Player player, org.bukkit.inventory.EquipmentSlot hand) Called when a sub-hitbox of this entity detects an interaction.
For default bukkit behavior, useEntityHandler.interact(Entity, Player, EquipmentSlot).voidonInteractAt(org.bukkit.entity.Player player, org.bukkit.inventory.EquipmentSlot hand, org.bukkit.util.Vector position) voidsetCollidableToLiving(org.bukkit.entity.LivingEntity living, boolean flag) Configure whether the targeted living entity can collide with this entityvoidSet the hitbox of this entity.
For bukkit entities, useEntityHandler.setHitbox(Entity, Hitbox).voidsetStepHeight(double height) Set the step height of this entity.
For bukkit entities, useEntityHandler.setStepHeight(Entity, double)Create a wrapper for the body rotation control of this entity.
For bukkit entities, wrap withEntityHandler.wrapBodyRotationControl(Entity).Create a wrapper for the look control of this entity.
For bukkit entities, wrap withEntityHandler.wrapLookControl(Entity).Create a wrapper for the movement control of this entity.
For bukkit entities, wrap withEntityHandler.wrapMoveControl(Entity).voidPatch Minecraft's faulty pathfinding to accept different hitbox sizes.
For bukkit entities, wrap withEntityHandler.wrapNavigation(Entity).wrapRangeManager(IModel model) Create a wrapper for the render range manager of this entity.
For bukkit entities, wrap withEntityHandler.wrapRangeManager(Entity).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
getEntityId, getHitbox, getLocation, getModelHitbox, getPassengers, getRangeManager, getUniqueId, getXHeadRot, getYBodyRot, getYHeadRot, isDead, isGlowing, isMoving, isOnGround, setYBodyRot, setYHeadRot
-
Constructor Details
-
Dummy
Do not use this constructor unless you know what you are doing.
UseModelEngineAPI.createDummy()orModelEngineAPI.createDummy(UUID)instead.
-
-
Method Details
-
getOriginal
Description copied from interface:BaseEntityGet the wrapped target.- Specified by:
getOriginalin interfaceBaseEntity<Object>
-
wrapMoveControl
Description copied from interface:BaseEntityCreate a wrapper for the movement control of this entity.
For bukkit entities, wrap withEntityHandler.wrapMoveControl(Entity).- Specified by:
wrapMoveControlin interfaceBaseEntity<Object>
-
wrapLookControl
Description copied from interface:BaseEntityCreate a wrapper for the look control of this entity.
For bukkit entities, wrap withEntityHandler.wrapLookControl(Entity).- Specified by:
wrapLookControlin interfaceBaseEntity<Object>
-
wrapBodyRotationControl
Description copied from interface:BaseEntityCreate a wrapper for the body rotation control of this entity.
For bukkit entities, wrap withEntityHandler.wrapBodyRotationControl(Entity).- Specified by:
wrapBodyRotationControlin interfaceBaseEntity<Object>
-
wrapRangeManager
Description copied from interface:BaseEntityCreate a wrapper for the render range manager of this entity.
For bukkit entities, wrap withEntityHandler.wrapRangeManager(Entity).- Specified by:
wrapRangeManagerin interfaceBaseEntity<Object>
-
onHurt
Description copied from interface:BaseEntityCalled when a sub-hitbox of this entity detects an attack.
For default bukkit behavior, useEntityHandler.hurt(Entity, IDamageSource, float).- Specified by:
onHurtin interfaceBaseEntity<Object>- Parameters:
damageSource- the damage source of this attackdamage- raw damage before reduction- Returns:
- false to cancel the attack.
-
onInteract
public void onInteract(org.bukkit.entity.Player player, org.bukkit.inventory.EquipmentSlot hand) Description copied from interface:BaseEntityCalled when a sub-hitbox of this entity detects an interaction.
For default bukkit behavior, useEntityHandler.interact(Entity, Player, EquipmentSlot).- Specified by:
onInteractin interfaceBaseEntity<Object>- Parameters:
player- the triggerhand- hand used to interact
-
onInteractAt
public void onInteractAt(org.bukkit.entity.Player player, org.bukkit.inventory.EquipmentSlot hand, org.bukkit.util.Vector position) -
setHitbox
Description copied from interface:BaseEntitySet the hitbox of this entity.
For bukkit entities, useEntityHandler.setHitbox(Entity, Hitbox).- Specified by:
setHitboxin interfaceBaseEntity<Object>
-
setStepHeight
public void setStepHeight(double height) Description copied from interface:BaseEntitySet the step height of this entity.
For bukkit entities, useEntityHandler.setStepHeight(Entity, double)- Specified by:
setStepHeightin interfaceBaseEntity<Object>- Parameters:
height- height in blocks
-
getStepHeight
Description copied from interface:BaseEntityGet the step height of this entity.- Specified by:
getStepHeightin interfaceBaseEntity<Object>- Returns:
- the step height, or null if it could not be determined.
-
setCollidableToLiving
public void setCollidableToLiving(org.bukkit.entity.LivingEntity living, boolean flag) Description copied from interface:BaseEntityConfigure whether the targeted living entity can collide with this entity- Specified by:
setCollidableToLivingin interfaceBaseEntity<Object>- Parameters:
living- The targeted living entityflag- Can be collided
-
broadcastSpawnPacket
public void broadcastSpawnPacket()Description copied from interface:BaseEntityCalled when the target becomes visible again.
For bukkit entities and players, useEntityHandler.broadcastSpawnPacket(BaseEntity, boolean)- Specified by:
broadcastSpawnPacketin interfaceBaseEntity<Object>
-
broadcastDespawnPacket
public void broadcastDespawnPacket()Description copied from interface:BaseEntityCalled when the target becomes invisible.
For bukkit entities and players, useEntityHandler.broadcastDespawnPacket(BaseEntity, boolean)- Specified by:
broadcastDespawnPacketin interfaceBaseEntity<Object>
-
getWorld
public org.bukkit.World getWorld()Description copied from interface:BaseEntityGet the world of this entity.- Specified by:
getWorldin interfaceBaseEntity<Object>
-
getItemInSlot
public org.bukkit.inventory.ItemStack getItemInSlot(org.bukkit.inventory.EquipmentSlot slot) - Specified by:
getItemInSlotin interfaceBaseEntity<Object>
-