LXGaming / Sledgehammer

Smashes the stupid out of the client & server.
Apache License 2.0
16 stars 5 forks source link

[Request]Fix dupe bug about Embers and accelerate mods #38

Closed mczph closed 1 year ago

mczph commented 1 year ago

https://user-images.githubusercontent.com/103164772/211531892-9d6e85b9-374c-4ab5-9438-755946046055.mp4

First speed up Embers Rekindled's Melter,put an item into it.And then quick right click to dupe items.

accelerate mods refer to things like time in a bottle or torcherino

LXGaming commented 1 year ago

Fixed in v1.12.2-2.0.22

Explanation: Every 10 ticks the Melter will check for item entities above it and will automatically grab and insert the first item it finds, it will then mark the item entity for removal however entities are only removed at the end of a server tick.

The fix is just to check if the item entity has been marked for removal before attempting to insert it into the Melter, as with Tick Accelerators a full server tick hasn't occurred so the item entities haven't been removed and instead the Melter is inserting the same item entity multiple times causing the duplication.