No need to check if this is wheat...

This commit is contained in:
gmcferrin 2013-01-29 10:07:32 -05:00
parent 659e982c47
commit d2cb88d93b

View File

@ -80,11 +80,9 @@ public class Herbalism {
return;
}
if (!block.getType().equals(Material.WHEAT)) {
inventory.removeItem(new ItemStack(Material.SEEDS));
player.updateInventory(); // Needed until replacement available
greenTerraConvert(player, block);
}
inventory.removeItem(new ItemStack(Material.SEEDS));
player.updateInventory(); // Needed until replacement available
greenTerraConvert(player, block);
}
public static void greenTerraConvert(Player player, Block block) {
@ -338,9 +336,7 @@ public class Herbalism {
public static void hylianLuck(Block block, Player player, BlockBreakEvent event) {
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.HERBALISM);
float chance = (float) ((hylianLuckMaxChance / hylianLuckMaxLevel) * skillLevel);
if (chance > hylianLuckMaxChance) chance = (float) hylianLuckMaxChance;
double chance = (hylianLuckMaxChance / hylianLuckMaxLevel) * Misc.skillCheck(skillLevel, hylianLuckMaxLevel);
int activationChance = Misc.calculateActivationChance(Permissions.luckyHerbalism(player));
if (chance > Misc.getRandom().nextInt(activationChance)) {