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


Java EntityRegistry类代码示例

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


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

示例1: init

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
	proxy.init(event);
	
	
	ItemLoader.LoadItems();
	BlockLoader.loadBlocks();
	Recipes.registerRecpies();
	EntityLoader.LoadEntitys();
	OreDict.addores();
	Achievements.loadAchievements();
	Stats.RegisterStats();
	
	
	EntityRegistry.registerModEntity(EntityGiantSnowBall.class, "GiantSnowBall", EntityRegistry.findGlobalUniqueEntityId(), MODID, 80, 3, true);

	proxy.registerRenderThings();
	
	GameRegistry.registerTileEntity(TileEntityBulb.class, "Bulb");
	TileEntity.addMapping(TileEntityBulb.class, "Bulb_Mapping");
	BulbModelID = 72;
	
	}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:25,代码来源:epicproportionsmod_christmas.java

示例2: addEntities

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
/**
 * Adds and registers all entities and tile entities.
 */
public void addEntities()
{
	//Registrations
	EntityRegistry.registerModEntity(EntityObsidianTNT.class, "ObsidianTNT", 0, this, 64, 5, true);
	EntityRegistry.registerModEntity(EntityRobit.class, "Robit", 1, this, 64, 2, true);
	EntityRegistry.registerModEntity(EntityBalloon.class, "Balloon", 2, this, 64, 1, true);
	EntityRegistry.registerModEntity(EntityBabySkeleton.class, "BabySkeleton", 3, this, 64, 5, true);
	EntityRegistry.registerModEntity(EntityFlame.class, "Flame", 4, this, 64, 5, true);
	
	//Tile entities
	GameRegistry.registerTileEntity(TileEntityBoundingBlock.class, "BoundingBlock");
	GameRegistry.registerTileEntity(TileEntityAdvancedBoundingBlock.class, "AdvancedBoundingBlock");
	GameRegistry.registerTileEntity(TileEntityCardboardBox.class, "CardboardBox");
	GameRegistry.registerTileEntity(TileEntitySolarEvaporationValve.class, "SalinationValve");
	GameRegistry.registerTileEntity(TileEntitySolarEvaporationBlock.class, "SalinationTank");
	GameRegistry.registerTileEntity(TileEntityEntangledBlock.class, "EntangledBlock");
	GameRegistry.registerTileEntity(TileEntityBoiler.class, "SteamBoiler");
	GameRegistry.registerTileEntity(TileEntityBoilerValve.class, "BoilerValve");

	//Load tile entities that have special renderers.
	proxy.registerSpecialTileEntities();
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:26,代码来源:Mekanism.java

示例3: spawnEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:17,代码来源:CraftWorld.java

示例4: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
private static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggColour1, int eggColour2, boolean hasEgg) {
	EntityRegistry.registerModEntity(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates);

	if (id >= array.length) {
		EntityData[] newArray = new EntityData[id + 5];
		for (int i = 0; i < array.length; i++)
			newArray[i] = array[i];
		array = newArray;
	}
	if (array[id] != null)
		throw new IllegalArgumentException("ID " + id + " is already being used! Please report this error!");
	else {
		array[id] = new EntityData(entityName, id, eggColour1, eggColour2, hasEgg);
		map.put(id, entityClass);
	}
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:17,代码来源:ModEntityList.java

示例5: registerTileEntities

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
public void registerTileEntities(boolean flag)
	{
		// non TESR registers
        registerCommonTileEntities();
        if (TFCPrimitiveTech.instance.isSlingshotEnabled)
        {
        	EntityRegistry.registerModEntity(EntityProjectileSharpStone.class, "itemSharpStone", 1, TFCPrimitiveTech.instance, 64, 5, true);
        	EntityRegistry.registerModEntity(EntityProjectileHardStone.class, "itemHardStone", 1, TFCPrimitiveTech.instance, 64, 5, true);
        	EntityRegistry.registerModEntity(EntityProjectileSoftStone.class, "itemSoftStone", 1, TFCPrimitiveTech.instance, 64, 5, true);
        	EntityRegistry.registerGlobalEntityID(EntityProjectileStone.class, "SlingshotStone", EntityRegistry.findGlobalUniqueEntityId());
        }
		if (flag)
		{
//			GameRegistry.registerTileEntity(TileEntityBurlapSack.class, "Sack");
			// TESR registers
		}
	}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:18,代码来源:ModCommonProxy.java

示例6: LoadEntitys

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
public static void LoadEntitys() {
	

//Pat Registry
    EntityRegistry.registerGlobalEntityID(EntitySpookyPat.class, "EntitySpookyPat",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntitySpookyPat.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//Jen Registry
    EntityRegistry.registerGlobalEntityID(EntitySpookyJen.class, "EntitySpookyJen",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntitySpookyJen.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//Jen Registry
    EntityRegistry.registerGlobalEntityID(EntitySpookyCaptianCookie.class, "EntitySpookyCaptianCookie",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntitySpookyCaptianCookie.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//ScareCrow Registry
    EntityRegistry.registerGlobalEntityID(EntityScareCrow.class, "EntityScareCrow",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntityScareCrow.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//Ghost Registry
    EntityRegistry.registerGlobalEntityID(EntityGhost.class, "EntityGhost",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntityGhost.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
   	}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:25,代码来源:EntityLoader.java

示例7: registerInit

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
static void registerInit(@SuppressWarnings("UnusedParameters") FMLInitializationEvent event) {

		//TileEntityの登録 =============================================================================================

		GameRegistry.registerTileEntity(TileEntityClayCrucible.class, "tileClayCrucible");
		GameRegistry.registerTileEntity(TileEntityClayCrucibleHeater.class, "tileClayCrucibleHeater");

		//WorldGeneratorの登録 =========================================================================================
		GameRegistry.registerWorldGenerator(new OreGenerator(), 2);

		//チャンク生成イベントのフック
		MinecraftForge.EVENT_BUS.register(new AMMStructureEventHandler());

		MapGenStructureIO.registerStructure(StructureTestStart.class, "Test");
		MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest1.class, "Test1");
		MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest2.class, "Test2");
		MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest3.class, "Test3");
		MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest4.class, "Test4");

		MapGenStructureIO.registerStructure(StructureTiamatStart.class, "TiamatComet");
		MapGenStructureIO.func_143031_a(ComponentTiamatCenter.class, "TiamaitCometCenter");
		MapGenStructureIO.func_143031_a(ComponentTiamatCenterLine.class, "TiamatCometCenterLine");

		EntityRegistry.registerModEntity(EntityHoeHoeMan.class, "HoeHoeMan", 0, AntiMatterModCore.MOD_ID, 250, 1, false);//中ボスの追加
		if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
			RenderingRegistry.registerEntityRenderingHandler(EntityHoeHoeMan.class, new RenderHoeHoeMan());
		}

		//村のチェストの中身============================================================================================
		//ChestGenHooks.addItem(ChestGenHooks.VILLAGE_BLACKSMITH, new WeightedRandomChestContent(ingot_01,1,1,5,5));
		//ChestGenHooks.addItem(ChestGenHooks.VILLAGE_BLACKSMITH, new WeightedRandomChestContent(ingot_01,2,1,5,5));
		ChestGenHooks village =ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH);
		village.setMax(village.getMax()+10);
		village.setMin(village.getMin()+10);
	}
 
开发者ID:Team-Antimatter-Mod,项目名称:AntiMatterMod,代码行数:36,代码来源:AntiMatterModRegistry.java

示例8: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static void registerEntity (Entity entity){
    if (!(entity instanceof SSheepEntity)) { SteelSheep.logger.error("The entity specified (" + entity + ") did not include any of the required fields"); return; }

    int newId = getUniqueId();

    EntityRegistry.registerModEntity(entity.getClass(),((SSheepEntity)entity).getEntityName(),newId,SteelSheep.instance,80,3,false);
    EntityList.IDtoClassMapping.put(newId,entity.getClass());
    EntityList.entityEggs.put(newId,new EntityList.EntityEggInfo(newId,((SSheepEntity) entity).getEggColors()[0],((SSheepEntity) entity).getEggColors()[1]));

    if (entity instanceof EntityLiving) {
        EntityRegistry.addSpawn(((EntityLiving)entity).getClass(), 30, 2, 4, EnumCreatureType.ambient, ((SSheepEntity) entity).getBiomeList());
    }

    SteelSheep.logger.info("Registered the entity " + entity + " successfully! (Name: " + EntityList.stringToClassMapping.get(entity.getClass()) + ")");

}
 
开发者ID:Mitchellbrine,项目名称:SteelSheep,代码行数:18,代码来源:SSEntityRegistry.java

示例9: init

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {

	// 諸Entity
	EntityRegistry.registerModEntity(EntityLawyer.class, "Lawyer", 200,
			this, 80, 1, true);
	EntityRegistry.registerModEntity(Entity6Char.class, "6char", 201, this,
			128, 5, true);

	// 諸Recipe
	GameRegistry.addShapelessRecipe(new ItemStack(item6Char),
			Items.cooked_chicken,// 唐揚げ
			Items.fish,// 沢蟹
			Items.baked_potato,// コロッケ
			Items.cooked_porkchop// 酢豚
			);
	proxy.init(event);

}
 
开发者ID:Church-of-Koushin,项目名称:Koushin-General-Mod,代码行数:20,代码来源:KoushinCore.java

示例10: init

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
public static void init() {
    registerSCP(EntitySCP0015.class, "scp:0015",
            EntityRegistry.findGlobalUniqueEntityId(),
            0x000000, 0x000000, 1);
    registerSCP(EntitySCP0015Projectile.class, "scp:0015-p",
            EntityRegistry.findGlobalUniqueEntityId(),
            -1, -1, -1);
    registerSCP(EntitySCP0023.class, "scp:0023",
            EntityRegistry.findGlobalUniqueEntityId(),
            0x000000, 0x000000, 1);
    registerSCP(EntitySCP0131.class, "scp:0131",
            EntityRegistry.findGlobalUniqueEntityId(),
            0xFF0000, 0xFFFF00, 0);
    registerSCP(EntitySCP0173.class, "scp:0173",
            EntityRegistry.findGlobalUniqueEntityId(),
            0xFEF2BF, 0x2BC600, 1);
    registerSCP(EntityClassDMale.class, "scp:classd_male",
            EntityRegistry.findGlobalUniqueEntityId(),
            0xFF6600, 0x000000, -1);
}
 
开发者ID:hanetzer,项目名称:SecureCraftProtect,代码行数:21,代码来源:SCPEntity.java

示例11: addSpawn

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature)
{
    for (BiomeGenBase biome : BiomeGenBase.biomeList)
    {
    	if(biome != null)
    	{
    		if(BiomeDictionary.isBiomeRegistered(biome))
    		{
    			if(BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.END))
    			{
    				return;
    			}
    			if(BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.NETHER))
    			{
    				return;
    			}
    			if(BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.MUSHROOM))
    			{
    				return;
    			}
    		}
    		
    		EntityRegistry.addSpawn(entityClass, weightedProb, min, max, typeOfCreature, biome);
    	}
    }
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:27,代码来源:EntitylistMF.java

示例12: init

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
public static void init()
{
    LogHelper.debug(ConfigurationHandler.enableCarnivalClowns);
    if(ConfigurationHandler.enableCarnivalClowns == true) {
        EntityRegistry.registerModEntity(EntityCarnivalClown.class, "carnival_clown", 1, Reference.MOD_ID, 80, 3, true);
        RenderingRegistry.registerEntityRenderingHandler(EntityCarnivalClown.class, new RenderClown(new ModelCarnivalClown(), 0.5F));
        EntityRegistry.addSpawn(EntityCarnivalClown.class, 10, 1, 2, EnumCreatureType.creature, BiomeGenBase.plains);
        ModelCarnivalClown.registerEntityEgg(EntityCarnivalClown.class, 0xffffff, 0xff0000);
        LanguageRegistry.instance().addStringLocalization("entity.Carnival.carnival_clown.name", "en_US", "Carnival Clown");
    }

    //Temporarily removed while i think of a way to fix it
    /*EntityRegistry.registerModEntity(EntityDethknight.class, "dethknight", 2, Reference.MOD_ID, 80, 3, true);
    RenderingRegistry.registerEntityRenderingHandler(EntityDethknight.class, new RenderDethknight(new ModelDethknight(), 0.5F));
    EntityRegistry.addSpawn(EntityDethknight.class, 10, 1, 2, EnumCreatureType.creature, BiomeGenBase.plains);
    ModelCarnivalClown.registerEntityEgg(EntityDethknight.class, 0x000000, 0xff0000);
    LanguageRegistry.instance().addStringLocalization("entity.Carnival.dethknight.name", "en_US", "Dethknight");*/
}
 
开发者ID:DanCarlyon,项目名称:Carnival,代码行数:19,代码来源:ModEntities.java

示例13: init

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
public static void init() {
	EntityRegistry.registerModEntity(EntityMagician.class, "entityMagician", mageID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntitySoulFragment.class, "entitySoul", soulID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityBossOverworld.class, "bossOverworld", overworldBossID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityBossNether.class, "bossNether", netherBossID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityBossEnder.class, "bossEnder", enderBossID, MagiciansArtifice.instance, 80, 3, true);
       //EntityRegistry.registerModEntity(EntityPetPheonix.class, "petPheonix", pheonixID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityPetAppling.class, "petAppling", applingID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityPetDragon.class, "petDragon", dragonID, MagiciansArtifice.instance, 80, 3, true);
       //EntityRegistry.registerModEntity(EntityPetRat.class, "petRat", ratID, MagiciansArtifice.instance, 80, 3, true);

       BlockDispenser.dispenseBehaviorRegistry.putObject(ItemRegistry.horcrux, new DispenserSoulBehavior());

	registerEntityEgg(EntityMagician.class, 0x000349, 0xFFE343);
       registerEntityEgg(EntityBossOverworld.class, 0xBBF2FF, 0xFFFFFF);
       registerEntityEgg(EntityBossNether.class, 0xDA0000, 0x3B0000);
       registerEntityEgg(EntityBossEnder.class, 0x3C0059, 0x2B0C36);
       registerEntityEgg(EntityPetAppling.class, 0xDE0101, 0xFFC8C8);
       registerEntityEgg(EntityPetDragon.class, 0xDE0101, 0xFFC8C8);
	registerVillagers();
}
 
开发者ID:MagiciansArtificeTeam,项目名称:Magicians-Artifice,代码行数:22,代码来源:MAEntityRegistry.java

示例14: registerBase

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
@Override
public void registerBase() {
	super.registerBase();

	this.initializeSpellMaterials();

	EntityRegistry.registerModEntity(EntitySpellProjectile.class,
			"SpellProjectile", cpw.mods.fml.common.registry.EntityRegistry
					.findGlobalUniqueEntityId(), RubedoCore.instance, 64,
			1, true);

	for (MaterialMultiItem material : this.getMaterials()) {
		if (material.baseMaterial != null) {
			String name = "base_" + material.name;
			Item item = ItemSpellBase.getBaseMap().get(name);
			GameRegistry.registerItem(item, name);
		}
	}
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:20,代码来源:ContentSpells.java

示例15: preInit

import cpw.mods.fml.common.registry.EntityRegistry; //导入依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {

    try {
        if (Class.forName("com.pixelmonmod.pixelmon.Pixelmon") != null)
            pixelmonPresent = true;
    } catch (ClassNotFoundException e) {
        FMLLog.warning("Pixelmon mod not found, pixelmon functions disabled.");
    }

    AddMeta(event);
    config = PixelUtilitysConfig.getInstance();
    config.setEvent(event);
    PixelUtilitysAchievements.setupAchievements();

    EntityRegistry.registerModEntity(SeatEntity.class, "Seat", 0, this, 3, 1, false);
}
 
开发者ID:AnDwHaT5,项目名称:PixelUtilities,代码行数:18,代码来源:Basemod.java


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