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 SummaryNested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.BehaviorBehavior.Status
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intprivate static final floatFields inherited from class net.minecraft.world.entity.ai.behavior.BehaviorDEFAULT_DURATION, entryCondition
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel p_24419_, Villager p_24420_, long p_24421_) protected booleancheckExtraStartConditions(ServerLevel p_24416_, Villager p_24417_) figureOutWhatIAmWillingToTrade(Villager p_24423_, Villager p_24424_) protected voidstart(ServerLevel p_24437_, Villager p_24438_, long p_24439_) protected voidstop(ServerLevel p_24453_, Villager p_24454_, long p_24455_) private static voidthrowHalfStack(Villager p_24426_, Set<Item> p_24427_, LivingEntity p_24428_) protected voidtick(ServerLevel p_24445_, Villager p_24446_, long p_24447_) Methods inherited from class net.minecraft.world.entity.ai.behavior.BehaviordebugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
- 
Field Details- 
INTERACT_DIST_SQRprivate static final int INTERACT_DIST_SQR- See Also:
 
- 
SPEED_MODIFIERprivate static final float SPEED_MODIFIER- See Also:
 
- 
trades
 
- 
- 
Constructor Details- 
TradeWithVillagerpublic TradeWithVillager()
 
- 
- 
Method Details- 
checkExtraStartConditions- Overrides:
- checkExtraStartConditionsin class- Behavior<Villager>
 
- 
canStillUse- Overrides:
- canStillUsein class- Behavior<Villager>
 
- 
start
- 
tick
- 
stop
- 
figureOutWhatIAmWillingToTrade
- 
throwHalfStack
 
-