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


Java BlockMatcher.forBlock方法代码示例

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


在下文中一共展示了BlockMatcher.forBlock方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WorldGenEndOre

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGenEndOre() {
  if (Configs.blockCountGold > 0)
    this.genGold = new WorldGenMinable(WorldModule.end_gold_ore.getDefaultState(), Configs.blockCountGold, BlockMatcher.forBlock(Blocks.END_STONE));
  if (Configs.blockCountIron > 0)
    this.genIron = new WorldGenMinable(WorldModule.end_iron_ore.getDefaultState(), Configs.blockCountIron, BlockMatcher.forBlock(Blocks.END_STONE));
  if (Configs.blockCountRedstone > 0)
    this.genRedstone = new WorldGenMinable(WorldModule.end_redstone_ore.getDefaultState(), Configs.blockCountRedstone, BlockMatcher.forBlock(Blocks.END_STONE));
  if (Configs.blockCountCoal > 0)
    this.genCoal = new WorldGenMinable(WorldModule.end_coal_ore.getDefaultState(), Configs.blockCountCoal, BlockMatcher.forBlock(Blocks.END_STONE));
  if (Configs.blockCountEmerald > 0)
    this.genEmerald = new WorldGenMinable(WorldModule.end_emerald_ore.getDefaultState(), Configs.blockCountEmerald, BlockMatcher.forBlock(Blocks.END_STONE));
  if (Configs.blockCountLapis > 0)
    this.genLapis = new WorldGenMinable(WorldModule.end_lapis_ore.getDefaultState(), Configs.blockCountLapis, BlockMatcher.forBlock(Blocks.END_STONE));
  if (Configs.blockCountDiamond > 0)
    this.genDiamond = new WorldGenMinable(WorldModule.end_diamond_ore.getDefaultState(), Configs.blockCountDiamond, BlockMatcher.forBlock(Blocks.END_STONE));
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:17,代码来源:WorldGenEndOre.java

示例2: WorldGenNetherOre

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGenNetherOre() {
  if (Configs.blockCountRedstone > 0)
    this.genRedstone = new WorldGenMinable(WorldModule.nether_redstone_ore.getDefaultState(), Configs.blockCountRedstone, BlockMatcher.forBlock(Blocks.NETHERRACK));
  if (Configs.blockCountIron > 0)
    this.genIron = new WorldGenMinable(WorldModule.nether_iron_ore.getDefaultState(), Configs.blockCountIron, BlockMatcher.forBlock(Blocks.NETHERRACK));
  if (Configs.blockCountGold > 0)
    this.genGold = new WorldGenMinable(WorldModule.nether_gold_ore.getDefaultState(), Configs.blockCountGold, BlockMatcher.forBlock(Blocks.NETHERRACK));
  if (Configs.blockCountCoal > 0)
    this.genCoal = new WorldGenMinable(WorldModule.nether_coal_ore.getDefaultState(), Configs.blockCountCoal, BlockMatcher.forBlock(Blocks.NETHERRACK));
  if (Configs.blockCountEmerald > 0)
    this.genEmerald = new WorldGenMinable(WorldModule.nether_emerald_ore.getDefaultState(), Configs.blockCountEmerald, BlockMatcher.forBlock(Blocks.NETHERRACK));
  if (Configs.blockCountLapis > 0)
    this.genLapis = new WorldGenMinable(WorldModule.nether_lapis_ore.getDefaultState(), Configs.blockCountLapis, BlockMatcher.forBlock(Blocks.NETHERRACK));
  if (Configs.blockCountDiamond > 0)
    this.genDiamond = new WorldGenMinable(WorldModule.nether_diamond_ore.getDefaultState(), Configs.blockCountDiamond, BlockMatcher.forBlock(Blocks.NETHERRACK));
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:17,代码来源:WorldGenNetherOre.java

示例3: WorldGenOre

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
WorldGenOre(Function<Block, IBlockState> function, Block block, int minVeinSize, int maxVeinSize, int minHeight, int maxHeight, int generationChance, Block surrounding, BiomeDictionary.Type... biomes) {
	super(block.getDefaultState(), minVeinSize);
	this.oreToGen = function.apply(block);
	this.minOreVeinSize = minVeinSize;
	this.maxOreVeinSize = maxVeinSize;
	this.maxHeight = maxHeight;
	this.minHeight = minHeight;
	this.genChance = generationChance;
	this.predicate = BlockMatcher.forBlock(surrounding);
	if (biomes != null)
		Collections.addAll(this.biomes, biomes);
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:13,代码来源:WorldGenOre.java

示例4: generate

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public void generate(Random random, int chunkX, int chunkZ, World world, OreConfig config) {
	Block block = GameData.getBlockRegistry().getObject(config.getBlock());
	Block block2 = GameData.getBlockRegistry().getObject(config.getReplacementBlock());
	if (block2 == null) {
		block2 = Blocks.STONE;
	}
	WorldGenMinable worldGenMinable = new WorldGenMinable(block.getDefaultState(), config.veinSize, BlockMatcher.forBlock(block2));
	int xPos, yPos, zPos;
	for (int i = 0; i < config.veinsPerChunk; i++) {
		xPos = chunkX * 16 + random.nextInt(16);
		yPos = 10 + random.nextInt(config.maxYHeight - config.minYHeight);
		zPos = chunkZ * 16 + random.nextInt(16);
		worldGenMinable.generate(world, random, new BlockPos(xPos, yPos, zPos));
	}
}
 
开发者ID:modmuss50,项目名称:OreHotswap,代码行数:16,代码来源:OreGenerator.java

示例5: OreGen

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public OreGen(String name, IBlockState state, int maxVeinSize, Block replaceTarget, int minY, int maxY, int chunkOccurence, int weight) {
	this.name = name;
	this.ore = new WorldGenMinable(state, maxVeinSize, BlockMatcher.forBlock(replaceTarget));
	this.minY = minY;
	this.maxY = maxY;
	this.chunkOccurence = chunkOccurence;
	this. weight = weight;
}
 
开发者ID:Bitterholz,项目名称:LP2,代码行数:9,代码来源:LPWorldGen.java

示例6: generateOre

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public static void generateOre(Block block, World world, Random random, int chunkX, int chunkZ, int minVeinSize, int maxVeinSize, int chance, int minY, int maxY, Block generateIn) {
    int veinSize = minVeinSize + random.nextInt(maxVeinSize - minVeinSize);
    int heightRange = maxY - minY;
    WorldGenMinable gen = new WorldGenMinable(block.getDefaultState(), veinSize, BlockMatcher.forBlock(generateIn));
    for(int i = 0; i < chance; i++) {
        int xRand = chunkX * 16 + random.nextInt(16);
        int yRand = random.nextInt(heightRange) + minY;
        int zRand = chunkZ * 16 + random.nextInt(16);
        gen.generate(world, random, new BlockPos(xRand, yRand, zRand));
    }
}
 
开发者ID:fabbe50,项目名称:TFICore,代码行数:12,代码来源:OregenHandler.java

示例7: addOreSpawn

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public static void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int minVeinSize, int maxVeinSize, int chancesToSpawn, int minY, int maxY, Block blockgen) {
WorldGenMinable minable = new WorldGenMinable(block.getDefaultState(), (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), BlockMatcher.forBlock(blockgen));
   for(int i = 0; i < chancesToSpawn; i++)
   {
       int posX = blockXPos + random.nextInt(16);
       int posY = minY + random.nextInt(maxY - minY);
       int posZ = blockZPos + random.nextInt(16);
       minable.generate(world, random, new BlockPos(posX, posY, posZ));
   }
   }
 
开发者ID:AshIndigo,项目名称:Alloycraft,代码行数:11,代码来源:UtilsWorldgen.java

示例8: WorldGen

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGen() {
	Bauxite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(0), 9);
	Ilmenite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(1), 5);
	Chromite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(2), 5);
	Pyrite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(6), 9);
	Cobaltite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(7), 5);
	Garnierite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(8), 9);
	Copper=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(9), 9);
	Malachite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(10), 9);
	Sphalerite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(11), 9);
	ArsenoPyrite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(12), 5);
	Silver=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(14), 9);
	Cassiterite=new WorldGenMinable(BlockRegistry.OreBlock0.getStateFromMeta(15), 9);
	Wolframite=new WorldGenMinable(BlockRegistry.OreBlock1.getStateFromMeta(0), 5);
	Platinum=new WorldGenMinable(BlockRegistry.OreBlock1.getStateFromMeta(1), 5);
	Galena=new WorldGenMinable(BlockRegistry.OreBlock1.getStateFromMeta(4), 9);
	Cinnabar=new WorldGenMinable(BlockRegistry.OreBlock1.getStateFromMeta(3), 9);
	Bismuthinite=new WorldGenMinable(BlockRegistry.OreBlock1.getStateFromMeta(5), 9);
	Orichalcum=new WorldGenMinable(BlockRegistry.OreBlock1.getStateFromMeta(6), 8);
	Thorite=new WorldGenMinable(BlockRegistry.ThoriumOre.getDefaultState(), 5);
	Pitchblende=new WorldGenMinable(BlockRegistry.UraniumOre.getDefaultState(), 5);
	//nether
	N_Pyrite=new WorldGenMinable(BlockRegistry.NetherOreBlock0.getStateFromMeta(0), 9, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_arsenoPyrite=new WorldGenMinable(BlockRegistry.NetherOreBlock0.getStateFromMeta(1), 9, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Silver=new WorldGenMinable(BlockRegistry.NetherOreBlock0.getStateFromMeta(2), 9, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Gold=new WorldGenMinable(BlockRegistry.NetherOreBlock0.getStateFromMeta(3), 9, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Cinnabar=new WorldGenMinable(BlockRegistry.NetherOreBlock0.getStateFromMeta(4), 9, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Prometheum=new WorldGenMinable(BlockRegistry.NetherOreBlock0.getStateFromMeta(5), 9, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Mithril=new WorldGenMinable(BlockRegistry.NetherOreBlock0.getStateFromMeta(6), 5, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Sulfur=new WorldGenMinable(BlockRegistry.NetherOreBlock1.getStateFromMeta(1), 17, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Diamond=new WorldGenMinable(BlockRegistry.NetherOreBlock1.getStateFromMeta(2), 7, BlockMatcher.forBlock(Blocks.NETHERRACK));
	N_Blazonium=new WorldGenMinable(BlockRegistry.BlazoniumOre.getDefaultState(), 5, BlockMatcher.forBlock(Blocks.NETHERRACK));
	//end
	E_Terminium=new WorldGenMinable(BlockRegistry.TerminiumOre.getDefaultState(), 7, BlockMatcher.forBlock(Blocks.END_STONE));
}
 
开发者ID:EnderiumSmith,项目名称:Nuclear-Foundation,代码行数:36,代码来源:WorldGen.java

示例9: WorldGenOreSingleton

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGenOreSingleton(Block ore, int mh) {
  //http://minecraft.gamepedia.com/Ore#Availability
  // http://minecraft.gamepedia.com/Customized#Ore_settings
  blockOre = ore;
  minHeight = mh;
  gen = new WorldGenMinable(blockOre.getDefaultState(), 1, BlockMatcher.forBlock(Blocks.STONE));
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:8,代码来源:WorldGenOreSingleton.java

示例10: WorldGenMinable

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

示例11: WorldGenMinableRandom

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGenMinableRandom(IBlockState[] states, int blockCount)
{
    this(states, blockCount, BlockMatcher.forBlock(Blocks.STONE));
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:5,代码来源:WorldGenMinableRandom.java

示例12: WorldGenOres

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGenOres() {
    oreGenNiter = new WorldGenMinable(ModBlocks.BLOCK_ORE_NITER.getDefaultState(), 8, BlockMatcher.forBlock(Blocks.STONE));
    oreGenSalt = new WorldGenMinable(ModBlocks.BLOCK_ORE_SALT.getDefaultState(), 8, BlockMatcher.forBlock(Blocks.STONE));
    oreGenSulfur = new WorldGenMinable(ModBlocks.BLOCK_ORE_SULFUR.getDefaultState(), 8, BlockMatcher.forBlock(Blocks.STONE));
}
 
开发者ID:droidicus,项目名称:AquaRegia,代码行数:6,代码来源:WorldGenOres.java

示例13: WorldGenMinable

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGenMinable(IBlockState state, int blockCount) {
    this(state, blockCount, BlockMatcher.forBlock(Blocks.STONE));
}
 
开发者ID:TeamFRM,项目名称:TAIGA,代码行数:4,代码来源:WorldGenMinable.java

示例14: OreGenEntry

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public OreGenEntry(Predicate<World> world, Supplier<IBlockState> ore, int yStart, int maxAmount, int yEnd, int veinSize) {
	this(BlockMatcher.forBlock(Blocks.STONE)::apply, world, ore, yStart, maxAmount, yEnd, veinSize);
}
 
开发者ID:tom5454,项目名称:Toms-Mod,代码行数:4,代码来源:WorldGen.java

示例15: WorldGenGoldRiver

import net.minecraft.block.state.pattern.BlockMatcher; //导入方法依赖的package包/类
public WorldGenGoldRiver() {
  //http://minecraft.gamepedia.com/Ore#Availability
  // http://minecraft.gamepedia.com/Customized#Ore_settings
  genGold = new WorldGenMinable(Blocks.GOLD_ORE.getDefaultState(), blockCount, BlockMatcher.forBlock(Blocks.STONE));
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:6,代码来源:WorldGenGoldRiver.java


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