Class RegistrationContext
java.lang.Object
net.darkhax.bookshelf.common.api.registry.RegistrationContext
Holds context that is shared between different registry adapters.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlaceableBlock(RegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block>, net.minecraft.world.level.block.Block> block, RegistrationContext.BlockItemGenerator itemBlock) Associates a block with a factory that provides its corresponding item form.Gets the namespace that all new content should be registered with.voidregisterPlacableBlocks(ItemRegistryAdapter itemRegistry)
-
Constructor Details
-
RegistrationContext
-
-
Method Details
-
namespace
Gets the namespace that all new content should be registered with.- Returns:
- The namespace new content is registered with.
-
addPlaceableBlock
public void addPlaceableBlock(RegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block>, net.minecraft.world.level.block.Block> block, RegistrationContext.BlockItemGenerator itemBlock) Associates a block with a factory that provides its corresponding item form. The produced item will be automatically registered with the same ID as the block.- Parameters:
block- The block to associate the item with.itemBlock- A factory that creates the placer item.
-
registerPlacableBlocks
-