pufferfish-gg/Pufferfish

"Skip cloning loot parameters" patch is useless

Opened this issue · 1 comments

I was looking into Pufferfish's patches, and while I was looking into it, I looked at the https://github.com/pufferfish-gg/Pufferfish/blob/ver/1.20/patches/server/0031-Skip-cloning-loot-parameters.patch patch... and it feels like it is useless and is causing two unnecessary allocations.

If you look at the original patch from Airplane, it makes sense why they made that change: Vanilla used ImmutableMap.copyOf to copy the maps, but on recent versions this is useless since it doesn't do that anymore: https://github.com/TECHNOVE/Airplane/blob/ver/1.17/patches/server/0030-Skip-cloning-loot-parameters.patch

And on another note, the "Reduce entity allocations" allocate a MutableBlockPos for each created entity, but that cachedBlockPos variable is never used! Heck, not even in Airplane that variable seems to be used.

@kev626
Please read the issues.