
Investigate possible lighter implementation of QuickBench
Ampflower opened this issue ยท 0 comments
Minecraft has changed how recipes were handled rather frequently recently, necessitating QuickBench to be updated manually each time.
To reduce the load or need of updating and porting, it may be worth while to go ahead and inject to already fairly optimised vanilla paths to just omit the manually sent packet, than to reimplement what is just Vanilla's minus 2 function calls.
This would also improve mod compatibility, as mods that inject into the crafting logic won't have to deal with an unexpected edgecase of QuickBench or *FastBench colliding or simply not calling their functions.
Functions to investigate:
-
net.minecraft.world.inventory.CraftingMenu#slotChangedCraftingGrid
- Our reimplementation only changes two things, but is otherwise verbatim vanilla.
- Reuse the cached recipe within the result container, if applicable.
- Omit sending packets
- Bonus: Changing this would also hit InventoryMenu, and any other implementations that delegates to CraftingMenu, increasing mod compatibility.
- Our reimplementation only changes two things, but is otherwise verbatim vanilla.
-
net.minecraft.world.inventory.CraftingMenu#quickMoveStack
- Particularly, should investigate
net.minecraft.world.inventory.ResultSlot#onQuickCraft
- Particularly, should investigate