Change isHerbalismDrop to use strings.. this method still needs more work

This commit is contained in:
nossr50 2023-04-02 20:24:04 -07:00
parent ae961caeab
commit cd96bc79d8
2 changed files with 28 additions and 25 deletions

View File

@ -16,6 +16,7 @@ Version 2.1.219
Added 'Stripped_Cherry_Log' 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
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
Fixed locale pt_BR type (thanks MrPowerGamerBR)

View File

@ -22,6 +22,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
public final class ItemUtils {
/**
@ -413,31 +414,31 @@ public final class ItemUtils {
*/
public static boolean isHerbalismDrop(ItemStack item) {
//TODO: 1.14 This needs to be updated
switch (item.getType()) {
case WHEAT:
case WHEAT_SEEDS:
case CARROT:
case CHORUS_FRUIT:
case CHORUS_FLOWER:
case POTATO:
case BEETROOT:
case BEETROOTS:
case BEETROOT_SEEDS:
case NETHER_WART:
case BROWN_MUSHROOM:
case RED_MUSHROOM:
case ROSE_BUSH:
case DANDELION:
case CACTUS:
case SUGAR_CANE:
case MELON:
case MELON_SEEDS:
case PUMPKIN:
case PUMPKIN_SEEDS:
case LILY_PAD:
case VINE:
case TALL_GRASS:
case COCOA_BEANS:
switch (item.getType().getKey().getKey().toLowerCase()) {
case "wheat":
case "wheat_seeds":
case "carrot":
case "chorus_fruit":
case "chorus_flower":
case "potato":
case "beetroot":
case "beetroots":
case "beetroot_seeds":
case "nether_wart":
case "brown_mushroom":
case "red_mushroom":
case "rose_bush":
case "dandelion":
case "cactus":
case "sugar_cane":
case "melon":
case "melon_seeds":
case "pumpkin":
case "pumpkin_seeds":
case "lily_pad":
case "vine":
case "tall_grass":
case "cocoa_beans":
return true;
default:
@ -445,6 +446,7 @@ public final class ItemUtils {
}
}
/**
* Checks to see if an item is a mob drop.
*