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

83 Commits

Author SHA1 Message Date
MrPowerGamerBR
67e846409b Update to Paper 1.21 2024-06-17 23:22:18 -03:00
MrPowerGamerBR
a65807bc69 Fix tests again because I'm stupid 2024-06-13 13:19:53 -03:00
MrPowerGamerBR
edbd20d2b2 Fix tests 2024-06-13 13:04:46 -03:00
MrPowerGamerBR
8252a38f3d Add some SparklyPower-specific patches, update README 2024-06-13 12:18:15 -03:00
MrPowerGamerBR
bd3776d9ee Add missing NotNull annotation
Whoops
2024-06-11 02:13:33 -03:00
MrPowerGamerBR
bf4c9b5b18 Allow setting the packet object in the ClientboundPacketPreDispatchEvent 2024-06-11 02:06:40 -03:00
MrPowerGamerBR
99de662d39 Don't blindly type, worst mistake of my life 2024-06-10 19:09:22 -03:00
MrPowerGamerBR
ac01b433b3 Add missing annotation 2024-06-10 19:04:19 -03:00
MrPowerGamerBR
e679b13c01 A bunch of new patches that we need for SparklyPower features 2024-06-10 18:54:03 -03:00
MrPowerGamerBR
404a4945d0 Reset dirty flag when loading maps from the disk
By default, the server will start rewriting all map datas to the disk after loading it, even if the map didn't have any changes

This also slows down world saving a lot if you have a lot of maps
2024-06-05 15:29:03 -03:00
MrPowerGamerBR
0710140816 Whoops 2024-06-04 11:33:53 -03:00
MrPowerGamerBR
95cc305b33 Remove empty diff from the Blazing Simple Farm Checks patch 2024-06-04 11:30:48 -03:00
MrPowerGamerBR
ad88829cde Fix missing namespaces on the SparklyPower Legacy NBT remapper 2024-06-01 11:00:30 -03:00
MrPowerGamerBR
35a6a315fc Remap SparklyPower hacky legacy NBT tags + Branding changes 2024-06-01 01:40:34 -03:00
MrPowerGamerBR
2063f83130 Update to Paper 1.20.6 2024-05-30 20:22:23 -03:00
MrPowerGamerBR
a48bd8375e Fix build 2024-04-20 15:51:02 -03:00
MrPowerGamerBR
d8d1aade1b Whoops 2024-03-20 14:12:47 -03:00
MrPowerGamerBR
89d1082cf2 Move RedstoneWireTurbo instance to be per world instead of sharing a global instance
Fixes #12
2024-03-20 14:08:37 -03:00
MrPowerGamerBR
7a80199414 Update upstream (yay finally)
Not tested in production yet, but soon it will be
2024-02-18 15:02:29 -03:00
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
238b46685b Update Upstream
Another patch merged into Paper, woo
2023-12-02 19:09:56 -03:00
MrPowerGamerBR
ad57a126fa Update EntityScheduler optimization patch to match Paper PR 2023-12-01 13:12:45 -03:00
MrPowerGamerBR
909dd2c1b9 Move inventory close stacktrace debug to "sparklypaper.logContainerCreationStacktraces" property 2023-11-30 13:09:48 -03:00
MrPowerGamerBR
5391e9c4bc More improvements 2023-11-28 02:23:23 -03:00
MrPowerGamerBR
07ee63724e Improve Fix TE Unload Lag Spike patch 2023-11-28 02:17:40 -03:00
MrPowerGamerBR
449a84ceb6 Remove unnecessary durability check in "ItemStack#isSimilar(...)" 2023-11-26 20:33:27 -03:00
MrPowerGamerBR
6e182d7d93 "this" 2023-11-26 16:49:41 -03:00
MrPowerGamerBR
6b2c63f6e1 Fix build 2023-11-26 14:30:43 -03:00
MrPowerGamerBR
b82e1078fe Split the tickBlockEntities optimization into two patches 2023-11-26 14:15:51 -03:00
MrPowerGamerBR
d8ba56e45b Update Upstream and Fix Build 2023-11-25 21:46:56 -03:00
MrPowerGamerBR
b96d6f8f38 [ci skip] Add proper explanation 2023-11-24 23:47:25 -03:00
MrPowerGamerBR
f1f43018a1 Just use get directly instead of using our hacky hack
The real reason I reverted this was because this was throwing an exception, idk why tho because tbh it doesn't make any sense
2023-11-24 23:42:45 -03:00
MrPowerGamerBR
3b27299c78 Fix our custom block entity list
Yeah, I probably should've tested it a bit further

But don't worry, its performance is still way way way WAY better than the original ArrayList used
2023-11-24 22:09:53 -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
7044824d2d [ci skip] Improve canSee patch commit message 2023-11-24 11:46:36 -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
e509994f65 Change check order 2023-11-23 20:37:54 -03:00
MrPowerGamerBR
6b4c6a766f Cache the block entity's chunk coordinate key in the block entity itself
Again, this is seems like a small optimization, but it is actually useful because we avoid doing calculations for each block entity, and if your server has a lot of them, it adds up
2023-11-23 19:37:09 -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
MrPowerGamerBR
d06438014c Disable "timings" command too 2023-11-23 12:14:29 -03:00
MrPowerGamerBR
5fe6f9d424 Disable Timings if Parallel World Ticking is enabled
Fixes #4
2023-11-23 12:10:13 -03: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