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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
default boolean
default void
closeRangeLeashBehaviour
(Entity pEntity) default void
dropLeash
(boolean pBroadcastPacket, boolean pDropItem) dropLeash
(E pEntity, boolean pBroadcastPacket, boolean pDropItem) default void
elasticRangeLeashBehaviour
(Entity pLeashHolder, float pDistance) default Entity
getLeashHolder
(E pEntity) default boolean
handleLeashAtDistance
(Entity pLeashHolder, float pDistance) default boolean
default void
legacyElasticRangeLeashBehaviour
(E pEntity, Entity pLeashHolder, float pDistance) default boolean
default Leashable.LeashData
readLeashData
(CompoundTag pTag) restoreLeashFromSave
(E pEntity, Leashable.LeashData pLeashData) default void
setDelayedLeashHolderId
(int pDelayedLeashHolderId) void
setLeashData
(Leashable.LeashData pLeashData) setLeashedTo
(E pEntity, Entity pLeashHolder, boolean pBroadcastPacket) default void
setLeashedTo
(Entity pLeashHolder, boolean pBroadcastPacket) tickLeash
(E pEntity) default void
writeLeashData
(CompoundTag pTag, Leashable.LeashData pLeashData)
-
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 pDelayedLeashHolderId) -
readLeashData
-
writeLeashData
-
restoreLeashFromSave
private static <E extends Entity & Leashable> void restoreLeashFromSave(E pEntity, Leashable.LeashData pLeashData) -
dropLeash
default void dropLeash(boolean pBroadcastPacket, boolean pDropItem) -
dropLeash
-
tickLeash
-
handleLeashAtDistance
-
leashTooFarBehaviour
default void leashTooFarBehaviour() -
closeRangeLeashBehaviour
-
elasticRangeLeashBehaviour
-
legacyElasticRangeLeashBehaviour
-
setLeashedTo
-
setLeashedTo
-
getLeashHolder
-
getLeashHolder
-