9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-23 17:09:22 +00:00
Commit Graph

125 Commits

Author SHA1 Message Date
MrPowerGamerBR
d06438014c Disable "timings" command too 2023-11-23 12:14:29 -03:00
MrPowerGamerBR
54a3a0abc4 [ci skip] Add note about Timings 2023-11-23 12:13:17 -03:00
MrPowerGamerBR
5fe6f9d424 Disable Timings if Parallel World Ticking is enabled
Fixes #4
2023-11-23 12:10:13 -03:00
Loritta Morenitta
320fce2353 Updated Upstream (Paper) 2023-11-23 00:22:08 +00:00
MrPowerGamerBR
5248909b6f Fix CraftState use snapshot check 2023-11-22 16:14:05 -03:00
MrPowerGamerBR
a93396ebe5 Skip dirty stats copy when requesting player stats
There's literally only one getDirty call. Because the map was only retrieved once, we don't actually need to create a copy of the map just to iterate it, we can just access it directly and clear it manually after use.
2023-11-22 14:45:25 -03:00
MrPowerGamerBR
50c98ccbd5 [ci skip] README changes 2023-11-22 14:11:16 -03:00
MrPowerGamerBR
2067615d58 Thanks Gradle
I have no idea why this wasn't working
2023-11-22 13:50:35 -03:00
MrPowerGamerBR
dc7cea5f1b Set the property on every gradle invocation 2023-11-22 13:28:10 -03:00
MrPowerGamerBR
9715e4901d [ci skip] README changes (again) 2023-11-22 11:47:58 -03:00
MrPowerGamerBR
f75bd46df6 [ci skip] README changes 2023-11-22 11:47:35 -03:00
MrPowerGamerBR
537011dbfe Change workflow name 2023-11-22 11:43:13 -03:00
MrPowerGamerBR
af05df723e Actually let's use two different workflows instead 2023-11-22 11:42:20 -03:00
MrPowerGamerBR
680433bd11 Fix workflow 2023-11-22 11:32:35 -03:00
MrPowerGamerBR
b4a0b43344 Add build without Parallel World Ticking 2023-11-22 11:29:10 -03:00
MrPowerGamerBR
8dbc519375 Cache coordinate key used for nearby players when ticking chunks
The "getChunkKey(...)" call is a bit expensive, using 0.24% of CPU time with 19k chunks loaded

So instead of paying the price on each tick, we pay the price when the chunk is loaded

Which, if you think about it, is actually better, since we tick chunks more than we load chunks
2023-11-22 11:10:54 -03:00
MrPowerGamerBR
3c39cf0c25 [ci skip] Add info about why patch "Optimize-random-calls-in-chunk-ticking" is borked 2023-11-22 02:31:17 -03:00
MrPowerGamerBR
5457114057 [ci skip] README changes 2023-11-22 01:56:46 -03:00
MrPowerGamerBR
53dcccb2a5 Cache tracking range type enum ordinal
Yes, I was shocked, flabbergasted even, when I found out that "Enum.ordinal()" was lagging here

But I guess it makes sense: It is a function that is called every tick for each entity, and it is a bit wasteful converting from enum to ordinal every time
2023-11-22 01:51:29 -03:00
MrPowerGamerBR
d03d4b9f1d [ci skip] README changes (again) 2023-11-21 23:34:38 -03:00
MrPowerGamerBR
6e8885ab81 [ci skip] README changes (again) 2023-11-21 23:33:27 -03:00
MrPowerGamerBR
af841d584c [ci skip] README changes 2023-11-21 23:26:52 -03:00
MrPowerGamerBR
3f47e18bc4 Improve EntityScheduler optimization patch even... further... beyond! 2023-11-21 23:22:17 -03:00
MrPowerGamerBR
4d91dd604d Improve EntityScheduler optimization patch 2023-11-21 21:10:07 -03:00
MrPowerGamerBR
6dd174a103 [ci skip] Add note about Citizens' sleeping trait 2023-11-21 20:17:02 -03:00
MrPowerGamerBR
dfe57f34c4 Spooky month optimizations
The quintessential patch that other performance forks also have for... some reason

Caches when Bat's spooky season starts and ends, and when Skeleton and Zombies halloween starts and ends

Avoids unnecessary date checks, even tho that this shouldn't really improve performance that much... unless you have a lot of mobs being spawned
2023-11-21 17:08:58 -03:00
MrPowerGamerBR
96c5de6f94 Add option to change crops to go from first age to last age directly, to avoid useless block updates 2023-11-21 16:14:45 -03:00
MrPowerGamerBR
d80994bccc [ci skip] Update README 2023-11-21 12:21:22 -03:00
MrPowerGamerBR
dd77d31f76 Lazily create LootContext for criterions
For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate

To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance
2023-11-21 12:20:27 -03:00
MrPowerGamerBR
53c15660ff [ci skip] Bring back haha funny tagline in the patch 2023-11-21 01:08:06 -03:00
MrPowerGamerBR
4b63f11e5a Make CraftBlockEntityState's DISABLE_SNAPSHOT thread safe 2023-11-21 01:02:49 -03:00
MrPowerGamerBR
8043704bb0 Only check for farm block moisture if the crop growth event wasn't cancelled 2023-11-21 00:50:26 -03:00
MrPowerGamerBR
0d0706ff13 Blazingly Simple Farm Checks 2023-11-20 23:07:10 -03:00
MrPowerGamerBR
5a10e7d710 Merge branch 'ver/1.20.2' of https://github.com/SparklyPower/SparklyPaper into ver/1.20.2 2023-11-20 14:51:49 -03:00
MrPowerGamerBR
3f75b842ed [ci skip] README changes 2023-11-20 14:50:58 -03:00
Loritta Morenitta
7633ca89e6 Updated Upstream (Paper) 2023-11-20 00:22:35 +00:00
MrPowerGamerBR
8bd484c287 Patch changes 2023-11-19 20:39:51 -03:00
MrPowerGamerBR
27b4f21dfc Fix Warriorrrr's item frame track rewrite patch due to server changes 2023-11-19 14:23:57 -03:00
MrPowerGamerBR
82aee81eac [ci skip] Derp 2023-11-19 14:19:16 -03:00
MrPowerGamerBR
339d27f15c Replace item frame patch 2023-11-19 14:17:46 -03:00
MrPowerGamerBR
e028bd5157 Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
On each tick, Paper runs EntityScheduler's executeTick of each entity. This is a bit expensive, due to ArrayDeque's size() call because it ain't a simple "get the current queue size" function, and due to the thread checks.

To avoid the hefty ArrayDeque's size() call, we check if we *really* need to execute the executeTick, by checking if currentlyExecuting is not empty or if oneTimeDelayed is not empty.

Most entities won't have any scheduled tasks, so this is a nice performance bonus. These optimizations, however, wouldn't work in a Folia environment, but because in SparklyPaper executeTick is always executed on the main thread, it ain't an issue for us (yay).
2023-11-19 13:41:45 -03:00
MrPowerGamerBR
06a52899fa Change optimization patch because we have commented this out 2023-11-19 03:06:24 -03:00
MrPowerGamerBR
205834a750 Merge branch 'ver/1.20.2' of https://github.com/SparklyPower/SparklyPaper into ver/1.20.2 2023-11-18 21:35:50 -03:00
MrPowerGamerBR
3e549c4903 New optimization patches 2023-11-18 21:32:54 -03:00
Loritta Morenitta
2c2653ff45 Updated Upstream (Paper) 2023-11-19 00:23:51 +00:00
Loritta Morenitta
d5f32bb838 Updated Upstream (Paper) 2023-11-18 00:21:27 +00:00
MrPowerGamerBR
4bf4b3c60a [ci skip] Improve wording 2023-11-17 19:42:09 -03:00
MrPowerGamerBR
f7a3b8585c [ci skip] Add small "locked" map performance tip 2023-11-17 19:31:51 -03:00
MrPowerGamerBR
7907eb6a8f [ci skip] Whoops 2023-11-17 19:22:29 -03:00
MrPowerGamerBR
4098309e79 Refactor MapItem update skip, add synchornized to CraftMapColorCache's "isCached" function 2023-11-17 19:13:56 -03:00