gnembon / carpet-autoCraftingTable

autoCraftingTable extension for carpet-mod
GNU Lesser General Public License v3.0
80 stars 27 forks source link

Fix lag caused by empty crafting table and Update to 1.18.2 #53

Closed Crec0 closed 2 years ago

Crec0 commented 2 years ago

Empty crafting tables sitting on hoppers were causing tremendous lag due to recipe manager being invoked every tick to search for empty recipes.
Since crafting tables were empty, there's no need to check for recipes, we can exit early.
Update to 1.18.2 while at it. resolves #54 fixes #6

DanShaders commented 2 years ago

Shift clicking output slot does not work with your fix. Adding return this.blockEntity.getStack(0); after 125th line in AutoCraftingTableContainer.java makes it work again, however it does not seem like a proper solution.

Crec0 commented 2 years ago

@DanShaders Can you try now ?

DanShaders commented 2 years ago

Yeap, both commits work.

DanShaders commented 2 years ago

Well, I found another bug: shift clicking output crafts till there is no available products even if the recipe has changed. For example, clicking with shift on sticks here before results in buttons and sticks crafted after (This is not the case with commit 4e1b13b)

Crec0 commented 2 years ago

@DanShaders I really appreciate the feedback so far. Thank you. I have fixed this issue.

DanShaders commented 2 years ago

Oh, I thought it was an issue with your new code but apparently you've fixed #6)

Crec0 commented 2 years ago

Didn't even realize it was an existing issue. Well as long as it's fixed :shrug: