Skip to content

Investigate possible lighter implementation of QuickBench #10

@Ampflower

Description

@Ampflower

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.
      1. Reuse the cached recipe within the result container, if applicable.
      2. Omit sending packets
    • Bonus: Changing this would also hit InventoryMenu, and any other implementations that delegates to CraftingMenu, increasing mod compatibility.
  • net.minecraft.world.inventory.CraftingMenu#quickMoveStack
    • Particularly, should investigate net.minecraft.world.inventory.ResultSlot#onQuickCraft

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions