Package net.glowstone.entity
Class EntityRegistry
java.lang.Object
net.glowstone.entity.EntityRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomEntityDescriptor
static 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 boolean
static void
registerCustomEntity
(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
-