public class EntityRegistry
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
EntityRegistry.EntityRegistration |
Modifier and Type | Method and Description |
---|---|
static void |
addSpawn(java.lang.Class<? extends EntityLiving> entityClass,
int weightedProb,
int min,
int max,
EnumCreatureType typeOfCreature,
Biome... biomes)
Add a spawn entry for the supplied entity in the supplied
BiomeGenBase list |
static void |
addSpawn(java.lang.String entityName,
int weightedProb,
int min,
int max,
EnumCreatureType typeOfCreature,
Biome... biomes)
Add a spawn entry for the supplied entity in the supplied
BiomeGenBase list |
static EntityRegistry |
instance() |
EntityRegistry.EntityRegistration |
lookupModSpawn(java.lang.Class<? extends Entity> clazz,
boolean keepLooking) |
EntityRegistry.EntityRegistration |
lookupModSpawn(ModContainer mc,
int modEntityId) |
static void |
registerEgg(java.lang.Class<? extends Entity> entityClass,
int primary,
int secondary)
Registers a spawn egg for the specified entity class.
|
static void |
registerModEntity(java.lang.Class<? extends Entity> entityClass,
java.lang.String entityName,
int id,
java.lang.Object mod,
int trackingRange,
int updateFrequency,
boolean sendsVelocityUpdates)
Register the mod entity type with FML
|
static void |
registerModEntity(java.lang.Class<? extends Entity> entityClass,
java.lang.String entityName,
int id,
java.lang.Object mod,
int trackingRange,
int updateFrequency,
boolean sendsVelocityUpdates,
int eggPrimary,
int eggSecondary)
Register the mod entity type with FML
This will also register a spawn egg.
|
static void |
removeSpawn(java.lang.Class<? extends EntityLiving> entityClass,
EnumCreatureType typeOfCreature,
Biome... biomes)
Remove the spawn entry for the supplied entity
|
static void |
removeSpawn(java.lang.String entityName,
EnumCreatureType typeOfCreature,
Biome... biomes)
Remove the spawn entry for the supplied entity
|
boolean |
tryTrackingEntity(EntityTracker entityTracker,
Entity entity) |
public static EntityRegistry instance()
public static void registerModEntity(java.lang.Class<? extends Entity> entityClass, java.lang.String entityName, int id, java.lang.Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
entityClass
- The entity classentityName
- A unique name for the entityid
- A mod specific ID for the entitymod
- The modtrackingRange
- The range at which MC will send tracking updatesupdateFrequency
- The frequency of tracking updatessendsVelocityUpdates
- Whether to send velocity information packets as wellpublic static void registerModEntity(java.lang.Class<? extends Entity> entityClass, java.lang.String entityName, int id, java.lang.Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggPrimary, int eggSecondary)
entityClass
- The entity classentityName
- A unique name for the entityid
- A mod specific ID for the entitymod
- The modtrackingRange
- The range at which MC will send tracking updatesupdateFrequency
- The frequency of tracking updatessendsVelocityUpdates
- Whether to send velocity information packets as welleggPrimary
- Primary egg coloreggSecondary
- Secondary egg colorpublic static void registerEgg(java.lang.Class<? extends Entity> entityClass, int primary, int secondary)
entityClass
- The entity classprimary
- Primary egg colorsecondary
- Secondary egg colorjava.lang.IllegalArgumentException
- if entityClass is not registered in classToStringMapping.public static void addSpawn(java.lang.Class<? extends EntityLiving> entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
BiomeGenBase
listentityClass
- Entity class addedweightedProb
- Probabilitymin
- Min spawn countmax
- Max spawn counttypeOfCreature
- Type of spawnbiomes
- List of biomespublic static void addSpawn(java.lang.String entityName, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
BiomeGenBase
listentityName
- The entity nameweightedProb
- Probabilitymin
- Min spawn countmax
- Max spawn counttypeOfCreature
- type of spawnbiomes
- List of biomespublic static void removeSpawn(java.lang.Class<? extends EntityLiving> entityClass, EnumCreatureType typeOfCreature, Biome... biomes)
entityClass
- The entity classtypeOfCreature
- type of spawnbiomes
- Biomes to remove frompublic static void removeSpawn(java.lang.String entityName, EnumCreatureType typeOfCreature, Biome... biomes)
entityName
- Name of entity being removedtypeOfCreature
- type of spawnbiomes
- Biomes to remove frompublic EntityRegistry.EntityRegistration lookupModSpawn(java.lang.Class<? extends Entity> clazz, boolean keepLooking)
public EntityRegistry.EntityRegistration lookupModSpawn(ModContainer mc, int modEntityId)
public boolean tryTrackingEntity(EntityTracker entityTracker, Entity entity)