fixed right-click issue with accessories

This commit is contained in:
Kino 2017-07-14 21:30:47 -04:00
parent 22c5853038
commit 3e74637ea1

View file

@ -97,9 +97,8 @@ public class ItemAccessory extends Item
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack, World worldIn, EntityPlayer player, EnumHand hand)
{
if (itemStack != null)
if (itemStack != null && PlayerAether.get(player).accessories.setInventoryAccessory(itemStack.copy()))
{
PlayerAether.get(player).accessories.setInventoryAccessory(itemStack.copy());
--itemStack.stackSize;
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemStack);