Merge pull request #310 from yueh/fix-309

Fixes dupe bug. #309
This commit is contained in:
yueh 2014-10-16 15:03:59 +02:00
commit 721226abb0

View file

@ -1,5 +1,7 @@
package appeng.util.inv;
import java.util.Iterator;
import net.minecraft.entity.player.EntityPlayer;
@ -9,6 +11,7 @@ import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
import appeng.util.iterators.NullIterator;
/*
* Lets you do simply tests with the players cursor, without messing with the specifics.
*/
@ -17,7 +20,8 @@ public class AdaptorPlayerHand extends InventoryAdaptor
private final EntityPlayer p;
public AdaptorPlayerHand(EntityPlayer _p) {
public AdaptorPlayerHand( EntityPlayer _p )
{
p = _p;
}
@ -112,7 +116,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
ItemStack hand = p.inventory.getItemStack();
if ( hand != null && !Platform.isSameItem( A, hand ) )
if ( hand != null && !Platform.isSameItemPrecise( A, hand ) )
return A;
int original = 0;