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 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canStillUse
(ServerLevel pLevel, Villager pEntity, long pGameTime) boolean
checkExtraStartConditions
(ServerLevel pLevel, Villager pOwner) private static void
clearHeldItem
(Villager pVillager) private static void
displayAsHeldItem
(Villager pVillager, ItemStack pItem) private void
displayCyclingItems
(Villager pVillager) private void
displayFirstItem
(Villager pVillager) private void
findItemsToDisplay
(LivingEntity pEntity, Villager pVillager) private LivingEntity
lookAtTarget
(Villager pVillager) private boolean
void
start
(ServerLevel pLevel, Villager pEntity, long pGameTime) void
stop
(ServerLevel pLevel, Villager pEntity, long pGameTime) void
tick
(ServerLevel pLevel, Villager pOwner, long pGameTime) private void
updateDisplayItems
(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:
checkExtraStartConditions
in classBehavior<Villager>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Villager>
-
start
-
tick
-
stop
-
findItemsToDisplay
-
displayFirstItem
-
updateDisplayItems
-
playerItemStackMatchesCostOfOffer
-
clearHeldItem
-
displayAsHeldItem
-
lookAtTarget
-
displayCyclingItems
-