本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}