本文整理匯總了Java中net.minecraftforge.event.terraingen.TerrainGen.decorate方法的典型用法代碼示例。如果您正苦於以下問題:Java TerrainGen.decorate方法的具體用法?Java TerrainGen.decorate怎麽用?Java TerrainGen.decorate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.event.terraingen.TerrainGen
的用法示例。
在下文中一共展示了TerrainGen.decorate方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: genDecorations
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
protected void genDecorations(BiomeGenBase biome) {
MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z));
//TODO will need to update most, if not all, randomly-generated coordinates once I make the new terrain gen
int i; //the for-loop iterator (counter); declared here for re-usability on subsequent world-gen loops
int x; //the randomly-generated x-Coord; declared here for re-usability on subsequent world-gen loops
int y; //the randomly-generated y-Coord; declared here for re-usability on subsequent world-gen loops
int z; //the randomly-generated z-Coord; declared here for re-usability on subsequent world-gen loops
//the event firing is here just for completeness though it may never be used
boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CUSTOM);
for (i = 0; doGen && i < wightBulbPerChunk; ++i)
{
x = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
y = this.randomGenerator.nextInt(128);
z = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.wightBulbGen.generate(this.currentWorld, this.randomGenerator, x, y, z);
}
MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z));
}
示例2: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nileBlueFlower);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 10; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blueFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例3: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nilePinkFlower);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 10; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blueFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例4: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nileBlackFlower);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 10; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blueFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例5: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blackFlowerGenerator = new WorldGenFlowers(ModBlocks.nileBlackFlower.blockID);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 30; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blackFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例6: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nileBlueFlower.blockID);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 10; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blueFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例7: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nileBlueFlower.blockID);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 30; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blueFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例8: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nilePinkFlower.blockID);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 10; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blueFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例9: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z){
super.decorate(par1World, par2Random, chunk_X, chunk_Z);
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nileBlackFlower.blockID);
boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS);
for (int j = 0; doGen && j < 10; ++j)
{
int k = chunk_X + par2Random.nextInt(16) + 8;
int l = par2Random.nextInt(128);
int i1 = chunk_Z + par2Random.nextInt(16) + 8;
blueFlowerGenerator.generate(par1World, par2Random, k, l, i1);
}
}
示例10: generate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
public void generate(final Random randomGenerator, final int chunkX, final int chunkZ, final World world, final IChunkProvider chunkGenerator, final IChunkProvider chunkProvider)
{
final boolean doGen = TerrainGen.decorate(world, randomGenerator, chunkX, chunkZ, CLAY);
for (int i = 0; doGen && i < WorldGenSalt.saltPerChunk; ++i)
{
final int randX = chunkX * 16 + randomGenerator.nextInt(16) + 8;
final int randZ = chunkZ * 16 + randomGenerator.nextInt(16) + 8;
this.generate(world, randomGenerator, randX, world.getTopSolidOrLiquidBlock(randX, randZ), randZ);
}
}
示例11: getGen
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
private boolean getGen(EventType event)
{
return TerrainGen.decorate(this.currentWorld, this.randomGenerator, this.chunk_X, this.chunk_Z, event);
}
示例12: genDecorations
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
@Override
protected void genDecorations(BiomeGenBase p_150513_1_)
{
MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z));
int i;
int j;
int k;
boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND);
for (i = 0; doGen && i < this.sandPerChunk2; ++i)
{
j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k);
}
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY);
for (i = 0; doGen && i < this.clayPerChunk; ++i)
{
j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.clayGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k);
}
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2);
for (i = 0; doGen && i < this.sandPerChunk; ++i)
{
j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k);
}
i = this.treesPerChunk;
if (this.randomGenerator.nextInt(10) == 0)
{
++i;
}
int l;
int i1;
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE);
for (j = 0; doGen && j < i; ++j)
{
k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
i1 = this.currentWorld.getHeightValue(k, l);
WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator);
worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D);
if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l))
{
worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l);
}
}
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS);
for (j = 0; doGen && j < this.grassPerChunk; ++j)
{
k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator);
worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l);
}
}
示例13: getGen
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
private boolean getGen(EventType event)
{
return TerrainGen.decorate(this.currentWorld, this.rand, this.chunkX, this.chunkZ, event);
}
示例14: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_)
{
int k;
int l;
int i1;
int j1;
if (this.field_150644_aH == 1 || this.field_150644_aH == 2)
{
k = p_76728_2_.nextInt(3);
for (l = 0; l < k; ++l)
{
i1 = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
j1 = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
int k1 = p_76728_1_.getHeightValue(i1, j1);
field_150643_aG.generate(p_76728_1_, p_76728_2_, i1, k1, j1);
}
}
genTallFlowers.func_150548_a(3);
for (k = 0; k < 7; ++k)
{
l = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
i1 = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
j1 = p_76728_2_.nextInt(p_76728_1_.getHeightValue(l, i1) + 32);
genTallFlowers.generate(p_76728_1_, p_76728_2_, l, j1, i1);
}
WorldGenFlowers blueFlowerGenerator = new WorldGenFlowers(ModBlocks.nileBlueFlower);
boolean doGen = TerrainGen.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_, FLOWERS);
for (int j = 0; doGen && j < 30; ++j)
{
int k2 = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
int l2 = p_76728_2_.nextInt(128);
int i2 = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
blueFlowerGenerator.generate(p_76728_1_, p_76728_2_, k2, l2, i2);
}
super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_);
}
示例15: decorate
import net.minecraftforge.event.terraingen.TerrainGen; //導入方法依賴的package包/類
/**
* The method that does the work of actually decorating chunks
*/
@Override
protected void decorate()
{
MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z));
this.generateOres();
int i;
int j;
int k;
boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND);
for (i = 0; doGen && i < this.sandPerChunk2; ++i)
{
j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k);
}
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2);
for (i = 0; doGen && i < this.sandPerChunk; ++i)
{
j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k);
}
int l;
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE);
for (j = 0; doGen && j < i; ++j)
{
k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
WorldGenerator worldgenerator = this.biome.getRandomWorldGenForTrees(this.randomGenerator);
worldgenerator.setScale(1.0D, 1.0D, 1.0D);
worldgenerator.generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l);
}
int i1;
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS);
for (j = 0; doGen && j < this.grassPerChunk; ++j)
{
k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
l = this.randomGenerator.nextInt(128);
i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
WorldGenerator worldgenerator1 = this.biome.getRandomWorldGenForGrass(this.randomGenerator);
worldgenerator1.generate(this.currentWorld, this.randomGenerator, k, l, i1);
}
MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z));
}