本文整理汇总了Java中net.minecraft.block.BlockStoneBrick类的典型用法代码示例。如果您正苦于以下问题:Java BlockStoneBrick类的具体用法?Java BlockStoneBrick怎么用?Java BlockStoneBrick使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BlockStoneBrick类属于net.minecraft.block包,在下文中一共展示了BlockStoneBrick类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: iterate
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
private int iterate(BlockPos pos, List<BlockPos> destroyBlocks, double oX, double oY, double oZ){
if(pos.distanceSq(oX, oY, oZ) > 32) {
return 0;
}
BlockPos[] sides = new BlockPos[]{pos.up(), pos.down(), pos.north(), pos.south(), pos.east(), pos.west()};
int added = 0;
for(BlockPos side : sides){
IBlockState state = worldObj.getBlockState(side);
if(state != null && state.getBlock() == Blocks.STONEBRICK && state.getValue(BlockStoneBrick.VARIANT) == EnumType.CRACKED){
if(!destroyBlocks.contains(side)){
destroyBlocks.add(side);
added++;
}
}
}
return added;
}
示例2: onHackFinished
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
@Override
public void onHackFinished(World world, BlockPos pos, EntityPlayer player) {
IBlockState state = world.getBlockState(pos);
IBlockState newState;
switch (state.getValue(BlockSilverfish.VARIANT)) {
case COBBLESTONE:
newState = Blocks.COBBLESTONE.getDefaultState();
break;
case STONEBRICK:
newState = Blocks.STONEBRICK.getDefaultState();
break;
case MOSSY_STONEBRICK:
newState = Blocks.STONEBRICK.getDefaultState().withProperty(BlockStoneBrick.VARIANT, BlockStoneBrick.EnumType.MOSSY);
break;
case CRACKED_STONEBRICK:
newState = Blocks.STONEBRICK.getDefaultState().withProperty(BlockStoneBrick.VARIANT, BlockStoneBrick.EnumType.CRACKED);
break;
case CHISELED_STONEBRICK:
newState = Blocks.STONEBRICK.getDefaultState().withProperty(BlockStoneBrick.VARIANT, BlockStoneBrick.EnumType.CHISELED);
break;
default:
newState = Blocks.STONE.getDefaultState();
break;
}
world.setBlockState(pos, newState);
}
示例3: selectBlocks
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
public void selectBlocks(Random rand, int x, int y, int z, boolean p_75062_5_)
{
if (p_75062_5_)
{
float f = rand.nextFloat();
if (f < 0.2F)
{
this.blockstate = Blocks.stonebrick.getStateFromMeta(BlockStoneBrick.CRACKED_META);
}
else if (f < 0.5F)
{
this.blockstate = Blocks.stonebrick.getStateFromMeta(BlockStoneBrick.MOSSY_META);
}
else if (f < 0.55F)
{
this.blockstate = Blocks.monster_egg.getStateFromMeta(BlockSilverfish.EnumType.STONEBRICK.getMetadata());
}
else
{
this.blockstate = Blocks.stonebrick.getDefaultState();
}
}
else
{
this.blockstate = Blocks.air.getDefaultState();
}
}
示例4: FurnaceRecipes
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
private FurnaceRecipes()
{
this.addSmeltingRecipeForBlock(Blocks.iron_ore, new ItemStack(Items.iron_ingot), 0.7F);
this.addSmeltingRecipeForBlock(Blocks.gold_ore, new ItemStack(Items.gold_ingot), 1.0F);
this.addSmeltingRecipeForBlock(Blocks.diamond_ore, new ItemStack(Items.diamond), 1.0F);
this.addSmeltingRecipeForBlock(Blocks.sand, new ItemStack(Blocks.glass), 0.1F);
this.addSmelting(Items.porkchop, new ItemStack(Items.cooked_porkchop), 0.35F);
this.addSmelting(Items.beef, new ItemStack(Items.cooked_beef), 0.35F);
this.addSmelting(Items.chicken, new ItemStack(Items.cooked_chicken), 0.35F);
this.addSmelting(Items.rabbit, new ItemStack(Items.cooked_rabbit), 0.35F);
this.addSmelting(Items.mutton, new ItemStack(Items.cooked_mutton), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.cobblestone, new ItemStack(Blocks.stone), 0.1F);
this.addSmeltingRecipe(new ItemStack(Blocks.stonebrick, 1, BlockStoneBrick.DEFAULT_META), new ItemStack(Blocks.stonebrick, 1, BlockStoneBrick.CRACKED_META), 0.1F);
this.addSmelting(Items.clay_ball, new ItemStack(Items.brick), 0.3F);
this.addSmeltingRecipeForBlock(Blocks.clay, new ItemStack(Blocks.hardened_clay), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.cactus, new ItemStack(Items.dye, 1, EnumDyeColor.GREEN.getDyeDamage()), 0.2F);
this.addSmeltingRecipeForBlock(Blocks.log, new ItemStack(Items.coal, 1, 1), 0.15F);
this.addSmeltingRecipeForBlock(Blocks.log2, new ItemStack(Items.coal, 1, 1), 0.15F);
this.addSmeltingRecipeForBlock(Blocks.emerald_ore, new ItemStack(Items.emerald), 1.0F);
this.addSmelting(Items.potato, new ItemStack(Items.baked_potato), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.netherrack, new ItemStack(Items.netherbrick), 0.1F);
this.addSmeltingRecipe(new ItemStack(Blocks.sponge, 1, 1), new ItemStack(Blocks.sponge, 1, 0), 0.15F);
for (ItemFishFood.FishType itemfishfood$fishtype : ItemFishFood.FishType.values())
{
if (itemfishfood$fishtype.canCook())
{
this.addSmeltingRecipe(new ItemStack(Items.fish, 1, itemfishfood$fishtype.getMetadata()), new ItemStack(Items.cooked_fish, 1, itemfishfood$fishtype.getMetadata()), 0.35F);
}
}
this.addSmeltingRecipeForBlock(Blocks.coal_ore, new ItemStack(Items.coal), 0.1F);
this.addSmeltingRecipeForBlock(Blocks.redstone_ore, new ItemStack(Items.redstone), 0.7F);
this.addSmeltingRecipeForBlock(Blocks.lapis_ore, new ItemStack(Items.dye, 1, EnumDyeColor.BLUE.getDyeDamage()), 0.2F);
this.addSmeltingRecipeForBlock(Blocks.quartz_ore, new ItemStack(Items.quartz), 0.2F);
}
示例5: addRecipes
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
/**
* Adds the crafting recipes to the CraftingManager.
*/
public void addRecipes(CraftingManager p_77589_1_)
{
p_77589_1_.addRecipe(new ItemStack(Blocks.chest), new Object[] {"###", "# #", "###", '#', Blocks.planks});
p_77589_1_.addRecipe(new ItemStack(Blocks.trapped_chest), new Object[] {"#-", '#', Blocks.chest, '-', Blocks.tripwire_hook});
p_77589_1_.addRecipe(new ItemStack(Blocks.ender_chest), new Object[] {"###", "#E#", "###", '#', Blocks.obsidian, 'E', Items.ender_eye});
p_77589_1_.addRecipe(new ItemStack(Blocks.furnace), new Object[] {"###", "# #", "###", '#', Blocks.cobblestone});
p_77589_1_.addRecipe(new ItemStack(Blocks.crafting_table), new Object[] {"##", "##", '#', Blocks.planks});
p_77589_1_.addRecipe(new ItemStack(Blocks.sandstone), new Object[] {"##", "##", '#', new ItemStack(Blocks.sand, 1, BlockSand.EnumType.SAND.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.red_sandstone), new Object[] {"##", "##", '#', new ItemStack(Blocks.sand, 1, BlockSand.EnumType.RED_SAND.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.sandstone, 4, BlockSandStone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.sandstone, 1, BlockSandStone.EnumType.DEFAULT.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.red_sandstone, 4, BlockRedSandstone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.red_sandstone, 1, BlockRedSandstone.EnumType.DEFAULT.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.sandstone, 1, BlockSandStone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab, 1, BlockStoneSlab.EnumType.SAND.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.red_sandstone, 1, BlockRedSandstone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab2, 1, BlockStoneSlabNew.EnumType.RED_SANDSTONE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.quartz_block, 1, BlockQuartz.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab, 1, BlockStoneSlab.EnumType.QUARTZ.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.quartz_block, 2, BlockQuartz.EnumType.LINES_Y.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.quartz_block, 1, BlockQuartz.EnumType.DEFAULT.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stonebrick, 4), new Object[] {"##", "##", '#', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.STONE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stonebrick, 1, BlockStoneBrick.CHISELED_META), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab, 1, BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata())});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.stonebrick, 1, BlockStoneBrick.MOSSY_META), new Object[] {Blocks.stonebrick, Blocks.vine});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.mossy_cobblestone, 1), new Object[] {Blocks.cobblestone, Blocks.vine});
p_77589_1_.addRecipe(new ItemStack(Blocks.iron_bars, 16), new Object[] {"###", "###", '#', Items.iron_ingot});
p_77589_1_.addRecipe(new ItemStack(Blocks.glass_pane, 16), new Object[] {"###", "###", '#', Blocks.glass});
p_77589_1_.addRecipe(new ItemStack(Blocks.redstone_lamp, 1), new Object[] {" R ", "RGR", " R ", 'R', Items.redstone, 'G', Blocks.glowstone});
p_77589_1_.addRecipe(new ItemStack(Blocks.beacon, 1), new Object[] {"GGG", "GSG", "OOO", 'G', Blocks.glass, 'S', Items.nether_star, 'O', Blocks.obsidian});
p_77589_1_.addRecipe(new ItemStack(Blocks.nether_brick, 1), new Object[] {"NN", "NN", 'N', Items.netherbrick});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 2, BlockStone.EnumType.DIORITE.getMetadata()), new Object[] {"CQ", "QC", 'C', Blocks.cobblestone, 'Q', Items.quartz});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.stone, 1, BlockStone.EnumType.GRANITE.getMetadata()), new Object[] {new ItemStack(Blocks.stone, 1, BlockStone.EnumType.DIORITE.getMetadata()), Items.quartz});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.stone, 2, BlockStone.EnumType.ANDESITE.getMetadata()), new Object[] {new ItemStack(Blocks.stone, 1, BlockStone.EnumType.DIORITE.getMetadata()), Blocks.cobblestone});
p_77589_1_.addRecipe(new ItemStack(Blocks.dirt, 4, BlockDirt.DirtType.COARSE_DIRT.getMetadata()), new Object[] {"DG", "GD", 'D', new ItemStack(Blocks.dirt, 1, BlockDirt.DirtType.DIRT.getMetadata()), 'G', Blocks.gravel});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 4, BlockStone.EnumType.DIORITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.DIORITE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 4, BlockStone.EnumType.GRANITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.GRANITE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 4, BlockStone.EnumType.ANDESITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.ANDESITE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.prismarine, 1, BlockPrismarine.ROUGH_META), new Object[] {"SS", "SS", 'S', Items.prismarine_shard});
p_77589_1_.addRecipe(new ItemStack(Blocks.prismarine, 1, BlockPrismarine.BRICKS_META), new Object[] {"SSS", "SSS", "SSS", 'S', Items.prismarine_shard});
p_77589_1_.addRecipe(new ItemStack(Blocks.prismarine, 1, BlockPrismarine.DARK_META), new Object[] {"SSS", "SIS", "SSS", 'S', Items.prismarine_shard, 'I', new ItemStack(Items.dye, 1, EnumDyeColor.BLACK.getDyeDamage())});
p_77589_1_.addRecipe(new ItemStack(Blocks.sea_lantern, 1, 0), new Object[] {"SCS", "CCC", "SCS", 'S', Items.prismarine_shard, 'C', Items.prismarine_crystals});
}
示例6: selectBlocks
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
public void selectBlocks(Random rand, int x, int y, int z, boolean p_75062_5_)
{
if (p_75062_5_)
{
float f = rand.nextFloat();
if (f < 0.2F)
{
this.blockstate = Blocks.STONEBRICK.getStateFromMeta(BlockStoneBrick.CRACKED_META);
}
else if (f < 0.5F)
{
this.blockstate = Blocks.STONEBRICK.getStateFromMeta(BlockStoneBrick.MOSSY_META);
}
else if (f < 0.55F)
{
this.blockstate = Blocks.MONSTER_EGG.getStateFromMeta(BlockSilverfish.EnumType.STONEBRICK.getMetadata());
}
else
{
this.blockstate = Blocks.STONEBRICK.getDefaultState();
}
}
else
{
this.blockstate = Blocks.AIR.getDefaultState();
}
}
示例7: selectBlocks
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
/**
* picks Block Ids and Metadata (Silverfish)
*/
public void selectBlocks(Random rand, int x, int y, int z, boolean p_75062_5_)
{
if (p_75062_5_)
{
float f = rand.nextFloat();
if (f < 0.2F)
{
this.blockstate = Blocks.STONEBRICK.getStateFromMeta(BlockStoneBrick.CRACKED_META);
}
else if (f < 0.5F)
{
this.blockstate = Blocks.STONEBRICK.getStateFromMeta(BlockStoneBrick.MOSSY_META);
}
else if (f < 0.55F)
{
this.blockstate = Blocks.MONSTER_EGG.getStateFromMeta(BlockSilverfish.EnumType.STONEBRICK.getMetadata());
}
else
{
this.blockstate = Blocks.STONEBRICK.getDefaultState();
}
}
else
{
this.blockstate = Blocks.AIR.getDefaultState();
}
}
示例8: FurnaceRecipes
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
private FurnaceRecipes()
{
this.addSmeltingRecipeForBlock(Blocks.IRON_ORE, new ItemStack(Items.IRON_INGOT), 0.7F);
this.addSmeltingRecipeForBlock(Blocks.GOLD_ORE, new ItemStack(Items.GOLD_INGOT), 1.0F);
this.addSmeltingRecipeForBlock(Blocks.DIAMOND_ORE, new ItemStack(Items.DIAMOND), 1.0F);
this.addSmeltingRecipeForBlock(Blocks.SAND, new ItemStack(Blocks.GLASS), 0.1F);
this.addSmelting(Items.PORKCHOP, new ItemStack(Items.COOKED_PORKCHOP), 0.35F);
this.addSmelting(Items.BEEF, new ItemStack(Items.COOKED_BEEF), 0.35F);
this.addSmelting(Items.CHICKEN, new ItemStack(Items.COOKED_CHICKEN), 0.35F);
this.addSmelting(Items.RABBIT, new ItemStack(Items.COOKED_RABBIT), 0.35F);
this.addSmelting(Items.MUTTON, new ItemStack(Items.COOKED_MUTTON), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.COBBLESTONE, new ItemStack(Blocks.STONE), 0.1F);
this.addSmeltingRecipe(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.DEFAULT_META), new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CRACKED_META), 0.1F);
this.addSmelting(Items.CLAY_BALL, new ItemStack(Items.BRICK), 0.3F);
this.addSmeltingRecipeForBlock(Blocks.CLAY, new ItemStack(Blocks.HARDENED_CLAY), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.CACTUS, new ItemStack(Items.DYE, 1, EnumDyeColor.GREEN.getDyeDamage()), 0.2F);
this.addSmeltingRecipeForBlock(Blocks.LOG, new ItemStack(Items.COAL, 1, 1), 0.15F);
this.addSmeltingRecipeForBlock(Blocks.LOG2, new ItemStack(Items.COAL, 1, 1), 0.15F);
this.addSmeltingRecipeForBlock(Blocks.EMERALD_ORE, new ItemStack(Items.EMERALD), 1.0F);
this.addSmelting(Items.POTATO, new ItemStack(Items.BAKED_POTATO), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.NETHERRACK, new ItemStack(Items.NETHERBRICK), 0.1F);
this.addSmeltingRecipe(new ItemStack(Blocks.SPONGE, 1, 1), new ItemStack(Blocks.SPONGE, 1, 0), 0.15F);
this.addSmelting(Items.CHORUS_FRUIT, new ItemStack(Items.CHORUS_FRUIT_POPPED), 0.1F);
for (ItemFishFood.FishType itemfishfood$fishtype : ItemFishFood.FishType.values())
{
if (itemfishfood$fishtype.canCook())
{
this.addSmeltingRecipe(new ItemStack(Items.FISH, 1, itemfishfood$fishtype.getMetadata()), new ItemStack(Items.COOKED_FISH, 1, itemfishfood$fishtype.getMetadata()), 0.35F);
}
}
this.addSmeltingRecipeForBlock(Blocks.COAL_ORE, new ItemStack(Items.COAL), 0.1F);
this.addSmeltingRecipeForBlock(Blocks.REDSTONE_ORE, new ItemStack(Items.REDSTONE), 0.7F);
this.addSmeltingRecipeForBlock(Blocks.LAPIS_ORE, new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()), 0.2F);
this.addSmeltingRecipeForBlock(Blocks.QUARTZ_ORE, new ItemStack(Items.QUARTZ), 0.2F);
}
示例9: registerOreDict
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
public static void registerOreDict() {
for (BlockStoneBrick.EnumType type : BlockStoneBrick.EnumType.values()) {
registerOre(LibOreDict.BRICK_STONE, Blocks.STONEBRICK, type.getMetadata());
}
registerOre(LibOreDict.LOG_WOOD, ModBlocks.TintedLog);
registerOre(LibOreDict.PLANK_WOOD, ModBlocks.TintedPlanks);
registerOre(LibOreDict.SAPLING, ModBlocks.TintedSapling);
}
示例10: FurnaceRecipes
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
private FurnaceRecipes()
{
this.addSmeltingRecipeForBlock(Blocks.IRON_ORE, new ItemStack(Items.IRON_INGOT), 0.7F);
this.addSmeltingRecipeForBlock(Blocks.GOLD_ORE, new ItemStack(Items.GOLD_INGOT), 1.0F);
this.addSmeltingRecipeForBlock(Blocks.DIAMOND_ORE, new ItemStack(Items.DIAMOND), 1.0F);
this.addSmeltingRecipeForBlock(Blocks.SAND, new ItemStack(Blocks.GLASS), 0.1F);
this.addSmelting(Items.PORKCHOP, new ItemStack(Items.COOKED_PORKCHOP), 0.35F);
this.addSmelting(Items.BEEF, new ItemStack(Items.COOKED_BEEF), 0.35F);
this.addSmelting(Items.CHICKEN, new ItemStack(Items.COOKED_CHICKEN), 0.35F);
this.addSmelting(Items.RABBIT, new ItemStack(Items.COOKED_RABBIT), 0.35F);
this.addSmelting(Items.MUTTON, new ItemStack(Items.COOKED_MUTTON), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.COBBLESTONE, new ItemStack(Blocks.STONE), 0.1F);
this.addSmeltingRecipe(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.DEFAULT_META), new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CRACKED_META), 0.1F);
this.addSmelting(Items.CLAY_BALL, new ItemStack(Items.BRICK), 0.3F);
this.addSmeltingRecipeForBlock(Blocks.CLAY, new ItemStack(Blocks.HARDENED_CLAY), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.CACTUS, new ItemStack(Items.DYE, 1, EnumDyeColor.GREEN.getDyeDamage()), 0.2F);
this.addSmeltingRecipeForBlock(Blocks.LOG, new ItemStack(Items.COAL, 1, 1), 0.15F);
this.addSmeltingRecipeForBlock(Blocks.LOG2, new ItemStack(Items.COAL, 1, 1), 0.15F);
this.addSmeltingRecipeForBlock(Blocks.EMERALD_ORE, new ItemStack(Items.EMERALD), 1.0F);
this.addSmelting(Items.POTATO, new ItemStack(Items.BAKED_POTATO), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.NETHERRACK, new ItemStack(Items.NETHERBRICK), 0.1F);
this.addSmeltingRecipe(new ItemStack(Blocks.SPONGE, 1, 1), new ItemStack(Blocks.SPONGE, 1, 0), 0.15F);
this.addSmelting(Items.CHORUS_FRUIT, new ItemStack(Items.CHORUS_FRUIT_POPPED), 0.1F);
for (ItemFishFood.FishType itemfishfood$fishtype : ItemFishFood.FishType.values())
{
if (itemfishfood$fishtype.canCook())
{
this.addSmeltingRecipe(new ItemStack(Items.FISH, 1, itemfishfood$fishtype.getMetadata()), new ItemStack(Items.COOKED_FISH, 1, itemfishfood$fishtype.getMetadata()), 0.35F);
}
}
this.addSmeltingRecipeForBlock(Blocks.COAL_ORE, new ItemStack(Items.COAL), 0.1F);
this.addSmeltingRecipeForBlock(Blocks.REDSTONE_ORE, new ItemStack(Items.REDSTONE), 0.7F);
this.addSmeltingRecipeForBlock(Blocks.LAPIS_ORE, new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()), 0.2F);
this.addSmeltingRecipeForBlock(Blocks.QUARTZ_ORE, new ItemStack(Items.QUARTZ), 0.2F);
this.addSmelting(Items.CHAINMAIL_HELMET, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.CHAINMAIL_CHESTPLATE, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.CHAINMAIL_LEGGINGS, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.CHAINMAIL_BOOTS, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_PICKAXE, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_SHOVEL, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_AXE, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_HOE, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_SWORD, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_HELMET, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_CHESTPLATE, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_LEGGINGS, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_BOOTS, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.IRON_HORSE_ARMOR, new ItemStack(Items.field_191525_da), 0.1F);
this.addSmelting(Items.GOLDEN_PICKAXE, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_SHOVEL, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_AXE, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_HOE, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_SWORD, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_HELMET, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_CHESTPLATE, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_LEGGINGS, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_BOOTS, new ItemStack(Items.GOLD_NUGGET), 0.1F);
this.addSmelting(Items.GOLDEN_HORSE_ARMOR, new ItemStack(Items.GOLD_NUGGET), 0.1F);
}
示例11: addRecipes
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
/**
* Adds the crafting recipes to the CraftingManager.
*/
public void addRecipes(CraftingManager manager)
{
manager.addRecipe(new ItemStack(Blocks.CHEST), new Object[] {"###", "# #", "###", '#', Blocks.PLANKS});
manager.addShapelessRecipe(new ItemStack(Blocks.TRAPPED_CHEST), new Object[] {Blocks.CHEST, Blocks.TRIPWIRE_HOOK});
manager.addRecipe(new ItemStack(Blocks.ENDER_CHEST), new Object[] {"###", "#E#", "###", '#', Blocks.OBSIDIAN, 'E', Items.ENDER_EYE});
manager.addRecipe(new ItemStack(Blocks.FURNACE), new Object[] {"###", "# #", "###", '#', Blocks.COBBLESTONE});
manager.addRecipe(new ItemStack(Blocks.CRAFTING_TABLE), new Object[] {"##", "##", '#', Blocks.PLANKS});
manager.addRecipe(new ItemStack(Blocks.SANDSTONE), new Object[] {"##", "##", '#', new ItemStack(Blocks.SAND, 1, BlockSand.EnumType.SAND.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.RED_SANDSTONE), new Object[] {"##", "##", '#', new ItemStack(Blocks.SAND, 1, BlockSand.EnumType.RED_SAND.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.SANDSTONE, 4, BlockSandStone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.SANDSTONE, 1, BlockSandStone.EnumType.DEFAULT.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.RED_SANDSTONE, 4, BlockRedSandstone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.RED_SANDSTONE, 1, BlockRedSandstone.EnumType.DEFAULT.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.SANDSTONE, 1, BlockSandStone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB, 1, BlockStoneSlab.EnumType.SAND.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.RED_SANDSTONE, 1, BlockRedSandstone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB2, 1, BlockStoneSlabNew.EnumType.RED_SANDSTONE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1, BlockQuartz.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB, 1, BlockStoneSlab.EnumType.QUARTZ.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 2, BlockQuartz.EnumType.LINES_Y.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.QUARTZ_BLOCK, 1, BlockQuartz.EnumType.DEFAULT.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONEBRICK, 4), new Object[] {"##", "##", '#', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.STONE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CHISELED_META), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB, 1, BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata())});
manager.addShapelessRecipe(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.MOSSY_META), new Object[] {Blocks.STONEBRICK, Blocks.VINE});
manager.addShapelessRecipe(new ItemStack(Blocks.MOSSY_COBBLESTONE, 1), new Object[] {Blocks.COBBLESTONE, Blocks.VINE});
manager.addRecipe(new ItemStack(Blocks.IRON_BARS, 16), new Object[] {"###", "###", '#', Items.IRON_INGOT});
manager.addRecipe(new ItemStack(Blocks.GLASS_PANE, 16), new Object[] {"###", "###", '#', Blocks.GLASS});
manager.addRecipe(new ItemStack(Blocks.REDSTONE_LAMP, 1), new Object[] {" R ", "RGR", " R ", 'R', Items.REDSTONE, 'G', Blocks.GLOWSTONE});
manager.addRecipe(new ItemStack(Blocks.BEACON, 1), new Object[] {"GGG", "GSG", "OOO", 'G', Blocks.GLASS, 'S', Items.NETHER_STAR, 'O', Blocks.OBSIDIAN});
manager.addRecipe(new ItemStack(Blocks.NETHER_BRICK, 1), new Object[] {"NN", "NN", 'N', Items.NETHERBRICK});
manager.addRecipe(new ItemStack(Blocks.RED_NETHER_BRICK, 1), new Object[] {"NW", "WN", 'N', Items.NETHERBRICK, 'W', Items.NETHER_WART});
manager.addRecipe(new ItemStack(Blocks.STONE, 2, BlockStone.EnumType.DIORITE.getMetadata()), new Object[] {"CQ", "QC", 'C', Blocks.COBBLESTONE, 'Q', Items.QUARTZ});
manager.addShapelessRecipe(new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.GRANITE.getMetadata()), new Object[] {new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.DIORITE.getMetadata()), Items.QUARTZ});
manager.addShapelessRecipe(new ItemStack(Blocks.STONE, 2, BlockStone.EnumType.ANDESITE.getMetadata()), new Object[] {new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.DIORITE.getMetadata()), Blocks.COBBLESTONE});
manager.addRecipe(new ItemStack(Blocks.DIRT, 4, BlockDirt.DirtType.COARSE_DIRT.getMetadata()), new Object[] {"DG", "GD", 'D', new ItemStack(Blocks.DIRT, 1, BlockDirt.DirtType.DIRT.getMetadata()), 'G', Blocks.GRAVEL});
manager.addRecipe(new ItemStack(Blocks.STONE, 4, BlockStone.EnumType.DIORITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.DIORITE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONE, 4, BlockStone.EnumType.GRANITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.GRANITE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONE, 4, BlockStone.EnumType.ANDESITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.ANDESITE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.ROUGH_META), new Object[] {"SS", "SS", 'S', Items.PRISMARINE_SHARD});
manager.addRecipe(new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.BRICKS_META), new Object[] {"SSS", "SSS", "SSS", 'S', Items.PRISMARINE_SHARD});
manager.addRecipe(new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.DARK_META), new Object[] {"SSS", "SIS", "SSS", 'S', Items.PRISMARINE_SHARD, 'I', new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage())});
manager.addRecipe(new ItemStack(Blocks.SEA_LANTERN, 1, 0), new Object[] {"SCS", "CCC", "SCS", 'S', Items.PRISMARINE_SHARD, 'C', Items.PRISMARINE_CRYSTALS});
manager.addRecipe(new ItemStack(Blocks.PURPUR_BLOCK, 4, 0), new Object[] {"FF", "FF", 'F', Items.CHORUS_FRUIT_POPPED});
manager.addRecipe(new ItemStack(Blocks.PURPUR_STAIRS, 4, 0), new Object[] {"# ", "## ", "###", '#', Blocks.PURPUR_BLOCK});
manager.addRecipe(new ItemStack(Blocks.PURPUR_PILLAR, 1, 0), new Object[] {"#", "#", '#', Blocks.PURPUR_SLAB});
manager.addRecipe(new ItemStack(Blocks.END_BRICKS, 4, 0), new Object[] {"##", "##", '#', Blocks.END_STONE});
manager.addRecipe(new ItemStack(Blocks.MAGMA, 1, 0), new Object[] {"##", "##", '#', Items.MAGMA_CREAM});
manager.addRecipe(new ItemStack(Blocks.NETHER_WART_BLOCK, 1, 0), new Object[] {"###", "###", "###", '#', Items.NETHER_WART});
}
示例12: isProperSoil
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
public boolean isProperSoil(IBlockAccess world, BlockPos pos, EnumFacing facing)
{
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
return block == Blocks.SAND || block == Blocks.MOSSY_COBBLESTONE || (block == Blocks.STONEBRICK && state.getValue(BlockStoneBrick.VARIANT) == BlockStoneBrick.EnumType.MOSSY) || block.canSustainPlant(world.getBlockState(pos),world,pos,facing.getOpposite(),this);
}
示例13: addFinalValues
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
private static void addFinalValues() {
// Fluid handling
for (Item item : GameData.getItemRegistry().typeSafeIterable()) {
LinkedList<ItemStack> subItems = Lists.newLinkedList();
try {
item.getSubItems(item, item.getCreativeTab(), subItems);
} catch (Exception ignore) {}
for (ItemStack itemStack : subItems) {
if (FluidContainerRegistry.isContainer(itemStack)) {
FluidStack fluidStack = FluidContainerRegistry.getFluidForFilledItem(itemStack);
ItemStack empty = FluidContainerRegistry.drainFluidContainer(itemStack);
if (fluidStack != null && empty != null) {
setEMC(itemStack, getEMC(empty) + getEMC(fluidStack.getFluid()));
}
}
}
}
// Stone brick handling
double stoneBrickEmc = getEMC(Blocks.stonebrick);
for (int i = 1; i < BlockStoneBrick.field_150141_b.length; i++) {
setEMC(new ItemStack(Blocks.stonebrick, 1, i), stoneBrickEmc);
}
// Anvil handling
double anvilEmc = getEMC(new ItemStack(Blocks.anvil, 1, 0));
setEMC(new ItemStack(Blocks.anvil, 1, 1), anvilEmc * 0.66D);
setEMC(new ItemStack(Blocks.anvil, 1, 2), anvilEmc * 0.33D);
// Name tag
double string = getEMC(Items.string);
double paper = getEMC(Items.paper);
setEMC(Items.name_tag, string + paper);
if (Loader.isModLoaded("Thaumcraft")) {
setEMC(GameRegistry.findItem("Thaumcraft", "ItemThaumonomicon"), getEMC(Blocks.bookshelf));
}
}
示例14: addRecipes
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
/**
* Adds the crafting recipes to the CraftingManager.
*/
public void addRecipes(CraftingManager manager)
{
manager.addRecipe(new ItemStack(Blocks.CHEST), new Object[] {"###", "# #", "###", '#', Blocks.PLANKS});
manager.addShapelessRecipe(new ItemStack(Blocks.TRAPPED_CHEST), new Object[] {Blocks.CHEST, Blocks.TRIPWIRE_HOOK});
manager.addRecipe(new ItemStack(Blocks.ENDER_CHEST), new Object[] {"###", "#E#", "###", '#', Blocks.OBSIDIAN, 'E', Items.ENDER_EYE});
manager.addRecipe(new ItemStack(Blocks.FURNACE), new Object[] {"###", "# #", "###", '#', Blocks.COBBLESTONE});
manager.addRecipe(new ItemStack(Blocks.CRAFTING_TABLE), new Object[] {"##", "##", '#', Blocks.PLANKS});
manager.addRecipe(new ItemStack(Blocks.SANDSTONE), new Object[] {"##", "##", '#', new ItemStack(Blocks.SAND, 1, BlockSand.EnumType.SAND.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.RED_SANDSTONE), new Object[] {"##", "##", '#', new ItemStack(Blocks.SAND, 1, BlockSand.EnumType.RED_SAND.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.SANDSTONE, 4, BlockSandStone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.SANDSTONE, 1, BlockSandStone.EnumType.DEFAULT.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.RED_SANDSTONE, 4, BlockRedSandstone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.RED_SANDSTONE, 1, BlockRedSandstone.EnumType.DEFAULT.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.SANDSTONE, 1, BlockSandStone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB, 1, BlockStoneSlab.EnumType.SAND.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.RED_SANDSTONE, 1, BlockRedSandstone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB2, 1, BlockStoneSlabNew.EnumType.RED_SANDSTONE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1, BlockQuartz.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB, 1, BlockStoneSlab.EnumType.QUARTZ.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 2, BlockQuartz.EnumType.LINES_Y.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.QUARTZ_BLOCK, 1, BlockQuartz.EnumType.DEFAULT.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONEBRICK, 4), new Object[] {"##", "##", '#', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.STONE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CHISELED_META), new Object[] {"#", "#", '#', new ItemStack(Blocks.STONE_SLAB, 1, BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata())});
manager.addShapelessRecipe(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.MOSSY_META), new Object[] {Blocks.STONEBRICK, Blocks.VINE});
manager.addShapelessRecipe(new ItemStack(Blocks.MOSSY_COBBLESTONE, 1), new Object[] {Blocks.COBBLESTONE, Blocks.VINE});
manager.addRecipe(new ItemStack(Blocks.IRON_BARS, 16), new Object[] {"###", "###", '#', Items.IRON_INGOT});
manager.addRecipe(new ItemStack(Blocks.GLASS_PANE, 16), new Object[] {"###", "###", '#', Blocks.GLASS});
manager.addRecipe(new ItemStack(Blocks.REDSTONE_LAMP, 1), new Object[] {" R ", "RGR", " R ", 'R', Items.REDSTONE, 'G', Blocks.GLOWSTONE});
manager.addRecipe(new ItemStack(Blocks.BEACON, 1), new Object[] {"GGG", "GSG", "OOO", 'G', Blocks.GLASS, 'S', Items.NETHER_STAR, 'O', Blocks.OBSIDIAN});
manager.addRecipe(new ItemStack(Blocks.NETHER_BRICK, 1), new Object[] {"NN", "NN", 'N', Items.NETHERBRICK});
manager.addRecipe(new ItemStack(Blocks.field_189879_dh, 1), new Object[] {"NW", "WN", 'N', Items.NETHERBRICK, 'W', Items.NETHER_WART});
manager.addRecipe(new ItemStack(Blocks.STONE, 2, BlockStone.EnumType.DIORITE.getMetadata()), new Object[] {"CQ", "QC", 'C', Blocks.COBBLESTONE, 'Q', Items.QUARTZ});
manager.addShapelessRecipe(new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.GRANITE.getMetadata()), new Object[] {new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.DIORITE.getMetadata()), Items.QUARTZ});
manager.addShapelessRecipe(new ItemStack(Blocks.STONE, 2, BlockStone.EnumType.ANDESITE.getMetadata()), new Object[] {new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.DIORITE.getMetadata()), Blocks.COBBLESTONE});
manager.addRecipe(new ItemStack(Blocks.DIRT, 4, BlockDirt.DirtType.COARSE_DIRT.getMetadata()), new Object[] {"DG", "GD", 'D', new ItemStack(Blocks.DIRT, 1, BlockDirt.DirtType.DIRT.getMetadata()), 'G', Blocks.GRAVEL});
manager.addRecipe(new ItemStack(Blocks.STONE, 4, BlockStone.EnumType.DIORITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.DIORITE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONE, 4, BlockStone.EnumType.GRANITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.GRANITE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.STONE, 4, BlockStone.EnumType.ANDESITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.ANDESITE.getMetadata())});
manager.addRecipe(new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.ROUGH_META), new Object[] {"SS", "SS", 'S', Items.PRISMARINE_SHARD});
manager.addRecipe(new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.BRICKS_META), new Object[] {"SSS", "SSS", "SSS", 'S', Items.PRISMARINE_SHARD});
manager.addRecipe(new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.DARK_META), new Object[] {"SSS", "SIS", "SSS", 'S', Items.PRISMARINE_SHARD, 'I', new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage())});
manager.addRecipe(new ItemStack(Blocks.SEA_LANTERN, 1, 0), new Object[] {"SCS", "CCC", "SCS", 'S', Items.PRISMARINE_SHARD, 'C', Items.PRISMARINE_CRYSTALS});
manager.addRecipe(new ItemStack(Blocks.PURPUR_BLOCK, 4, 0), new Object[] {"FF", "FF", 'F', Items.CHORUS_FRUIT_POPPED});
manager.addRecipe(new ItemStack(Blocks.PURPUR_STAIRS, 4, 0), new Object[] {"# ", "## ", "###", '#', Blocks.PURPUR_BLOCK});
manager.addRecipe(new ItemStack(Blocks.PURPUR_PILLAR, 1, 0), new Object[] {"#", "#", '#', Blocks.PURPUR_SLAB});
manager.addRecipe(new ItemStack(Blocks.END_BRICKS, 4, 0), new Object[] {"##", "##", '#', Blocks.END_STONE});
manager.addRecipe(new ItemStack(Blocks.field_189877_df, 1, 0), new Object[] {"##", "##", '#', Items.MAGMA_CREAM});
manager.addRecipe(new ItemStack(Blocks.field_189878_dg, 1, 0), new Object[] {"###", "###", "###", '#', Items.NETHER_WART});
}
示例15: onBlockPlaced
import net.minecraft.block.BlockStoneBrick; //导入依赖的package包/类
@Override
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
return getDefaultState().withProperty(VARIANT, BlockStoneBrick.EnumType.byMetadata(meta));
}