Class ShowTradesToPlayer
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Villager>
net.minecraft.world.entity.ai.behavior.ShowTradesToPlayer
- All Implemented Interfaces:
BehaviorControl<Villager>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate intprivate static final intprivate ItemStackprivate static final intFields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanStillUse(ServerLevel p_24109_, Villager p_24110_, long p_24111_) booleancheckExtraStartConditions(ServerLevel p_24106_, Villager p_24107_) private static voidclearHeldItem(Villager p_182374_) private static voiddisplayAsHeldItem(Villager p_182371_, ItemStack p_182372_) private voiddisplayCyclingItems(Villager p_24148_) private voiddisplayFirstItem(Villager p_24116_) private voidfindItemsToDisplay(LivingEntity p_24113_, Villager p_24114_) private LivingEntitylookAtTarget(Villager p_24138_) private booleanvoidstart(ServerLevel p_24124_, Villager p_24125_, long p_24126_) voidstop(ServerLevel p_24144_, Villager p_24145_, long p_24146_) voidtick(ServerLevel p_24134_, Villager p_24135_, long p_24136_) private voidupdateDisplayItems(Villager p_24128_) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
MAX_LOOK_TIME
private static final int MAX_LOOK_TIME- See Also:
-
STARTING_LOOK_TIME
private static final int STARTING_LOOK_TIME- See Also:
-
playerItemStack
-
displayItems
-
cycleCounter
private int cycleCounter -
displayIndex
private int displayIndex -
lookTime
private int lookTime
-
-
Constructor Details
-
ShowTradesToPlayer
public ShowTradesToPlayer(int p_24096_, int p_24097_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<Villager>
-
canStillUse
- Overrides:
canStillUsein classBehavior<Villager>
-
start
-
tick
-
stop
-
findItemsToDisplay
-
displayFirstItem
-
updateDisplayItems
-
playerItemStackMatchesCostOfOffer
-
clearHeldItem
-
displayAsHeldItem
-
lookAtTarget
-
displayCyclingItems
-