mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Change isHerbalismDrop to use strings.. this method still needs more work
This commit is contained in:
		@@ -16,6 +16,7 @@ Version 2.1.219
 | 
				
			|||||||
    Added 'Stripped_Cherry_Log' to woodcutting experience in experience.yml
 | 
					    Added 'Stripped_Cherry_Log' to woodcutting experience in experience.yml
 | 
				
			||||||
    Added 'Stripped_Cherry_Wood' to woodcutting experience in experience.yml
 | 
					    Added 'Stripped_Cherry_Wood' to woodcutting experience in experience.yml
 | 
				
			||||||
    Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining
 | 
					    Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining
 | 
				
			||||||
 | 
					    NOTE: There are plans to add experience for discovering items via the new brushing mechanic, but this will have to wait for new Spigot API to become available
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Version 2.1.218
 | 
					Version 2.1.218
 | 
				
			||||||
    Fixed locale pt_BR type (thanks MrPowerGamerBR)
 | 
					    Fixed locale pt_BR type (thanks MrPowerGamerBR)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,6 +22,7 @@ import org.jetbrains.annotations.Nullable;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import java.util.Collections;
 | 
					import java.util.Collections;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import java.util.Locale;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public final class ItemUtils {
 | 
					public final class ItemUtils {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@@ -413,31 +414,31 @@ public final class ItemUtils {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public static boolean isHerbalismDrop(ItemStack item) {
 | 
					    public static boolean isHerbalismDrop(ItemStack item) {
 | 
				
			||||||
        //TODO: 1.14 This needs to be updated
 | 
					        //TODO: 1.14 This needs to be updated
 | 
				
			||||||
        switch (item.getType()) {
 | 
					        switch (item.getType().getKey().getKey().toLowerCase()) {
 | 
				
			||||||
            case WHEAT:
 | 
					            case "wheat":
 | 
				
			||||||
            case WHEAT_SEEDS:
 | 
					            case "wheat_seeds":
 | 
				
			||||||
            case CARROT:
 | 
					            case "carrot":
 | 
				
			||||||
            case CHORUS_FRUIT:
 | 
					            case "chorus_fruit":
 | 
				
			||||||
            case CHORUS_FLOWER:
 | 
					            case "chorus_flower":
 | 
				
			||||||
            case POTATO:
 | 
					            case "potato":
 | 
				
			||||||
            case BEETROOT:
 | 
					            case "beetroot":
 | 
				
			||||||
            case BEETROOTS:
 | 
					            case "beetroots":
 | 
				
			||||||
            case BEETROOT_SEEDS:
 | 
					            case "beetroot_seeds":
 | 
				
			||||||
            case NETHER_WART:
 | 
					            case "nether_wart":
 | 
				
			||||||
            case BROWN_MUSHROOM:
 | 
					            case "brown_mushroom":
 | 
				
			||||||
            case RED_MUSHROOM:
 | 
					            case "red_mushroom":
 | 
				
			||||||
            case ROSE_BUSH:
 | 
					            case "rose_bush":
 | 
				
			||||||
            case DANDELION:
 | 
					            case "dandelion":
 | 
				
			||||||
            case CACTUS:
 | 
					            case "cactus":
 | 
				
			||||||
            case SUGAR_CANE:
 | 
					            case "sugar_cane":
 | 
				
			||||||
            case MELON:
 | 
					            case "melon":
 | 
				
			||||||
            case MELON_SEEDS:
 | 
					            case "melon_seeds":
 | 
				
			||||||
            case PUMPKIN:
 | 
					            case "pumpkin":
 | 
				
			||||||
            case PUMPKIN_SEEDS:
 | 
					            case "pumpkin_seeds":
 | 
				
			||||||
            case LILY_PAD:
 | 
					            case "lily_pad":
 | 
				
			||||||
            case VINE:
 | 
					            case "vine":
 | 
				
			||||||
            case TALL_GRASS:
 | 
					            case "tall_grass":
 | 
				
			||||||
            case COCOA_BEANS:
 | 
					            case "cocoa_beans":
 | 
				
			||||||
                return true;
 | 
					                return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            default:
 | 
					            default:
 | 
				
			||||||
@@ -445,6 +446,7 @@ public final class ItemUtils {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Checks to see if an item is a mob drop.
 | 
					     * Checks to see if an item is a mob drop.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user