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 SummaryNested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.BehaviorBehavior.Status
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate intprivate intprivate intprivate static final intprivate ItemStackprivate static final intFields inherited from class net.minecraft.world.entity.ai.behavior.BehaviorDEFAULT_DURATION, entryCondition
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.BehaviordebugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
- 
Field Details- 
MAX_LOOK_TIMEprivate static final int MAX_LOOK_TIME- See Also:
 
- 
STARTING_LOOK_TIMEprivate static final int STARTING_LOOK_TIME- See Also:
 
- 
playerItemStack
- 
displayItems
- 
cycleCounterprivate int cycleCounter
- 
displayIndexprivate int displayIndex
- 
lookTimeprivate int lookTime
 
- 
- 
Constructor Details- 
ShowTradesToPlayerpublic ShowTradesToPlayer(int p_24096_, int p_24097_) 
 
- 
- 
Method Details- 
checkExtraStartConditions- Overrides:
- checkExtraStartConditionsin class- Behavior<Villager>
 
- 
canStillUse- Overrides:
- canStillUsein class- Behavior<Villager>
 
- 
start
- 
tick
- 
stop
- 
findItemsToDisplay
- 
displayFirstItem
- 
updateDisplayItems
- 
playerItemStackMatchesCostOfOffer
- 
clearHeldItem
- 
displayAsHeldItem
- 
lookAtTarget
- 
displayCyclingItems
 
-