当前位置: 首页>>代码示例>>Java>>正文


Java EntityRegistry.findGlobalUniqueEntityId方法代码示例

本文整理汇总了Java中cpw.mods.fml.common.registry.EntityRegistry.findGlobalUniqueEntityId方法的典型用法代码示例。如果您正苦于以下问题:Java EntityRegistry.findGlobalUniqueEntityId方法的具体用法?Java EntityRegistry.findGlobalUniqueEntityId怎么用?Java EntityRegistry.findGlobalUniqueEntityId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cpw.mods.fml.common.registry.EntityRegistry的用法示例。


在下文中一共展示了EntityRegistry.findGlobalUniqueEntityId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name)
{
	int entityID = EntityRegistry.findGlobalUniqueEntityId();
	long seed = name.hashCode();
	Random rand = new Random(seed);
	int primaryColor = rand.nextInt() * 0x000000;
	int secondaryColor = rand.nextInt() * 0xff00000;
	int spawnRateconfig = ConfigurationHandler.xenbeastSpawnRate;
	int minSpawnconfig = ConfigurationHandler.xenbeastMinSpawn;
	int maxSpawnconfig = ConfigurationHandler.xenbeastMaxSpawn;

	EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
	EntityRegistry.registerModEntity(entityClass, name, entityID, Xenorite.instance, 64, 1, true);
	EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); // probablity of space/minimal to spawn/max to spawn
	EntityRegistry.addSpawn(XenBeastEntity.class, spawnRateconfig, minSpawnconfig, maxSpawnconfig, EnumCreatureType.monster, new BiomeGenBase[]
	{ BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.taiga, BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.beach, BiomeGenBase.desertHills, BiomeGenBase.forestHills, BiomeGenBase.taigaHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.jungleEdge, BiomeGenBase.deepOcean, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.roofedForest, BiomeGenBase.coldTaiga, BiomeGenBase.coldTaigaHills, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.extremeHillsPlus, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau_F, BiomeGenBase.mesaPlateau });
	DungeonHooks.addDungeonMob("XenBeastEntity", 180);
}
 
开发者ID:TechieCrow,项目名称:Xenorite,代码行数:19,代码来源:XenBeastRegistry.java

示例2: createEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void createEntity(Class entityClass, String entityName, int solidColor, int SpotColor){
	int randomId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, ms.modInstance, 64, 1, true);
	EntityRegistry.addSpawn(entityClass, 5, 2, 9, EnumCreatureType.creature, BiomeGenBase.icePlains);
	EntityRegistry.addSpawn(entityClass, 5, 1, 3, EnumCreatureType.creature, BiomeGenBase.iceMountains);
	//EntityRegistry.addSpawn(entityClass, 1, 1, 5, EnumCreatureType.creature, BiomeGenBase.Biome);
	
	createEgg(randomId, solidColor, SpotColor);
	
}
 
开发者ID:MAPReiff,项目名称:MineMania-Rebirth-1.7.10,代码行数:12,代码来源:EntityPG.java

示例3: createEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void createEntity(Class entityClass, String entityName, int solidColor, int SpotColor){
	int randomId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, ms.modInstance, 64, 1, true);
	EntityRegistry.addSpawn(entityClass, 0, 0, 1, EnumCreatureType.creature, BiomeGenBase.forest);
	
	createEgg(randomId, solidColor, SpotColor);
	
}
 
开发者ID:MAPReiff,项目名称:MineMania-Rebirth-1.7.10,代码行数:10,代码来源:EntityLG.java

示例4: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name) {

        int entityId = EntityRegistry.findGlobalUniqueEntityId();
        long seed = name.hashCode();
        Random rand = new Random(seed);

        int primaryColor = rand.nextInt() * 16777215;
        int secondaryColor = rand.nextInt() * 16777215;

        EntityRegistry.registerGlobalEntityID(entityClass, name, entityId);
        EntityRegistry.registerModEntity(entityClass, name, entityId, instance, 64, 1, true);
        EntityList.entityEggs.put(Integer.valueOf(entityId), new EntityList.EntityEggInfo(entityId, primaryColor, secondaryColor));
    }
 
开发者ID:TeamBW,项目名称:NetherEnhancements,代码行数:14,代码来源:NetherEnhancements.java

示例5: preInit

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
@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);
}
 
开发者ID:NOVA-Team,项目名称:NOVA-Core,代码行数:8,代码来源:CommonProxy.java

示例6: createEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void createEntity(Class entityClass, String entityName, EnumCreatureType type, int probability, int minSpawn, int maxSpawn, BiomeGenBase[] biomes, int solidColor, int spotColor)
{
	int randomId = EntityRegistry.findGlobalUniqueEntityId();
	
	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, RegistryMain.modInstance, 64, 1, true);
	EntityRegistry.addSpawn(entityName, probability, minSpawn, maxSpawn, type, biomes);
	createEgg(randomId, solidColor, spotColor);
}
 
开发者ID:ehea617,项目名称:mo-zombies,代码行数:10,代码来源:EntityMain.java

示例7: registerEntities

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
private void registerEntities()
{
	arrowEntityId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID( ArrowEntity.class, "decoArrow", arrowEntityId );
	EntityRegistry.registerModEntity( ArrowEntity.class, "decoArrow", arrowEntityId, this, 64, 20, false );
	//EntityRegistry.instance().lookupModSpawn( ArrowEntity.class, false ).setCustomSpawning( null,  true );
	LanguageRegistry.instance().addStringLocalization( "entity.deco_arrow.name", "Arrow" );
}
 
开发者ID:spacechase0,项目名称:ComponentEquipment,代码行数:9,代码来源:ComponentEquipment.java

示例8: registerSpawnable

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void registerSpawnable(Class entityClass, String name, int MAINCOLORS, int SUBCOLORS){
	int entityId = EntityRegistry.findGlobalUniqueEntityId();
	long x = name.hashCode();
	Random random = new Random(x);
	int mainColor = MAINCOLORS;
	int subColor = SUBCOLORS;

	EntityRegistry.registerGlobalEntityID(entityClass, name, entityId);
	EntityRegistry.registerModEntity(entityClass, name, entityId,ItsAboutTime.instance, 64, 1, true);
	EntityList.entityEggs.put(Integer.valueOf(entityId), new EntityList.EntityEggInfo(entityId, mainColor, subColor));
}
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:12,代码来源:EntityHandler.java

示例9: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name) {
    int entityID = EntityRegistry.findGlobalUniqueEntityId();
    long seed = name.hashCode();
    Random rand = new Random(seed);
    int primaryColor = rand.nextInt() * 16777215;
    int secondaryColor = rand.nextInt() * 16777215;

    EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
    EntityRegistry.registerModEntity(entityClass, name, entityID, instance, 64, 1, true);
    EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
}
 
开发者ID:njdart,项目名称:OrbitCraft,代码行数:12,代码来源:OrbitCraft.java

示例10: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name)
{
    int entityID = EntityRegistry.findGlobalUniqueEntityId();
    long seed = name.hashCode();
    Random rand = new Random(seed);
    int primaryColor = rand.nextInt() * 16777215;
    int secondaryColor = rand.nextInt() * 16777215;
    EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
    EntityRegistry.registerModEntity(entityClass, name, entityID, Relearning_to_mod.instance, 64, 1, true);
    EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
}
 
开发者ID:static7s,项目名称:RTM,代码行数:12,代码来源:ModEntities.java

示例11: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name)
{
int entityID = EntityRegistry.findGlobalUniqueEntityId();
long seed = name.hashCode();
Random rand = new Random(seed);
int primaryColor = rand.nextInt() * 16777215;
int secondaryColor = rand.nextInt() * 16777215;

EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
EntityRegistry.registerModEntity(entityClass, name, entityID, instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
}
 
开发者ID:ZippyIO,项目名称:IgnitionUtilities,代码行数:13,代码来源:IgnitionLib.java

示例12: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name)
{
int entityID = EntityRegistry.findGlobalUniqueEntityId();
long seed = name.hashCode();
Random rand = new Random(seed);
int primaryColor = rand.nextInt() * 16777215;
int secondaryColor = rand.nextInt() * 16777215;

EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
EntityRegistry.registerModEntity(entityClass, name, entityID, Mankini.instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
}
 
开发者ID:MasterAbdoTGM50,项目名称:Mankini,代码行数:13,代码来源:ModEntities.java

示例13: preInit

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	networkLog.info("Starting Network");//Log out to the logger saying that the mod is starting to init

	initConfig.loadConfig(event.getSuggestedConfigurationFile());//load the config

	ModRegistry.registerMod(this);//register the mod with source core

	//some of the entity registry
	int entityID;
	entityID = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(ServerCart.class, "DiamondCart", entityID);
	EntityRegistry.registerModEntity(ServerCart.class, "DiamondCart", 2, instance, 64, 5, true);

	//register the gui handler
	NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());

	//register the drop item event for the tablets
	MinecraftForge.EVENT_BUS.register(new DropItemEvent());

	MinecraftForge.EVENT_BUS.register(new BlockBreakEvent());
	FMLCommonHandler.instance().bus().register(new RFPowerNet());
	FMLCommonHandler.instance().bus().register(new WorldTick());
	//call the item system
	ItemSystem.preInit(event);
	playerSystem.preInit(event);
}
 
开发者ID:modmuss50,项目名称:Network,代码行数:28,代码来源:NetworkCore.java

示例14: createEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public static void createEntity(Class entityClass, String entityName, int solidColour, int spotColour){
	int randomId = EntityRegistry.findGlobalUniqueEntityId();

	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, mainclass.modInstance, 64, 1, true);
	createEgg(randomId, solidColour, spotColour);
}
 
开发者ID:IronManMod,项目名称:IronMan,代码行数:8,代码来源:imEntity.java

示例15: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
@Override
public void registerEntity(Class<? extends Entity> entityClass, String entityName, int bkEggColor, int fgEggColor) {
	int id = EntityRegistry.findGlobalUniqueEntityId();

	EntityRegistry.registerGlobalEntityID(entityClass, entityName, id);
	EntityList.entityEggs.put(Integer.valueOf(id), new EntityEggInfo(id, bkEggColor, fgEggColor));
}
 
开发者ID:mookie1097,项目名称:NausicaaMod,代码行数:8,代码来源:Main.java


注:本文中的cpw.mods.fml.common.registry.EntityRegistry.findGlobalUniqueEntityId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。