Fix more items and unsafe checks that made items get deleted.

This commit is contained in:
Gunther De Wachter
2017-07-02 07:44:21 +02:00
parent b67d7eed82
commit e96339dd2b
10 changed files with 23 additions and 23 deletions
@@ -155,12 +155,12 @@ public final class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
@Override
public EnumActionResult onItemUse( final EntityPlayer player, final World w, final BlockPos pos, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{
if( this.getTypeByStack( player.getHeldItemMainhand() ) == PartType.InvalidType )
if( this.getTypeByStack( player.getHeldItem(hand) ) == PartType.InvalidType )
{
return EnumActionResult.FAIL;
}
return AEApi.instance().partHelper().placeBus( player.getHeldItemMainhand(), pos, side, player, hand, w );
return AEApi.instance().partHelper().placeBus( player.getHeldItem(hand), pos, side, player, hand, w );
}
@Override