当前位置: 首页>>代码示例>>Java>>正文


Java ChunkProviderEvent类代码示例

本文整理汇总了Java中net.minecraftforge.event.terraingen.ChunkProviderEvent的典型用法代码示例。如果您正苦于以下问题:Java ChunkProviderEvent类的具体用法?Java ChunkProviderEvent怎么用?Java ChunkProviderEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ChunkProviderEvent类属于net.minecraftforge.event.terraingen包,在下文中一共展示了ChunkProviderEvent类的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)]);
		}
	}

}
 
开发者ID:kormic911,项目名称:EvilOcean,代码行数:20,代码来源:ChunkProviderOcean.java

示例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]);
		}
	}*/
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:20,代码来源:ChunkProviderEpic.java

示例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);
	}
}
 
开发者ID:Barteks2x,项目名称:McWorldGenLoop,代码行数:21,代码来源:EventListener.java

示例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]);
		}
	}
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:23,代码来源:CoalDimension.java

示例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]);
		}
	}
}
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:19,代码来源:ChunkProviderNowhere.java

示例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]);
		}
	}
}
 
开发者ID:zmaster587,项目名称:AdvancedRocketry,代码行数:19,代码来源:ChunkProviderPlanet.java

示例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]);
		}
	}
}
 
开发者ID:TheDarkEra,项目名称:TheDarkEra,代码行数:18,代码来源:TDEChunkProvider.java

示例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]);
        }
    }
}
 
开发者ID:CodecademyMinecraftMods,项目名称:atlantis-mod,代码行数:19,代码来源:ChunkProviderTheDeep.java

示例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]);
        }
    }
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:19,代码来源:ChunkProviderNillax.java

示例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]);
        }
    }
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:19,代码来源:ChunkProviderNillax.java

示例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]);
		}
	}
}
 
开发者ID:jaredlll08,项目名称:MysticalTrinkets,代码行数:17,代码来源:ChunkProviderMysticalDimension.java

示例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]);
        }
    }
}
 
开发者ID:Cortex-Modders,项目名称:CodeLyokoMod,代码行数:19,代码来源:LyokoBaseChunkProvider.java

示例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]);
         }
     }
}
 
开发者ID:TEAMModding,项目名称:FutureCraft,代码行数:13,代码来源:ChunkProviderPlanet.java

示例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]);
		}
	}
}
 
开发者ID:AgeCraft,项目名称:AgeCraft-Old,代码行数:16,代码来源:AgeChunkProvider.java

示例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;
							}
						}
					}
				}
			}
		}
	}
}
 
开发者ID:MinecraftModArchive,项目名称:Runes-And-Silver,代码行数:70,代码来源:ChunkProviderCustomDimension.java


注:本文中的net.minecraftforge.event.terraingen.ChunkProviderEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。