Package alexiil.mc.lib.net
Class ParentDynamicNetId<P,C>
java.lang.Object
alexiil.mc.lib.net.TreeNetIdBase
alexiil.mc.lib.net.ParentNetIdBase
alexiil.mc.lib.net.ParentNetIdSingle<T>
alexiil.mc.lib.net.ParentNetIdDuel<P,C>
alexiil.mc.lib.net.ParentDynamicNetId<P,C>
-
Field Summary
Fields inherited from class alexiil.mc.lib.net.ParentNetIdDuel
parent
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
ConstructorDescriptionParentDynamicNetId(ParentNetIdSingle<P> parent, String name, DynamicNetId<C> childId, Function<P,C> childGetter)
-
Method Summary
Modifier and TypeMethodDescriptionprotected P
extractParent(C value)
DynamicNetLink<P,C>
linkFactory(P parent)
protected C
readContext(NetByteBuf buffer, IMsgReadCtx ctx, P parentValue)
protected void
writeContext0(NetByteBuf buffer, IMsgWriteCtx ctx, C value)
void
writeDynamicContext(CheckingNetByteBuf buffer, IMsgWriteCtx ctx, C value, List<TreeNetIdBase> resolvedPath)
Methods inherited from class alexiil.mc.lib.net.ParentNetIdDuel
getPrintableName, readContext, writeContext
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
-
childId
-
-
Constructor Details
-
ParentDynamicNetId
public ParentDynamicNetId(ParentNetIdSingle<P> parent, String name, DynamicNetId<C> childId, Function<P,C> childGetter)
-
-
Method Details
-
extractParent
- Specified by:
extractParent
in classParentNetIdDuel<P,C>
-
writeContext0
- Specified by:
writeContext0
in classParentNetIdDuel<P,C>
-
writeDynamicContext
public void writeDynamicContext(CheckingNetByteBuf buffer, IMsgWriteCtx ctx, C value, List<TreeNetIdBase> resolvedPath)- Overrides:
writeDynamicContext
in classParentNetIdDuel<P,C>
-
readContext
protected C readContext(NetByteBuf buffer, IMsgReadCtx ctx, P parentValue) throws InvalidInputDataException- Specified by:
readContext
in classParentNetIdDuel<P,C>
- Returns:
- The read value.
- Throws:
InvalidInputDataException
- if the byte buffer contained invalid data.
-
link
-
linkFactory
-