|
@@ -63,7 +63,8 @@ public class CustomBlocksConfig extends ModConfigLoader{
|
|
boolean dropItem = config.getBoolean(skillType + "." + blockName + ".Drop_Item", false);
|
|
boolean dropItem = config.getBoolean(skillType + "." + blockName + ".Drop_Item", false);
|
|
int dropID = config.getInt(skillType + "." + blockName + ".Drop_Item_ID", 0);
|
|
int dropID = config.getInt(skillType + "." + blockName + ".Drop_Item_ID", 0);
|
|
byte dropData = (byte) config.getInt(skillType + "." + blockName + ".Drop_Item_Data_Value", 0);
|
|
byte dropData = (byte) config.getInt(skillType + "." + blockName + ".Drop_Item_Data_Value", 0);
|
|
- int dropAmount = config.getInt(skillType + "." + blockName + ".Drop_Item_Amount", 1);
|
|
|
|
|
|
+ int minimumDropAmount = config.getInt(skillType + "." + blockName + ".Min_Drop_Item_Amount", 1);
|
|
|
|
+ int maxiumDropAmount = config.getInt(skillType + "." + blockName + ".Max_Drop_Item_Amount", 1);
|
|
|
|
|
|
if (id == 0) {
|
|
if (id == 0) {
|
|
plugin.getLogger().warning("Missing ID. This block will be skipped.");
|
|
plugin.getLogger().warning("Missing ID. This block will be skipped.");
|
|
@@ -80,13 +81,13 @@ public class CustomBlocksConfig extends ModConfigLoader{
|
|
ItemStack blockItem;
|
|
ItemStack blockItem;
|
|
|
|
|
|
if (dropItem) {
|
|
if (dropItem) {
|
|
- itemDrop = new ItemStack(dropID, dropAmount, (short) 0, dropData);
|
|
|
|
|
|
+ itemDrop = new ItemStack(dropID, 1, (short) 0, dropData);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- itemDrop = new ItemStack(id, dropAmount, (short) 0, data);
|
|
|
|
|
|
+ itemDrop = new ItemStack(id, 1, (short) 0, data);
|
|
}
|
|
}
|
|
|
|
|
|
- block = new CustomBlock(itemDrop, tier, xp, data, id);
|
|
|
|
|
|
+ block = new CustomBlock(minimumDropAmount, maxiumDropAmount, itemDrop, tier, xp, data, id);
|
|
blockItem = new ItemStack(id, 1, (short) 0, data);
|
|
blockItem = new ItemStack(id, 1, (short) 0, data);
|
|
|
|
|
|
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {
|
|
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {
|