本文整理汇总了Java中net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks方法的典型用法代码示例。如果您正苦于以下问题:Java ChunkProviderEvent.ReplaceBiomeBlocks方法的具体用法?Java ChunkProviderEvent.ReplaceBiomeBlocks怎么用?Java ChunkProviderEvent.ReplaceBiomeBlocks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.event.terraingen.ChunkProviderEvent
的用法示例。
在下文中一共展示了ChunkProviderEvent.ReplaceBiomeBlocks方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_) {
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_5_);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) {
return;
}
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, p_147422_1_ * 16, p_147422_2_ * 16, 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
BiomeGenBase biomegenbase = p_147422_5_[(l + k * 16)];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[(l + k * 16)]);
}
}
}
示例2: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int par1, int par2, Block[] blocks, byte[] par3ArrayOfByte, BiomeGenBase[] par4ArrayOfBiomeGenBase) {
GameLogHelper.writeToLog(Level.INFO, "Replacing block for biome.");
@SuppressWarnings("deprecation")
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, par1, par2, blocks, par3ArrayOfByte, par4ArrayOfBiomeGenBase);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
double d0 = 0.03125D;
this.stoneNoise = this.noisePerl.func_151599_a(this.stoneNoise, (double)(par1 * 16), (double)(par2 * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
/*for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
BiomeGenPat biomegenbase = (BiomeGenPat) par4ArrayOfBiomeGenBase[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, blocks, par3ArrayOfByte, par1 * 16 + k, par2 * 16 + l, this.stoneNoise[l + k * 16]);
}
for (int l = 0; l < 8; ++l) {
BiomeGenJen biomegenbase = (BiomeGenJen) par4ArrayOfBiomeGenBase[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, blocks, par3ArrayOfByte, par1 * 16 + k, par2 * 16 + l, this.stoneNoise[l + k * 16]);
}
}*/
}
示例3: onEvent
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onEvent(ChunkProviderEvent.ReplaceBiomeBlocks event){
int dim = event.world.provider.getDimensionId();
if(this.replacedMapGensDimensions.contains(dim)){
//don't touch, we already replaced it
return;
}
this.replacedMapGensDimensions.add(dim);
IChunkProvider prov = event.chunkProvider;
if(!(prov instanceof ChunkProviderGenerate)){
return;
}
List<Field> genFields = ReflectionUtil.getFieldsByType(MapGenBase.class, ChunkProviderGenerate.class, false);
for(Field field : genFields){
MapGenBase value = ReflectionUtil.getValue(field, prov, MapGenBase.class);
value = WorldGenUtil.tileableMapGen(value);
ReflectionUtil.setValue(field, prov, value);
}
}
示例4: func_180517_a
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void func_180517_a(int p_180517_1_, int p_180517_2_, ChunkPrimer p_180517_3_, BiomeGenBase[] p_180517_4_)
{
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180517_1_,
p_180517_2_, p_180517_3_, this.worldObj);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY)
return;
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, (double) (p_180517_1_ * 16),
(double) (p_180517_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k)
{
for (int l = 0; l < 16; ++l)
{
BiomeGenBase biomegenbase = p_180517_4_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_180517_3_, p_180517_1_ * 16 + k,
p_180517_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例5: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_)
{
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_4_, p_147422_5_);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, (double)(p_147422_1_ * 16), (double)(p_147422_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k)
{
for (int l = 0; l < 16; ++l)
{
BiomeGenBase biomegenbase = p_147422_5_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例6: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_)
{
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_4_, p_147422_5_, this.worldObj);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, (double)(p_147422_1_ * 16), (double)(p_147422_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k)
{
for (int l = 0; l < 16; ++l)
{
BiomeGenBase biomegenbase = p_147422_5_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例7: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_) {
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_4_, p_147422_5_);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY)
return;
double d0 = 0.03125D;
this.stoneNoise = this.noiseGen4.func_151599_a(this.stoneNoise, (double) (p_147422_1_ * 16), (double) (p_147422_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
BiomeGenBase biomegenbase = p_147422_5_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例8: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_)
{
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_5_);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, (double)(p_147422_1_ * 16), (double)(p_147422_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k)
{
for (int l = 0; l < 16; ++l)
{
BiomeGenBase biomegenbase = p_147422_5_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例9: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_)
{
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_4_, p_147422_5_, this.worldObj);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, (double)(p_147422_1_ * 16), (double)(p_147422_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k)
{
for (int l = 0; l < 16; ++l)
{
BiomeGenBase biomegenbase = p_147422_5_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例10: func_180517_a
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void func_180517_a(int p_180517_1_, int p_180517_2_, ChunkPrimer p_180517_3_, BiomeGenBase[] p_180517_4_)
{
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180517_1_, p_180517_2_, p_180517_3_, this.worldObj);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, (double)(p_180517_1_ * 16), (double)(p_180517_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k)
{
for (int l = 0; l < 16; ++l)
{
BiomeGenBase biomegenbase = p_180517_4_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_180517_3_, p_180517_1_ * 16 + k, p_180517_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例11: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_) {
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_5_);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY)
return;
double d0 = 0.03125D;
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, p_147422_1_ * 16, p_147422_2_ * 16, 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
BiomeGenBase biomegenbase = p_147422_5_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例12: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int chunkX, int chunkZ, Block[] blocks, byte[] blockMeta, BiomeGenBase[] biomesForGeneration)
{
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, chunkX, chunkZ, blocks, blockMeta, biomesForGeneration);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Event.Result.DENY) return;
double d0 = 0.03125D;
int posX = chunkX * 16;
int posZ = chunkZ * 16;
this.stoneNoise = this.noiseGen4.generateNoiseOctaves(this.stoneNoise, posX, posZ, 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int z = 0; z < 16; ++z) {
for (int x = 0; x < 16; ++x) {
BiomeGenBase biomegenbase = biomesForGeneration[x + z * 16];
biomegenbase.genTerrainBlocks(this.world, this.rand, blocks, blockMeta, posX + z, posZ + x, this.stoneNoise[x + z * 16]);
}
}
}
示例13: func_180517_a
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void func_180517_a(int p_180517_1_, int p_180517_2_, ChunkPrimer p_180517_3_, BiomeGenBase[] p_180517_4_) {
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180517_1_, p_180517_2_, p_180517_3_, this.worldObj);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
BiomeGenBase biomegenbase = p_180517_4_[l + k * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_180517_3_, p_180517_1_ * 16 + k, p_180517_2_ * 16 + l, this.stoneNoise[l + k * 16]);
}
}
}
示例14: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int x, int y, Block[] blocks, byte[] meta, BiomeGenBase[] biomes) {
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, x, y, blocks, biomes);
MinecraftForge.EVENT_BUS.post(event);
if(event.getResult() == Result.DENY) {
return;
}
double d = 0.03125D;
stoneNoise = noiseGen4.func_151599_a(stoneNoise, (double) (x * 16), (double) (y * 16), 16, 16, d * 2.0D, d * 2.0D, 1.0D);
for(int i = 0; i < 16; i++) {
for(int j = 0; j < 16; j++) {
BiomeGenBase biome = biomes[j + i * 16];
biome.genTerrainBlocks(world, random, blocks, meta, x * 16 + i, y * 16 + j, stoneNoise[j + i * 16]);
}
}
}
示例15: replaceBlocksForBiome
import net.minecraftforge.event.terraingen.ChunkProviderEvent; //导入方法依赖的package包/类
public void replaceBlocksForBiome(int chunkX, int chunkZ, byte[] byteArray, BiomeGenBase[] biomesForGeneration2) {
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, chunkX, chunkZ, byteArray, biomesForGeneration2);
MinecraftForge.EVENT_BUS.post(event);
if(event.getResult() == Result.DENY) return;
byte b = 63;
double d = 0.031250;
this.stoneNoise = this.noiseGen4.generateNoiseOctaves(stoneNoise, chunkX*16, chunkZ*16, 0, 16, 16, 1, d*2D, d*2D, d*2D);
for(int x = 0; x < 16; x++){
for(int z = 0; z < 16; z++){
BiomeGenBase biome = biomesForGeneration2[z + x*16];
float temperature = biome.getFloatTemperature();
int i = (int) (this.stoneNoise[z + x*16] / 3D + 3D + this.rand.nextDouble() * 0.25D);
int j = -1;
byte b1 = biome.topBlock;
byte b2 = biome.fillerBlock;
for(int k = 127; k >= 0; k--){
int l = (z*16+x)*128+k;
if(k <= this.rand.nextInt(3)){
byteArray[l] = (byte)Block.bedrock.blockID;
}else{
byte b3 = byteArray[l];
if(b3 == 0){
j = -1;
}else if(b3 == Block.stone.blockID){
if(j == -1){
if(i <= 0){
b1 = 0;
b2 = (byte)Block.stone.blockID;
}else if(k >= b-2 && k <= b +1){//Generating Land
b1 = biome.topBlock;
b2 = biome.fillerBlock;
}
//Generating Water
if(k < b && b1 == 0){
if(temperature < 0.15F){
b1 = (byte)Block.ice.blockID;
}else{
b1 = (byte)Block.waterStill.blockID;
}
}
chunkZ = chunkX;
if(k >= b-1){
byteArray[l] = b1;
}else{
byteArray[l] = b2;
}
}else if(chunkZ>0){
chunkZ--;
byteArray[l] = b2;
if(chunkZ == 0 && b2 == Block.sand.blockID){
chunkZ = this.rand.nextInt(4);
b2 = (byte)Block.sandStone.blockID;
}
}
}
}
}
}
}
}