Only remove seed on greenThumb - Green Terra's already had the seed

removed the first time.
This commit is contained in:
GJ 2013-02-24 14:04:54 -05:00
parent a485308fca
commit 5cd542002e

View File

@ -320,6 +320,12 @@ public class Herbalism {
* @return true if the ability was successful, false otherwise
*/
private static boolean processGreenThumbPlants(BlockState blockState, Player player) {
PlayerProfile playerProfile = Users.getPlayer(player).getProfile();
if (playerProfile.getAbilityMode(AbilityType.GREEN_TERRA)) {
return convertGreenTerraPlants(blockState);
}
else if (SkillTools.activationSuccessful(player, SkillType.HERBALISM, greenThumbMaxChance, greenThumbMaxLevel)) {
PlayerInventory playerInventory = player.getInventory();
ItemStack seed = HerbalismBlock.getHerbalismBlock(blockState.getType()).getDropItem();
@ -327,15 +333,6 @@ public class Herbalism {
return false;
}
PlayerProfile playerProfile = Users.getPlayer(player).getProfile();
if (playerProfile.getAbilityMode(AbilityType.GREEN_TERRA)) {
playerInventory.removeItem(seed);
player.updateInventory(); // Needed until replacement available
return convertGreenTerraPlants(blockState);
}
else if (SkillTools.activationSuccessful(player, SkillType.HERBALISM, greenThumbMaxChance, greenThumbMaxLevel)) {
playerInventory.removeItem(seed);
player.updateInventory(); // Needed until replacement available