类 DeferredRegister.Entities
java.lang.Object
net.neoforged.neoforge.registries.DeferredRegister<EntityType<?>>
net.neoforged.neoforge.registries.DeferredRegister.Entities
- 直接已知子类:
DeferredEntityTypes
- 封闭类:
DeferredRegister<T>
Specialized DeferredRegister for
EntityTypes
.-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.registries.DeferredRegister
DeferredRegister.Blocks, DeferredRegister.DataComponents, DeferredRegister.Entities, DeferredRegister.Items
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明<E extends Entity>
DeferredHolder<EntityType<?>, EntityType<E>> registerEntityType
(String name, EntityType.EntityFactory<E> factory, MobCategory category) Convenience method that constructs a builder.<E extends Entity>
DeferredHolder<EntityType<?>, EntityType<E>> registerEntityType
(String name, EntityType.EntityFactory<E> factory, MobCategory category, UnaryOperator<EntityType.Builder<E>> builder) Convenience method that constructs a builder for use in the operator.从类继承的方法 net.neoforged.neoforge.registries.DeferredRegister
addAlias, create, create, create, createBlocks, createDataComponents, createEntities, createHolder, createItems, createTagKey, createTagKey, getEntries, getNamespace, getRegistry, getRegistryKey, getRegistryName, makeRegistry, register, register, register
-
构造器详细资料
-
Entities
-
-
方法详细资料
-
registerEntityType
public <E extends Entity> DeferredHolder<EntityType<?>,EntityType<E>> registerEntityType(String name, EntityType.EntityFactory<E> factory, MobCategory category) Convenience method that constructs a builder. Use this to avoid inference issues.- 类型参数:
E
- the type of the entity- 参数:
name
- The name for this entity type. It will automatically have the namespace prefixed.factory
- The factory used to typically construct the entity when using an existing helper from the type.category
- The category of the entity, typicallyMobCategory.MISC
for non-living entities, or one of the others for living entities.- 返回:
- A
DeferredHolder
which reflects the data that will be registered.
-
registerEntityType
public <E extends Entity> DeferredHolder<EntityType<?>,EntityType<E>> registerEntityType(String name, EntityType.EntityFactory<E> factory, MobCategory category, UnaryOperator<EntityType.Builder<E>> builder) Convenience method that constructs a builder for use in the operator. Use this to avoid inference issues.- 类型参数:
E
- the type of the entity- 参数:
name
- The name for this entity type. It will automatically have the namespace prefixed.factory
- The factory used to typically construct the entity when using an existing helper from the type.category
- The category of the entity, typicallyMobCategory.MISC
for non-living entities, or one of the others for living entities.builder
- The unary operator, which is passed a new builder for user operators, then builds it upon registration.- 返回:
- A
DeferredHolder
which reflects the data that will be registered.
-