Class PartTypeRegistry

java.lang.Object
org.cyclops.integrateddynamics.core.part.PartTypeRegistry
All Implemented Interfaces:
org.cyclops.cyclopscore.init.IRegistry, IPartTypeRegistry

public final class PartTypeRegistry extends Object implements IPartTypeRegistry
Registry for IPartType.
  • Method Details

    • getInstance

      public static PartTypeRegistry getInstance()
      Returns:
      The unique instance.
    • register

      public <P extends IPartType<P, S>, S extends IPartState<P>> P register(P partType)
      Description copied from interface: IPartTypeRegistry
      Register a new part type.
      Specified by:
      register in interface IPartTypeRegistry
      Type Parameters:
      P - The part type.
      S - The state type.
      Parameters:
      partType - The part type.
      Returns:
      The registered part type.
    • getPartTypes

      public Collection<IPartType> getPartTypes()
      Specified by:
      getPartTypes in interface IPartTypeRegistry
      Returns:
      All registered part types.
    • getPartType

      public IPartType getPartType(net.minecraft.resources.ResourceLocation partName)
      Description copied from interface: IPartTypeRegistry
      Get the part type by unique name.
      Specified by:
      getPartType in interface IPartTypeRegistry
      Parameters:
      partName - The unique part type name.
      Returns:
      The associated part type or null.