diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java index 8ef2bfeba..0466508ae 100755 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java @@ -392,10 +392,13 @@ public class Fishing { case SQUID: ItemStack item; try { - item = (new MaterialData(Material.INK_SACK, DyeColor.BLACK.getDyeData())).toItemStack(1); + item = (new MaterialData(Material.INK_SACK, DyeColor.BLACK.getData())).toItemStack(1); } catch(Exception e) { item = (new MaterialData(Material.INK_SACK, (byte) 0)).toItemStack(1); + } + catch(NoSuchMethodError e) { + item = (new MaterialData(Material.INK_SACK, (byte) 0)).toItemStack(1); } Misc.dropItem(location, item); diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java index 10ed1cb95..940d08572 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java @@ -266,11 +266,14 @@ public class Herbalism { else { if (mat == Material.COCOA) { try { - is = new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData()); + is = new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getData()); } catch (Exception e) { is = new ItemStack(Material.INK_SACK, 1, (short) 3); } + catch (NoSuchMethodError e) { + is = new ItemStack(Material.INK_SACK, 1, (short) 3); + } } else if (mat == Material.CARROT) { is = new ItemStack(Material.CARROT_ITEM); @@ -423,11 +426,14 @@ public class Herbalism { break; case COCOA: try { - hasSeeds = inventory.containsAtLeast(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData()), 1); + hasSeeds = inventory.containsAtLeast(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getData()), 1); } catch(Exception e) { hasSeeds = inventory.containsAtLeast(new ItemStack(Material.INK_SACK, 1, (short) 3), 1); } + catch(NoSuchMethodError e) { + hasSeeds = inventory.containsAtLeast(new ItemStack(Material.INK_SACK, 1, (short) 3), 1); + } break; case CARROT: hasSeeds = inventory.contains(Material.CARROT_ITEM); @@ -462,13 +468,17 @@ public class Herbalism { break; case COCOA: try { - Misc.dropItems(location, new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData()), 3); - inventory.removeItem(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData())); + Misc.dropItems(location, new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getData()), 3); + inventory.removeItem(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getData())); } catch(Exception e) { Misc.dropItems(location, new ItemStack(Material.INK_SACK, 1, (short) 3), 3); inventory.removeItem(new ItemStack(Material.INK_SACK, 1, (short) 3)); } + catch(NoSuchMethodError e) { + Misc.dropItems(location, new ItemStack(Material.INK_SACK, 1, (short) 3), 3); + inventory.removeItem(new ItemStack(Material.INK_SACK, 1, (short) 3)); + } break; case CARROT: Misc.dropItem(location, new ItemStack(Material.CARROT_ITEM)); diff --git a/src/main/java/com/gmail/nossr50/skills/mining/Mining.java b/src/main/java/com/gmail/nossr50/skills/mining/Mining.java index 67bee7c5e..c6960b597 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/Mining.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/Mining.java @@ -244,11 +244,14 @@ public class Mining { case LAPIS_ORE: if (config.getLapisDoubleDropsEnabled()) { try { - item = (new MaterialData(Material.INK_SACK, DyeColor.BLUE.getDyeData())).toItemStack(1); + item = (new MaterialData(Material.INK_SACK, DyeColor.BLUE.getData())).toItemStack(1); } catch(Exception e) { item = (new MaterialData(Material.INK_SACK, (byte) 4)).toItemStack(1); } + catch(NoSuchMethodError e) { + item = (new MaterialData(Material.INK_SACK, (byte) 4)).toItemStack(1); + } Misc.dropItems(location, item, 4); Misc.randomDropItems(location, item, 50, 4);