Class PatrolEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Monster, Targeter, ScoreHolder, CommandOutput, Nameable, EntityLike
Direct Known Subclasses:
RaiderEntity

public abstract class PatrolEntity extends HostileEntity
Mappings:
Namespace Name
named net/minecraft/entity/mob/PatrolEntity
intermediary net/minecraft/class_3732
official ckc
  • Field Details

    • patrolTarget

      @Nullable private @Nullable BlockPos patrolTarget
      Mappings:
      Namespace Name Mixin selector
      named patrolTarget Lnet/minecraft/entity/mob/PatrolEntity;patrolTarget:Lnet/minecraft/util/math/BlockPos;
      intermediary field_16478 Lnet/minecraft/class_3732;field_16478:Lnet/minecraft/class_2338;
      official b Lckc;b:Ljd;
    • patrolLeader

      private boolean patrolLeader
      Mappings:
      Namespace Name Mixin selector
      named patrolLeader Lnet/minecraft/entity/mob/PatrolEntity;patrolLeader:Z
      intermediary field_16479 Lnet/minecraft/class_3732;field_16479:Z
      official c Lckc;c:Z
    • patrolling

      private boolean patrolling
      Mappings:
      Namespace Name Mixin selector
      named patrolling Lnet/minecraft/entity/mob/PatrolEntity;patrolling:Z
      intermediary field_16477 Lnet/minecraft/class_3732;field_16477:Z
      official d Lckc;d:Z
  • Constructor Details

    • PatrolEntity

      protected PatrolEntity(EntityType<? extends PatrolEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      official <init> Lbsq;<init>(Lbsw;Ldcu;)V
  • Method Details

    • initGoals

      protected void initGoals()
      Overrides:
      initGoals in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named initGoals Lnet/minecraft/entity/mob/MobEntity;initGoals()V
      intermediary method_5959 Lnet/minecraft/class_1308;method_5959()V
      official z Lbtn;z()V
    • writeCustomDataToNbt

      public void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      Overrides:
      writeCustomDataToNbt in class MobEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      official b Lbsq;b(Lua;)V
    • readCustomDataFromNbt

      public void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      nbt might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.

      Overrides:
      readCustomDataFromNbt in class MobEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      official a Lbsq;a(Lua;)V
    • canLead

      public boolean canLead()
      Mappings:
      Namespace Name Mixin selector
      named canLead Lnet/minecraft/entity/mob/PatrolEntity;canLead()Z
      intermediary method_16485 Lnet/minecraft/class_3732;method_16485()Z
      official gn Lckc;gn()Z
    • initialize

      @Nullable public @Nullable EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable @Nullable EntityData entityData)
      Overrides:
      initialize in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named initialize Lnet/minecraft/entity/mob/MobEntity;initialize(Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/world/LocalDifficulty;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/entity/EntityData;)Lnet/minecraft/entity/EntityData;
      intermediary method_5943 Lnet/minecraft/class_1308;method_5943(Lnet/minecraft/class_5425;Lnet/minecraft/class_1266;Lnet/minecraft/class_3730;Lnet/minecraft/class_1315;)Lnet/minecraft/class_1315;
      official a Lbtn;a(Lddj;Lbqo;Lbtp;Lbuf;)Lbuf;
    • canSpawn

      public static boolean canSpawn(EntityType<? extends PatrolEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      named canSpawn Lnet/minecraft/entity/mob/PatrolEntity;canSpawn(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Z
      intermediary method_20739 Lnet/minecraft/class_3732;method_20739(Lnet/minecraft/class_1299;Lnet/minecraft/class_1936;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      official b Lckc;b(Lbsw;Ldcv;Lbtp;Ljd;Layv;)Z
    • canImmediatelyDespawn

      public boolean canImmediatelyDespawn(double distanceSquared)
      Overrides:
      canImmediatelyDespawn in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named canImmediatelyDespawn Lnet/minecraft/entity/mob/MobEntity;canImmediatelyDespawn(D)Z
      intermediary method_5974 Lnet/minecraft/class_1308;method_5974(D)Z
      official h Lbtn;h(D)Z
    • setPatrolTarget

      public void setPatrolTarget(BlockPos targetPos)
      Mappings:
      Namespace Name Mixin selector
      named setPatrolTarget Lnet/minecraft/entity/mob/PatrolEntity;setPatrolTarget(Lnet/minecraft/util/math/BlockPos;)V
      intermediary method_16216 Lnet/minecraft/class_3732;method_16216(Lnet/minecraft/class_2338;)V
      official g Lckc;g(Ljd;)V
    • getPatrolTarget

      public BlockPos getPatrolTarget()
      Returns the position this patrol entity is walking to.
      Mappings:
      Namespace Name Mixin selector
      named getPatrolTarget Lnet/minecraft/entity/mob/PatrolEntity;getPatrolTarget()Lnet/minecraft/util/math/BlockPos;
      intermediary method_16215 Lnet/minecraft/class_3732;method_16215()Lnet/minecraft/class_2338;
      official go Lckc;go()Ljd;
    • hasPatrolTarget

      public boolean hasPatrolTarget()
      Mappings:
      Namespace Name Mixin selector
      named hasPatrolTarget Lnet/minecraft/entity/mob/PatrolEntity;hasPatrolTarget()Z
      intermediary method_16220 Lnet/minecraft/class_3732;method_16220()Z
      official gp Lckc;gp()Z
    • setPatrolLeader

      public void setPatrolLeader(boolean patrolLeader)
      Mappings:
      Namespace Name Mixin selector
      named setPatrolLeader Lnet/minecraft/entity/mob/PatrolEntity;setPatrolLeader(Z)V
      intermediary method_16217 Lnet/minecraft/class_3732;method_16217(Z)V
      official w Lckc;w(Z)V
    • isPatrolLeader

      public boolean isPatrolLeader()
      Mappings:
      Namespace Name Mixin selector
      named isPatrolLeader Lnet/minecraft/entity/mob/PatrolEntity;isPatrolLeader()Z
      intermediary method_16219 Lnet/minecraft/class_3732;method_16219()Z
      official gq Lckc;gq()Z
    • hasNoRaid

      public boolean hasNoRaid()
      Mappings:
      Namespace Name Mixin selector
      named hasNoRaid Lnet/minecraft/entity/mob/PatrolEntity;hasNoRaid()Z
      intermediary method_16472 Lnet/minecraft/class_3732;method_16472()Z
      official gt Lckc;gt()Z
    • setRandomPatrolTarget

      public void setRandomPatrolTarget()
      Mappings:
      Namespace Name Mixin selector
      named setRandomPatrolTarget Lnet/minecraft/entity/mob/PatrolEntity;setRandomPatrolTarget()V
      intermediary method_16218 Lnet/minecraft/class_3732;method_16218()V
      official gu Lckc;gu()V
    • isRaidCenterSet

      protected boolean isRaidCenterSet()
      Mappings:
      Namespace Name Mixin selector
      named isRaidCenterSet Lnet/minecraft/entity/mob/PatrolEntity;isRaidCenterSet()Z
      intermediary method_16915 Lnet/minecraft/class_3732;method_16915()Z
      official gv Lckc;gv()Z
    • setPatrolling

      protected void setPatrolling(boolean patrolling)
      Mappings:
      Namespace Name Mixin selector
      named setPatrolling Lnet/minecraft/entity/mob/PatrolEntity;setPatrolling(Z)V
      intermediary method_22332 Lnet/minecraft/class_3732;method_22332(Z)V
      official x Lckc;x(Z)V