Mod support - able to define tiers for custom blocks now.

Tier 1 - breaks with wood/gold
Tier 2 - breaks with stone
Tier 3 - breaks with iron
Tier 4 - breaks with diamond
This commit is contained in:
GJ
2012-05-17 21:57:41 -04:00
parent efcc15d89d
commit c559e70270
4 changed files with 19 additions and 2 deletions

View File

@ -71,6 +71,7 @@ public class CustomBlocksConfig extends ModConfigLoader{
int id = config.getInt(skillType + "." + blockName + ".ID", 0);
byte data = (byte) config.getInt(skillType + "." + blockName + ".Data_Value", 0);
int xp = config.getInt(skillType + "." + blockName + ".XP_Gain", 0);
int tier = config.getInt(skillType + "." + blockName + ".Tier", 1);
boolean dropItem = config.getBoolean(skillType + "." + blockName + ".Drop_Item", false);
int dropID = config.getInt(skillType + "." + blockName + ".Drop_Item_ID", 0);
byte dropData = (byte) config.getInt(skillType + "." + blockName + ".Drop_Item_Data_Value", 0);
@ -97,7 +98,7 @@ public class CustomBlocksConfig extends ModConfigLoader{
itemDrop = new ItemStack(id, dropAmount, (short) 0, data);
}
block = new CustomBlock(itemDrop, xp, data, id);
block = new CustomBlock(itemDrop, tier, xp, data, id);
blockItem = new ItemStack(id, 1, (short) 0, data);
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {