Skytils / SkytilsMod

Skytils is a Hypixel Skyblock mod! Be careful, malicious copies are distributed across GitHub. Confirm on discord.gg/skytils (807302538558308352)
https://hypixel.net/threads/3856202/
GNU Affero General Public License v3.0
1.04k stars 421 forks source link

Fixed item stack copy #484

Closed hannibal002 closed 1 week ago

hannibal002 commented 1 month ago

Fixed calling ItemStack.copy() too often unnecessary.

In MiningFeatures.onDrawSlot we are calling val item = event.slot.stack, even outside the HOTM inventories. This causes the injected MixinSlot to call markTerminalItems. In here, we create a copy of the item stack before checking if the slot number is part of SelectAllColorSolver or StartsWithSequenceSolver.