Class DeferredBlocks
java.lang.Object
net.neoforged.neoforge.registries.DeferredRegister<Block>
net.neoforged.neoforge.registries.DeferredRegister.Blocks
net.neoforged.testframework.registration.DeferredBlocks
- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.neoforge.registries.DeferredRegisterDeferredRegister.Blocks, DeferredRegister.Items
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected <I extends Block>
 DeferredBlockBuilder<I>createHolder(ResourceKey<? extends Registry<Block>> registryKey, ResourceLocation key) Create aDeferredHolderor an inheriting type to be stored.<B extends Block>
 DeferredBlockBuilder<B>register(String name, Function<ResourceLocation, ? extends B> func) Adds a new block to the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.<B extends Block>
 DeferredBlockBuilder<B>Adds a new block to the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.<B extends Block>
 DeferredBlockBuilder<B>registerBlock(String name, Function<BlockBehaviour.Properties, ? extends B> func, BlockBehaviour.Properties props) Adds a new block to the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.<B extends Block,E extends BlockEntity> 
 DeferredBlockBuilder<B>registerBlockWithBEType(String name, BiFunction<BlockBehaviour.Properties, Supplier<BlockEntityType<E>>, ? extends B> func, org.apache.commons.lang3.function.TriFunction<BlockEntityType<?>, BlockPos, BlockState, E> beType, BlockBehaviour.Properties props) registerSimpleBlock(String name, BlockBehaviour.Properties props) Adds a new simpleBlockto the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.Methods inherited from class net.neoforged.neoforge.registries.DeferredRegisteraddAlias, create, create, create, createBlocks, createItems, createTagKey, createTagKey, getEntries, getNamespace, getRegistry, getRegistryKey, getRegistryName, makeRegistry, register
- 
Field Details- 
registrationHelper
 
- 
- 
Constructor Details- 
DeferredBlocks
 
- 
- 
Method Details- 
createHolderprotected <I extends Block> DeferredBlockBuilder<I> createHolder(ResourceKey<? extends Registry<Block>> registryKey, ResourceLocation key) Description copied from class:DeferredRegisterCreate aDeferredHolderor an inheriting type to be stored.- Overrides:
- createHolderin class- DeferredRegister.Blocks
- Type Parameters:
- I- The specific type of the entry.
- Parameters:
- registryKey- The key of the registry.
- key- The resource location of the entry.
- Returns:
- The new instance of DeferredHolderor an inheriting type.
 
- 
registerDescription copied from class:DeferredRegister.BlocksAdds a new block to the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.- Overrides:
- registerin class- DeferredRegister.Blocks
- Parameters:
- name- The new block's name. It will automatically have the namespace prefixed.
- sup- A factory for the new block. The factory should not cache the created block.
- Returns:
- A DeferredHolderthat will track updates from the registry for this block.
 
- 
registerpublic <B extends Block> DeferredBlockBuilder<B> register(String name, Function<ResourceLocation, ? extends B> func) Description copied from class:DeferredRegister.BlocksAdds a new block to the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.- Overrides:
- registerin class- DeferredRegister.Blocks
- Parameters:
- name- The new block's name. It will automatically have the namespace prefixed.
- func- A factory for the new block. The factory should not cache the created block.
- Returns:
- A DeferredHolderthat will track updates from the registry for this block.
 
- 
registerBlockpublic <B extends Block> DeferredBlockBuilder<B> registerBlock(String name, Function<BlockBehaviour.Properties, ? extends B> func, BlockBehaviour.Properties props) Description copied from class:DeferredRegister.BlocksAdds a new block to the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.- Overrides:
- registerBlockin class- DeferredRegister.Blocks
- Parameters:
- name- The new block's name. It will automatically have the namespace prefixed.
- func- A factory for the new block. The factory should not cache the created block.
- props- The properties for the created block.
- Returns:
- A DeferredHolderthat will track updates from the registry for this block.
- See Also:
 
- 
registerBlockWithBETypepublic <B extends Block,E extends BlockEntity> DeferredBlockBuilder<B> registerBlockWithBEType(String name, BiFunction<BlockBehaviour.Properties, Supplier<BlockEntityType<E>>, ? extends B> func, org.apache.commons.lang3.function.TriFunction<BlockEntityType<?>, BlockPos, BlockState, E> beType, BlockBehaviour.Properties props) 
- 
registerSimpleBlockpublic DeferredBlockBuilder<Block> registerSimpleBlock(String name, BlockBehaviour.Properties props) Description copied from class:DeferredRegister.BlocksAdds a new simpleBlockto the list of entries to be registered and returns aDeferredHolderthat will be populated with the created block automatically.- Overrides:
- registerSimpleBlockin class- DeferredRegister.Blocks
- Parameters:
- name- The new block's name. It will automatically have the namespace prefixed.
- props- The properties for the created block.
- Returns:
- A DeferredHolderthat will track updates from the registry for this block.
- See Also:
 
 
-