Package net.minecraft.world.entity
Interface Leashable
- All Known Implementing Classes:
AbstractChestedHorse
,AbstractFish
,AbstractGolem
,AbstractHorse
,AbstractIllager
,AbstractPiglin
,AbstractSchoolingFish
,AbstractSkeleton
,AbstractVillager
,AgeableMob
,Allay
,AmbientCreature
,Animal
,Armadillo
,Axolotl
,Bat
,Bee
,Blaze
,Boat
,Bogged
,Breeze
,Camel
,Cat
,CaveSpider
,ChestBoat
,Chicken
,Cod
,Cow
,Creeper
,Dolphin
,Donkey
,Drowned
,ElderGuardian
,EnderDragon
,EnderMan
,Endermite
,Evoker
,FlyingMob
,Fox
,Frog
,Ghast
,Giant
,GlowSquid
,Goat
,Guardian
,Hoglin
,Horse
,Husk
,Illusioner
,IronGolem
,Llama
,MagmaCube
,Mob
,Monster
,Mule
,MushroomCow
,Ocelot
,Panda
,Parrot
,PathfinderMob
,PatrollingMonster
,Phantom
,Pig
,Piglin
,PiglinBrute
,Pillager
,PolarBear
,Pufferfish
,Rabbit
,Raider
,Ravager
,Salmon
,Sheep
,ShoulderRidingEntity
,Shulker
,Silverfish
,Skeleton
,SkeletonHorse
,Slime
,Sniffer
,SnowGolem
,SpellcasterIllager
,Spider
,Squid
,Stray
,Strider
,Tadpole
,TamableAnimal
,TraderLlama
,TropicalFish
,Turtle
,Vex
,Villager
,Vindicator
,WanderingTrader
,Warden
,WaterAnimal
,Witch
,WitherBoss
,WitherSkeleton
,Wolf
,Zoglin
,Zombie
,ZombieHorse
,ZombieVillager
,ZombifiedPiglin
public interface Leashable
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
default boolean
default void
closeRangeLeashBehaviour
(Entity p_344596_) default void
dropLeash
(boolean p_343929_, boolean p_344806_) dropLeash
(E p_343459_, boolean p_342580_, boolean p_344786_) default void
elasticRangeLeashBehaviour
(Entity p_342226_, float p_342283_) default Entity
getLeashHolder
(E p_342282_) default boolean
handleLeashAtDistance
(Entity p_345181_, float p_342079_) default boolean
default void
legacyElasticRangeLeashBehaviour
(E p_342325_, Entity p_343749_, float p_343654_) default boolean
default Leashable.LeashData
readLeashData
(CompoundTag p_344001_) restoreLeashFromSave
(E p_343564_, Leashable.LeashData p_344259_) default void
setDelayedLeashHolderId
(int p_345000_) void
setLeashData
(Leashable.LeashData p_345228_) setLeashedTo
(E p_342775_, Entity p_342643_, boolean p_343557_) default void
setLeashedTo
(Entity p_342408_, boolean p_342255_) tickLeash
(E p_343570_) default void
writeLeashData
(CompoundTag p_344282_, Leashable.LeashData p_345503_)
-
Field Details
-
LEASH_TAG
- See Also:
-
LEASH_TOO_FAR_DIST
static final double LEASH_TOO_FAR_DIST- See Also:
-
LEASH_ELASTIC_DIST
static final double LEASH_ELASTIC_DIST- See Also:
-
-
Method Details
-
getLeashData
-
setLeashData
-
isLeashed
default boolean isLeashed() -
mayBeLeashed
default boolean mayBeLeashed() -
canHaveALeashAttachedToIt
default boolean canHaveALeashAttachedToIt() -
canBeLeashed
default boolean canBeLeashed() -
setDelayedLeashHolderId
default void setDelayedLeashHolderId(int p_345000_) -
readLeashData
-
writeLeashData
-
restoreLeashFromSave
private static <E extends Entity & Leashable> void restoreLeashFromSave(E p_343564_, Leashable.LeashData p_344259_) -
dropLeash
default void dropLeash(boolean p_343929_, boolean p_344806_) -
dropLeash
-
tickLeash
-
handleLeashAtDistance
-
leashTooFarBehaviour
default void leashTooFarBehaviour() -
closeRangeLeashBehaviour
-
elasticRangeLeashBehaviour
-
legacyElasticRangeLeashBehaviour
-
setLeashedTo
-
setLeashedTo
-
getLeashHolder
-
getLeashHolder
-