diff --git a/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java b/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java index 1d9e641f8..d9dabb89e 100644 --- a/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java +++ b/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java @@ -111,7 +111,18 @@ public class TreasureConfig extends ConfigLoader { /* * Material, Amount, and Data */ - Material material = treasureName.contains("POTION") ? Material.POTION : Material.matchMaterial(treasureName); + Material material; + + if (treasureName.contains("POTION")) { + material = Material.POTION; + } + else if (treasureName.contains("INK_SACK")) { + material = Material.INK_SACK; + } + else { + material = Material.matchMaterial(treasureName); + } + int amount = config.getInt(type + "." + treasureName + ".Amount"); int data = config.getInt(type + "." + treasureName + ".Data"); @@ -179,8 +190,8 @@ public class TreasureConfig extends ConfigLoader { reason.add("Invalid Potion_Type: " + potionType); } } - else if (config.contains(type + "." + treasureName + ".Dye_Color")) { - String color = config.getString("Fishing." + treasureName + ".Dye_Color"); + else if (treasureName.contains("INK_SACK")) { + String color = treasureName.substring(9); try { Dye dye = new Dye(); diff --git a/src/main/resources/treasures.yml b/src/main/resources/treasures.yml index 545b21026..b69b386d9 100644 --- a/src/main/resources/treasures.yml +++ b/src/main/resources/treasures.yml @@ -345,8 +345,7 @@ Fishing: Drop_Chance: 40.0 Drop_Level: 800 Max_Level: -1 - INK_SACK: - Dye_Color: BLUE + INK_SACK_BLUE: Amount: 20 XP: 200 Drop_Chance: 40.0 @@ -464,8 +463,7 @@ Excavation: Drop_Chance: 0.13 Drop_Level: 350 Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand] - INK_SACK: - Dye_Color: BROWN + INK_SACK_BROWN: Amount: 1 XP: 100 Drop_Chance: 1.33 @@ -487,8 +485,7 @@ Hylian_Luck: Drop_Chance: 100.0 Drop_Level: 0 Drops_From: [Bushes] - INK_SACK: - Dye_Color: BROWN + INK_SACK_BROWN: Amount: 1 XP: 0 Drop_Chance: 100.0