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
  • Field Details

  • Method Details

    • getLeashData

      @Nullable Leashable.LeashData getLeashData()
    • setLeashData

      void setLeashData(@Nullable Leashable.LeashData p_345228_)
    • isLeashed

      default boolean isLeashed()
    • mayBeLeashed

      default boolean mayBeLeashed()
    • canHaveALeashAttachedToIt

      default boolean canHaveALeashAttachedToIt()
    • canBeLeashed

      default boolean canBeLeashed()
    • setDelayedLeashHolderId

      default void setDelayedLeashHolderId(int p_345000_)
    • readLeashData

      @Nullable default Leashable.LeashData readLeashData(CompoundTag p_344001_)
    • writeLeashData

      default void writeLeashData(CompoundTag p_344282_, @Nullable Leashable.LeashData p_345503_)
    • 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

      private static <E extends Entity & Leashable> void dropLeash(E p_343459_, boolean p_342580_, boolean p_344786_)
    • tickLeash

      static <E extends Entity & Leashable> void tickLeash(E p_343570_)
    • handleLeashAtDistance

      default boolean handleLeashAtDistance(Entity p_345181_, float p_342079_)
    • leashTooFarBehaviour

      default void leashTooFarBehaviour()
    • closeRangeLeashBehaviour

      default void closeRangeLeashBehaviour(Entity p_344596_)
    • elasticRangeLeashBehaviour

      default void elasticRangeLeashBehaviour(Entity p_342226_, float p_342283_)
    • legacyElasticRangeLeashBehaviour

      private static <E extends Entity & Leashable> void legacyElasticRangeLeashBehaviour(E p_342325_, Entity p_343749_, float p_343654_)
    • setLeashedTo

      default void setLeashedTo(Entity p_342408_, boolean p_342255_)
    • setLeashedTo

      private static <E extends Entity & Leashable> void setLeashedTo(E p_342775_, Entity p_342643_, boolean p_343557_)
    • getLeashHolder

      @Nullable default Entity getLeashHolder()
    • getLeashHolder

      @Nullable private static <E extends Entity & Leashable> Entity getLeashHolder(E p_342282_)