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


Java SpawnListEntry类代码示例

本文整理汇总了Java中net.minecraft.world.biome.BiomeGenBase.SpawnListEntry的典型用法代码示例。如果您正苦于以下问题:Java SpawnListEntry类的具体用法?Java SpawnListEntry怎么用?Java SpawnListEntry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k)
{
    if (par1EnumCreatureType == EnumCreatureType.monster)
    {
        final List monsters = new ArrayList();
        monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 3000, 1, 3));
        monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 2000, 1, 2));
        monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 1500, 1, 1));
        monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 2000, 1, 1));
        if (ConfigManagerCore.challengeMode) monsters.add(new SpawnListEntry(EntityEnderman.class, 250, 1, 1));
        return monsters;
    }
    else
    {
        return null;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:20,代码来源:ChunkProviderAsteroids.java

示例2: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k)
{
    if (par1EnumCreatureType == EnumCreatureType.monster)
    {
        final List monsters = new ArrayList();
        monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
        monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
        monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
        monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
        return monsters;
    }
    else
    {
        return null;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:19,代码来源:ChunkProviderMoon.java

示例3: GenerationSettings

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
public GenerationSettings(String planetName, double terrainHeightMod, double smallFeatureHeightMod, double mountainHeightMod, double valleyHeightMod, int craterProbibility, int caveChance,
		SpacePair<Block, Integer> blockTop, SpacePair<Block, Integer> blockFiller, SpacePair<Block, Integer> blockLower, SpacePair<Block, Integer> blockBrick, Block blockEgg,
		boolean dungeonEnabled, boolean pitEnabled, boolean villageEnabled,
		List<SpawnListEntry> spawnableMonsters) {
	this.planetName = planetName;
	this.terrainHeightMod = terrainHeightMod;
	this.smallFeatureHeightMod = smallFeatureHeightMod;
	this.mountainHeightMod = mountainHeightMod;
	this.valleyHeightMod = valleyHeightMod;
	this.craterProbibility = craterProbibility;
	this.caveChance = caveChance;
	
	this.blockTop = new SpacePair<Block, Byte>(blockTop.getFirst(), new Byte("" + blockTop.getSecond()));
	this.blockFiller = new SpacePair<Block, Byte>(blockFiller.getFirst(), new Byte("" + blockFiller.getSecond()));
	this.blockLower = new SpacePair<Block, Byte>(blockLower.getFirst(), new Byte("" + blockLower.getSecond()));
	this.blockBrick = new SpacePair<Block, Byte>(blockBrick.getFirst(), new Byte("" + blockBrick.getSecond()));
	this.blockEgg = blockEgg;
	
	this.spawnableMonsters = spawnableMonsters;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:21,代码来源:GenerationSettings.java

示例4: addSpawn

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
    for (BiomeGenBase biome : biomes)
    {
        @SuppressWarnings("unchecked")
        List<SpawnListEntry> spawns = biome.func_76747_a(typeOfCreature);

        for (SpawnListEntry entry : spawns)
        {
            //Adjusting an existing spawn entry
            if (entry.field_76300_b == entityClass)
            {
                entry.field_76292_a = weightedProb;
                entry.field_76301_c = min;
                entry.field_76299_d = max;
                break;
            }
        }

        spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max));
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:23,代码来源:EntityRegistry.java

示例5: removeSpawn

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
    for (BiomeGenBase biome : biomes)
    {
        @SuppressWarnings("unchecked")
        Iterator<SpawnListEntry> spawns = biome.func_76747_a(typeOfCreature).iterator();

        while (spawns.hasNext())
        {
            SpawnListEntry entry = spawns.next();
            if (entry.field_76300_b == entityClass)
            {
                spawns.remove();
            }
        }
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:18,代码来源:EntityRegistry.java

示例6: PotentialSpawns

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
public PotentialSpawns(World world, EnumCreatureType type, int x, int y, int z, List<SpawnListEntry> oldList)
{
    super(world);
    this.x = x;
    this.y = y;
    this.z = z;
    this.type = type;
    if (oldList != null)
    {
        this.list = oldList;
    }
    else
    {
        this.list = new ArrayList<SpawnListEntry>();
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:17,代码来源:WorldEvent.java

示例7: addSpawn

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
    for (BiomeGenBase biome : biomes)
    {
        @SuppressWarnings("unchecked")
        List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);

        for (SpawnListEntry entry : spawns)
        {
            //Adjusting an existing spawn entry
            if (entry.entityClass == entityClass)
            {
                entry.itemWeight = weightedProb;
                entry.minGroupCount = min;
                entry.maxGroupCount = max;
                break;
            }
        }

        spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max));
    }
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:23,代码来源:EntityRegistry.java

示例8: removeSpawn

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
    for (BiomeGenBase biome : biomes)
    {
        @SuppressWarnings("unchecked")
        Iterator<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature).iterator();

        while (spawns.hasNext())
        {
            SpawnListEntry entry = spawns.next();
            if (entry.entityClass == entityClass)
            {
                spawns.remove();
            }
        }
    }
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:18,代码来源:EntityRegistry.java

示例9: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k) {
	if (par1EnumCreatureType == EnumCreatureType.monster) {
		final List monsters = new ArrayList();

		if (!ConfigManagerCore.idRealisticEnabled) {
			monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
		}

		return monsters;
	} else {
		return null;
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:19,代码来源:ChunkProviderEuropa.java

示例10: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k) {
	if (par1EnumCreatureType == EnumCreatureType.monster) {
		List monsters = new ArrayList();

		if (!ConfigManagerCore.idRealisticEnabled) {
			monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
		}

		return monsters;
	} else {
		return null;
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:19,代码来源:ChunkProviderMercury.java

示例11: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k) {
	if (par1EnumCreatureType == EnumCreatureType.monster) {
		List monsters = new ArrayList();
		monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
		monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
		monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
		monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
		monsters.add(new SpawnListEntry(EntityEvolvedBlaze.class, 8, 2, 3));
		return monsters;
	}

	else {
		return null;
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:18,代码来源:ChunkProviderVenus.java

示例12: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k) {
	if (par1EnumCreatureType == EnumCreatureType.monster) {
		final List monsters = new ArrayList();

		if (!ConfigManagerCore.idRealisticEnabled) {
			monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
		}
		return monsters;
	} else {
		return null;
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:18,代码来源:ChunkProviderCallisto.java

示例13: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k) {
	if (par1EnumCreatureType == EnumCreatureType.monster) {
		List monsters = new ArrayList();

		if (!ConfigManagerCore.idRealisticEnabled) {
			monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
			monsters.add(new SpawnListEntry(EntityEvolvedBlaze.class, 8, 2, 3));
		}

		return monsters;
	} else {
		return null;
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:20,代码来源:ChunkProviderIo.java

示例14: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
@SuppressWarnings({"unchecked","rawtypes"}) 
@Override public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType,int i,int j,int k){
	  if (par1EnumCreatureType == EnumCreatureType.monster) 
	{
	    List monsters=new ArrayList();
	    monsters.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 8, 1, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityPixelOneSwingman.class, 1, 1, 1));
	    return monsters;
	}
	if (par1EnumCreatureType == EnumCreatureType.creature) 
	{
		List creatures=new ArrayList();
		creatures.add(new BiomeGenBase.SpawnListEntry(EntityhumanPixel.class, 8, 2, 3));
		creatures.add(new BiomeGenBase.SpawnListEntry(EntitypixelPig.class, 8, 1, 3));
		creatures.add(new BiomeGenBase.SpawnListEntry(EntitypixelCow.class, 8, 1, 3));
		return creatures;
		}
	  return null;
	}
 
开发者ID:RamiLego4Game,项目名称:GalacticraftPixelGalaxy,代码行数:24,代码来源:ChunkProviderGreenPixel.java

示例15: swapEntitySpawn

import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; //导入依赖的package包/类
/**
 * Replaces the class used when spawning an entity in a world.
 *
 * @param o Original class
 * @param c Replacement class
 * @param e CreatureType
 */
public static void swapEntitySpawn(Class<? extends Entity> o, Class<? extends Entity> c, EnumCreatureType e) {
    BiomeGenBase[] standardBiomes = BiomeGenBase.getBiomeGenArray();

    for (BiomeGenBase biome : standardBiomes) {
        if (biome != null) {
            List<SpawnListEntry> spawnableList = biome.getSpawnableList(e);
            if (spawnableList != null) {
                for (SpawnListEntry entry : spawnableList) {
                    if (entry != null && entry.entityClass == o) {
                        entry.entityClass = c;
                    }
                }
            }
        }
    }
}
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:24,代码来源:ApiEntity.java


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