Smelting!

This commit is contained in:
GJ
2013-01-23 16:34:01 -05:00
parent 56d27c3d78
commit 6f0e2437e0
25 changed files with 734 additions and 21 deletions

View File

@ -303,4 +303,15 @@ public class BlockChecks {
return false;
}
public static boolean canBeFluxMined(Block block) {
switch (block.getType()) {
case IRON_ORE:
case GOLD_ORE:
return true;
default:
return false;
}
}
}

View File

@ -473,4 +473,21 @@ public class ItemChecks {
type == Material.SHEARS || type == Material.FISHING_ROD || type == Material.CARROT_STICK ||
type == Material.FLINT_AND_STEEL || type == Material.BOW;
}
public static boolean isSmeltable(ItemStack itemStack) {
switch (itemStack.getType()) {
case COAL_ORE:
case DIAMOND_ORE:
case GLOWING_REDSTONE_ORE:
case GOLD_ORE:
case IRON_ORE:
case LAPIS_ORE:
case REDSTONE_ORE:
case EMERALD_ORE:
return true;
default:
return false;
}
}
}

View File

@ -113,6 +113,10 @@ public class Permissions {
return hasPermission(player, "mcmmo.perks.lucky.repair");
}
public static boolean luckySmelting(Player player) {
return hasPermission(player, "mcmmo.perks.lucky.smelting");
}
public static boolean luckySwords(Player player) {
return hasPermission(player, "mcmmo.perks.lucky.swords");
}
@ -502,6 +506,26 @@ public class Permissions {
return hasPermission(player, "mcmmo.ability.blastmining.detonate");
}
/*
* MCMMO.ABILITY.SMELTING.*
*/
public static boolean fuelEfficiency(Player player) {
return hasPermission(player, "mcmmo.ability.smelting.fuelefficiency");
}
public static boolean secondSmelt(Player player) {
return hasPermission(player, "mcmmo.ability.smelting.secondsmelt");
}
public static boolean fluxMining(Player player) {
return hasPermission(player, "mcmmo.ability.smelting.fluxmining");
}
public static boolean smeltingVanillaXPBoost(Player player) {
return hasPermission(player, "mcmmo.ability.smelting.vanillaxpboost");
}
/*
* MCMMO.ITEM.*
*/
@ -602,4 +626,8 @@ public class Permissions {
public static boolean acrobatics(Player player) {
return hasPermission(player, "mcmmo.skills.acrobatics");
}
public static boolean smelting(Player player) {
return hasPermission(player, "mcmmo.skills.smelting");
}
}