I'm trying to create perfect fletching and ive gotten fletch bow and string bow correct now im down to stuff like darts and arrows and im wondering if this would work for getting the amount of darts to create if the player has under 15 of one item and more of the other?
Code:
public int dartAmount() {
int tip = 0;
int feather = 0;
for (int j = 0; j < dartArray.length; j++) {
tip = c.getItems().getItemCount((int)dartArray[j][0]);
feather = c.getItems().getItemCount(314);
}
if (tip > feather && feather < 15)
return feather;
else if (feather > tip && tip < 15)
return tip;
return 15;
}
in the if statements the variables tip and feather would the be whats inside the loops or is it when there change inside the loop there only that inside and outside the loop they would just be 0? Sorry if I'm making it sound complicated