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


Java BlockHelper类代码示例

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


BlockHelper类属于net.minecraft.block.state.pattern包,在下文中一共展示了BlockHelper类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateNether

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public void generateNether(World world, Random rand, int x, int z)
{
	int x1 = x;
	int y1 = 0;
	int z1 = z;
	this.generateOre(MBlocks.blazium_ore, world, rand, x1, z1, 1, 10, 15, 0, 128,
	                 BlockHelper.forBlock(Blocks.netherrack), true);
	this.generateOre(MBlocks.glow_mossy_netherrack, world, rand, x1, z1, 5, 20, 2, 0, 128,
	                 BlockHelper.forBlock(Blocks.netherrack), true);
	this.generateOre(MBlocks.glow_mossy_nether_bricks, world, rand, x1, z1, 5, 20, 30, 0, 100,
	                 BlockHelper.forBlock(Blocks.nether_brick), true);
	this.generateOre(MBlocks.soul_ore, world, rand, x1, z1, 3, 8, 30, 0, 128,
	                 BlockHelper.forBlock(Blocks.soul_sand), true);
	this.generateHangingMoss(world, rand, x1, z1, MBlocks.hanging_glow_moss);
	this.genGlowShrooms(world, rand, x1, z1);
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:17,代码来源:MGenHandler.java

示例2: generateOre

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public static void generateOre(IBlockState state, Block blockin, Random random, int x, int z, World world, int chance, int minY, int maxY, int minVienSize, int maxVienSize) {

		int vienSize = minVienSize + random.nextInt(maxVienSize - minVienSize);
		int hightRange = maxY - minY;

		for (int i = 0; i < chance; i++) {
			int posX = x + random.nextInt(16);
			int posY = random.nextInt(hightRange) + minY;
			int posZ = z + random.nextInt(16);
			new WorldGenMinable(state, vienSize, BlockHelper.forBlock(blockin)).generate(world, random, new BlockPos(posX, posY, posZ));
		}
	}
 
开发者ID:HyCraftHD,项目名称:TeambattleMod,代码行数:13,代码来源:GenerationUtil.java

示例3: generateEnd

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public void generateEnd(World world, Random rand, int x, int z)
{
	int x1 = x;
	int y1 = 0;
	int z1 = z;
	this.generateHangingMoss(world, rand, x1, z1, MBlocks.hanging_glow_moss);

	this.generateOre(MBlocks.continnium_ore, world, rand, x1, z1, 3, 12, 3, 15, 100,
	                 BlockHelper.forBlock(Blocks.end_stone), Config.genContinnium);
	this.generateOre(MBlocks.dimensium_ore, world, rand, x1, z1, 3, 12, 3, 15, 100,
	                 BlockHelper.forBlock(Blocks.end_stone), Config.genDimensium);
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:13,代码来源:MGenHandler.java

示例4: generateSurface

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
private void generateSurface(World world, Random rand, int chunkX, int chunkZ) {
    for (int k = 0; k < 10; k++) {
        int firstBlockXCoord = chunkX + rand.nextInt(16);
        int firstBlockZCoord = chunkZ + rand.nextInt(16);
        BlockPos blockPos = new BlockPos(firstBlockXCoord, 0, firstBlockZCoord);
        int tinY = rand.nextInt(40);
        int copperY = rand.nextInt(64);
        int leadY = rand.nextInt(30);
        int silverY = rand.nextInt(30);
        int nickelY = rand.nextInt(22);
        int apliteY = rand.nextInt(55);

        if (ConfigHandler.useFECopper)
            (new WorldGenMinable(BlockRegistry.blockOres.getStateFromMeta(0), 4, BlockHelper.forBlock(Blocks.stone))).generate(world, rand, blockPos.add(0, copperY, 0));
        if (ConfigHandler.useFETin)
            (new WorldGenMinable(BlockRegistry.blockOres.getStateFromMeta(1), 4, BlockHelper.forBlock(Blocks.stone))).generate(world, rand, blockPos.add(0, tinY, 0));
        if (ConfigHandler.useFELead)
            (new WorldGenMinable(BlockRegistry.blockOres.getStateFromMeta(2), 4, BlockHelper.forBlock(Blocks.stone))).generate(world, rand, blockPos.add(0, leadY, 0));
        if (ConfigHandler.useFESilver)
            (new WorldGenMinable(BlockRegistry.blockOres.getStateFromMeta(3), 4, BlockHelper.forBlock(Blocks.stone))).generate(world, rand, blockPos.add(0,silverY, 0));
        if (ConfigHandler.useFENickel)
            (new WorldGenMinable(BlockRegistry.blockOres.getStateFromMeta(4), 4, BlockHelper.forBlock(Blocks.stone))).generate(world, rand, blockPos.add(0,nickelY, 0));
        if (ConfigHandler.useFEApalite)
            (new WorldGenMinable(BlockRegistry.aplite.getDefaultState(), 30, BlockHelper.forBlock(Blocks.stone))).generate(world, rand, blockPos.add(0, apliteY, 0));
            
    }

}
 
开发者ID:FlowstoneTeam,项目名称:FlowstoneEnergy,代码行数:29,代码来源:GenerationHandler.java

示例5: generateEnd

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
private void generateEnd(World world, Random random, int x, int z)
{
    for(int i = 0; i < 15; i++)
    {
        (new WorldGenMinable(WolfBlockList.silverOre.getDefaultState(), 3, BlockHelper.forBlock(Blocks.end_stone))).generate(world, random, new BlockPos(x + random.nextInt(16), 62, z + random.nextInt(16)));
    }
}
 
开发者ID:Superloup10,项目名称:Wolf-s-addons,代码行数:8,代码来源:OreGenerator.java

示例6: generateSurface

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
private void generateSurface(World world, Random random, int x, int z)
{
    for(int i = 0; i < 15; i++)
    {
        (new WorldGenMinable(WolfBlockList.silverOre.getDefaultState(), 3, BlockHelper.forBlock(Blocks.stone))).generate(world, random, new BlockPos(x + random.nextInt(16), 62, z + random.nextInt(16)));
    }
}
 
开发者ID:Superloup10,项目名称:Wolf-s-addons,代码行数:8,代码来源:OreGenerator.java

示例7: generateNether

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
private void generateNether(World world, Random random, int x, int z)
{
    for(int i = 0; i < 15; i++)
    {
        (new WorldGenMinable(WolfBlockList.silverOre.getDefaultState(), 3, BlockHelper.forBlock(Blocks.netherrack))).generate(world, random, new BlockPos(x + random.nextInt(16), 62, z + random.nextInt(16)));
    }
}
 
开发者ID:Superloup10,项目名称:Wolf-s-addons,代码行数:8,代码来源:OreGenerator.java

示例8: WorldGenMinable

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public WorldGenMinable(IBlockState state, int blockCount)
{
    this(state, blockCount, BlockHelper.forBlock(Blocks.stone));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:WorldGenMinable.java

示例9: WeightedWorldGenMinable

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public WeightedWorldGenMinable(IWeightedBlockState[] WeightedBlocks, int NumberOfBlocks)
{
	this(WeightedBlocks, NumberOfBlocks, BlockHelper.forBlock(Blocks.stone));
}
 
开发者ID:VapourDrive,项目名称:GenLoader,代码行数:5,代码来源:WeightedWorldGenMinable.java

示例10: DemoGenSingleMinable

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public DemoGenSingleMinable(IBlockState block) {
	this(block, BlockHelper.forBlock(Blocks.stone));
}
 
开发者ID:worldwidewoogie,项目名称:demomod,代码行数:5,代码来源:DemoGenSingleMinable.java

示例11: WorldGenMinableSky

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public WorldGenMinableSky(IBlockState p_i45630_1_, int p_i45630_2_)
{
    this(p_i45630_1_, p_i45630_2_, BlockHelper.forBlock(Blocks.stone));
}
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.8,代码行数:5,代码来源:WorldGenMinableSky.java

示例12: generateOre

import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
/**
 * Generation with worldgenmineable
 * 
 * @param oregen
 *            Oregen
 * @param random
 *            Random
 * @param x
 *            Chunk x
 * @param z
 *            Chunk z
 * @param world
 *            World
 */
public static void generateOre(OreGen oregen, Random random, int x, int z, World world) {

	int vienSize = 2 + oregen.getMinVienSize() + random.nextInt(oregen.getMaxVienSize() - oregen.getMinVienSize() + 1);
	int hightRange = oregen.getMaxY() - oregen.getMinY();

	for (int i = 0; i < oregen.getChance(); i++) {
		int posX = x + random.nextInt(16);
		int posY = random.nextInt(hightRange) + oregen.getMinY();
		int posZ = z + random.nextInt(16);
		new WorldGenMinable(oregen.getState(), vienSize, BlockHelper.forBlock(oregen.getBlockin())).generate(world, random, new BlockPos(posX, posY, posZ));
	}
}
 
开发者ID:HyCraftHD,项目名称:ModLibary,代码行数:27,代码来源:GenerationUtil.java


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