Package de.ellpeck.rockbottom.api
Class Registries
java.lang.Object
de.ellpeck.rockbottom.api.Registries
This class houses all of the game's default
IRegistry objects. If you
want to access a registry without directly accessing its object, use get(ResourceName, Class).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NameRegistry<ICompendiumRecipe>The registry for allICompendiumRecipeobjects that are in the game.static final NameRegistry<IAssetLoader>The registry for allIAssetLoaderobjects.static final NameRegistry<BiomeLevel>The registry for allBiomeLevelobjects.static final NameRegistry<Biome>The registry for allBiomeobjects.static final IndexRegistry<Class<? extends ChatComponent>>The registry for allChatComponentobjects.static final NameRegistry<CombinerRecipe>The registry for allCombinerRecipeobjects that can be combined in any kind of combiner.static final NameRegistry<Command>The registry for allCommandobjects.static final NameRegistry<CompendiumCategory>The registry for allCompendiumCategoryobjects 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 final ParentedNameRegistry<ConstructionRecipe>// TODO 0.4 A parent for Manual and Construction Table recipes.static final ParentedNameRegistry<ConstructionRecipe>The recipe for allConstructionRecipeobjects which require a tool to be crafted.static final NameRegistry<IContentLoader>The registry for allIContentLoaderobjects.static final NameRegistry<ICriterion>The registry for allICriterionobjects.static final NameRegistry<IEffect>The registry for allIEffectobjects that can be applied to any entity.static final NameRegistry<Entity.IFactory>The registry for allEntitytypes.static final NameRegistry<FuelInput>The registry for allFuelInputobjects that determine which kinds of items burn for how long as furnace fuel.static final NameRegistry<Information.IFactory>The registry for allInformationtypes.static final NameRegistry<Item>The registry for allItemobjects.static final NameRegistry<Keybind>The registry for allKeybindobjects.static final IndexRegistry<IMainMenuTheme>The list of allIMainMenuThemeobjects.static final ParentedNameRegistry<ConstructionRecipe>The registry for allConstructionRecipeobjects that are displayed on the left side of the player's inventory.static final ParentedNameRegistry<MortarRecipe>The registry for allMortarRecipeobjects that can be processed in a mortar.static final DoubleRegistry<IPacket.IFactory>The registry for allIPackettypes.static final IndexRegistry<IPartFactory<?>>The registry for allDataParttypes.static final NameRegistry<IRegistry>The registry containing all persistentIRegistryobjects.static final NameRegistry<SmeltingRecipe>The registry for allSmeltingRecipeobjects that can be smelted in any kind of furnace.static final ParentedNameRegistry<SmithingRecipe>The registry for allSmithingRecipeobjects that can be processed in a mortar.static final NameRegistry<SpawnBehavior>The registry for allSpawnBehaviorobjects that determine how and where entities can randomly appear in the world.static final IndexRegistry<ISpecialCursor>The list of allISpecialCursorinstance.static final NameRegistry<StatisticInitializer>The registry for allStatisticInitializerobjects that track certain things in the game.static final NameRegistry<IStructure>The registry for allIStructureobjects.static final NameRegistry<SubWorldInitializer>The registry for allSubWorldInitializerobjects that can be used to initialize custom sub worlds for the main world.static final NameRegistry<TileLayer>The registry for allTileLayerobjects.static final NameRegistry<Tile>The registry for allTileobjects.static final NameRegistry<TileState>The registry for allTileStateobjects.static final NameRegistry<ToolProperty>The registry for allToolPropertyobjects that determine what kind of tool an item is and what level it is.static final NameRegistry<IWorldGenerator.IFactory>The registry for allIWorldGeneratortypes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IRegistryget(ResourceName name) static <T extends IRegistry>
Tget(ResourceName name, Class<T> type)
-
Field Details
-
REGISTRIES
The registry containing all persistentIRegistryobjects. UseIRegistry.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, useget(ResourceName, Class). -
TILE_REGISTRY
The registry for allTileobjects. UseTile.register()to register it. -
ITEM_REGISTRY
The registry for allItemobjects. UseItem.register()to register it. -
ENTITY_REGISTRY
The registry for allEntitytypes. TheResourceNamerefers 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, anEntityneeds to have a constructor containing only anIWorld. -
PART_REGISTRY
The registry for allDataParttypes. 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 aDataSetis 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 existingDataParts. -
PACKET_REGISTRY
The registry for allIPackettypes. To register into this registry, you can useIndexRegistry.getNextFreeId()to determine an id for the packet, or directly register it usingDoubleRegistry.registerNextFree(ResourceName, Object))}. -
COMMAND_REGISTRY
The registry for allCommandobjects. UseCommand.register()to register it. -
CRITERIA_REGISTRY
The registry for allICriterionobjects. Use {link ICriteria#register()} to register your criteria. These can be used in recipe json files. -
ALL_RECIPES
The registry for allICompendiumRecipeobjects that are in the game. If your mod includes its own registry for recipes, consider making it aParentedNameRegistryand using this as the parent. -
CONSTRUCTION_RECIPES
// TODO 0.4 A parent for Manual and Construction Table recipes. -
CONSTRUCTION_TABLE_RECIPES
@ApiInternal public static final ParentedNameRegistry<ConstructionRecipe> CONSTRUCTION_TABLE_RECIPESThe recipe for allConstructionRecipeobjects 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. UseConstructionRecipe.registerConstructionTable()to register. -
MANUAL_CONSTRUCTION_RECIPES
@ApiInternal public static final ParentedNameRegistry<ConstructionRecipe> MANUAL_CONSTRUCTION_RECIPESThe registry for allConstructionRecipeobjects that are displayed on the left side of the player's inventory. UseConstructionRecipe.registerManual()to register recipes into this registry. If you want to get a recipe instance by its name, useConstructionRecipe.forName(ResourceName). -
MORTAR_RECIPES
The registry for allMortarRecipeobjects that can be processed in a mortar. To register something into this registry, please useMortarRecipe.register(). If you want to get a recipe instance by its name, useMortarRecipe.forName(ResourceName). -
SMITHING_RECIPES
The registry for allSmithingRecipeobjects that can be processed in a mortar. To register something into this registry, please useSmithingRecipe.register(). If you want to get a recipe instance by its name, useMortarRecipe.forName(ResourceName). -
WORLD_GENERATORS
The registry for allIWorldGeneratortypes. TheResourceNameis 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. -
BIOME_REGISTRY
The registry for allBiomeobjects. UseBiome.register()to register biomes into this registry. -
BIOME_LEVEL_REGISTRY
The registry for allBiomeLevelobjects. UseBiomeLevel.register()to register biomes into this registry. -
STRUCTURE_REGISTRY
The registry for allIStructureobjects. 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, useIStructure.forName(ResourceName)or if you want to get multiple structures with similar names, useIStructure.forNamePart(String). -
TILE_STATE_REGISTRY
The registry for allTileStateobjects. This registry automatically has objects registered into it by registering the associatedTileobjects usingTile.register(). Do not manually register anything in it. -
TILE_LAYER_REGISTRY
The registry for allTileLayerobjects. UseTileLayer.register()to register a layer into this registry. -
KEYBIND_REGISTRY
The registry for allKeybindobjects. UseKeybind.register()to register a keybind into this registry. This needs to be done beforeIMod.preInit(IGameInstance, IApiHandler, IEventHandler)as otherwise, the keybind's current value will not be loaded from theSettingsfile automatically. -
CHAT_COMPONENT_REGISTRY
The registry for allChatComponentobjects. UseIndexRegistry.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. -
MAIN_MENU_THEMES
The list of allIMainMenuThemeobjects. 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. -
INFORMATION_REGISTRY
The registry for allInformationtypes. Note that, to save and load information from and to disk, they need to contain a constructor that takes anResourceNamesimilar to the one thatInformationprovides. -
ASSET_LOADER_REGISTRY
The registry for allIAssetLoaderobjects. To register one into this registry, useIAssetLoader.register(). -
CONTENT_LOADER_REGISTRY
The registry for allIContentLoaderobjects. To register one into this registry, useIContentLoader.register(). -
SPECIAL_CURSORS
The list of allISpecialCursorinstance. Adding cursors into this list will allow them to be displayed in place of the regular cursor when their condition is met. -
EFFECT_REGISTRY
The registry for allIEffectobjects that can be applied to any entity. To register something into this registry, useIEffect.register(). -
STATISTICS_REGISTRY
The registry for allStatisticInitializerobjects that track certain things in the game. To registry something into this registry, useStatisticInitializer.register(). To get a statistic and/or modify its value, useIStatisticswhich you can obtain from anyAbstractPlayerEntity. -
FUEL_REGISTRY
The registry for allFuelInputobjects that determine which kinds of items burn for how long as furnace fuel. To register something into this registry, please useFuelInput.register(). -
SMELTING_REGISTRY
The registry for allSmeltingRecipeobjects that can be smelted in any kind of furnace. To register something into this registry, please useSmeltingRecipe.register(). -
COMBINER_REGISTRY
The registry for allCombinerRecipeobjects that can be combined in any kind of combiner. To register something into this registry, please useCombinerRecipe.register(). -
SPAWN_BEHAVIOR_REGISTRY
The registry for allSpawnBehaviorobjects that determine how and where entities can randomly appear in the world. To register something into this registry, please useSpawnBehavior.register(). -
TOOL_PROPERTY_REGISTRY
The registry for allToolPropertyobjects that determine what kind of tool an item is and what level it is. UseToolProperty.register()to register a property. -
SUB_WORLD_INITIALIZER_REGISTRY
The registry for allSubWorldInitializerobjects that can be used to initialize custom sub worlds for the main world. To register a sub world initializer, please useSubWorldInitializer.register(). -
COMPENDIUM_CATEGORY_REGISTRY
The registry for allCompendiumCategoryobjects 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. UseCompendiumCategory.register()to register a category.
-
-
Constructor Details
-
Registries
public Registries()
-
-
Method Details
-
get
-
get
-