Class TraderLlama

All Implemented Interfaces:
CommandSource, ContainerListener, Attackable, HasCustomInventoryScreen, RangedAttackMob, OwnableEntity, PlayerRideable, PlayerRideableJumping, Saddleable, Targeting, VariantHolder<Llama.Variant>, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, IForgeLivingEntity, INBTSerializable<CompoundTag>

public class TraderLlama extends Llama
  • Field Details

    • despawnDelay

      private int despawnDelay
  • Constructor Details

  • Method Details

    • isTraderLlama

      public boolean isTraderLlama()
      Overrides:
      isTraderLlama in class Llama
    • makeNewLlama

      @Nullable protected Llama makeNewLlama()
      Overrides:
      makeNewLlama in class Llama
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_30950_)
      Overrides:
      addAdditionalSaveData in class Llama
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_30948_)
      Overrides:
      readAdditionalSaveData in class Llama
    • registerGoals

      protected void registerGoals()
      Overrides:
      registerGoals in class Llama
    • setDespawnDelay

      public void setDespawnDelay(int p_149556_)
    • doPlayerRide

      protected void doPlayerRide(Player p_30958_)
      Overrides:
      doPlayerRide in class AbstractHorse
    • aiStep

      public void aiStep()
      Overrides:
      aiStep in class AbstractHorse
    • maybeDespawn

      private void maybeDespawn()
    • canDespawn

      private boolean canDespawn()
    • isLeashedToWanderingTrader

      private boolean isLeashedToWanderingTrader()
    • isLeashedToSomethingOtherThanTheWanderingTrader

      private boolean isLeashedToSomethingOtherThanTheWanderingTrader()
    • finalizeSpawn

      @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_30942_, DifficultyInstance p_30943_, MobSpawnType p_30944_, @Nullable SpawnGroupData p_30945_, @Nullable CompoundTag p_30946_)
      Description copied from class: Mob
      Forge: Override-Only, call via ForgeEventFactory.onFinalizeSpawn.
      Overrides are allowed. Do not wrap super calls within override (as that will cause stack overflows).
      Vanilla calls are replaced with a transformer, and are not visible in source.

      Be certain to either call super.finalizeSpawn or set the Mob.spawnType field from within your override.

      Overrides:
      finalizeSpawn in class Llama