Class SpawnNPCInteractionFailureTracker

java.lang.Object
com.hypixel.hytale.server.npc.interactions.SpawnNPCInteractionFailureTracker
All Implemented Interfaces:
Resource<EntityStore>, Cloneable

public class SpawnNPCInteractionFailureTracker extends Object implements Resource<EntityStore>
Remembers SpawnNPCInteraction spawn failures per target block so repeated failures do not flood logs. Entries are cleared when the block is broken (BreakBlockEvent).
  • Constructor Details

    • SpawnNPCInteractionFailureTracker

      public SpawnNPCInteractionFailureTracker()
  • Method Details

    • getResourceType

      public static ResourceType<EntityStore, SpawnNPCInteractionFailureTracker> getResourceType()
    • recordFailure

      public boolean recordFailure(@Nonnull org.joml.Vector3ic block)
      Parameters:
      block - the interacted block position
      Returns:
      true if this is the first recorded failure at block (caller should log)
    • clearFailureForBlock

      public void clearFailureForBlock(@Nonnull org.joml.Vector3ic block)
    • clone

      @Nonnull public Resource<EntityStore> clone()
      Specified by:
      clone in interface Resource<EntityStore>
      Returns:
      a clone instance of the original resource instance.