Package alexiil.mc.lib.net
Class TreeNetIdBase
java.lang.Object
alexiil.mc.lib.net.TreeNetIdBase
- Direct Known Subclasses:
NetIdBase
,ParentNetIdBase
The base class for all networking ID's. Most of the time you should use one of the subclasses: either the parent
node
ParentNetIdBase
, or the leaf node NetIdBase
.-
Field Summary
Modifier and TypeFieldDescriptionstatic int
Used for logging and display purposes only.int
The length of this ID alone.The name - must be unique to the parent that uses it, so for top level mod packets this MUST include the modid.int
Full length including all parents. -
Constructor Summary
-
Method Summary
-
Field Details
-
DYNAMIC_LENGTH
public static final int DYNAMIC_LENGTH- See Also:
- Constant Field Values
-
name
The name - must be unique to the parent that uses it, so for top level mod packets this MUST include the modid. -
fullName
Used for logging and display purposes only. -
length
public final int lengthThe length of this ID alone. Might not be a sensible number even iftotalLength
is. -
totalLength
public final int totalLengthFull length including all parents. -
parent
-
-
Constructor Details
-
TreeNetIdBase
-
-
Method Details
-
toString
-
getPrintableName
-
getRealClassName
-
equals
-
hashCode
public final int hashCode() -
hasFixedLength
public final boolean hasFixedLength()- Returns:
- True if the total length of this NetId (the entire path, including it's header) is a fixed length (and so the length doesn't need to be written out each time it is sent), or false otherwise.
-