Class MobMock

All Implemented Interfaces:
MessageTarget, Frictional, net.kyori.adventure.audience.Audience, net.kyori.adventure.pointer.Pointered, net.kyori.adventure.sound.Sound.Emitter, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, Attributable, CommandSender, Damageable, Entity, LivingEntity, Mob, Lootable, Metadatable, Nameable, Permissible, ServerOperator, PersistentDataHolder, ProjectileSource
Direct Known Subclasses:
AmbientMock, CreatureMock, FlyingMock, SimpleMobMock, SlimeMock

public abstract class MobMock extends LivingEntityMock implements Mob
Mock implementation of a Mob.
See Also:
  • Constructor Details

    • MobMock

      protected MobMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid)
      Constructs a new MobMock on the provided ServerMock with a specified UUID.
      Parameters:
      server - The server to create the entity on.
      uuid - The UUID of the entity.
  • Method Details

    • getPathfinder

      @NotNull public @NotNull Pathfinder getPathfinder()
      Specified by:
      getPathfinder in interface Mob
    • isInDaylight

      public boolean isInDaylight()
      Specified by:
      isInDaylight in interface Mob
    • lookAt

      public void lookAt(@NotNull @NotNull Location location)
      Specified by:
      lookAt in interface Mob
    • lookAt

      public void lookAt(@NotNull @NotNull Location location, float headRotationSpeed, float maxHeadPitch)
      Specified by:
      lookAt in interface Mob
    • lookAt

      public void lookAt(@NotNull @NotNull Entity entity)
      Specified by:
      lookAt in interface Mob
    • lookAt

      public void lookAt(@NotNull @NotNull Entity entity, float headRotationSpeed, float maxHeadPitch)
      Specified by:
      lookAt in interface Mob
    • lookAt

      public void lookAt(double x, double y, double z)
      Specified by:
      lookAt in interface Mob
    • lookAt

      public void lookAt(double x, double y, double z, float headRotationSpeed, float maxHeadPitch)
      Specified by:
      lookAt in interface Mob
    • getHeadRotationSpeed

      public int getHeadRotationSpeed()
      Specified by:
      getHeadRotationSpeed in interface Mob
    • getMaxHeadPitch

      public int getMaxHeadPitch()
      Specified by:
      getMaxHeadPitch in interface Mob
    • setTarget

      public void setTarget(@Nullable @Nullable LivingEntity target)
      Specified by:
      setTarget in interface Mob
    • getTarget

      @Nullable public @Nullable LivingEntity getTarget()
      Specified by:
      getTarget in interface Mob
    • setAware

      public void setAware(boolean aware)
      Specified by:
      setAware in interface Mob
    • isAware

      public boolean isAware()
      Specified by:
      isAware in interface Mob
    • getAmbientSound

      @Nullable public @Nullable Sound getAmbientSound()
      Specified by:
      getAmbientSound in interface Mob
    • isLeftHanded

      public boolean isLeftHanded()
      Specified by:
      isLeftHanded in interface Mob
    • setLeftHanded

      public void setLeftHanded(boolean leftHanded)
      Specified by:
      setLeftHanded in interface Mob
    • setLootTable

      public void setLootTable(@Nullable @Nullable LootTable table)
      Specified by:
      setLootTable in interface Lootable
    • getLootTable

      @Nullable public @Nullable LootTable getLootTable()
      Specified by:
      getLootTable in interface Lootable
    • setSeed

      public void setSeed(long seed)
      Specified by:
      setSeed in interface Lootable
    • getSeed

      public long getSeed()
      Specified by:
      getSeed in interface Lootable
    • finalizeSpawn

      public void finalizeSpawn()
      Called immediately after the entity is spawned.
    • getPossibleExperienceReward

      public int getPossibleExperienceReward()
      Specified by:
      getPossibleExperienceReward in interface Mob