public final class Registries
extends java.lang.Object
IRegistry objects. If you
want to access a registry without directly accessing its object, use get(ResourceName, Class).| Modifier and Type | Field and Description |
|---|---|
static NameRegistry<ICompendiumRecipe> |
ALL_RECIPES
The registry for all
ICompendiumRecipe objects that are
in the game. |
static NameRegistry<IAssetLoader> |
ASSET_LOADER_REGISTRY
The registry for all
IAssetLoader objects. |
static NameRegistry<BiomeLevel> |
BIOME_LEVEL_REGISTRY
The registry for all
BiomeLevel objects. |
static NameRegistry<Biome> |
BIOME_REGISTRY
The registry for all
Biome objects. |
static IndexRegistry<java.lang.Class<? extends ChatComponent>> |
CHAT_COMPONENT_REGISTRY
The registry for all
ChatComponent objects. |
static NameRegistry<CombinerRecipe> |
COMBINER_REGISTRY
The registry for all
CombinerRecipe objects that can be combined
in any kind of combiner. |
static NameRegistry<Command> |
COMMAND_REGISTRY
The registry for all
Command objects. |
static NameRegistry<CompendiumCategory> |
COMPENDIUM_CATEGORY_REGISTRY
The registry for all
CompendiumCategory objects that allow
modders to add a custom tab to the compendium in the inventory, and an
easy way to list recipes and their descriptions with it. |
static ParentedNameRegistry<ConstructionRecipe> |
CONSTRUCTION_RECIPES
// TODO 0.4
A parent for Manual and Construction Table recipes.
|
static ParentedNameRegistry<ConstructionRecipe> |
CONSTRUCTION_TABLE_RECIPES
The recipe for all
ConstructionRecipe objects which require
a tool to be crafted. |
static NameRegistry<IContentLoader> |
CONTENT_LOADER_REGISTRY
The registry for all
IContentLoader objects. |
static NameRegistry<ICriteria> |
CRITERIA_REGISTRY
The registry for all
ICriteria objects. |
static NameRegistry<IEffect> |
EFFECT_REGISTRY
The registry for all
IEffect objects that can be applied to any
entity. |
static NameRegistry<Entity.IFactory> |
ENTITY_REGISTRY
The registry for all
Entity types. |
static NameRegistry<FuelInput> |
FUEL_REGISTRY
The registry for all
FuelInput objects that determine which kinds
of items burn for how long as furnace fuel. |
static NameRegistry<Information.IFactory> |
INFORMATION_REGISTRY
The registry for all
Information types. |
static NameRegistry<Item> |
ITEM_REGISTRY
The registry for all
Item objects. |
static NameRegistry<Keybind> |
KEYBIND_REGISTRY
The registry for all
Keybind objects. |
static IndexRegistry<IMainMenuTheme> |
MAIN_MENU_THEMES
The list of all
IMainMenuTheme objects. |
static ParentedNameRegistry<ConstructionRecipe> |
MANUAL_CONSTRUCTION_RECIPES
The registry for all
ConstructionRecipe objects that are
displayed on the left side of the player's inventory. |
static ParentedNameRegistry<MortarRecipe> |
MORTAR_RECIPES
The registry for all
MortarRecipe objects that can be processed
in a mortar. |
static IndexRegistry<java.lang.Class<? extends IPacket>> |
PACKET_REGISTRY
The registry for all
IPacket types. |
static IndexRegistry<IPartFactory> |
PART_REGISTRY
The registry for all
DataPart types. |
static NameRegistry<IRegistry> |
REGISTRIES
The registry containing all persistent
IRegistry objects. |
static NameRegistry<SmeltingRecipe> |
SMELTING_REGISTRY
The registry for all
SmeltingRecipe objects that can be smelted
in any kind of furnace. |
static ParentedNameRegistry<SmithingRecipe> |
SMITHING_RECIPES
The registry for all
SmithingRecipe objects that can be processed
in a mortar. |
static NameRegistry<SpawnBehavior> |
SPAWN_BEHAVIOR_REGISTRY
The registry for all
SpawnBehavior objects that determine how and
where entities can randomly appear in the world. |
static IndexRegistry<ISpecialCursor> |
SPECIAL_CURSORS
The list of all
ISpecialCursor instance. |
static NameRegistry<StatisticInitializer> |
STATISTICS_REGISTRY
The registry for all
StatisticInitializer objects that track
certain things in the game. |
static NameRegistry<IStructure> |
STRUCTURE_REGISTRY
The registry for all
IStructure objects. |
static NameRegistry<SubWorldInitializer> |
SUB_WORLD_INITIALIZER_REGISTRY
The registry for all
SubWorldInitializer objects that can be used
to initialize custom sub worlds for the main world. |
static NameRegistry<TileLayer> |
TILE_LAYER_REGISTRY
The registry for all
TileLayer objects. |
static NameRegistry<Tile> |
TILE_REGISTRY
The registry for all
Tile objects. |
static NameRegistry<TileState> |
TILE_STATE_REGISTRY
The registry for all
TileState objects. |
static NameRegistry<ToolProperty> |
TOOL_PROPERTY_REGISTRY
The registry for all
ToolProperty objects that determine what
kind of tool an item is and what level it is. |
static NameRegistry<IWorldGenerator.IFactory> |
WORLD_GENERATORS
The registry for all
IWorldGenerator types. |
| Constructor and Description |
|---|
Registries() |
| Modifier and Type | Method and Description |
|---|---|
static IRegistry |
get(ResourceName name) |
static <T extends IRegistry> |
get(ResourceName name,
java.lang.Class<T> type) |
@ApiInternal public static final NameRegistry<IRegistry> REGISTRIES
IRegistry objects. Use
IRegistry.register() to register your own registry. This is
useful both for outputting information on how full registries are, but
also for mod interaction: Other mods can register to your registries
without needing their object directly simply by getting them from this
registry. To get a registry by name, use get(ResourceName,
Class).@ApiInternal public static final NameRegistry<Tile> TILE_REGISTRY
Tile objects. Use Tile.register() to
register it.@ApiInternal public static final NameRegistry<Item> ITEM_REGISTRY
Item objects. Use Item.register() to
register it.public static final NameRegistry<Entity.IFactory> ENTITY_REGISTRY
Entity types. The ResourceName
refers to the way the entity will be saved to disk when it is present in
the world. Note that, to be able to be loaded back in when the game is
started, an Entity needs to have a constructor containing only an
IWorld.@ApiInternal public static final IndexRegistry<IPartFactory> PART_REGISTRY
DataPart types. Note that this registry
should not be registered into without caution, as the index should not be
automatically determined due to it having to persist on disk when a
DataSet is stored. Either use an index that most likely no other
mods will use, create a configuration file to be able to change it or
only use existing DataParts.public static final IndexRegistry<java.lang.Class<? extends IPacket>> PACKET_REGISTRY
IPacket types. To register into this
registry, you can use IndexRegistry.getNextFreeId() to determine
an id for the packet, or directly register it using IndexRegistry.registerNextFree(Object).public static final NameRegistry<Command> COMMAND_REGISTRY
Command objects. Use Command.register() to register it.public static final NameRegistry<ICriteria> CRITERIA_REGISTRY
ICriteria objects. Use
{link ICriteria#register()} to register your criteria.
These can be used in recipe json files.public static final NameRegistry<ICompendiumRecipe> ALL_RECIPES
ICompendiumRecipe objects that are
in the game. If your mod includes its own registry for recipes,
consider making it a ParentedNameRegistry and using this
as the parent.@ApiInternal public static final ParentedNameRegistry<ConstructionRecipe> CONSTRUCTION_RECIPES
@ApiInternal public static final ParentedNameRegistry<ConstructionRecipe> CONSTRUCTION_TABLE_RECIPES
ConstructionRecipe objects which require
a tool to be crafted. These show up in a separate tab to manual recipes
in the Compendium and can be crafted with the use of a tool in the
ConstructionTable. Use ConstructionRecipe.registerConstructionTable()
to register.@ApiInternal public static final ParentedNameRegistry<ConstructionRecipe> MANUAL_CONSTRUCTION_RECIPES
ConstructionRecipe objects that are
displayed on the left side of the player's inventory. Use ConstructionRecipe.registerManual() to register recipes into this
registry. If you want to get a recipe instance by its name, use ConstructionRecipe.forName(ResourceName).@ApiInternal public static final ParentedNameRegistry<MortarRecipe> MORTAR_RECIPES
MortarRecipe objects that can be processed
in a mortar. To register something into this registry, please use MortarRecipe.register(). If you want to get a recipe instance by its
name, use MortarRecipe.forName(ResourceName).@ApiInternal public static final ParentedNameRegistry<SmithingRecipe> SMITHING_RECIPES
SmithingRecipe objects that can be processed
in a mortar. To register something into this registry, please use SmithingRecipe.register(). If you want to get a recipe instance by its
name, use MortarRecipe.forName(ResourceName).public static final NameRegistry<IWorldGenerator.IFactory> WORLD_GENERATORS
IWorldGenerator types. The ResourceName is used to save a generator to disk if it is a retroactive
generator (IWorldGenerator.generatesRetroactively()) to mark that
it has already generated in a certain chunk. However, a registry name
needs to be supplied regardless if the generator is retroactive. Note
that, to instantiate a world generator, it needs to contain a default
constructor.@ApiInternal public static final NameRegistry<Biome> BIOME_REGISTRY
Biome objects. Use Biome.register()
to register biomes into this registry.@ApiInternal public static final NameRegistry<BiomeLevel> BIOME_LEVEL_REGISTRY
BiomeLevel objects. Use BiomeLevel.register() to register biomes into this registry.@ApiInternal public static final NameRegistry<IStructure> STRUCTURE_REGISTRY
IStructure objects. Use the contents.json
file to create a new structure and have it loaded through the content
manager. If you want to get a structure by its name, use IStructure.forName(ResourceName) or if you want to get multiple
structures with similar names, use IStructure.forNamePart(String).@ApiInternal public static final NameRegistry<TileState> TILE_STATE_REGISTRY
TileState objects. This registry
automatically has objects registered into it by registering the
associated Tile objects using Tile.register(). Do not
manually register anything in it.@ApiInternal public static final NameRegistry<TileLayer> TILE_LAYER_REGISTRY
TileLayer objects. Use TileLayer.register() to register a layer into this registry.@ApiInternal public static final NameRegistry<Keybind> KEYBIND_REGISTRY
Keybind objects. Use Keybind.register() to register a keybind into this registry. This needs
to be done before IMod.preInit(IGameInstance, IApiHandler,
IEventHandler) as otherwise, the keybind's current value will not be
loaded from the Settings file automatically.public static final IndexRegistry<java.lang.Class<? extends ChatComponent>> CHAT_COMPONENT_REGISTRY
ChatComponent objects. Use IndexRegistry.getNextFreeId() to determine the component's id. When
registering custom chat components, note that, to send their information
between the server and the client, they need to contain a default
constructor.public static final IndexRegistry<IMainMenuTheme> MAIN_MENU_THEMES
IMainMenuTheme objects. Adding themes into this
list will give them a chance to be randomly chosen when the title screen
of the game is loaded up. Do not clear this list as it will crash the
game on startup.public static final NameRegistry<Information.IFactory> INFORMATION_REGISTRY
Information types. Note that, to save and
load information from and to disk, they need to contain a constructor
that takes an ResourceName similar to the one that Information provides.@ApiInternal public static final NameRegistry<IAssetLoader> ASSET_LOADER_REGISTRY
IAssetLoader objects. To register one into
this registry, use IAssetLoader.register().@ApiInternal public static final NameRegistry<IContentLoader> CONTENT_LOADER_REGISTRY
IContentLoader objects. To register one into
this registry, use IContentLoader.register().public static final IndexRegistry<ISpecialCursor> SPECIAL_CURSORS
ISpecialCursor instance. Adding cursors into this
list will allow them to be displayed in place of the regular cursor when
their condition is met.@ApiInternal public static final NameRegistry<IEffect> EFFECT_REGISTRY
IEffect objects that can be applied to any
entity. To register something into this registry, use IEffect.register().@ApiInternal public static final NameRegistry<StatisticInitializer> STATISTICS_REGISTRY
StatisticInitializer objects that track
certain things in the game. To registry something into this registry, use
StatisticInitializer.register(). To get a statistic and/or modify
its value, use IStatistics which you can obtain from any AbstractEntityPlayer.@ApiInternal public static final NameRegistry<FuelInput> FUEL_REGISTRY
FuelInput objects that determine which kinds
of items burn for how long as furnace fuel. To register something into
this registry, please use FuelInput.register().@ApiInternal public static final NameRegistry<SmeltingRecipe> SMELTING_REGISTRY
SmeltingRecipe objects that can be smelted
in any kind of furnace. To register something into this registry, please
use SmeltingRecipe.register().@ApiInternal public static final NameRegistry<CombinerRecipe> COMBINER_REGISTRY
CombinerRecipe objects that can be combined
in any kind of combiner. To register something into this registry, please
use CombinerRecipe.register().@ApiInternal public static final NameRegistry<SpawnBehavior> SPAWN_BEHAVIOR_REGISTRY
SpawnBehavior objects that determine how and
where entities can randomly appear in the world. To register something
into this registry, please use SpawnBehavior.register().@ApiInternal public static final NameRegistry<ToolProperty> TOOL_PROPERTY_REGISTRY
ToolProperty objects that determine what
kind of tool an item is and what level it is. Use ToolProperty.register() to register a property.@ApiInternal public static final NameRegistry<SubWorldInitializer> SUB_WORLD_INITIALIZER_REGISTRY
SubWorldInitializer objects that can be used
to initialize custom sub worlds for the main world. To register a sub
world initializer, please use SubWorldInitializer.register().@ApiInternal public static final NameRegistry<CompendiumCategory> COMPENDIUM_CATEGORY_REGISTRY
CompendiumCategory objects that allow
modders to add a custom tab to the compendium in the inventory, and an
easy way to list recipes and their descriptions with it. Use CompendiumCategory.register() to register a category.public static <T extends IRegistry> T get(ResourceName name, java.lang.Class<T> type)
public static IRegistry get(ResourceName name)