API reference / @jsprismarine/client / ChatBehavior
Class: ChatBehavior
Defined in: client/src/bot/behavior/ChatBehavior.ts:29
Says something occasionally.
Chat is the cheapest packet a client can send and the most expensive thing a server can do with one: it fans out to every player, which makes this the behavior that finds broadcast costs. Two hundred bots chatting once each is forty thousand deliveries.
The interval is randomized per message rather than fixed, so a fleet does not synchronize into a drumbeat that measures burst handling instead of throughput.
Implements
Constructors
Constructor
new ChatBehavior():
ChatBehavior
Returns
ChatBehavior
Properties
name
readonlyname:"chat"='chat'
Defined in: client/src/bot/behavior/ChatBehavior.ts:30
Implementation of
Methods
tick()
tick(
context):Promise<void>
Defined in: client/src/bot/behavior/ChatBehavior.ts:34
Called on every tick of the bot that owns it.
Parameters
context
Returns
Promise<void>