Class TradeWithVillager
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Villager>
net.minecraft.world.entity.ai.behavior.TradeWithVillager
- All Implemented Interfaces:
BehaviorControl<Villager>
-
Nested Class Summary
Nested classes/interfaces inherited from class Behavior
Behavior.Status -
Field Summary
FieldsFields inherited from class Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel level, Villager body, long timestamp) protected booleancheckExtraStartConditions(ServerLevel level, Villager body) figureOutWhatIAmWillingToTrade(Villager myBody, Villager target) protected voidstart(ServerLevel level, Villager myBody, long timestamp) protected voidstop(ServerLevel level, Villager body, long timestamp) private static voidthrowHalfStack(Villager villager, Set<Item> items, LivingEntity target) protected voidtick(ServerLevel level, Villager body, long timestamp) Methods inherited from class Behavior
debugString, doStop, getRequiredMemories, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
trades
-
-
Constructor Details
-
TradeWithVillager
public TradeWithVillager()
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<Villager>
-
canStillUse
- Overrides:
canStillUsein classBehavior<Villager>
-
start
-
tick
-
stop
-
figureOutWhatIAmWillingToTrade
-
throwHalfStack
-