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>
public final class ParentDynamicNetId<P,C> extends ParentNetIdDuel<P,C>
-
Field Summary
Fields Modifier and Type Field Description DynamicNetId<C>
childId
Fields inherited from class alexiil.mc.lib.net.TreeNetIdBase
DYNAMIC_LENGTH, fullName, length, name, totalLength
-
Constructor Summary
Constructors Constructor Description ParentDynamicNetId(ParentNetIdSingle<P> parent, java.lang.String name, DynamicNetId<C> childId, java.util.function.Function<P,C> childGetter)
-
Method Summary
Modifier and Type Method Description protected P
extractParent(C value)
DynamicNetLink<P,C>
link(P parent, C child)
DynamicNetLink.IDynamicLinkFactory<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, java.util.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
-
Constructor Details
-
ParentDynamicNetId
public ParentDynamicNetId(ParentNetIdSingle<P> parent, java.lang.String name, DynamicNetId<C> childId, java.util.function.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, java.util.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
-