RenderableComponent holds an original BaseComponent and a map of UUID -> BaseComponent rendered for each viewer. It also implements IChatBaseComponent, so it can be smuggled through without adding any fields to packets. The packets that use it implement Renderable, which PlayerConnection calls to render the text for each viewer, on the main thread, just before sending the packet. The player's UUID is stored in PacketDataSerializer, and used to lookup the rendered text on the I/O thread.
Implements https://github.com/OvercastNetwork/minecraft-api/pull/6
RenderableComponent
holds an originalBaseComponent
and a map ofUUID
->BaseComponent
rendered for each viewer. It also implementsIChatBaseComponent
, so it can be smuggled through without adding any fields to packets. The packets that use it implementRenderable
, whichPlayerConnection
calls to render the text for each viewer, on the main thread, just before sending the packet. The player's UUID is stored inPacketDataSerializer
, and used to lookup the rendered text on the I/O thread.