Class GiveGiftsToHeroTask

java.lang.Object
net.minecraft.entity.ai.brain.task.MultiTickTask<VillagerEntity>
net.minecraft.entity.ai.brain.task.GiveGiftsToHeroTask
All Implemented Interfaces:
Task<VillagerEntity>

public class GiveGiftsToHeroTask extends MultiTickTask<VillagerEntity>
Mappings:
Namespace Name
official bie
intermediary net/minecraft/class_4243
named net/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask
  • Field Details

    • MAX_DISTANCE

      private static final int MAX_DISTANCE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Lbie;c:I
      intermediary field_30117 Lnet/minecraft/class_4243;field_30117:I
      named MAX_DISTANCE Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;MAX_DISTANCE:I
    • DEFAULT_DURATION

      private static final int DEFAULT_DURATION
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Lbie;d:I
      intermediary field_30118 Lnet/minecraft/class_4243;field_30118:I
      named DEFAULT_DURATION Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;DEFAULT_DURATION:I
    • MAX_NEXT_GIFT_DELAY

      private static final int MAX_NEXT_GIFT_DELAY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Lbie;e:I
      intermediary field_30119 Lnet/minecraft/class_4243;field_30119:I
      named MAX_NEXT_GIFT_DELAY Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;MAX_NEXT_GIFT_DELAY:I
    • RUN_TIME

      private static final int RUN_TIME
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official f Lbie;f:I
      intermediary field_30120 Lnet/minecraft/class_4243;field_30120:I
      named RUN_TIME Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;RUN_TIME:I
    • GIFTS

      private static final Map<VillagerProfession,Identifier> GIFTS
      Mappings:
      Namespace Name Mixin selector
      official g Lbie;g:Ljava/util/Map;
      intermediary field_18984 Lnet/minecraft/class_4243;field_18984:Ljava/util/Map;
      named GIFTS Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;GIFTS:Ljava/util/Map;
    • WALK_SPEED

      private static final float WALK_SPEED
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official h Lbie;h:F
      intermediary field_30121 Lnet/minecraft/class_4243;field_30121:F
      named WALK_SPEED Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;WALK_SPEED:F
    • ticksLeft

      private int ticksLeft
      Mappings:
      Namespace Name Mixin selector
      official i Lbie;i:I
      intermediary field_18985 Lnet/minecraft/class_4243;field_18985:I
      named ticksLeft Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;ticksLeft:I
    • done

      private boolean done
      Mappings:
      Namespace Name Mixin selector
      official j Lbie;j:Z
      intermediary field_18986 Lnet/minecraft/class_4243;field_18986:Z
      named done Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;done:Z
    • startTime

      private long startTime
      Mappings:
      Namespace Name Mixin selector
      official k Lbie;k:J
      intermediary field_18987 Lnet/minecraft/class_4243;field_18987:J
      named startTime Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;startTime:J
  • Constructor Details

    • GiveGiftsToHeroTask

      public GiveGiftsToHeroTask(int delay)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbie;<init>(I)V
      intermediary <init> Lnet/minecraft/class_4243;<init>(I)V
      named <init> Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;<init>(I)V
  • Method Details

    • shouldRun

      protected boolean shouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity)
      Overrides:
      shouldRun in class MultiTickTask<VillagerEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lbie;a(Laif;Lbxz;)Z
      intermediary method_19962 Lnet/minecraft/class_4243;method_19962(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;)Z
      named shouldRun Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;)Z
    • run

      protected void run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
      Overrides:
      run in class MultiTickTask<VillagerEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lbie;a(Laif;Lbxz;J)V
      intermediary method_19963 Lnet/minecraft/class_4243;method_19963(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V
      named run Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
    • shouldKeepRunning

      protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
      Overrides:
      shouldKeepRunning in class MultiTickTask<VillagerEntity>
      Mappings:
      Namespace Name Mixin selector
      official b Lbie;b(Laif;Lbxz;J)Z
      intermediary method_19965 Lnet/minecraft/class_4243;method_19965(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Z
      named shouldKeepRunning Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;shouldKeepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Z
    • keepRunning

      protected void keepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
      Overrides:
      keepRunning in class MultiTickTask<VillagerEntity>
      Mappings:
      Namespace Name Mixin selector
      official c Lbie;c(Laif;Lbxz;J)V
      intermediary method_19967 Lnet/minecraft/class_4243;method_19967(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V
      named keepRunning Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;keepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
    • finishRunning

      protected void finishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
      Overrides:
      finishRunning in class MultiTickTask<VillagerEntity>
      Mappings:
      Namespace Name Mixin selector
      official d Lbie;d(Laif;Lbxz;J)V
      intermediary method_19968 Lnet/minecraft/class_4243;method_19968(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)V
      named finishRunning Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;finishRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
    • giveGifts

      private void giveGifts(VillagerEntity villager, LivingEntity recipient)
      Mappings:
      Namespace Name Mixin selector
      official a Lbie;a(Lbxz;Lbfx;)V
      intermediary method_19957 Lnet/minecraft/class_4243;method_19957(Lnet/minecraft/class_1646;Lnet/minecraft/class_1309;)V
      named giveGifts Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;giveGifts(Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/LivingEntity;)V
    • getGifts

      private List<ItemStack> getGifts(VillagerEntity villager)
      Mappings:
      Namespace Name Mixin selector
      official a Lbie;a(Lbxz;)Ljava/util/List;
      intermediary method_19956 Lnet/minecraft/class_4243;method_19956(Lnet/minecraft/class_1646;)Ljava/util/List;
      named getGifts Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getGifts(Lnet/minecraft/entity/passive/VillagerEntity;)Ljava/util/List;
    • isNearestPlayerHero

      private boolean isNearestPlayerHero(VillagerEntity villager)
      Mappings:
      Namespace Name Mixin selector
      official b Lbie;b(Lbxz;)Z
      intermediary method_19964 Lnet/minecraft/class_4243;method_19964(Lnet/minecraft/class_1646;)Z
      named isNearestPlayerHero Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isNearestPlayerHero(Lnet/minecraft/entity/passive/VillagerEntity;)Z
    • getNearestPlayerIfHero

      private Optional<PlayerEntity> getNearestPlayerIfHero(VillagerEntity villager)
      Mappings:
      Namespace Name Mixin selector
      official c Lbie;c(Lbxz;)Ljava/util/Optional;
      intermediary method_19966 Lnet/minecraft/class_4243;method_19966(Lnet/minecraft/class_1646;)Ljava/util/Optional;
      named getNearestPlayerIfHero Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNearestPlayerIfHero(Lnet/minecraft/entity/passive/VillagerEntity;)Ljava/util/Optional;
    • isHero

      private boolean isHero(PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official a Lbie;a(Lbym;)Z
      intermediary method_19959 Lnet/minecraft/class_4243;method_19959(Lnet/minecraft/class_1657;)Z
      named isHero Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isHero(Lnet/minecraft/entity/player/PlayerEntity;)Z
    • isCloseEnough

      private boolean isCloseEnough(VillagerEntity villager, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official a Lbie;a(Lbxz;Lbym;)Z
      intermediary method_19958 Lnet/minecraft/class_4243;method_19958(Lnet/minecraft/class_1646;Lnet/minecraft/class_1657;)Z
      named isCloseEnough Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;isCloseEnough(Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/player/PlayerEntity;)Z
    • getNextGiftDelay

      private static int getNextGiftDelay(ServerWorld world)
      Mappings:
      Namespace Name Mixin selector
      official a Lbie;a(Laif;)I
      intermediary method_19961 Lnet/minecraft/class_4243;method_19961(Lnet/minecraft/class_3218;)I
      named getNextGiftDelay Lnet/minecraft/entity/ai/brain/task/GiveGiftsToHeroTask;getNextGiftDelay(Lnet/minecraft/server/world/ServerWorld;)I