當前位置: 首頁>>代碼示例>>Java>>正文


Java EntityRegistry.findGlobalUniqueEntityId方法代碼示例

本文整理匯總了Java中net.minecraftforge.fml.common.registry.EntityRegistry.findGlobalUniqueEntityId方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityRegistry.findGlobalUniqueEntityId方法的具體用法?Java EntityRegistry.findGlobalUniqueEntityId怎麽用?Java EntityRegistry.findGlobalUniqueEntityId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraftforge.fml.common.registry.EntityRegistry的用法示例。


在下文中一共展示了EntityRegistry.findGlobalUniqueEntityId方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerEntities

import net.minecraftforge.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public void registerEntities() {
	log("Registering Entities");
	ModEntityID = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerModEntity(EntityDriveable.class, "DriveableEntity", ModEntityID++, RealLifeMod.instance,
			256, 1, true);
	EntityRegistry.registerModEntity(EntityCar.class, "CarEntity", ModEntityID++, RealLifeMod.instance, 256, 1,
			true);
	EntityRegistry.registerModEntity(EntityPylon.class, "EntityPylon", ModEntityID++, RealLifeMod.instance, 80, 1,
			true);
	EntityRegistry.registerModEntity(EntityWheel.class, "EntityWheel", ModEntityID++, RealLifeMod.instance, 80, 1,
			true);
	EntityRegistry.registerModEntity(EntitySeat.class, "EntitySeat", ModEntityID++, RealLifeMod.instance, 80, 1,
			true);
	EntityRegistry.registerModEntity(EntitySit.class, "EntitySit", ModEntityID++, RealLifeMod.instance, 80, 1,
			false);

}
 
開發者ID:ItsAMysterious,項目名稱:Real-Life-Mod-1.8,代碼行數:18,代碼來源:RealLifeMod.java

示例2: createEntity

import net.minecraftforge.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void createEntity(Class<? extends Entity> entityClass, String entityName, int solidColor, int spotColor)
{
	int randomId = EntityRegistry.findGlobalUniqueEntityId();

	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, Tannery.modInstance, 42,
			1, true);
	createEgg(randomId, solidColor, spotColor);
	// EntityRegistry.addSpawn(Elk.class, 1, 21, 1,
	// EnumCreatureType.CREATURE, BiomeGenBase.iceMountains);
	EntityRegistry.addSpawn(Elk.class, 62, 3, 7, EnumCreatureType.CREATURE,
			BiomeGenBase.iceMountains, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains,
			BiomeGenBase.frozenOcean);
}
 
開發者ID:hero887,項目名稱:Tannery,代碼行數:15,代碼來源:TanneryEntities.java

示例3: createEntityNoEgg

import net.minecraftforge.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void createEntityNoEgg(Class<? extends Entity> entityClass, String entityName)
{
	int randomId = EntityRegistry.findGlobalUniqueEntityId();

	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, Tannery.modInstance, 42,
			1, true);
}
 
開發者ID:hero887,項目名稱:Tannery,代碼行數:9,代碼來源:TanneryEntities.java

示例4: preInit

import net.minecraftforge.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
@Override
public void preInit(FMLPreInitializationEvent evt) {
	GameRegistry.registerTileEntity(FWTile.class, "novaTile");
	GameRegistry.registerTileEntity(FWTileUpdater.class, "novaTileUpdater");
	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,代碼行數:9,代碼來源:CommonProxy.java

示例5: registerCreature

import net.minecraftforge.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void registerCreature(Creature creature)
{
	Class<? extends EntityARKCreature> entityClass = creature.getEntityClass();

	creatureMap.put(entityClass, creature);

	int uniqueId = EntityRegistry.findGlobalUniqueEntityId();

	String entityName = creature.getName().replaceAll(" ", "");
	EntityRegistry.registerGlobalEntityID(entityClass, entityName, uniqueId);
	EntityRegistry.registerModEntity(entityClass, entityName, uniqueId, ARKCraft.instance, 256,
			1, true);
}
 
開發者ID:Archiving,項目名稱:ARKCraft-Code,代碼行數:14,代碼來源:ARKEntityRegistry.java

示例6: registerMonster

import net.minecraftforge.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void registerMonster(Class eClass, String name, BiomeGenBase... biomes)
{
	int eggID = EntityRegistry.findGlobalUniqueEntityId();
	Random rand = new Random(name.hashCode());
	int mainColor = rand.nextInt() * 16777215;
	int secondColor = rand.nextInt() * 16777215;

	EntityRegistry.registerGlobalEntityID(eClass, name, eggID);
	EntityRegistry.addSpawn(eClass, 25, 2, 4, EnumCreatureType.CREATURE, biomes);
	EntityRegistry
			.registerModEntity(eClass, name, ++entityID, ARKCraft.instance(), 64, 3, true);
	EntityList.entityEggs.put(Integer.valueOf(eggID), new EntityList.EntityEggInfo(++entityID,
			mainColor, secondColor));
}
 
開發者ID:Archiving,項目名稱:ARKCraft-Code,代碼行數:15,代碼來源:EntityHandler.java

示例7: RegisterEntity

import net.minecraftforge.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void RegisterEntity(Class entityClass, String name){
    int entityId = EntityRegistry.findGlobalUniqueEntityId();
    long x = name.hashCode();

    EntityRegistry.registerGlobalEntityID(entityClass, name, entityId);
    EntityRegistry.registerModEntity(entityClass, name, entityId, CreepTech.INSTANCE, 1, 1, true);
}
 
開發者ID:Team-Radicool,項目名稱:CreepTech,代碼行數:8,代碼來源:EntityHandler.java


注:本文中的net.minecraftforge.fml.common.registry.EntityRegistry.findGlobalUniqueEntityId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。