本文整理汇总了Java中net.minecraft.world.biome.BiomeGenBase.swampland方法的典型用法代码示例。如果您正苦于以下问题:Java BiomeGenBase.swampland方法的具体用法?Java BiomeGenBase.swampland怎么用?Java BiomeGenBase.swampland使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.biome.BiomeGenBase
的用法示例。
在下文中一共展示了BiomeGenBase.swampland方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Start
import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
public Start(World worldIn, Random p_i2060_2_, int p_i2060_3_, int p_i2060_4_)
{
super(p_i2060_3_, p_i2060_4_);
BiomeGenBase biomegenbase = worldIn.getBiomeGenForCoords(new BlockPos(p_i2060_3_ * 16 + 8, 0, p_i2060_4_ * 16 + 8));
if (biomegenbase != BiomeGenBase.jungle && biomegenbase != BiomeGenBase.jungleHills)
{
if (biomegenbase == BiomeGenBase.swampland)
{
ComponentScatteredFeaturePieces.SwampHut componentscatteredfeaturepieces$swamphut = new ComponentScatteredFeaturePieces.SwampHut(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
this.components.add(componentscatteredfeaturepieces$swamphut);
}
else if (biomegenbase == BiomeGenBase.desert || biomegenbase == BiomeGenBase.desertHills)
{
ComponentScatteredFeaturePieces.DesertPyramid componentscatteredfeaturepieces$desertpyramid = new ComponentScatteredFeaturePieces.DesertPyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
this.components.add(componentscatteredfeaturepieces$desertpyramid);
}
}
else
{
ComponentScatteredFeaturePieces.JunglePyramid componentscatteredfeaturepieces$junglepyramid = new ComponentScatteredFeaturePieces.JunglePyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
this.components.add(componentscatteredfeaturepieces$junglepyramid);
}
this.updateBoundingBox();
}
示例2: GenLayerBiome
import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
super(p_i45560_1_);
this.parent = p_i45560_3_;
if (p_i45560_4_ == WorldType.DEFAULT_1_1)
{
this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
this.field_175973_g = null;
}
else if (p_i45560_4_ == WorldType.CUSTOMIZED)
{
this.field_175973_g = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).func_177864_b();
}
else
{
this.field_175973_g = null;
}
}
示例3: getCanSpawnHere
import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
BlockPos blockpos = new BlockPos(MathHelper.floor_double(this.posX), 0, MathHelper.floor_double(this.posZ));
Chunk chunk = this.worldObj.getChunkFromBlockCoords(blockpos);
if (this.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT && this.rand.nextInt(4) != 1)
{
return false;
}
else
{
if (this.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL)
{
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos);
if (biomegenbase == BiomeGenBase.swampland && this.posY > 50.0D && this.posY < 70.0D && this.rand.nextFloat() < 0.5F && this.rand.nextFloat() < this.worldObj.getCurrentMoonPhaseFactor() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.nextInt(8))
{
return super.getCanSpawnHere();
}
if (this.rand.nextInt(10) == 0 && chunk.getRandomWithSeed(987234911L).nextInt(10) == 0 && this.posY < 40.0D)
{
return super.getCanSpawnHere();
}
}
return false;
}
}
示例4: getColorBiome
import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
protected static BiomeGenBase getColorBiome(IBlockAccess p_getColorBiome_0_, BlockPos p_getColorBiome_1_)
{
BiomeGenBase biomegenbase = p_getColorBiome_0_.getBiomeGenForCoords(p_getColorBiome_1_);
if (biomegenbase == BiomeGenBase.swampland && !Config.isSwampColors())
{
biomegenbase = BiomeGenBase.plains;
}
return biomegenbase;
}
示例5: getColor
import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
public int getColor(IBlockAccess p_getColor_1_, BlockPos p_getColor_2_)
{
BiomeGenBase biomegenbase = CustomColors.getColorBiome(p_getColor_1_, p_getColor_2_);
return CustomColors.swampGrassColors != null && biomegenbase == BiomeGenBase.swampland ? CustomColors.swampGrassColors.getColor(biomegenbase, p_getColor_2_) : biomegenbase.getGrassColorAtPos(p_getColor_2_);
}
示例6: getSmoothColorMultiplier
import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
private static int getSmoothColorMultiplier(Block p_getSmoothColorMultiplier_0_, IBlockAccess p_getSmoothColorMultiplier_1_, BlockPos p_getSmoothColorMultiplier_2_, int[] p_getSmoothColorMultiplier_3_, int[] p_getSmoothColorMultiplier_4_, int p_getSmoothColorMultiplier_5_, int p_getSmoothColorMultiplier_6_, RenderEnv p_getSmoothColorMultiplier_7_)
{
int i = 0;
int j = 0;
int k = 0;
int l = p_getSmoothColorMultiplier_2_.getX();
int i1 = p_getSmoothColorMultiplier_2_.getY();
int j1 = p_getSmoothColorMultiplier_2_.getZ();
BlockPosM blockposm = p_getSmoothColorMultiplier_7_.getColorizerBlockPosM();
for (int k1 = l - 1; k1 <= l + 1; ++k1)
{
for (int l1 = j1 - 1; l1 <= j1 + 1; ++l1)
{
blockposm.setXyz(k1, i1, l1);
int[] aint = p_getSmoothColorMultiplier_3_;
if (p_getSmoothColorMultiplier_4_ != p_getSmoothColorMultiplier_3_ && p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm) == BiomeGenBase.swampland)
{
aint = p_getSmoothColorMultiplier_4_;
}
int i2 = 0;
if (aint == null)
{
switch (p_getSmoothColorMultiplier_5_)
{
case 1:
i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getGrassColorAtPos(blockposm);
break;
case 2:
if ((p_getSmoothColorMultiplier_6_ & 3) == 1)
{
i2 = ColorizerFoliage.getFoliageColorPine();
}
else if ((p_getSmoothColorMultiplier_6_ & 3) == 2)
{
i2 = ColorizerFoliage.getFoliageColorBirch();
}
else
{
i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getFoliageColorAtPos(blockposm);
}
break;
default:
i2 = p_getSmoothColorMultiplier_0_.colorMultiplier(p_getSmoothColorMultiplier_1_, blockposm);
}
}
else
{
i2 = getCustomColor(aint, p_getSmoothColorMultiplier_1_, blockposm);
}
i += i2 >> 16 & 255;
j += i2 >> 8 & 255;
k += i2 & 255;
}
}
int j2 = i / 9;
int k2 = j / 9;
int l2 = k / 9;
return j2 << 16 | k2 << 8 | l2;
}
示例7: getSmoothColorMultiplier
import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
private static int getSmoothColorMultiplier(Block p_getSmoothColorMultiplier_0_, IBlockAccess p_getSmoothColorMultiplier_1_, BlockPos p_getSmoothColorMultiplier_2_, int[] p_getSmoothColorMultiplier_3_, int[] p_getSmoothColorMultiplier_4_, int p_getSmoothColorMultiplier_5_, int p_getSmoothColorMultiplier_6_, RenderEnv p_getSmoothColorMultiplier_7_)
{
int i = 0;
int j = 0;
int k = 0;
int l = p_getSmoothColorMultiplier_2_.getX();
int i1 = p_getSmoothColorMultiplier_2_.getY();
int j1 = p_getSmoothColorMultiplier_2_.getZ();
BlockPosM blockposm = p_getSmoothColorMultiplier_7_.getColorizerBlockPos();
for (int k1 = l - 1; k1 <= l + 1; ++k1)
{
for (int l1 = j1 - 1; l1 <= j1 + 1; ++l1)
{
blockposm.setXyz(k1, i1, l1);
int[] aint = p_getSmoothColorMultiplier_3_;
if (p_getSmoothColorMultiplier_4_ != p_getSmoothColorMultiplier_3_ && p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm) == BiomeGenBase.swampland)
{
aint = p_getSmoothColorMultiplier_4_;
}
int i2 = 0;
if (aint == null)
{
switch (p_getSmoothColorMultiplier_5_)
{
case 1:
i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getGrassColorAtPos(blockposm);
break;
case 2:
if ((p_getSmoothColorMultiplier_6_ & 3) == 1)
{
i2 = ColorizerFoliage.getFoliageColorPine();
}
else if ((p_getSmoothColorMultiplier_6_ & 3) == 2)
{
i2 = ColorizerFoliage.getFoliageColorBirch();
}
else
{
i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getFoliageColorAtPos(blockposm);
}
break;
default:
i2 = p_getSmoothColorMultiplier_0_.colorMultiplier(p_getSmoothColorMultiplier_1_, blockposm);
}
}
else
{
i2 = getCustomColor(aint, p_getSmoothColorMultiplier_1_, blockposm);
}
i += i2 >> 16 & 255;
j += i2 >> 8 & 255;
k += i2 & 255;
}
}
int j2 = i / 9;
int k2 = j / 9;
int l2 = k / 9;
return j2 << 16 | k2 << 8 | l2;
}