mcMMO/src/main/java/com/gmail/nossr50/util/MaterialUtils.java
GJ a9d51dad34 Clean up Smelting checks.
Now uses recipes to check if an item is the result of smelting.
2013-10-31 14:29:06 -04:00

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);
}
}
}