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 pLevel, Villager pEntity, long pGameTime) booleancheckExtraStartConditions(ServerLevel pLevel, Villager pOwner) private static voidclearHeldItem(Villager pVillager) private static voiddisplayAsHeldItem(Villager pVillager, ItemStack pItem) private voiddisplayCyclingItems(Villager pVillager) private voiddisplayFirstItem(Villager pVillager) private voidfindItemsToDisplay(LivingEntity pEntity, Villager pVillager) private LivingEntitylookAtTarget(Villager pVillager) private booleanvoidstart(ServerLevel pLevel, Villager pEntity, long pGameTime) voidstop(ServerLevel pLevel, Villager pEntity, long pGameTime) voidtick(ServerLevel pLevel, Villager pOwner, long pGameTime) private voidupdateDisplayItems(Villager pVillager) 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 pMinDuration, int pMaxDuration)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<Villager>
-
canStillUse
- Overrides:
canStillUsein classBehavior<Villager>
-
start
-
tick
-
stop
-
findItemsToDisplay
-
displayFirstItem
-
updateDisplayItems
-
playerItemStackMatchesCostOfOffer
-
clearHeldItem
-
displayAsHeldItem
-
lookAtTarget
-
displayCyclingItems
-