Package codechicken.multipart.api
Class SimpleMultipartType<T extends MultiPart>
java.lang.Object
codechicken.multipart.api.MultipartType<T>
codechicken.multipart.api.SimpleMultipartType<T>
A simple implementation of
MultipartType providing
a unified callback to create the part for each side.
Created by covers1624 on 3/17/20.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Field Summary
Fields inherited from class codechicken.multipart.api.MultipartType
MULTIPART_TYPES -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptioncreatePartClient(codechicken.lib.data.MCDataInput packet) Called to create aMultiPartinstance from the providedMCDataInput.createPartServer(net.minecraft.nbt.CompoundTag tag) Called to create aMultiPartinstance on the server side from aCompoundTagtag.Methods inherited from class codechicken.multipart.api.MultipartType
getRegistryName
-
Constructor Details
-
SimpleMultipartType
-
-
Method Details
-
createPartServer
Description copied from class:MultipartTypeCalled to create aMultiPartinstance on the server side from aCompoundTagtag. This is called when the MultiPart is loaded from disk.- Specified by:
createPartServerin classMultipartType<T extends MultiPart>- Parameters:
tag- TheCompoundTagto load from.- Returns:
- The
MultiPartinstance, ornullto discard.
-
createPartClient
Description copied from class:MultipartTypeCalled to create aMultiPartinstance from the providedMCDataInput.The supplied packet comes from
MultiPart.writeDesc(codechicken.lib.data.MCDataOutput)- Specified by:
createPartClientin classMultipartType<T extends MultiPart>- Parameters:
packet- The packet.- Returns:
- The client-side part.
-