Java Code Examples for net.minecraft.block.material.Material#ROCK
The following examples show how to use
net.minecraft.block.material.Material#ROCK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlockTofuStairs.java From TofuCraftReload with MIT License | 6 votes |
/** * Ticks the block if it's been scheduled */ @Override public void updateTick(World par1World, BlockPos pos, IBlockState state, Random par5Random) { super.updateTick(par1World, pos, state, par5Random); if (isFragile) { IBlockState weightBlock = par1World.getBlockState(pos.up()); if (weightBlock != null) { if (weightBlock.getMaterial() == Material.ROCK || weightBlock.getMaterial() == Material.IRON) { dropBlockAsItem(par1World, pos, state, 0); par1World.setBlockToAir(pos); } } } }
Example 2
Source File: BlockOre.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@SuppressWarnings("deprecation") @Override public Material getMaterial(IBlockState state) { String harvestTool = getHarvestTool(state); if (harvestTool != null && harvestTool.equals("shovel")) { return Material.GROUND; } return Material.ROCK; }
Example 3
Source File: BlockCrucible.java From ExNihiloAdscensio with MIT License | 5 votes |
public BlockCrucible() { super(Material.ROCK); String name = "blockCrucible"; setUnlocalizedName(name); setRegistryName(name); GameRegistry.<Block>register(this); GameRegistry.register(new ItemBlockMeta(this).setRegistryName(name)); this.setHardness(2.0f); this.setDefaultState(this.blockState.getBaseState().withProperty(FIRED, false)); }
Example 4
Source File: ToolDrillLV.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@Override public boolean canMineBlock(IBlockState block, ItemStack stack) { String tool = block.getBlock().getHarvestTool(block); return (tool != null && (tool.equals("pickaxe") || tool.equals("shovel"))) || block.getMaterial() == Material.ROCK || block.getMaterial() == Material.IRON || block.getMaterial() == Material.ANVIL || block.getMaterial() == Material.SAND || block.getMaterial() == Material.GRASS || block.getMaterial() == Material.GROUND || block.getMaterial() == Material.SNOW || block.getMaterial() == Material.CLAY || block.getMaterial() == Material.GLASS; }
Example 5
Source File: BlockStoneMortar.java From Sakura_mod with MIT License | 5 votes |
protected BlockStoneMortar() { super(Material.ROCK); this.setHardness(2.0F); this.setResistance(11.0F); this.setSoundType(SoundType.STONE); this.setCreativeTab(CommonProxy.tab); }
Example 6
Source File: PlasticBlock.java From EmergingTechnology with MIT License | 5 votes |
public PlasticBlock() { super(Material.ROCK); this.setHardness(2.0f); this.setRegistryName(EmergingTechnology.MODID, _name); this.setUnlocalizedName(EmergingTechnology.MODID + "." + _name); this.setCreativeTab(EmergingTechnology.TECHNOLOGYTAB); this.setSoundType(SoundType.STONE); }
Example 7
Source File: BlockOreRutile.java From Logistics-Pipes-2 with MIT License | 5 votes |
public BlockOreRutile(){ super(Material.ROCK); setUnlocalizedName(References.NAME_ORE_RUTILE); setRegistryName(References.RN_ORE_RUTILE); setCreativeTab(CreativeTabs.BUILDING_BLOCKS); setHardness(3.0f); setResistance(15.0f); setSoundType(SoundType.STONE); setHarvestLevel("pickaxe",3); setOreName("oreTitanium"); }
Example 8
Source File: GTRecipeIterators.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
/** Iterates through loaded itemstacks for all mods **/ public static void postInit() { createMortarRecipe(); if (GTConfig.general.addCompressorRecipesForBlocks) { createUniversalProcessingRecipes(); } for (Item item : Item.REGISTRY) { NonNullList<ItemStack> items = NonNullList.create(); item.getSubItems(CreativeTabs.SEARCH, items); for (ItemStack stack : items) { if (GTConfig.general.oreDictWroughtIron && GTHelperStack.matchOreDict(stack, "ingotWroughtIron") && !GTHelperStack.matchOreDict(stack, "ingotRefinedIron")) { OreDictionary.registerOre("ingotRefinedIron", stack); } if (GTHelperStack.matchOreDict(stack, "ingotAluminum") && !GTHelperStack.matchOreDict(stack, "ingotAluminium")) { OreDictionary.registerOre("ingotAluminium", stack); } if (GTHelperStack.matchOreDict(stack, "dustAluminum") && !GTHelperStack.matchOreDict(stack, "dustAluminium")) { OreDictionary.registerOre("dustAluminium", stack); } if (GTHelperStack.matchOreDict(stack, "ingotChromium") && !GTHelperStack.matchOreDict(stack, "ingotChrome")) { OreDictionary.registerOre("ingotChrome", stack); } } } for (Block block : Block.REGISTRY) { if (block.getDefaultState().getMaterial() == Material.ROCK && !GTHelperStack.oreDictStartsWith(GTMaterialGen.get(block), "ore")) { GTItemJackHammer.rocks.add(block); } } GTMod.logger.info("Jack Hammer stone list populated with " + GTItemJackHammer.rocks.size() + " entries"); }
Example 9
Source File: BlockBase.java From Signals with GNU General Public License v3.0 | 5 votes |
public BlockBase(Class<? extends TileEntity> tileClass, String name){ super(Material.ROCK); setUnlocalizedName(name); this.tileClass = tileClass; GameRegistry.registerTileEntity(tileClass, name); setCreativeTab(CreativeTabSignals.getInstance()); ModBlocks.registerBlock(this); setHardness(1); }
Example 10
Source File: BlockPortalBase.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public BlockPortalBase() { super(Material.ROCK); this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); this.setSoundType(SoundType.GLASS); this.lightValue = 15; this.setTickRandomly(true); this.setBlockUnbreakable(); }
Example 11
Source File: StarBlock.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
public StarBlock(String modId, String name) { this(modId, name, Material.ROCK); }
Example 12
Source File: BlockNacre.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
public BlockNacre() { super("nacre_block", Material.ROCK); setHardness(0.5f); setSoundType(SoundType.STONE); }
Example 13
Source File: ItemBasicLaserGun.java From AdvancedRocketry with MIT License | 4 votes |
public boolean canHarvestBlock(IBlockState blockIn) { Block block = blockIn.getBlock(); if (block == Blocks.OBSIDIAN) { return this.toolMaterial.getHarvestLevel() == 3; } else if (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE) { if (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK) { if (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE) { if (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE) { if (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE) { if (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE) { Material material = blockIn.getMaterial(); return material == Material.ROCK ? true : (material == Material.IRON ? true : material == Material.ANVIL); } else { return this.toolMaterial.getHarvestLevel() >= 2; } } else { return this.toolMaterial.getHarvestLevel() >= 1; } } else { return this.toolMaterial.getHarvestLevel() >= 1; } } else { return this.toolMaterial.getHarvestLevel() >= 2; } } else { return this.toolMaterial.getHarvestLevel() >= 2; } } else { return this.toolMaterial.getHarvestLevel() >= 2; } }
Example 14
Source File: BlockMiningDrill.java From AdvancedRocketry with MIT License | 4 votes |
public BlockMiningDrill() { super(Material.ROCK); //super(TileDrill.class, zmaster587.libVulpes.inventory.GuiHandler.guiId.MODULAR.ordinal()); }
Example 15
Source File: BlockTerra.java From TFC2 with GNU General Public License v3.0 | 4 votes |
protected BlockTerra() { this(Material.ROCK, null); blockAABB = FULL_BLOCK_AABB; }
Example 16
Source File: StarBlockWithEntity.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
public StarBlockWithEntity(String modId, String name, Class<? extends StarBlockEntity> blockEntityClass) { this(modId, name, Material.ROCK, blockEntityClass); }
Example 17
Source File: BlockStoneStalac.java From TFC2 with GNU General Public License v3.0 | 4 votes |
public BlockStoneStalac() { super(Material.ROCK, META_PROPERTY); this.setCreativeTab(null); this.setSoundType(SoundType.STONE); }
Example 18
Source File: BlockBTank.java From BetterChests with GNU Lesser General Public License v3.0 | 4 votes |
public BlockBTank() { super(Material.ROCK); setUnlocalizedName("betterchests:bettertank"); }
Example 19
Source File: ItemJackHammer.java From AdvancedRocketry with MIT License | 4 votes |
public float getStrVsBlock(ItemStack stack, IBlockState state) { return state.getMaterial() == Material.IRON || state.getMaterial() == Material.ROCK || state.getMaterial() == MaterialGeode.geode ? this.efficiencyOnProperMaterial : super.getStrVsBlock(stack, state); }
Example 20
Source File: BlockStoneStalag.java From TFC2 with GNU General Public License v3.0 | 4 votes |
public BlockStoneStalag() { super(Material.ROCK, META_PROPERTY); this.setCreativeTab(null); this.setSoundType(SoundType.STONE); }