Minor fixes to crafting recipes.

dev
sigonasr2 11 years ago
parent a901466361
commit 4bc85772da
  1. 6
      BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java
  2. 12
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java

@ -33,12 +33,12 @@ public class PlayerBuffData {
public String toString() {
//A method that outputs this class as a string.
return ((java.lang.Object)this).toString()+"{p = "+p.toString()+", base_spdlv = "+base_spdlv+", base_armorlv = "+base_armorlv+", armorbufflist = "+
armorbufflist.toString()+", base_hplv = "+base_hplv+", hpbufflist = "+hpbufflist.toString()+", helmet_durability = "+
return "PlayerBuffData@{p = "+((p!=null)?p.toString():"null")+", base_spdlv = "+base_spdlv+", base_armorlv = "+base_armorlv+", armorbufflist = "+
((armorbufflist!=null)?armorbufflist.toString():"null")+", base_hplv = "+base_hplv+", hpbufflist = "+((hpbufflist!=null)?hpbufflist.toString():"null")+", helmet_durability = "+
helmet_durability+", chestplate_durability = "+chestplate_durability+", leggings_durability = "+leggings_durability+"," +
" boots_durability = "+boots_durability+", potion_spdlv = "+potion_spdlv+", potion_time = "+potion_time+", hpbuff_time = "+
hpbuff_time+", extra_hp = "+extra_hp+", money_gained = "+money_gained+", last_money_report_time = "+last_money_report_time+"," +
"plugin = "+plugin.toString()+"}";
"plugin = "+((plugin!=null)?plugin.toString():"null")+"}";
}
public String healthbar(double curHP,double maxHP) {

@ -4101,14 +4101,26 @@ implements Listener
}
if (result.getResult().getType()==Material.WOOL && result.getResult().getAmount() == 1) {
//Make sure the crafting matrix only contains three string.
int stringcount=0;
for (int i=0;i<result.getMatrix().length;i++) {
if (result.getMatrix()[i]!=null && result.getMatrix()[i].getType()==Material.STRING) {
stringcount++;
}
}
if (stringcount!=4) {
result.setResult(new ItemStack(Material.AIR));
return;
}
}
// Increase stairs recipe efficiency
if (result.getResult().getType()==Material.WOOD_STAIRS) {
result.setResult(new ItemStack(Material.WOOD_STAIRS, 8));
}
if (result.getResult().getType()==Material.COBBLESTONE_STAIRS) {
result.setResult(new ItemStack(Material.COBBLESTONE_STAIRS, 8));
}
if (result.getResult().getType()==Material.BIRCH_WOOD_STAIRS) {
result.setResult(new ItemStack(Material.BIRCH_WOOD_STAIRS, 8));
}

Loading…
Cancel
Save