Minor fixes to crafting recipes.
This commit is contained in:
parent
a901466361
commit
4bc85772da
@ -33,12 +33,12 @@ public class PlayerBuffData {
|
|||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
//A method that outputs this class as a string.
|
//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 = "+
|
return "PlayerBuffData@{p = "+((p!=null)?p.toString():"null")+", base_spdlv = "+base_spdlv+", base_armorlv = "+base_armorlv+", armorbufflist = "+
|
||||||
armorbufflist.toString()+", base_hplv = "+base_hplv+", hpbufflist = "+hpbufflist.toString()+", helmet_durability = "+
|
((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+"," +
|
helmet_durability+", chestplate_durability = "+chestplate_durability+", leggings_durability = "+leggings_durability+"," +
|
||||||
" boots_durability = "+boots_durability+", potion_spdlv = "+potion_spdlv+", potion_time = "+potion_time+", hpbuff_time = "+
|
" 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+"," +
|
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) {
|
public String healthbar(double curHP,double maxHP) {
|
||||||
|
@ -4101,14 +4101,26 @@ implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result.getResult().getType()==Material.WOOL && result.getResult().getAmount() == 1) {
|
if (result.getResult().getType()==Material.WOOL && result.getResult().getAmount() == 1) {
|
||||||
result.setResult(new ItemStack(Material.AIR));
|
//Make sure the crafting matrix only contains three string.
|
||||||
return;
|
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
|
// Increase stairs recipe efficiency
|
||||||
if (result.getResult().getType()==Material.WOOD_STAIRS) {
|
if (result.getResult().getType()==Material.WOOD_STAIRS) {
|
||||||
result.setResult(new ItemStack(Material.WOOD_STAIRS, 8));
|
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) {
|
if (result.getResult().getType()==Material.BIRCH_WOOD_STAIRS) {
|
||||||
result.setResult(new ItemStack(Material.BIRCH_WOOD_STAIRS, 8));
|
result.setResult(new ItemStack(Material.BIRCH_WOOD_STAIRS, 8));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user