Fix logic error in entity equip

This commit is contained in:
fullwall 2012-05-04 18:41:47 +08:00
parent a9105c624e
commit 172c46f766

View File

@ -90,8 +90,9 @@ public class CitizensHumanNPC extends CitizensNPC implements Equipable {
// Now edit the equipment based on the slot // Now edit the equipment based on the slot
if (type != Material.AIR) { if (type != Material.AIR) {
// Set the proper slot with one of the item // Set the proper slot with one of the item
hand.setAmount(1); ItemStack clone = hand.clone();
trait.set(slot, hand); clone.setAmount(1);
trait.set(slot, clone);
if (hand.getAmount() > 1) if (hand.getAmount() > 1)
hand.setAmount(hand.getAmount() - 1); hand.setAmount(hand.getAmount() - 1);