The class of Minecraft clients that associate incoming packets to updates of state of the connected world. The name "Sighted" is from an analogy between the animals receiving light rays to their eyes and Minecraft clients receiving client-bound packets - they both shape the assumptions (view) about the external environment using those incoming data.
These clients make a distinction between hidden "internal" packets and "visible" packets within ClientBoundPackets. Internal packets are packets that are abstracted away by abstraction, and cannot be observed by users of this class; they contribute to the automatic update of the clients' view of the world. Visible packets are those that are not filtered by the abstraction.
- Value Params
- abstraction
the object abstracting packets from writeTransport.
- identity
the identity of this client
- viewRef
reference to a WorldView that this client keeps updating
- writeTransport
INTERNAL, the transport that this client uses. Users should use nextPacketOrViewUpdate or writePacket wherever possible.
- Companion
- object
Type members
Classlikes
Result of an iteration of read-loop, provided by the beginReadLoop resource.
Result of an iteration of read-loop, provided by the beginReadLoop resource.
Value members
Concrete methods
A resource that manages the concurrent execution of readLoopUntilDefined that is executed endlessly until the resource gets out of scope.
A resource that manages the concurrent execution of readLoopUntilDefined that is executed endlessly until the resource gets out of scope.
An action that repeatedly runs f
using a result of reading a packet until we get a
defined value of A.
An action that repeatedly runs f
using a result of reading a packet until we get a
defined value of A.
In testing context, this method can be used in "expecting" a certain sequence of world states, for example,
- by checking the world time every time a result comes in (Minecraft protocol guarantees that some packet arrives after some time), or
- by throwing (using
MonadThrow[F].raiseError
) when certain condition is met