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