Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate possible lighter implementation of QuickBench #10

Open
2 tasks
Ampflower opened this issue Sep 30, 2024 · 0 comments
Open
2 tasks

Investigate possible lighter implementation of QuickBench #10

Ampflower opened this issue Sep 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ampflower
Copy link
Member

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
@Ampflower Ampflower added the enhancement New feature or request label Sep 30, 2024
@Ampflower Ampflower self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant