Package alexiil.mc.lib.net
Class ParentNetIdDuel<Parent,T>
java.lang.Object
alexiil.mc.lib.net.TreeNetIdBase
alexiil.mc.lib.net.ParentNetIdBase
alexiil.mc.lib.net.ParentNetIdSingle<T>
alexiil.mc.lib.net.ParentNetIdDuel<Parent,T>
- Direct Known Subclasses:
ParentDynamicNetId
,ParentNetIdCast
,ParentNetIdDuelDirect
,ParentNetIdExtractor
-
Field Summary
Fields inherited from class alexiil.mc.lib.net.ParentNetIdSingle
clazz
Fields inherited from class alexiil.mc.lib.net.TreeNetIdBase
DYNAMIC_LENGTH, fullName, length, name, totalLength
-
Constructor Summary
ConstructorDescriptionParentNetIdDuel
(ParentNetIdSingle<Parent> parent, String name, Class<T> clazz) ParentNetIdDuel
(ParentNetIdSingle<Parent> parent, String name, Class<T> clazz, int length) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Parent
extractParent
(T value) protected String
protected final T
readContext
(NetByteBuf buffer, IMsgReadCtx ctx) protected abstract T
readContext
(NetByteBuf buffer, IMsgReadCtx ctx, Parent parentValue) protected final void
writeContext
(NetByteBuf buffer, IMsgWriteCtx ctx, T value) protected abstract void
writeContext0
(NetByteBuf buffer, IMsgWriteCtx ctx, T value) protected void
writeDynamicContext
(CheckingNetByteBuf buffer, IMsgWriteCtx ctx, T value, List<TreeNetIdBase> resolvedPath) Methods inherited from class alexiil.mc.lib.net.ParentNetIdSingle
child, extractor, idData, idData, idSignal, readKey, subType, writeKey
Methods inherited from class alexiil.mc.lib.net.TreeNetIdBase
equals, getRealClassName, hasFixedLength, hashCode, toString
-
Field Details
-
parent
-
-
Constructor Details
-
ParentNetIdDuel
-
ParentNetIdDuel
-
-
Method Details
-
getPrintableName
- Overrides:
getPrintableName
in classParentNetIdSingle<T>
-
writeContext
- Specified by:
writeContext
in classParentNetIdSingle<T>
-
writeDynamicContext
protected void writeDynamicContext(CheckingNetByteBuf buffer, IMsgWriteCtx ctx, T value, List<TreeNetIdBase> resolvedPath) - Overrides:
writeDynamicContext
in classParentNetIdSingle<T>
-
extractParent
-
writeContext0
-
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.
-
readContext
protected abstract T readContext(NetByteBuf buffer, IMsgReadCtx ctx, Parent parentValue) throws InvalidInputDataException - Returns:
- The read value.
- Throws:
InvalidInputDataException
- if the byte buffer contained invalid data.
-