Java Code Examples for net.minecraft.block.material.Material#GLASS
The following examples show how to use
net.minecraft.block.material.Material#GLASS .
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: AquaponicGlass.java From EmergingTechnology with MIT License | 5 votes |
public AquaponicGlass() { super(Material.GLASS, false); this.setHardness(1.0f); this.setRegistryName(EmergingTechnology.MODID, _name); this.setUnlocalizedName(EmergingTechnology.MODID + "." + _name); this.setCreativeTab(EmergingTechnology.TECHNOLOGYTAB); this.setSoundType(SoundType.STONE); this.setLightOpacity(0); }
Example 2
Source File: BlockCrystal.java From AdvancedRocketry with MIT License | 5 votes |
public BlockCrystal() { super(Material.GLASS); this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); this.setSoundType(SoundType.GLASS); this.setDefaultState(this.getDefaultState().withProperty(CRYSTALPROPERTY, EnumCrystal.AMETHYST)); }
Example 3
Source File: BlockJar.java From Wizardry with GNU Lesser General Public License v3.0 | 5 votes |
public BlockJar() { super("jar_block", Material.GLASS); setSoundType(SoundType.GLASS); setHardness(0.3f); setResistance(1.5f); setLightOpacity(0); }
Example 4
Source File: BlockTank.java From YouTubeModdingTutorial with MIT License | 5 votes |
public BlockTank() { super(Material.GLASS); setHardness(1.0f); setSoundType(SoundType.GLASS); setRegistryName(TANK); setTranslationKey(MyMod.MODID + ".tank"); setHarvestLevel("pickaxe", 0); }
Example 5
Source File: ToolJackHammer.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("hammer") || tool.equals("pickaxe"))) || block.getMaterial() == Material.ROCK || block.getMaterial() == Material.GLASS || block.getMaterial() == Material.ICE || block.getMaterial() == Material.PACKED_ICE; }
Example 6
Source File: ToolPickaxe.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")) || block.getMaterial() == Material.ROCK || block.getMaterial() == Material.IRON || block.getMaterial() == Material.ANVIL || block.getMaterial() == Material.GLASS; }
Example 7
Source File: ToolHardHammer.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); ItemStack itemStack = new ItemStack(block.getBlock(), 1, block.getBlock().getMetaFromState(block)); return (tool != null && (tool.equals("hammer") || tool.equals("pickaxe"))) || block.getMaterial() == Material.ROCK || block.getMaterial() == Material.GLASS || block.getMaterial() == Material.ICE || block.getMaterial() == Material.PACKED_ICE || RecipeMaps.FORGE_HAMMER_RECIPES.findRecipe(Long.MAX_VALUE, Collections.singletonList(itemStack), Collections.emptyList(), 0) != null; }
Example 8
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 9
Source File: SolarGlass.java From EmergingTechnology with MIT License | 5 votes |
public SolarGlass() { super(Material.GLASS, "solarglass"); this.setSoundType(SoundType.METAL); this.setLightOpacity(0); setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); }
Example 10
Source File: Light.java From EmergingTechnology with MIT License | 5 votes |
public Light() { super(Material.GLASS, "light"); this.setSoundType(SoundType.GLASS); this.setLightLevel(1.0f); this.setLightOpacity(0); setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(POWERED, false) .withProperty(BULBTYPE, 0)); }
Example 11
Source File: ClearPlasticBlock.java From EmergingTechnology with MIT License | 5 votes |
public ClearPlasticBlock() { super(Material.GLASS, false); this.setHardness(1.0f); this.setRegistryName(EmergingTechnology.MODID, _name); this.setUnlocalizedName(EmergingTechnology.MODID + "." + _name); this.setCreativeTab(EmergingTechnology.TECHNOLOGYTAB); this.setSoundType(SoundType.STONE); this.setLightOpacity(0); }
Example 12
Source File: Torch.java From EmergingTechnology with MIT License | 5 votes |
public Torch() { super(Material.GLASS); this.setHardness(1.0f); this.setRegistryName(EmergingTechnology.MODID, _name); this.setUnlocalizedName(EmergingTechnology.MODID + "." + _name); this.setCreativeTab(EmergingTechnology.TECHNOLOGYTAB); this.setSoundType(SoundType.GLASS); this.setLightLevel(1.0f); this.setLightOpacity(0); }
Example 13
Source File: BlockSoulGlass.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public BlockSoulGlass() { super(Material.GLASS, false); blockSoundType = SoundType.GLASS; setDefaultState(this.blockState.getBaseState().withProperty(POWERED, false)); }
Example 14
Source File: BlockCreativeManaBattery.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
public BlockCreativeManaBattery() { super("creative_mana_battery", Material.GLASS); setSoundType(SoundType.GLASS); getItemForm().setMaxStackSize(1); }
Example 15
Source File: BlockManaBattery.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
public BlockManaBattery() { super("mana_battery", Material.GLASS); setSoundType(SoundType.GLASS); getItemForm().setMaxStackSize(1); }
Example 16
Source File: BlockLightSource.java From AdvancedRocketry with MIT License | 4 votes |
public BlockLightSource() { super(Material.GLASS); setUnlocalizedName("lightSource"); setLightLevel(1F); }
Example 17
Source File: BlockLens.java From AdvancedRocketry with MIT License | 4 votes |
public BlockLens() { super(Material.GLASS, true); setSoundType(SoundType.GLASS); }
Example 18
Source File: ItemEnderTool.java From enderutilities with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canHarvestBlock(IBlockState state, ItemStack stack) { if (this.isToolBroken(stack)) { return false; } ToolType tool = ToolType.fromStack(stack); if (tool.equals(ToolType.PICKAXE)) // Ender Pickaxe { if (state.getMaterial() == Material.ROCK || state.getMaterial() == Material.GLASS || state.getMaterial() == Material.ICE || state.getMaterial() == Material.PACKED_ICE || state.getMaterial() == Material.REDSTONE_LIGHT || state.getMaterial() == Material.PISTON || state.getMaterial() == Material.IRON || state.getMaterial() == Material.ANVIL) { //System.out.println("canHarvestBlock(): true; Pickaxe"); return true; } } else if (tool.equals(ToolType.AXE)) // Ender Axe { if (state.getMaterial() == Material.WOOD || state.getMaterial() == Material.LEAVES || state.getMaterial() == Material.GOURD || state.getMaterial() == Material.CARPET || state.getMaterial() == Material.CLOTH || state.getMaterial() == Material.PLANTS || state.getMaterial() == Material.VINE) { //System.out.println("canHarvestBlock(): true; Axe"); return true; } } else if (tool.equals(ToolType.SHOVEL)) // Ender Shovel { if (state.getMaterial() == Material.GROUND || state.getMaterial() == Material.GRASS || state.getMaterial() == Material.SAND || state.getMaterial() == Material.SNOW || state.getMaterial() == Material.CRAFTED_SNOW || state.getMaterial() == Material.CLAY) { //System.out.println("canHarvestBlock(): true; Shovel"); return true; } } //System.out.println("canHarvestBlock(): false"); return false; }