public enum PipeRegistry extends java.lang.Enum<PipeRegistry> implements IPipeRegistry
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
ItemPipeHolder |
createItemForPipe(PipeDefinition definition)
Creates an
IItemPipe for the given PipeDefinition . |
IItemPipe |
createUnnamedItemForPipe(PipeDefinition definition,
java.util.function.Consumer<net.minecraft.item.Item> postCreate)
Identical to
IPipeRegistry.createItemForPipe(PipeDefinition) , but doesn't require registering tags with buildcraft
lib in order to register. |
java.lang.Iterable<PipeDefinition> |
getAllRegisteredPipes() |
PipeDefinition |
getDefinition(net.minecraft.util.ResourceLocation identifier) |
IItemPipe |
getItemForPipe(PipeDefinition definition) |
PipeDefinition |
loadDefinition(java.lang.String identifier) |
void |
registerPipe(PipeDefinition definition) |
void |
setItemForPipe(PipeDefinition definition,
IItemPipe item)
Maps the given
PipeDefinition to an IItemPipe . |
static PipeRegistry |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PipeRegistry[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PipeRegistry INSTANCE
public static PipeRegistry[] values()
for (PipeRegistry c : PipeRegistry.values()) System.out.println(c);
public static PipeRegistry valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void registerPipe(PipeDefinition definition)
registerPipe
in interface IPipeRegistry
public void setItemForPipe(PipeDefinition definition, @Nullable IItemPipe item)
IPipeRegistry
setItemForPipe
in interface IPipeRegistry
public ItemPipeHolder createItemForPipe(PipeDefinition definition)
IPipeRegistry
IItemPipe
for the given PipeDefinition
. If the PipeDefinition
has been
registered with IPipeRegistry.registerPipe(PipeDefinition)
then it will also be registered with
IPipeRegistry.setItemForPipe(PipeDefinition, IItemPipe)
. The returned item will be automatically registered with
forge.createItemForPipe
in interface IPipeRegistry
public IItemPipe createUnnamedItemForPipe(PipeDefinition definition, java.util.function.Consumer<net.minecraft.item.Item> postCreate)
IPipeRegistry
IPipeRegistry.createItemForPipe(PipeDefinition)
, but doesn't require registering tags with buildcraft
lib in order to register.createUnnamedItemForPipe
in interface IPipeRegistry
postCreate
- A function to call in order to setup the IForgeRegistryEntry.Impl.setRegistryName(ResourceLocation)
and
Item.setUnlocalizedName(String)
.public IItemPipe getItemForPipe(PipeDefinition definition)
getItemForPipe
in interface IPipeRegistry
@Nullable public PipeDefinition getDefinition(net.minecraft.util.ResourceLocation identifier)
getDefinition
in interface IPipeRegistry
@Nonnull public PipeDefinition loadDefinition(java.lang.String identifier) throws InvalidInputDataException
InvalidInputDataException
public java.lang.Iterable<PipeDefinition> getAllRegisteredPipes()
getAllRegisteredPipes
in interface IPipeRegistry