Java Code Examples for org.bukkit.Material#QUARTZ

The following examples show how to use org.bukkit.Material#QUARTZ . 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: VeinMinerListener.java    From UhcCore with GNU General Public License v3.0 6 votes vote down vote up
private Material getDropType(){
    if (type == UniversalMaterial.NETHER_QUARTZ_ORE.getType()){
        return Material.QUARTZ;
    }

    switch (type){
        case DIAMOND_ORE:
            return Material.DIAMOND;
        case GOLD_ORE:
            return Material.GOLD_INGOT;
        case IRON_ORE:
            return Material.IRON_INGOT;
        case COAL_ORE:
            return Material.COAL;
        case LAPIS_ORE:
            return UniversalMaterial.LAPIS_LAZULI.getType();
        case EMERALD_ORE:
            return Material.EMERALD;
        case REDSTONE_ORE:
            return Material.REDSTONE;
        case GRAVEL:
            return Material.FLINT;
    }
    return null;
}
 
Example 2
Source File: IndustrialMiner.java    From Slimefun4 with GNU General Public License v3.0 6 votes vote down vote up
/**
 * This method returns the outcome that mining certain ores yields.
 * 
 * @param ore
 *            The {@link Material} of the ore that was mined
 * 
 * @return The outcome when mining this ore
 */
public ItemStack getOutcome(Material ore) {
    if (hasSilkTouch()) {
        return new ItemStack(ore);
    }

    Random random = ThreadLocalRandom.current();

    switch (ore) {
    case COAL_ORE:
        return new ItemStack(Material.COAL);
    case DIAMOND_ORE:
        return new ItemStack(Material.DIAMOND);
    case EMERALD_ORE:
        return new ItemStack(Material.EMERALD);
    case NETHER_QUARTZ_ORE:
        return new ItemStack(Material.QUARTZ);
    case REDSTONE_ORE:
        return new ItemStack(Material.REDSTONE, 4 + random.nextInt(2));
    case LAPIS_ORE:
        return new ItemStack(Material.LAPIS_LAZULI, 4 + random.nextInt(4));
    default:
        // This includes Iron and Gold ore
        return new ItemStack(ore);
    }
}
 
Example 3
Source File: Items.java    From StaffPlus with GNU General Public License v3.0 4 votes vote down vote up
ItemStackBuilder()
{
	itemStack = new ItemStack(Material.QUARTZ);
	setName("");
	setLore(new ArrayList<String>());
}
 
Example 4
Source File: Transporter.java    From AnnihilationPro with MIT License 4 votes vote down vote up
@Override
protected ItemStack getIcon()
{
	return new ItemStack(Material.QUARTZ);
}