9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-21 16:09:30 +00:00
Commit Graph

12 Commits

Author SHA1 Message Date
MrPowerGamerBR
9be5db7f52 Update Upstream (Paper) 2024-01-03 01:44:34 -03:00
MrPowerGamerBR
5889520bba Disable Nether and End portals for non-player entities
We don't need portals for them on SparklyPower

Fixes #9
2023-12-26 17:19:16 -03:00
MrPowerGamerBR
22b3025da2 Update upstream 2023-12-26 16:54:59 -03:00
MrPowerGamerBR
b305e4fcd1 Update upstream 2023-12-21 21:03:23 -03:00
MrPowerGamerBR
6989f768a7 Update to Minecraft 1.20.4 2023-12-09 15:48:30 -03:00
MrPowerGamerBR
95a2786276 Update Upstream
Yet another patch merged into Paper, yay!
2023-12-02 22:26:02 -03:00
MrPowerGamerBR
d8ba56e45b Update Upstream and Fix Build 2023-11-25 21:46:56 -03:00
MrPowerGamerBR
222bdcf9f5 Remove unused stuff 2023-11-24 20:25:57 -03:00
MrPowerGamerBR
490f8a5ec6 Improve the "tickBlockEntities" patch by replacing the block entity list with a custom list that allows us to remove multiple indexes at once
Improves tile entity removal performance A LOT, no matter if only a single tile entity is being removed or a bunch of them
2023-11-24 20:17:27 -03:00
MrPowerGamerBR
d17719e4e3 Remove some "dubious" patches
Honestly, some of these changes felt like hopium "surely this will fix the lag issues", even tho in my mind these didn't make sense

Yeah, these methods do show up in the profiler, but does these *really* make sense? I don't think so, I think these are just useless patches that only attempt to hide the pain, instead of tackling the REAL issue that is causing these methods to show up in the profiler
2023-11-24 02:48:58 -03:00
MrPowerGamerBR
66cab91fc1 Cache last shouldTickBlocksAt result when ticking block entities 2023-11-23 18:26:19 -03:00
MrPowerGamerBR
b1d551395f Optimize "canSee" checks
The "canSee" checks is in a hot path, invoked by each entity for each player on the server if they are in tracking range, so optimizing it is pretty nice

First, we change the original "HashMap" to fastutil's "Object2ObjectOpenHashMap", because the containsKey throughput is better

Then, we add a "isEmpty()" check before attempting to check if the map contains something

This seems stupid, but it does seem that it improves the performance a bit, and it makes sense, "containsKey(...)" does not attempt to check the map size before attempting to check if the map contains the key

We also create a "canSee" method tailored for "ChunkMap#updatePlayer()", a method without the equals check (the "updatePlayer()" already checks if the entity is the same entity) and we cache the "isVisibleByDefault()" result between runs (this also seems a bit overkill because "isVisibleByDefault()" is just a method that returns a boolean, but because this is a hotpath, we need all optimizations that we can get
2023-11-23 14:52:18 -03:00