Package alexiil.mc.lib.net
Class ParentNetId
java.lang.Object
alexiil.mc.lib.net.TreeNetIdBase
alexiil.mc.lib.net.ParentNetIdBase
alexiil.mc.lib.net.ParentNetId
A
parent node
that doesn't write any header information for it's children: the static
context (given by the IMsgReadCtx
or IMsgWriteCtx
) should be enough.-
Field Summary
Fields inherited from class alexiil.mc.lib.net.TreeNetIdBase
DYNAMIC_LENGTH, fullName, length, name, parent, totalLength
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a newParentNetId
with this as it's child.Returns a newNetIdData
(with this as it's parent) that can write an arbitrary length of data.Returns a newNetIdData
(with this as it's parent) that must write exactly the given "length" bytes of data.Returns a newNetIdSignal
(with this as it's parent) that won't write any data out: instead the mere presence of this packet should convey all of the information required.Methods inherited from class alexiil.mc.lib.net.TreeNetIdBase
equals, getPrintableName, getRealClassName, hasFixedLength, hashCode, toString
-
Constructor Details
-
ParentNetId
- Parameters:
parent
- The parent. If this is null then this is a root node, and therefore is managed separately. (In all other cases you probably want to callchild(String)
instead of using this).
-
-
Method Details
-
idData
Returns a newNetIdData
(with this as it's parent) that can write an arbitrary length of data. -
idData
Returns a newNetIdData
(with this as it's parent) that must write exactly the given "length" bytes of data.- Parameters:
dataLength
- The exact number of bytes that must be written out. (This is so that the exact length isn't written out each time as it's known in advance). There's generally no reason to use this unless this is for a very small (and frequently sent) packet, as otherwise the space gained will be negligible.
-
idSignal
Returns a newNetIdSignal
(with this as it's parent) that won't write any data out: instead the mere presence of this packet should convey all of the information required. -
child
Returns a newParentNetId
with this as it's child. This is mostly useful for organising different packets or mods from the root node.
-