Crafting Tweaks

Crafting Tweaks

109M Downloads

Compress All slower then doing compress on each slot..

hvdklauw opened this issue ยท 0 comments

commented

Minecraft Version

1.16

Mod Loader

Forge

Mod Loader Version

36.1.16

Mod Version

12.2.1

Describe the Issue

Two issues really, but I think they are related:

So I'm playing MC Celestial and compressing pebbles, cobble, gravel or whatever on everything in my inventory is very slow
Also when doing a 3x3 compression on an inventory with multiple full stacks leaves 1 item in each slot.

The reason for both I think is that it's internally using the compress stack on each inventory slot if it has the same item.

I think that means it's checking which recipe to use multiple times (making it slow) and it also means it leaves items behind.

I think doing it like this will be better (example with 9.5 stacks of items in the inventory):

  1. Count the total number of source items (608)
  2. Find the recipe and see if it's 2x2 or 3x3. (3x3 -> 9 items)
  3. Do a division of the items (67 crafts possible)
  4. Delete the source items from the inventory: (67 * 9 = 603) leaving the first slot containing the item with 5 left over items.
  5. Add 67 of the crafted item to the inventory.

This should make it a lot faster and actually do what you would expect, instead of currently lagging, leaving 9 single items + a 5 stack in the inventory and thus sometimes not even allowing the craft because there is no space for the result.

Logs

No response

Do you use any performance-enhancing mods (e.g. OptiFine)?

No optifine or anything