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
Modifier and TypeFieldDescriptionprivate int
private int
private int
private static final int
private ItemStack
private static final int
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canStillUse
(ServerLevel p_24109_, Villager p_24110_, long p_24111_) boolean
checkExtraStartConditions
(ServerLevel p_24106_, Villager p_24107_) private static void
clearHeldItem
(Villager p_182374_) private static void
displayAsHeldItem
(Villager p_182371_, ItemStack p_182372_) private void
displayCyclingItems
(Villager p_24148_) private void
displayFirstItem
(Villager p_24116_) private void
findItemsToDisplay
(LivingEntity p_24113_, Villager p_24114_) private LivingEntity
lookAtTarget
(Villager p_24138_) private boolean
void
start
(ServerLevel p_24124_, Villager p_24125_, long p_24126_) void
stop
(ServerLevel p_24144_, Villager p_24145_, long p_24146_) void
tick
(ServerLevel p_24134_, Villager p_24135_, long p_24136_) private void
updateDisplayItems
(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:
checkExtraStartConditions
in classBehavior<Villager>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Villager>
-
start
-
tick
-
stop
-
findItemsToDisplay
-
displayFirstItem
-
updateDisplayItems
-
playerItemStackMatchesCostOfOffer
-
clearHeldItem
-
displayAsHeldItem
-
lookAtTarget
-
displayCyclingItems
-