本文整理汇总了Java中net.minecraft.world.biome.BiomeDesert类的典型用法代码示例。如果您正苦于以下问题:Java BiomeDesert类的具体用法?Java BiomeDesert怎么用?Java BiomeDesert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BiomeDesert类属于net.minecraft.world.biome包,在下文中一共展示了BiomeDesert类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onInitialSpawn
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
/**
* Overridden to call {@link EntityZombie#setChild(boolean)} to force all ZombieHands to be adults, and to create HuskHands in desert biomes
*/
@Override
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
{
super.onInitialSpawn(difficulty, livingdata);
this.setChild(false);
// *** logic copied from 1.10 implementation of EntityZombie
Biome biome = this.world.getBiome(new BlockPos(this));
if (biome instanceof BiomeDesert && this.world.canSeeSky(new BlockPos(this)) && this.rand.nextInt(5) != 0)
{
this.setZombieType(ZombieType.HUSK);
}
// *** logic copied from 1.10 implementation of EntityZombie
return livingdata;
}
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:20,代码来源:EntityZombieHands.java
示例2: Start
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
public Start(BiomeProvider chunkManagerIn, int p_i2104_2_, Random rand, int p_i2104_4_, int p_i2104_5_, List<StructureVillagePieces.PieceWeight> p_i2104_6_, int p_i2104_7_)
{
super((StructureVillagePieces.Start)null, 0, rand, p_i2104_4_, p_i2104_5_);
this.worldChunkMngr = chunkManagerIn;
this.structureVillageWeightedPieceList = p_i2104_6_;
this.terrainType = p_i2104_7_;
Biome biome = chunkManagerIn.getBiome(new BlockPos(p_i2104_4_, 0, p_i2104_5_), Biomes.DEFAULT);
if (biome instanceof BiomeDesert)
{
this.structureType = 1;
}
else if (biome instanceof BiomeSavanna)
{
this.structureType = 2;
}
else if (biome instanceof BiomeTaiga)
{
this.structureType = 3;
}
this.func_189924_a(this.structureType);
this.isZombieInfested = rand.nextInt(50) == 0;
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:StructureVillagePieces.java
示例3: Start
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
public Start(BiomeProvider chunkManagerIn, int p_i2104_2_, Random rand, int p_i2104_4_, int p_i2104_5_, List<StructureVillagePieces.PieceWeight> p_i2104_6_, int p_i2104_7_)
{
super((StructureVillagePieces.Start)null, 0, rand, p_i2104_4_, p_i2104_5_);
this.worldChunkMngr = chunkManagerIn;
this.structureVillageWeightedPieceList = p_i2104_6_;
this.terrainType = p_i2104_7_;
Biome biome = chunkManagerIn.getBiome(new BlockPos(p_i2104_4_, 0, p_i2104_5_), Biomes.DEFAULT);
this.biome = biome;
this.startPiece = this;
if (biome instanceof BiomeDesert)
{
this.structureType = 1;
}
else if (biome instanceof BiomeSavanna)
{
this.structureType = 2;
}
else if (biome instanceof BiomeTaiga)
{
this.structureType = 3;
}
this.func_189924_a(this.structureType);
this.isZombieInfested = rand.nextInt(50) == 0;
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:27,代码来源:StructureVillagePieces.java
示例4: setVariantByCurrentBiome
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
private void setVariantByCurrentBiome() {
Biome biome = world.getBiome(getPosition());
if (biome instanceof BiomeTaiga) {
variant = BaileyVariant.TAIGA;
} else if (biome instanceof BiomeDesert) {
variant = BaileyVariant.DESERT;
} else if (biome instanceof BiomePlains) {
variant = BaileyVariant.PLAINS;
} else if (biome instanceof BiomeSavanna) {
variant = BaileyVariant.SAVANNA;
} else {
variant = BaileyVariant.random();
}
}
开发者ID:ToroCraft,项目名称:Dailies,代码行数:15,代码来源:EntityBailey.java
示例5: isPermitted
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
@Override
public boolean isPermitted(Biome biome) {
return biome instanceof BiomeJungle ||
biome instanceof BiomeSavanna ||
biome instanceof BiomeDesert || biome instanceof BiomeMesa;
}
开发者ID:JayAvery,项目名称:geomastery,代码行数:8,代码来源:BlockSeedling.java
示例6: generate
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {
if (world.provider.getDimension() == 0) {
WorldGenAbstractTree apple = new WorldGenApple(false);
WorldGenAbstractTree maple = new WorldGenMaple(false);
WorldGenAbstractTree ebony = new WorldGenEbony(false);
WorldGenAbstractTree fir = new WorldGenFir(false);
WorldGenAbstractTree pine = new WorldGenPine(false);
WorldGenAbstractTree willow = new WorldGenWillow();
WorldGenAbstractTree yew = new WorldGenYew();
// get the biome
Biome biome = world.getBiome(new BlockPos(chunkX * 16, 64, chunkZ * 16));
if (biome instanceof BiomeDesert) {
makeTree(ebony, chunkX, chunkZ, random, world, 0, 1);
}
if (biome instanceof BiomeForest || biome instanceof BiomeForestMutated) {
if (random.nextInt(4) == 0) {
makeTree(maple, chunkX, chunkZ, random, world, 0, 3);
}
if (random.nextInt(12) == 0) {
makeTree(apple, chunkX, chunkZ, random, world, 1, 2);
}
makeTree(pine, chunkX, chunkZ, random, world, 0, 3);
}
if (biome instanceof BiomeHills) {
makeTree(maple, chunkX, chunkZ, random, world, 0, 3);
makeTree(fir, chunkX, chunkZ, random, world, 0, 3);
}
if (biome instanceof BiomeMesa && random.nextBoolean()) {
makeTree(ebony, chunkX, chunkZ, random, world, 1, 3);
}
if (biome instanceof BiomePlains) {
makeTree(apple, chunkX, chunkZ, random, world, 0, 1);
}
if (biome instanceof BiomeRiver && random.nextInt(3) == 0) {
makeTree(yew, chunkX, chunkZ, random, world, 0, 3);
}
if (biome instanceof BiomeSavanna) {
makeTree(ebony, chunkX, chunkZ, random, world, 0, 3);
}
if (biome instanceof BiomeSwamp) {
if (random.nextInt(2) == 0) {
makeTree(willow, chunkX, chunkZ, random, world, 0, 3);
}
if (random.nextInt(1) == 0) {
makeTree(yew, chunkX, chunkZ, random, world, 0, 3);
}
}
if (biome instanceof BiomeTaiga) {
makeTree(pine, chunkX, chunkZ, random, world, 0, 3);
makeTree(fir, chunkX, chunkZ, random, world, 1, 4);
}
if (biome instanceof BiomeJungle) {
makeTree(rubber, chunkX, chunkZ, random, world, 0, 3);
}
}
}
开发者ID:MinecraftModDevelopmentMods,项目名称:Got-Wood,代码行数:71,代码来源:WorldGenerator.java
示例7: getRandomRabbitType
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
private int getRandomRabbitType()
{
Biome biome = this.world.getBiome(new BlockPos(this));
int i = this.rand.nextInt(100);
return biome.isSnowyBiome() ? (i < 80 ? 1 : 3) : (biome instanceof BiomeDesert ? 4 : (i < 50 ? 0 : (i < 90 ? 5 : 2)));
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:7,代码来源:EntityRabbit.java
示例8: getRandomRabbitType
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
private int getRandomRabbitType()
{
Biome biome = this.worldObj.getBiome(new BlockPos(this));
int i = this.rand.nextInt(100);
return biome.isSnowyBiome() ? (i < 80 ? 1 : 3) : (biome instanceof BiomeDesert ? 4 : (i < 50 ? 0 : (i < 90 ? 5 : 2)));
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:7,代码来源:EntityRabbit.java
示例9: getRandomRabbitType
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
private int getRandomRabbitType()
{
Biome biome = this.worldObj.getBiomeGenForCoords(new BlockPos(this));
int i = this.rand.nextInt(100);
return biome.isSnowyBiome() ? (i < 80 ? 1 : 3) : (biome instanceof BiomeDesert ? 4 : (i < 50 ? 0 : (i < 90 ? 5 : 2)));
}
开发者ID:BlazeAxtrius,项目名称:ExpandedRailsMod,代码行数:7,代码来源:EntityRabbit.java
示例10: chooseTemp
import net.minecraft.world.biome.BiomeDesert; //导入依赖的package包/类
/** Assigns a temperature to the biome.
* @return The base temperature for the biome */
private static float chooseTemp(Biome biome) {
if (biome == Biomes.MUTATED_ICE_FLATS) {
return -4;
} else if (biome instanceof BiomeSnow) {
return -3;
} else if (biome == Biomes.FROZEN_RIVER) {
return -2;
} else if (biome == Biomes.COLD_TAIGA ||
biome == Biomes.COLD_TAIGA_HILLS ||
biome == Biomes.MUTATED_TAIGA_COLD) {
return -1;
} else if (biome == Biomes.COLD_BEACH) {
return -0.5F;
} else if (biome instanceof BiomeHills || biome instanceof BiomeTaiga ||
biome instanceof BiomeVoid || biome instanceof BiomeEnd) {
return 0;
} else if (biome == Biomes.STONE_BEACH) {
return 0.5F;
} else if (biome == Biomes.BIRCH_FOREST ||
biome == Biomes.BIRCH_FOREST_HILLS) {
return 1;
} else if (biome instanceof BiomeOcean || biome instanceof BiomeForest
|| biome instanceof BiomeRiver) {
return 2;
} else if (biome instanceof BiomePlains) {
return 2.5F;
} else if (biome instanceof BiomeSwamp || biome instanceof BiomeBeach) {
return 3;
} else if (biome instanceof BiomeMushroomIsland) {
return 4;
} else if (biome instanceof BiomeJungle) {
return 4.5F;
} else if (biome instanceof BiomeSavanna) {
return 5;
} else if (biome instanceof BiomeDesert || biome instanceof BiomeMesa ||
biome instanceof BiomeHell) {
return 6;
} else {
float base = biome.getTemperature();
float converted = (base - 1) * 10;
Geomastery.LOG.info("Unsupported biome {} has had its temperature set to {}", biome.getBiomeName(), converted);
return converted;
}
}
开发者ID:JayAvery,项目名称:geomastery,代码行数:79,代码来源:GeoBiomes.java
注:本文中的net.minecraft.world.biome.BiomeDesert类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论