mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-26 14:33:50 +00:00
preserve crafting tool inventory origin after use (#339)
This commit is contained in:
1 parent
278291fbd8
commit
73acc41d1b
1 file changed
+5
@@ -332,6 +332,11 @@ public class CraftingStationContainer extends Container {
|
||||
}
|
||||
|
||||
ItemStack previous = before[i];
|
||||
if (clickedSlot == CRAFTING_RESULT_SLOT && previous != null && previous.getItem() == current.getItem()) {
|
||||
// Crafting can return the same tool with different damage or NBT.
|
||||
logic.setSideInventoryPreference(slot, preferencesBefore[i]);
|
||||
continue;
|
||||
}
|
||||
boolean receivedCarriedStack = (mode == CLICK_MODE_PICKUP && slot == clickedSlot || mode == CLICK_MODE_DRAG)
|
||||
&& carriedBefore != null
|
||||
&& stacksCanMerge(current, carriedBefore);
|
||||
|
||||
Reference in new issue
Block a user