ignore damage for damageable items when transfering into crafting grid
This commit is contained in:
@@ -5,6 +5,7 @@ import com.raoulvdberge.refinedstorage.RSBlocks;
|
||||
import com.raoulvdberge.refinedstorage.RSItems;
|
||||
import com.raoulvdberge.refinedstorage.RSUtils;
|
||||
import com.raoulvdberge.refinedstorage.api.network.security.Permission;
|
||||
import com.raoulvdberge.refinedstorage.api.util.IComparer;
|
||||
import com.raoulvdberge.refinedstorage.apiimpl.API;
|
||||
import com.raoulvdberge.refinedstorage.block.BlockGrid;
|
||||
import com.raoulvdberge.refinedstorage.block.EnumGridType;
|
||||
@@ -251,7 +252,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
|
||||
// If we are connected, first try to get the possibilities from the network
|
||||
if (network != null) {
|
||||
for (ItemStack possibility : possibilities) {
|
||||
ItemStack took = network.extractItem(possibility, 1, false);
|
||||
ItemStack took = network.extractItem(possibility, 1, IComparer.COMPARE_NBT | (possibility.getItem().isDamageable() ? 0 : IComparer.COMPARE_DAMAGE), false);
|
||||
|
||||
if (took != null) {
|
||||
matrix.setInventorySlotContents(i, RSUtils.getStack(took));
|
||||
@@ -267,7 +268,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
|
||||
if (!found) {
|
||||
for (ItemStack possibility : possibilities) {
|
||||
for (int j = 0; j < player.inventory.getSizeInventory(); ++j) {
|
||||
if (API.instance().getComparer().isEqualNoQuantity(possibility, player.inventory.getStackInSlot(j))) {
|
||||
if (API.instance().getComparer().isEqual(possibility, player.inventory.getStackInSlot(j), IComparer.COMPARE_NBT | (possibility.getItem().isDamageable() ? 0 : IComparer.COMPARE_DAMAGE))) {
|
||||
matrix.setInventorySlotContents(i, ItemHandlerHelper.copyStackWithSize(player.inventory.getStackInSlot(j), 1));
|
||||
|
||||
player.inventory.decrStackSize(j, 1);
|
||||
|
||||
Reference in New Issue
Block a user