Contents
Class LivingEntity
java.lang.Object
com.hypixel.hytale.server.core.entity.Entity
com.hypixel.hytale.server.core.entity.LivingEntity
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
A class that represents a living entity in the game.
-
Nested Class Summary
Nested classes/interfaces inherited from class Entity
Entity.DefaultAnimations -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<LivingEntity> The codec used to parseLivingEntityinstances.static final intFields inherited from class Entity
DISPLAY_NAME, LOGGER, UNASSIGNED_ID, UUID, VERSIONFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionEmpty Constructor for aLivingEntityinstance.LivingEntity(World world) Default Constructor for aLivingEntityinstance. -
Method Summary
Modifier and TypeMethodDescriptiondoublestatic longgetPackedMaterialAndFluidAtBreathingHeight(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) Gets the packed material and fluid ID at the entity's breathing height.voidmoveTo(Ref<EntityStore> ref, double locX, double locY, double locZ, ComponentAccessor<EntityStore> componentAccessor) voidsetCurrentFallDistance(double currentFallDistance) toString()updateItemStackDurability(Ref<EntityStore> ref, ItemStack itemStack, ItemContainer container, int slotId, double durabilityChange, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class Entity
clearReference, clone, equals, getLegacyDisplayName, getNetworkId, getReference, getUuid, getWorld, hashCode, isCollidable, isHiddenFromLivingEntity, loadIntoWorld, markNeedsSave, remove, setLegacyUUID, setReference, toHolder, unloadFromWorld, wasRemovedMethods inherited from interface Component
cloneSerializable
-
Field Details
-
CODEC
The codec used to parseLivingEntityinstances. -
DEFAULT_ITEM_THROW_SPEED
public static final int DEFAULT_ITEM_THROW_SPEED- See Also:
-
-
Constructor Details
-
LivingEntity
public LivingEntity()Empty Constructor for aLivingEntityinstance. -
LivingEntity
Default Constructor for aLivingEntityinstance.- Parameters:
world- The world the entity is in, ornullif not in a world.
-
-
Method Details
-
getPackedMaterialAndFluidAtBreathingHeight
public static long getPackedMaterialAndFluidAtBreathingHeight(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Gets the packed material and fluid ID at the entity's breathing height.- Parameters:
ref- The entity reference of the entity.componentAccessor- TheComponentAccessor<EntityStore>for component access.- Returns:
- the packed material and fluid ID at the entity's breathing height.
-
getInventory
-
moveTo
public void moveTo(@Nonnull Ref<EntityStore> ref, double locX, double locY, double locZ, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
moveToin classEntity- Parameters:
ref- The entity reference of this entity.locX- The X coordinate to move to.locY- The Y coordinate to move to.locZ- The Z coordinate to move to.componentAccessor- TheComponentAccessor<EntityStore>for component access.
-
updateItemStackDurability
@Deprecated(forRemoval=true) @Nullable public ItemStackSlotTransaction updateItemStackDurability(@Nonnull Ref<EntityStore> ref, @Nonnull ItemStack itemStack, ItemContainer container, int slotId, double durabilityChange, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theItemUtils.updateItemStackDurability(Ref, ItemStack, ItemContainer, int, double, ComponentAccessor)equivalent instead. -
getCurrentFallDistance
public double getCurrentFallDistance() -
setCurrentFallDistance
public void setCurrentFallDistance(double currentFallDistance) -
toString
-
ItemUtils.updateItemStackDurability(Ref, ItemStack, ItemContainer, int, double, ComponentAccessor)equivalent instead.