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.16k stars 442 forks source link

Fixed item stack copy #484

Closed hannibal002 closed 5 months ago

hannibal002 commented 6 months 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.