ok so i made a crafting class and inside i have this method
Code:
public void craft(int itemUsed, int useWith){
int uncut = 0;
int cut = 0;
/**
* cut gem if used on chisel
*/
if (((itemUsed == uncut) || (useWith == uncut)) && ((itemUsed == 1755) || (useWith == 1755))){
switch(uncut){
case 1623:
cutGem(1607, 1623, 1000, 1, 888);
break;
case 1621:
cutGem(1605, 1621, 2000, 27, 889);
break;
case 1619:
cutGem(1603, 1619, 4000, 34, 887);
break;
case 1617:
cutGem(1601, 1617, 6000, 65, 886);
break;
case 1631:
cutGem(1615, 1631, 8500, 70, 885);
break;
case 6571:
cutGem(6573, 6571, 10000, 90, 2717);
break;
}
}
/**
* string amulet if cut gem is used on ball of wool
*/
if (((itemUsed == cut) || (useWith == cut)) && ((itemUsed == 1759) || (useWith == 1759))){
switch(cut){
case 1607:
stringAmmy(1727, 1607, 1000, 1);
break;
case 1605:
stringAmmy(1729, 1605, 2000, 27);
break;
case 1603:
stringAmmy(1725, 1603, 4000, 34);
break;
case 1601:
stringAmmy(1731, 1601, 6000, 65);
break;
case 1615:
stringAmmy(1712, 1615, 8500, 70);
break;
case 5673:
stringAmmy(6585, 5673, 10000, 90);
break;
}
}
}
however ingame,nothing happens. but i when i tried commenting out case 1623 and made it a seperate if statement
Code:
if (((itemUsed == 1623) || (useWith == 1623)) && ((itemUsed == 1755) || (useWith == 1755))){
cutGem(1607, 1623, 1000, 1, 888);
}
it works perfectly.
so am i doing something wrong with my switch statements?