Package alexiil.mc.lib.net
Class DynamicNetId<T>
java.lang.Object
alexiil.mc.lib.net.TreeNetIdBase
alexiil.mc.lib.net.ParentNetIdBase
alexiil.mc.lib.net.ParentNetIdSingle<T>
alexiil.mc.lib.net.DynamicNetId<T>
public final class DynamicNetId<T> extends ParentNetIdSingle<T>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DynamicNetId.LinkAccessor<T>
-
Field Summary
Fields inherited from class alexiil.mc.lib.net.TreeNetIdBase
DYNAMIC_LENGTH, fullName, length, name, parent, totalLength
-
Constructor Summary
Constructors Constructor Description DynamicNetId(java.lang.Class<T> clazz, DynamicNetId.LinkAccessor<T> linkGetter)
-
Method Summary
Modifier and Type Method Description protected T
readContext(NetByteBuf buffer, IMsgReadCtx ctx)
protected void
writeContext(NetByteBuf buffer, IMsgWriteCtx ctx, T value)
protected void
writeDynamicContext(CheckingNetByteBuf buffer, IMsgWriteCtx ctx, T value, java.util.List<TreeNetIdBase> resolvedPath)
Methods inherited from class alexiil.mc.lib.net.ParentNetIdSingle
child, extractor, getPrintableName, idData, idData, idSignal, readKey, subType, writeKey
Methods inherited from class alexiil.mc.lib.net.TreeNetIdBase
equals, getRealClassName, hasFixedLength, hashCode, toString
-
Constructor Details
-
Method Details
-
readContext
- Specified by:
readContext
in classParentNetIdSingle<T>
- Returns:
- The read value, or null if the parent couldn't be read.
- Throws:
InvalidInputDataException
- if the byte buffer contained invalid data.
-
writeContext
- Specified by:
writeContext
in classParentNetIdSingle<T>
-
writeDynamicContext
protected void writeDynamicContext(CheckingNetByteBuf buffer, IMsgWriteCtx ctx, T value, java.util.List<TreeNetIdBase> resolvedPath)- Overrides:
writeDynamicContext
in classParentNetIdSingle<T>
-