mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 21:56:47 +01:00
a9d51dad34
Now uses recipes to check if an item is the result of smelting.
26 lines
624 B
Java
26 lines
624 B
Java
package com.gmail.nossr50.util;
|
|
|
|
import org.bukkit.material.MaterialData;
|
|
|
|
public final class MaterialUtils {
|
|
private MaterialUtils() {}
|
|
|
|
protected static boolean isOre(MaterialData data) {
|
|
switch (data.getItemType()) {
|
|
case COAL_ORE:
|
|
case DIAMOND_ORE:
|
|
case GLOWING_REDSTONE_ORE:
|
|
case GOLD_ORE:
|
|
case IRON_ORE:
|
|
case LAPIS_ORE:
|
|
case QUARTZ_ORE:
|
|
case REDSTONE_ORE:
|
|
case EMERALD_ORE:
|
|
return true;
|
|
|
|
default:
|
|
return ModUtils.isCustomOre(data);
|
|
}
|
|
}
|
|
}
|