also strips tag when transfering items to the crafting grid

This commit is contained in:
way2muchnoise
2017-01-05 17:08:56 +01:00
parent 6ed421d95d
commit 38a64e74f4

View File

@@ -252,7 +252,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
// If we are connected, first try to get the possibilities from the network // If we are connected, first try to get the possibilities from the network
if (network != null) { if (network != null) {
for (ItemStack possibility : possibilities) { for (ItemStack possibility : possibilities) {
ItemStack took = network.extractItem(possibility, 1, IComparer.COMPARE_NBT | (possibility.getItem().isDamageable() ? 0 : IComparer.COMPARE_DAMAGE), false); ItemStack took = network.extractItem(possibility, 1, IComparer.COMPARE_NBT | IComparer.COMPARE_STRIP_NBT | (possibility.getItem().isDamageable() ? 0 : IComparer.COMPARE_DAMAGE), false);
if (took != null) { if (took != null) {
matrix.setInventorySlotContents(i, RSUtils.getStack(took)); matrix.setInventorySlotContents(i, RSUtils.getStack(took));
@@ -268,7 +268,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
if (!found) { if (!found) {
for (ItemStack possibility : possibilities) { for (ItemStack possibility : possibilities) {
for (int j = 0; j < player.inventory.getSizeInventory(); ++j) { for (int j = 0; j < player.inventory.getSizeInventory(); ++j) {
if (API.instance().getComparer().isEqual(possibility, player.inventory.getStackInSlot(j), IComparer.COMPARE_NBT | (possibility.getItem().isDamageable() ? 0 : IComparer.COMPARE_DAMAGE))) { if (API.instance().getComparer().isEqual(possibility, player.inventory.getStackInSlot(j), IComparer.COMPARE_NBT | IComparer.COMPARE_STRIP_NBT | (possibility.getItem().isDamageable() ? 0 : IComparer.COMPARE_DAMAGE))) {
matrix.setInventorySlotContents(i, ItemHandlerHelper.copyStackWithSize(player.inventory.getStackInSlot(j), 1)); matrix.setInventorySlotContents(i, ItemHandlerHelper.copyStackWithSize(player.inventory.getStackInSlot(j), 1));
player.inventory.decrStackSize(j, 1); player.inventory.decrStackSize(j, 1);