Can't use MainHand if we want to support 1.8.

This commit is contained in:
Brianna 2020-07-28 14:17:28 -05:00
parent 3920bd2e31
commit fae3b80488

View File

@ -55,8 +55,8 @@ public class RepairHandler {
EntityEquipment equipment = player.getEquipment(); EntityEquipment equipment = player.getEquipment();
if (equipment != null) { if (equipment != null) {
if (equipment.getItemInMainHand().equals(itemStack)) { if (equipment.getItemInHand().equals(itemStack)) {
equipment.setItemInMainHand(null); equipment.setItemInHand(null);
playerData.setSlot(EquipmentSlot.HAND); playerData.setSlot(EquipmentSlot.HAND);
} else if (itemStack.equals(equipment.getHelmet())) { } else if (itemStack.equals(equipment.getHelmet())) {
equipment.setHelmet(null); equipment.setHelmet(null);
@ -242,7 +242,7 @@ public class RepairHandler {
ItemStack item = playerData.getToBeRepaired(); ItemStack item = playerData.getToBeRepaired();
switch (slot) { switch (slot) {
case HAND: case HAND:
equipment.setItemInMainHand(item); equipment.setItemInHand(item);
break; break;
case OFF_HAND: case OFF_HAND:
equipment.setItemInOffHand(item); equipment.setItemInOffHand(item);