Fixed being able to pick up from pattern result slot
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- Fixed race condition with crafting tasks
|
- Fixed race condition with crafting tasks
|
||||||
- Fixed pressing escape in crafting settings GUI not going back to grid GUI
|
- Fixed pressing escape in crafting settings GUI not going back to grid GUI
|
||||||
- Fixed losing autoselection in Grid when clicking on slot with autoselection mode
|
- Fixed losing autoselection in Grid when clicking on slot with autoselection mode
|
||||||
|
- Fixed being able to pick up from pattern result slot
|
||||||
- Added a max crafting quantity per request cap (hardcoded to 100)
|
- Added a max crafting quantity per request cap (hardcoded to 100)
|
||||||
|
|
||||||
**Features**
|
**Features**
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import java.util.List;
|
|||||||
public class ContainerGrid extends ContainerBase {
|
public class ContainerGrid extends ContainerBase {
|
||||||
private List<Slot> craftingSlots = new ArrayList<Slot>();
|
private List<Slot> craftingSlots = new ArrayList<Slot>();
|
||||||
private SlotGridCraftingResult craftingResultSlot;
|
private SlotGridCraftingResult craftingResultSlot;
|
||||||
|
private SlotDisabled patternResultSlot;
|
||||||
private IGrid grid;
|
private IGrid grid;
|
||||||
|
|
||||||
public ContainerGrid(EntityPlayer player, IGrid grid) {
|
public ContainerGrid(EntityPlayer player, IGrid grid) {
|
||||||
@@ -65,7 +66,7 @@ public class ContainerGrid extends ContainerBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addSlotToContainer(new SlotDisabled(((TileGrid) grid).getCraftingResultInventory(), 0, 116 + 4, 120 + 4));
|
addSlotToContainer(patternResultSlot = new SlotDisabled(((TileGrid) grid).getCraftingResultInventory(), 0, 116 + 4, 120 + 4));
|
||||||
|
|
||||||
addSlotToContainer(new SlotFiltered(((TileGrid) grid).getPatternsInventory(), 0, 152, 104, new BasicItemValidator(RefinedStorageItems.PATTERN)));
|
addSlotToContainer(new SlotFiltered(((TileGrid) grid).getPatternsInventory(), 0, 152, 104, new BasicItemValidator(RefinedStorageItems.PATTERN)));
|
||||||
addSlotToContainer(new SlotOutput(((TileGrid) grid).getPatternsInventory(), 1, 152, 144));
|
addSlotToContainer(new SlotOutput(((TileGrid) grid).getPatternsInventory(), 1, 152, 144));
|
||||||
@@ -126,6 +127,10 @@ public class ContainerGrid extends ContainerBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canMergeSlot(ItemStack stack, Slot slot) {
|
public boolean canMergeSlot(ItemStack stack, Slot slot) {
|
||||||
return slot != craftingResultSlot && super.canMergeSlot(stack, slot);
|
if (slot == craftingResultSlot || slot == patternResultSlot) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.canMergeSlot(stack, slot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user