Code:
if (EventDispatcher.execute(player, new ItemOnItemInteractionEvent(used, with, usedWithSlot, itemUsedSlot))) {
return;
}
if (ItemActionRepository.itemOnItem(player, used, with)) {
return;
}
Another class handles your item on item interactions. Your potion values are probably just set to the wrong item id in one of your herblore classes. Not much to look at in that class, but heres my potion combination method if you want to make your own or revise yours
Code:
public static void combinePotion(Player p, int firstPotID, int secondPotID) {
CombiningDoses potion = CombiningDoses.getPotionByID(firstPotID);
if (potion == null || !p.getInventory().contains(firstPotID) || !p.getInventory().contains(secondPotID))
return;
if (potion.getDoseForID(secondPotID) > 0) {
int firstPotAmount = potion.getDoseForID(firstPotID);
int secondPotAmount = potion.getDoseForID(secondPotID);
if (firstPotAmount + secondPotAmount <= 4) {
p.getInventory().delete(firstPotID, 1);
p.getInventory().delete(secondPotID, 1);
p.getInventory().add(potion.getIDForDose(firstPotAmount + secondPotAmount), 1);
p.getInventory().add(EMPTY_VIAL, 1);
} else {
int overflow = (firstPotAmount + secondPotAmount) - 4;
p.getInventory().delete(firstPotID, 1);
p.getInventory().delete(secondPotID, 1);
p.getInventory().add(potion.getIDForDose(4), 1);
p.getInventory().add(potion.getIDForDose(overflow), 1);
}
}
}