Package codechicken.multipart.api
Class MultipartType<T extends MultiPart>
java.lang.Object
codechicken.multipart.api.MultipartType<T>
- Direct Known Subclasses:
MicroblockPartFactory,SimpleMultipartType
Created by covers1624 on 3/16/20.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<MultipartType<?>>> The registry name used by MultipartType. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TcreatePartClient(codechicken.lib.data.MCDataInput packet) Called to create aMultiPartinstance from the providedMCDataInput.abstract TcreatePartServer(net.minecraft.nbt.CompoundTag tag) Called to create aMultiPartinstance on the server side from aCompoundTagtag.net.minecraft.resources.ResourceLocation
-
Field Details
-
MULTIPART_TYPES
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<MultipartType<?>>> MULTIPART_TYPESThe registry name used by MultipartType.
-
-
Constructor Details
-
MultipartType
public MultipartType()
-
-
Method Details
-
createPartServer
Called to create aMultiPartinstance on the server side from aCompoundTagtag. This is called when the MultiPart is loaded from disk.- Parameters:
tag- TheCompoundTagto load from.- Returns:
- The
MultiPartinstance, ornullto discard.
-
createPartClient
Called to create aMultiPartinstance from the providedMCDataInput.The supplied packet comes from
MultiPart.writeDesc(codechicken.lib.data.MCDataOutput)- Parameters:
packet- The packet.- Returns:
- The client-side part.
-
getRegistryName
public net.minecraft.resources.ResourceLocation getRegistryName()
-