Class DolphinMeta
java.lang.Object
net.minestom.server.entity.metadata.EntityMeta
net.minestom.server.entity.metadata.LivingEntityMeta
net.minestom.server.entity.metadata.MobMeta
net.minestom.server.entity.metadata.PathfinderMobMeta
net.minestom.server.entity.metadata.water.WaterAnimalMeta
net.minestom.server.entity.metadata.water.DolphinMeta
-
Field Summary
Fields inherited from class net.minestom.server.entity.metadata.EntityMeta
metadata
-
Constructor Summary
ConstructorDescriptionDolphinMeta
(@NotNull Entity entity, @NotNull Metadata metadata) Creates a new meta data for a dolphin. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the current moisture level.@NotNull Point
Get the given destination point for a treasure.boolean
hasFish()
Returns an indicator if a Dolphin received a fish from a player.void
setHasFish
(boolean value) Set the indicator if a Dolphin got a fish from a player.void
setMoistureLevel
(int level) Updates the given moisture level.void
setTreasurePosition
(@NotNull Point value) Set the destination point to lead a player to a treasure.Methods inherited from class net.minestom.server.entity.metadata.MobMeta
isAggressive, isLeftHanded, isNoAi, setAggressive, setLeftHanded, setNoAi
Methods inherited from class net.minestom.server.entity.metadata.LivingEntityMeta
getActiveHand, getArrowCount, getBedInWhichSleepingPosition, getBeeStingerCount, getHealth, getHealthAddedByAbsorption, getPotionEffectColor, isHandActive, isInRiptideSpinAttack, isPotionEffectAmbient, setActiveHand, setArrowCount, setBedInWhichSleepingPosition, setBeeStingerCount, setHandActive, setHealth, setHealthAddedByAbsorption, setInRiptideSpinAttack, setPotionEffectAmbient, setPotionEffectColor
Methods inherited from class net.minestom.server.entity.metadata.EntityMeta
consumeEntity, getAirTicks, getCustomName, getMask, getMaskBit, getPose, getTickFrozen, isCustomNameVisible, isFlyingWithElytra, isHasGlowingEffect, isHasNoGravity, isInvisible, isOnFire, isSilent, isSneaking, isSprinting, isSwimming, setAirTicks, setCustomName, setCustomNameVisible, setFlyingWithElytra, setHasGlowingEffect, setHasNoGravity, setInvisible, setMask, setMaskBit, setNotifyAboutChanges, setOnFire, setPose, setSilent, setSneaking, setSprinting, setSwimming, setTickFrozen
-
Field Details
-
OFFSET
public static final byte OFFSET- See Also:
-
MAX_OFFSET
public static final byte MAX_OFFSET- See Also:
-
-
Constructor Details
-
DolphinMeta
Creates a new meta data for a dolphin.- Parameters:
entity
- the involved entitymetadata
- the base metadata
-
-
Method Details
-
getTreasurePosition
Get the given destination point for a treasure.- Returns:
- the point or
Vec.ZERO
when no point is set
-
setTreasurePosition
Set the destination point to lead a player to a treasure.- Parameters:
value
- the point to set
-
hasFish
public boolean hasFish()Returns an indicator if a Dolphin received a fish from a player.- Returns:
- true when yes otherwise false
-
setHasFish
public void setHasFish(boolean value) Set the indicator if a Dolphin got a fish from a player.- Parameters:
value
- the value to set
-
getMoistureLevel
public int getMoistureLevel()Get the current moisture level.- Returns:
- the given level
-
setMoistureLevel
public void setMoistureLevel(int level) Updates the given moisture level.- Parameters:
level
- the level to set
-