Class AngerManagement

java.lang.Object
net.minecraft.world.entity.monster.warden.AngerManagement

public class AngerManagement extends Object
  • Field Details

    • CONVERSION_DELAY

      protected static final int CONVERSION_DELAY
      See Also:
    • MAX_ANGER

      protected static final int MAX_ANGER
      See Also:
    • DEFAULT_ANGER_DECREASE

      private static final int DEFAULT_ANGER_DECREASE
      See Also:
    • conversionDelay

      private int conversionDelay
    • highestAnger

      int highestAnger
    • SUSPECT_ANGER_PAIR

      private static final com.mojang.serialization.Codec<com.mojang.datafixers.util.Pair<UUID,Integer>> SUSPECT_ANGER_PAIR
    • filter

      private final Predicate<Entity> filter
    • suspects

      protected final ArrayList<Entity> suspects
    • suspectSorter

      private final AngerManagement.Sorter suspectSorter
    • angerBySuspect

      protected final it.unimi.dsi.fastutil.objects.Object2IntMap<Entity> angerBySuspect
    • angerByUuid

      protected final it.unimi.dsi.fastutil.objects.Object2IntMap<UUID> angerByUuid
  • Constructor Details

  • Method Details

    • codec

      public static com.mojang.serialization.Codec<AngerManagement> codec(Predicate<Entity> p_219278_)
    • createUuidAngerPairs

      private List<com.mojang.datafixers.util.Pair<UUID,Integer>> createUuidAngerPairs()
    • tick

      public void tick(ServerLevel p_219264_, Predicate<Entity> p_219265_)
    • sortAndUpdateHighestAnger

      private void sortAndUpdateHighestAnger()
    • convertFromUuids

      private void convertFromUuids(ServerLevel p_219262_)
    • increaseAnger

      public int increaseAnger(Entity p_219269_, int p_219270_)
    • clearAnger

      public void clearAnger(Entity p_219267_)
    • getTopSuspect

      @Nullable private Entity getTopSuspect()
    • getActiveAnger

      public int getActiveAnger(@Nullable Entity p_219287_)
    • getActiveEntity

      public Optional<LivingEntity> getActiveEntity()