Package net.minecraft.world.entity
Interface Leashable
- All Known Implementing Classes:
AbstractBoat,AbstractChestBoat,AbstractChestedHorse,AbstractFish,AbstractGolem,AbstractHorse,AbstractIllager,AbstractPiglin,AbstractSchoolingFish,AbstractSkeleton,AbstractVillager,AgeableMob,AgeableWaterCreature,Allay,AmbientCreature,Animal,Armadillo,Axolotl,Bat,Bee,Blaze,Boat,Bogged,Breeze,Camel,Cat,CaveSpider,ChestBoat,ChestRaft,Chicken,Cod,Cow,Creaking,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,Raft,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 booleandefault booleandefault voidcloseRangeLeashBehaviour(Entity pEntity) default voiddropLeash(E pEntity, boolean pBroadcastPacket, boolean pDropItem) default voidelasticRangeLeashBehaviour(Entity pLeashHolder, float pDistance) default EntitygetLeashHolder(E pEntity) default booleanhandleLeashAtDistance(Entity pLeashHolder, float pDistance) default booleandefault voidlegacyElasticRangeLeashBehaviour(E pEntity, Entity pLeashHolder, float pDistance) default booleandefault voiddefault voidreadLeashData(CompoundTag pTag) private static Leashable.LeashDatadefault voidrestoreLeashFromSave(E pEntity, Leashable.LeashData pLeashData) default voidsetDelayedLeashHolderId(int pDelayedLeashHolderId) voidsetLeashData(Leashable.LeashData pLeashData) setLeashedTo(E pEntity, Entity pLeashHolder, boolean pBroadcastPacket) default voidsetLeashedTo(Entity pLeashHolder, boolean pBroadcastPacket) tickLeash(ServerLevel pLevel, E pEntity) default voidwriteLeashData(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
-
readLeashDataInternal
-
writeLeashData
-
restoreLeashFromSave
private static <E extends Entity & Leashable> void restoreLeashFromSave(E pEntity, Leashable.LeashData pLeashData) -
dropLeash
default void dropLeash() -
removeLeash
default void removeLeash() -
onLeashRemoved
default void onLeashRemoved() -
dropLeash
-
tickLeash
-
handleLeashAtDistance
-
leashTooFarBehaviour
default void leashTooFarBehaviour() -
closeRangeLeashBehaviour
-
elasticRangeLeashBehaviour
-
legacyElasticRangeLeashBehaviour
-
setLeashedTo
-
setLeashedTo
-
getLeashHolder
-
getLeashHolder
-