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
,PartEntityTest.TestEntity
,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_352073_) default void
dropLeash
(boolean p_352294_, boolean p_352456_) dropLeash
(E p_352163_, boolean p_352286_, boolean p_352272_) default void
elasticRangeLeashBehaviour
(Entity p_353036_, float p_353047_) default Entity
getLeashHolder
(E p_352466_) default boolean
handleLeashAtDistance
(Entity p_352458_, float p_352101_) default boolean
default void
legacyElasticRangeLeashBehaviour
(E p_353048_, Entity p_353039_, float p_353053_) default boolean
default Leashable.LeashData
readLeashData
(CompoundTag p_352410_) restoreLeashFromSave
(E p_352354_, Leashable.LeashData p_352106_) default void
setDelayedLeashHolderId
(int p_352387_) void
setLeashData
(Leashable.LeashData p_352114_) setLeashedTo
(E p_352280_, Entity p_352109_, boolean p_352239_) default void
setLeashedTo
(Entity p_352411_, boolean p_352183_) tickLeash
(E p_352082_) default void
writeLeashData
(CompoundTag p_352349_, Leashable.LeashData p_352363_)
-
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_352387_) -
readLeashData
-
writeLeashData
-
restoreLeashFromSave
private static <E extends Entity & Leashable> void restoreLeashFromSave(E p_352354_, Leashable.LeashData p_352106_) -
dropLeash
default void dropLeash(boolean p_352294_, boolean p_352456_) -
dropLeash
-
tickLeash
-
handleLeashAtDistance
-
leashTooFarBehaviour
default void leashTooFarBehaviour() -
closeRangeLeashBehaviour
-
elasticRangeLeashBehaviour
-
legacyElasticRangeLeashBehaviour
-
setLeashedTo
-
setLeashedTo
-
getLeashHolder
-
getLeashHolder
-