Package net.glowstone.entity
Class EntityRegistry
java.lang.Object
net.glowstone.entity.EntityRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomEntityDescriptorstatic Class<? extends GlowEntity>Gets the implementation class for the given entity interface class.static Class<? extends GlowEntity>getEntity(org.bukkit.entity.EntityType type) static List<CustomEntityDescriptor>static booleanstatic voidregisterCustomEntity(CustomEntityDescriptor<? extends GlowEntity> descriptor) Registers a custom entity type.
-
Constructor Details
-
EntityRegistry
public EntityRegistry()
-
-
Method Details
-
getEntity
-
getEntity
public static Class<? extends GlowEntity> getEntity(Class<? extends org.bukkit.entity.Entity> clazz) Gets the implementation class for the given entity interface class.- Parameters:
clazz- the entity interface class- Returns:
- the implementation class
-
registerCustomEntity
Registers a custom entity type.- Parameters:
descriptor- the entity type to register; all fields exceptCustomEntityDescriptor.getStorage()must be non-null
-
getCustomEntityDescriptor
-
isCustomEntityRegistered
-
getRegisteredCustomEntities
-