类 DeferredRegister.Blocks
java.lang.Object
net.neoforged.neoforge.registries.DeferredRegister<Block>
net.neoforged.neoforge.registries.DeferredRegister.Blocks
- 直接已知子类:
DeferredBlocks
- 封闭类:
DeferredRegister<T>
Specialized DeferredRegister for
Blocks
that uses the specialized DeferredBlock
as the return type for register(java.lang.String, java.util.function.Function<net.minecraft.resources.ResourceLocation, ? extends B>)
.-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.registries.DeferredRegister
DeferredRegister.Blocks, DeferredRegister.DataComponents, DeferredRegister.Entities, DeferredRegister.Items
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected <I extends Block>
DeferredBlock<I> createHolder
(ResourceKey<? extends Registry<Block>> registryKey, ResourceLocation key) Create aDeferredHolder
or an inheriting type to be stored.<B extends Block>
DeferredBlock<B> register
(String name, Function<ResourceLocation, ? extends B> func) Adds a new block to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.<B extends Block>
DeferredBlock<B> Adds a new block to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.<B extends Block>
DeferredBlock<B> registerBlock
(String name, Function<BlockBehaviour.Properties, ? extends B> func) Adds a new block to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.<B extends Block>
DeferredBlock<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 aDeferredHolder
that will be populated with the created block automatically.registerSimpleBlock
(String name) Adds a new simpleBlock
with the defaultproperties
to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.registerSimpleBlock
(String name, BlockBehaviour.Properties props) Adds a new simpleBlock
with the givenproperties
to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.从类继承的方法 net.neoforged.neoforge.registries.DeferredRegister
addAlias, create, create, create, createBlocks, createDataComponents, createEntities, createItems, createTagKey, createTagKey, getEntries, getNamespace, getRegistry, getRegistryKey, getRegistryName, makeRegistry, register
-
构造器详细资料
-
Blocks
-
-
方法详细资料
-
register
public <B extends Block> DeferredBlock<B> register(String name, Function<ResourceLocation, ? extends B> func) Adds a new block to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.- 覆盖:
register
在类中DeferredRegister<Block>
- 参数:
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.- 返回:
- A
DeferredHolder
that will track updates from the registry for this block.
-
register
Adds a new block to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.- 覆盖:
register
在类中DeferredRegister<Block>
- 参数:
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.- 返回:
- A
DeferredHolder
that will track updates from the registry for this block.
-
registerBlock
public <B extends Block> DeferredBlock<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 aDeferredHolder
that will be populated with the created block automatically.- 参数:
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.- 返回:
- A
DeferredHolder
that will track updates from the registry for this block. - 另请参阅:
-
registerBlock
public <B extends Block> DeferredBlock<B> registerBlock(String name, Function<BlockBehaviour.Properties, ? extends B> func) Adds a new block to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically. This method uses the defaultBlockBehaviour.Properties
.- 参数:
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.- 返回:
- A
DeferredHolder
that will track updates from the registry for this block. - 另请参阅:
-
registerSimpleBlock
Adds a new simpleBlock
with the givenproperties
to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.- 参数:
name
- The new block's name. It will automatically have the namespace prefixed.props
- The properties for the created block.- 返回:
- A
DeferredHolder
that will track updates from the registry for this block. - 另请参阅:
-
registerSimpleBlock
Adds a new simpleBlock
with the defaultproperties
to the list of entries to be registered and returns aDeferredHolder
that will be populated with the created block automatically.- 参数:
name
- The new block's name. It will automatically have the namespace prefixed.- 返回:
- A
DeferredHolder
that will track updates from the registry for this block. - 另请参阅:
-
createHolder
protected <I extends Block> DeferredBlock<I> createHolder(ResourceKey<? extends Registry<Block>> registryKey, ResourceLocation key) 从类复制的说明:DeferredRegister
Create aDeferredHolder
or an inheriting type to be stored.- 覆盖:
createHolder
在类中DeferredRegister<Block>
- 类型参数:
I
- The specific type of the entry.- 参数:
registryKey
- The key of the registry.key
- The resource location of the entry.- 返回:
- The new instance of
DeferredHolder
or an inheriting type.
-