Package alexiil.mc.lib.multipart.api
Class PartDefinition
java.lang.Object
alexiil.mc.lib.multipart.api.PartDefinition
Contains the definition for an
AbstractPart
. Used for saving and loading, and syncing server to client.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic NetObjectCache<PartDefinition>
static Map<Identifier,PartDefinition>
-
Constructor Summary
ModifierConstructorDescriptionprotected
PartDefinition(Identifier identifier)
Protected constructor for use by subclasses that override bothreadFromNbt(MultipartHolder, NbtCompound)
andloadFromBuffer(MultipartHolder, NetByteBuf, IMsgReadCtx)
.PartDefinition(Identifier identifier, PartDefinition.IPartNbtReader reader, PartDefinition.IPartNetLoader loader)
-
Method Summary
Modifier and TypeMethodDescriptionloadFromBuffer(MultipartHolder holder, NetByteBuf buffer, IMsgReadCtx ctx)
readFromNbt(MultipartHolder holder, NbtCompound nbt)
void
register()
void
register(Identifier... oldNames)
-
Field Details
-
PARTS
-
ID_NET_CACHE
-
identifier
-
-
Constructor Details
-
PartDefinition
public PartDefinition(Identifier identifier, PartDefinition.IPartNbtReader reader, PartDefinition.IPartNetLoader loader) -
PartDefinition
Protected constructor for use by subclasses that override bothreadFromNbt(MultipartHolder, NbtCompound)
andloadFromBuffer(MultipartHolder, NetByteBuf, IMsgReadCtx)
.
-
-
Method Details
-
register
public final void register() -
register
-
readFromNbt
-
loadFromBuffer
public AbstractPart loadFromBuffer(MultipartHolder holder, NetByteBuf buffer, IMsgReadCtx ctx) throws InvalidInputDataException- Throws:
InvalidInputDataException
-