Class MinionShelvingDespawnGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
johnsmith.enchantingoverhauled.entity.ai.goal.MinionShelvingDespawnGoal

public class MinionShelvingDespawnGoal extends net.minecraft.world.entity.ai.goal.Goal
AI Goal that directs summoned EnchantedBookEntity minions to return to a nearby bookshelf and despawn once combat has de-escalated.

Optimized to scan only loaded chunks using LevelChunkSection.maybeHas(Predicate) palette filtering and to bound 3D A* pathfinding to at most the 3 closest candidate shelves.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.goal.Goal

    net.minecraft.world.entity.ai.goal.Goal.Flag
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MinionShelvingDespawnGoal(EnchantedBookEntity book, double speedModifier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
     
    void
     
    void
     

    Methods inherited from class net.minecraft.world.entity.ai.goal.Goal

    adjustedTickDelay, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEESCALATION_DURATION_TICKS

      public static final int DEESCALATION_DURATION_TICKS
      See Also:
  • Constructor Details

    • MinionShelvingDespawnGoal

      public MinionShelvingDespawnGoal(EnchantedBookEntity book, double speedModifier)
  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class net.minecraft.world.entity.ai.goal.Goal
    • canContinueToUse

      public boolean canContinueToUse()
      Overrides:
      canContinueToUse in class net.minecraft.world.entity.ai.goal.Goal
    • start

      public void start()
      Overrides:
      start in class net.minecraft.world.entity.ai.goal.Goal
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.ai.goal.Goal
    • stop

      public void stop()
      Overrides:
      stop in class net.minecraft.world.entity.ai.goal.Goal