本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
示例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));
}
}
示例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();
}
}
}
}
示例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>();
}
}
示例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));
}
}
示例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();
}
}
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
}
}
}
}
}