本文整理汇总了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);
}
示例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));
}
}
示例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);
}
示例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));
}
}
示例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)));
}
}
示例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)));
}
}
示例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)));
}
}
示例8: WorldGenMinable
import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public WorldGenMinable(IBlockState state, int blockCount)
{
this(state, blockCount, BlockHelper.forBlock(Blocks.stone));
}
示例9: WeightedWorldGenMinable
import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
public WeightedWorldGenMinable(IWeightedBlockState[] WeightedBlocks, int NumberOfBlocks)
{
this(WeightedBlocks, NumberOfBlocks, BlockHelper.forBlock(Blocks.stone));
}
示例10: DemoGenSingleMinable
import net.minecraft.block.state.pattern.BlockHelper; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public DemoGenSingleMinable(IBlockState block) {
this(block, BlockHelper.forBlock(Blocks.stone));
}
示例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));
}
示例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));
}
}