minor changes to shift crafting behavior (#2561)
* minor changes to shift crafting behavior * revert shift crafting only crafting until current stack size of crafting slots.
This commit is contained in:
		@@ -75,7 +75,10 @@ public class CraftingGridBehavior implements ICraftingGridBehavior {
 | 
				
			|||||||
        int amountCrafted = 0;
 | 
					        int amountCrafted = 0;
 | 
				
			||||||
        ItemStack crafted = grid.getCraftingResult().getStackInSlot(0);
 | 
					        ItemStack crafted = grid.getCraftingResult().getStackInSlot(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        int maxCrafted = crafted.getMaxStackSize();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ForgeHooks.setCraftingPlayer(player);
 | 
					        ForgeHooks.setCraftingPlayer(player);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Do while the item is still craftable (aka is the result slot still the same as the original item?) and we don't exceed the max stack size.
 | 
					        // Do while the item is still craftable (aka is the result slot still the same as the original item?) and we don't exceed the max stack size.
 | 
				
			||||||
        do {
 | 
					        do {
 | 
				
			||||||
            grid.onCrafted(player);
 | 
					            grid.onCrafted(player);
 | 
				
			||||||
@@ -83,7 +86,7 @@ public class CraftingGridBehavior implements ICraftingGridBehavior {
 | 
				
			|||||||
            craftedItemsList.add(crafted.copy());
 | 
					            craftedItemsList.add(crafted.copy());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            amountCrafted += crafted.getCount();
 | 
					            amountCrafted += crafted.getCount();
 | 
				
			||||||
        } while (API.instance().getComparer().isEqual(crafted, grid.getCraftingResult().getStackInSlot(0)) && amountCrafted < crafted.getMaxStackSize());
 | 
					        } while (API.instance().getComparer().isEqual(crafted, grid.getCraftingResult().getStackInSlot(0)) && amountCrafted < maxCrafted && amountCrafted + crafted.getCount() <= maxCrafted );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        INetwork network = grid.getNetwork();
 | 
					        INetwork network = grid.getNetwork();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user