Class MultipartType<T extends MultiPart>

java.lang.Object
codechicken.multipart.api.MultipartType<T>
Direct Known Subclasses:
MicroblockPartFactory, SimpleMultipartType

public abstract class MultipartType<T extends MultiPart> extends Object
Created by covers1624 on 3/16/20.
  • Field Details

    • MULTIPART_TYPES

      public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<MultipartType<?>>> MULTIPART_TYPES
      The registry name used by MultipartType.
  • Constructor Details

    • MultipartType

      public MultipartType()
  • Method Details

    • createPartServer

      @Nullable public abstract T createPartServer(net.minecraft.nbt.CompoundTag tag)
      Called to create a MultiPart instance on the server side from a CompoundTag tag. This is called when the MultiPart is loaded from disk.
      Parameters:
      tag - The CompoundTag to load from.
      Returns:
      The MultiPart instance, or null to discard.
    • createPartClient

      public abstract T createPartClient(codechicken.lib.data.MCDataInput packet)
      Called to create a MultiPart instance from the provided MCDataInput.

      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()