mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Better way to handle ink sacks, allows for dropping of multiple types.
This commit is contained in:
parent
e0592b3f62
commit
1a88b0b944
@ -111,7 +111,18 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
/*
|
/*
|
||||||
* Material, Amount, and Data
|
* 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 amount = config.getInt(type + "." + treasureName + ".Amount");
|
||||||
int data = config.getInt(type + "." + treasureName + ".Data");
|
int data = config.getInt(type + "." + treasureName + ".Data");
|
||||||
|
|
||||||
@ -179,8 +190,8 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
reason.add("Invalid Potion_Type: " + potionType);
|
reason.add("Invalid Potion_Type: " + potionType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (config.contains(type + "." + treasureName + ".Dye_Color")) {
|
else if (treasureName.contains("INK_SACK")) {
|
||||||
String color = config.getString("Fishing." + treasureName + ".Dye_Color");
|
String color = treasureName.substring(9);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Dye dye = new Dye();
|
Dye dye = new Dye();
|
||||||
|
@ -345,8 +345,7 @@ Fishing:
|
|||||||
Drop_Chance: 40.0
|
Drop_Chance: 40.0
|
||||||
Drop_Level: 800
|
Drop_Level: 800
|
||||||
Max_Level: -1
|
Max_Level: -1
|
||||||
INK_SACK:
|
INK_SACK_BLUE:
|
||||||
Dye_Color: BLUE
|
|
||||||
Amount: 20
|
Amount: 20
|
||||||
XP: 200
|
XP: 200
|
||||||
Drop_Chance: 40.0
|
Drop_Chance: 40.0
|
||||||
@ -464,8 +463,7 @@ Excavation:
|
|||||||
Drop_Chance: 0.13
|
Drop_Chance: 0.13
|
||||||
Drop_Level: 350
|
Drop_Level: 350
|
||||||
Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||||
INK_SACK:
|
INK_SACK_BROWN:
|
||||||
Dye_Color: BROWN
|
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 100
|
XP: 100
|
||||||
Drop_Chance: 1.33
|
Drop_Chance: 1.33
|
||||||
@ -487,8 +485,7 @@ Hylian_Luck:
|
|||||||
Drop_Chance: 100.0
|
Drop_Chance: 100.0
|
||||||
Drop_Level: 0
|
Drop_Level: 0
|
||||||
Drops_From: [Bushes]
|
Drops_From: [Bushes]
|
||||||
INK_SACK:
|
INK_SACK_BROWN:
|
||||||
Dye_Color: BROWN
|
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 0
|
XP: 0
|
||||||
Drop_Chance: 100.0
|
Drop_Chance: 100.0
|
||||||
|
Loading…
Reference in New Issue
Block a user