2013-10-31 19:29:06 +01:00
|
|
|
package com.gmail.nossr50.util;
|
|
|
|
|
2014-03-03 18:27:45 +01:00
|
|
|
import com.gmail.nossr50.mcMMO;
|
2018-10-10 03:48:47 +02:00
|
|
|
import org.bukkit.Material;
|
2014-03-03 18:27:45 +01:00
|
|
|
|
2013-10-31 19:29:06 +01:00
|
|
|
public final class MaterialUtils {
|
|
|
|
private MaterialUtils() {}
|
|
|
|
|
2018-10-10 03:48:47 +02:00
|
|
|
protected static boolean isOre(Material data) {
|
2020-02-29 01:44:37 +01:00
|
|
|
//Netherrite Ore (Kind of)
|
|
|
|
if(data.getKey().getKey().equalsIgnoreCase("ancient_debris"))
|
|
|
|
return true;
|
|
|
|
|
2018-10-10 03:48:47 +02:00
|
|
|
switch (data) {
|
2013-10-31 19:29:06 +01:00
|
|
|
case COAL_ORE:
|
|
|
|
case DIAMOND_ORE:
|
2018-07-24 04:13:57 +02:00
|
|
|
case NETHER_QUARTZ_ORE:
|
2013-10-31 19:29:06 +01:00
|
|
|
case GOLD_ORE:
|
|
|
|
case IRON_ORE:
|
|
|
|
case LAPIS_ORE:
|
|
|
|
case REDSTONE_ORE:
|
|
|
|
case EMERALD_ORE:
|
|
|
|
return true;
|
|
|
|
default:
|
2014-02-03 20:48:43 +01:00
|
|
|
return mcMMO.getModManager().isCustomOre(data);
|
2013-10-31 19:29:06 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|