Add shiftclick handler for containerstorage
This commit is contained in:
@@ -35,7 +35,7 @@ public class ContainerDiskDrive extends ContainerStorage {
|
||||
return null;
|
||||
}
|
||||
} else if (!mergeItemStack(stack, 0, 8, false)) {
|
||||
return null;
|
||||
return mergeItemStackToSpecimen(stack, 8, 8 + 9);
|
||||
}
|
||||
|
||||
if (stack.stackSize == 0) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package refinedstorage.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import refinedstorage.container.slot.SlotSpecimen;
|
||||
import refinedstorage.tile.TileBase;
|
||||
@@ -23,4 +25,15 @@ public class ContainerStorage extends ContainerBase {
|
||||
|
||||
addPlayerInventory(8, 129);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
Slot slot = getSlot(index);
|
||||
|
||||
if (slot != null && slot.getHasStack() && index >= 8) {
|
||||
return mergeItemStackToSpecimen(slot.getStack(), 0, 9);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user