mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 01:03:44 +01:00 
			
		
		
		
	Slight greenThumbWheat cleanup
This commit is contained in:
		| @@ -228,7 +228,6 @@ public class Herbalism { | |||||||
|         int herbLevel = profile.getSkillLevel(SkillType.HERBALISM); |         int herbLevel = profile.getSkillLevel(SkillType.HERBALISM); | ||||||
|         PlayerInventory inventory = player.getInventory(); |         PlayerInventory inventory = player.getInventory(); | ||||||
|         boolean hasSeeds = false; |         boolean hasSeeds = false; | ||||||
|         Location location = block.getLocation(); |  | ||||||
|         Material type = block.getType(); |         Material type = block.getType(); | ||||||
|  |  | ||||||
|         switch(type) { |         switch(type) { | ||||||
| @@ -251,12 +250,18 @@ public class Herbalism { | |||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         if (!hasSeeds) { | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         int activationChance = SkillTools.calculateActivationChance(Permissions.luckyHerbalism(player)); |         int activationChance = SkillTools.calculateActivationChance(Permissions.luckyHerbalism(player)); | ||||||
|  |         float chance = (float) (greenThumbMaxChance / greenThumbMaxLevel * herbLevel); | ||||||
|  |  | ||||||
|         float chance = (float) ((greenThumbMaxChance / greenThumbMaxLevel) * herbLevel); |         if (chance > greenThumbMaxChance) { | ||||||
|         if (chance > greenThumbMaxChance) chance = (float) greenThumbMaxChance; |             chance = (float) greenThumbMaxChance; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         if (hasSeeds && (profile.getAbilityMode(AbilityType.GREEN_TERRA) || chance > Misc.getRandom().nextInt(activationChance))) { |         if (profile.getAbilityMode(AbilityType.GREEN_TERRA) || chance > Misc.getRandom().nextInt(activationChance)) { | ||||||
|             switch(type) { |             switch(type) { | ||||||
|             case CROPS: |             case CROPS: | ||||||
|                 inventory.removeItem(new ItemStack(Material.SEEDS)); |                 inventory.removeItem(new ItemStack(Material.SEEDS)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 bm01
					bm01