Java Code Examples for cpw.mods.fml.common.registry.EntityRegistry#registerGlobalEntityID()

The following examples show how to use cpw.mods.fml.common.registry.EntityRegistry#registerGlobalEntityID() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void preInit(FMLPreInitializationEvent evt) {
	GameRegistry.registerTileEntity(FWTile.class, "novaTile");
	int globalUniqueEntityId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(FWEntity.class, "novaEntity", globalUniqueEntityId);
	EntityRegistry.registerModEntity(FWEntity.class, "novaEntity", globalUniqueEntityId, NovaMinecraft.instance, 64, 20, true);
}
 
Example 2
Source File: MoCreatures.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
/**
 * For Litterbox and kittybeds
 * 
 * @param entityClass
 * @param entityName
 */
protected void registerEntity(Class<? extends Entity> entityClass, String entityName)
{
    int entityID = EntityRegistry.findGlobalUniqueEntityId();
    LanguageRegistry.instance().addStringLocalization("entity." + entityName + ".name", "en_US", entityName);
    //private static EntityEggInfo searchEggColor(Class entityClass , int entityId)
    //EntityEggInfo eggColors = MoCEggColour.searchEggColor(entityClass, entityID);
    EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityID);
    EntityRegistry.registerModEntity(entityClass, entityName, entityID, instance, 128, 1, true);
}
 
Example 3
Source File: MoCreatures.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
private void registerEntity(Class<? extends Entity> entityClass, String entityName, int eggColor, int eggDotsColor, String visibleName)
{
    int entityID = EntityRegistry.findGlobalUniqueEntityId();
    LanguageRegistry.instance().addStringLocalization("entity." + entityName + ".name", "en_US", visibleName);
    EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityID, eggColor, eggDotsColor);
    EntityRegistry.registerModEntity(entityClass, entityName, entityID, instance, 128, 1, true);
}
 
Example 4
Source File: RegisteredEntities.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
private static void registerEntity(Class<? extends Entity> entityClass, String name, int trackingRange, int updateFreq, boolean sendVelUpdates) {
    int id = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(entityClass, name, id);
    EntityRegistry.registerModEntity(entityClass, name, id, Gadomancy.instance, trackingRange, updateFreq, sendVelUpdates);
}