9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 09:59:15 +00:00
Commit Graph

65 Commits

Author SHA1 Message Date
hayanesuru
9db6bfba3b improve Async target finding (#294)
* fix NearestHealableRaiderTargetGoal not async and fix data race in Async target finding

* remove unnecessary requiresUpdateEveryTick

* add AsyncGoal

* use cow list on ServerLevel#players

* move warning

* run tasks after entity tick
2025-04-22 18:55:01 +03:00
John Smith
ef1559c781 Fix flush frequency in linear region flush logic (#293)
Fixed an issue where linear always flushes
2025-04-22 00:06:23 -04:00
Taiyou
83e9043a45 Couple fixes and improvements (#287)
* a lot of cleanup and new chunk changes

* perf: Head Node Hit Optimization

* part 1: reworked-reworked ChunkHolderManager

* part 2: speeeeeeeeeeeeeeeeeeeeeeeeeeed

* Optimise MobEffectUtil#getDigSpeedAmplification

* optimize chunk unloads and cleanup a bit

* fix 🐝

* rewritten async target finding

* extend the custom map usage

---------

Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
2025-04-21 23:49:33 +03:00
HaHaWTH
65d24439b8 Mark FasterRandomSource direct impl as static final 2025-04-21 06:40:31 +14:00
Creeam
d0944505c2 Adjust throttle hopper default value
Vanilla throttles this for 8 ticks, leave it here as the default value
2025-04-19 22:19:26 +08:00
Dreeam
dd22d9caff [ci skip] cleanup imports 2025-04-17 03:17:40 -04:00
Taiyou06
3d7b15ba53 cleanup and make concurrency level higher 2025-04-13 03:59:07 +02:00
Taiyou06
2308f08ae3 make StringCanonizingOpenHashMap faster 2025-04-13 03:23:40 +02:00
Dreeam
1a64b379a6 Fix version fetcher 2025-04-07 20:00:12 -04:00
Taiyou06
4cd885a8c2 more virtual thread options 2025-04-06 14:44:44 +02:00
hayanesuru
f1a31d88c8 Add timeout to AsyncPlayerDataSaving (#275)
* Add timeout to AsyncPlayerDataSaving

* dump thread if failed to save playerdata

* PlayerDataStorage#lockFor break loop after cancel
2025-03-31 18:34:44 +03:00
Taiyou06
faf2abdd88 remove experimental tag on AsyncBlockFinding 2025-03-29 14:59:43 +01:00
Taiyou06
e797ead637 perf: Async Target Finding 2025-03-29 14:19:14 +01:00
Dreeam
2f8915ce2b cleanup 2025-03-28 16:22:53 -04:00
hayanesuru
233da80a87 Update async playerdata saving (#269) 2025-03-28 17:25:23 +03:00
Dreeam
e56ef42b4e [ci skip] cleanup 2025-03-27 17:12:32 -04:00
Taiyou06
bb9f3a5600 Optimize NonFlush Packet Sending 2025-03-26 18:08:18 +01:00
Taiyou06
1e36d848c2 remove AsyncPacketSending for now (needs some fixes and testing 🙏) 2025-03-26 08:56:18 +01:00
Dreeam
2c7cb52e6b Fix build 2025-03-25 03:29:15 -04:00
Taiyou
cbcc54726a Async playerPacket sending (#245)
* async player packet sending

* small cleanup

* eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

* holy shit this is fast

* some cleanup

* change .size to O(1)

* rewrite starts (i need to do this OMEGA SAFE)

* rebuilt

* rebase

* Rewritten AsyncPacketSending
2025-03-25 03:20:49 -04:00
Taiyou06
f1a398f9b5 better locks, perf, readability on ConcurrentLongHashSet 2025-03-24 23:25:00 +01:00
Taiyou06
278b1d635b remove CompactSineLUT (not needed) 2025-03-24 22:29:45 +01:00
Taiyou06
61e200a959 Revert "modified CompactSineLUT to be both fast and still stay compact"
This reverts commit d6ac0d0a2b.
2025-03-24 22:14:25 +01:00
Taiyou06
d6ac0d0a2b modified CompactSineLUT to be both fast and still stay compact 2025-03-24 22:03:31 +01:00
Taiyou06
b1d127576f async block finding 2025-03-23 20:46:17 +01:00
Creeam
dab3ca7e0d Band-aid fix for async events (#266) 2025-03-23 21:43:45 +03:00
Taiyou06
4c947f92ce add temporary compatibility for plugins to PWT 2025-03-22 14:20:34 +01:00
Taiyou06
d5426137dd add direct RNG 2025-03-22 13:57:21 +01:00
Dreeam
c276c2ba48 [ci skip] cleanup 2025-03-21 08:54:57 -04:00
Dreeam
e77896f346 Add config post load & Fix 2025-03-17 23:07:42 -04:00
Dreeam
40fa45ef8d Refactor Improve Purpur AFK system
* Move Leaf config init before Minecraft commands register
* Fix broken afk command cooldown
* Cleanup code
2025-03-17 20:54:15 -04:00
Dreeam
52477a91ae Updated Upstream (Paper/Gale)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@f4f27551 [ci/skip] Clarify BlockFadeEvent#getNewState javadocs (#12250)
PaperMC/Paper@102c8bbc Add config for updating equipment on player actions (#12275)
PaperMC/Paper@f0388e2f Call EntityPushedByEntityAttackEvent for Mace AoE (#12257)
PaperMC/Paper@c37b890c More deferred requireNonNull message creation
PaperMC/Paper@310f5229 Add unsupported config option and internal API to simplify remote item matching
PaperMC/Paper@6ea42025 Send all attributes on respawn (#12274)
PaperMC/Paper@2d3a1385 [ci/skip] Refine recipe management API documentation. (#12287)
PaperMC/Paper@aaaeb4e1 [ci/skip] Make compilation logs actually readable (#12276)
PaperMC/Paper@bb1beda6 feat: add event to wind charge explode (#12248)

Gale Changes:
Dreeam-qwq/Gale@43bfa513 Updated Upstream (Paper)
Dreeam-qwq/Gale@ab0a7189 Updated Upstream ()
Dreeam-qwq/Gale@27ddb2fa [ci/skip] Added merge announcement
Dreeam-qwq/Gale@523e7745 [ci/skip] Fix announcement format
Dreeam-qwq/Gale@d91ed070 [ci/skip] Update annocement
2025-03-17 14:30:27 -04:00
Altiami
2d6e6b28f3 SparklyPaper: Parallel world ticking (#246)
* SparklyPaper: Parallel world ticking

* per world mspt (/leaf mspt)

* fix chunk loading off-main violations

* rebase and make tpsbar per world

* temp fix for async chunk sending crash

* add /leaf mspt compact and more cleanup

* TCRF SparklyPaper (Pathothingi): Fix Nether and End portals for non-player entities

* fix Potothingi's name

* change thread name

* fix plugin related async ticks (hopefully)

* Revert "fix plugin related async ticks (hopefully)"

This reverts commit 7a9b79adc538989ecbec162dd377245706522a87.

* Add more config guards

* rebase on upstream

* actually add the paper patches

* fix villagers failing to release poi

* rebase

* make async chunk send work with parallel world ticking again

---------

Co-authored-by: Taiyou06 <kaandindar21@gmail.com>
2025-03-17 17:54:12 +03:00
Dreeam
f6aa7635f3 [ci skip] cleanup (14/14) 2025-03-14 15:54:02 -04:00
Taiyou
2a6eda6d32 Configurable spawner block settings (#251)
* custom SpawnerSettings

* [ci/skip] cleanup

* [ci/skip] cleanup

* Use vanilla min/max spawn delay as default values

* Move config to gameplay
2025-03-10 06:10:28 -04:00
HaHaWTH
77759079e1 Add experimental comment to AsyncChunkSend 2025-03-09 19:29:50 +14:00
Dreeam
efc9314dd9 [ci skip] cleanup (1/14) 2025-03-07 15:18:16 -05:00
Dreeam
ab4fe8ea44 [ci skip] cleanup 2025-03-07 15:02:52 -05:00
Taiyou
cd7689b16f Chunk improvements (#231)
* perf: SpatialPlayerIndex for isChunkNearPlayer

* perf: ensureCapacity with collectTickingChunks

* perf: optimize getSlopeDistance

* perf: optimize AABB Intersections

* perf: implement custom arrays for regions and caches

* perf: Improve SortedArraySet sorting (needs testing)

* rebase 1.21.4

* perf: optimize ClientBoundLightUpdatePacketData

* perf: O(1) Array Writes during Chunk Loading

* perf: Optimize LinearPalette (no not the linear format)

* perf: Rewrite ConcurrentLongHashSet

* rebase 1.21.4

* Fix Multithreaded Tracker (#236)

* duke gonna arrest me

* i hate git v2

* rebase

* dont worry ill change the name of this patch

* perf: Rewrite ConcurrentLongHashSet again

* perf: Optimize sendChunk

* [ci skip]

* cleanup

* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* cleanup

* remove streams on LinearPalette and SerializableChunkData

* actually commit them lmao

* actually commit them lmao 2

* fix

* rebase

* perf: clone less (could help with skyblocks)

* perf: more unload stuff

* perf: manual loop unrolling and bulk copy

* initial size for SerializeableChunkData

* perf: async chunkSend

* cleanup asyncChunkSend

* remove experimental tag

* rebase

---------

Co-authored-by: Creeam <102713261+HaHaWTH@users.noreply.github.com>
Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
2025-03-05 22:45:26 +03:00
Taiyou06
ae5cd82c12 add a toggle 2025-03-05 15:37:38 +01:00
Creeam
2e5ea6957e Fix async entity tracker (#241)
* Fix Multithreaded Tracker

* [ci skip] Add comments
2025-02-27 15:11:28 -05:00
Taiyou06
ab0e8da1dc swap to the guava's Interners.weakInterner() 2025-02-22 19:55:50 +01:00
Dreeam
04500614b2 [ci skip] cleanup 2025-02-22 04:28:10 -05:00
Dreeam
77119bec4a Get correct class name 2025-02-22 04:07:36 -05:00
Dreeam
01fa6ac227 Add Leaf Commands (WIP)
* Added Leaf Commands base
* Added WIP /leaf reload
* Added /leaf version
* Change /gale permission to OP as default
2025-02-22 03:15:42 -05:00
Dreeam
69ece108dd Update config comment 2025-02-22 02:28:43 -05:00
Kaan D.
502385840d Bunch of side perf improvements (#217)
* Fix TE Lag

* Sepals Rearrange the attackable conditions

* Cache ItemStack max stack size

* fix build

* extra: Skip dirty stats copy when requesting player stats

* extra: Reset dirty flag when loading maps from the disk

* extra: Supporting block cache

* extra: Avoid useless deque clear on - credit: @MachineBreaker

* experimental/draft: Optimize SortedArraySet

* experimental/draft: Simplify SortedArraySet - sometime complex stuff doesnt mean faster.

* extra: Change maps/sets in brain + remove streams from villagers

* extra: Remove 'copyOf' from Baby Villager Sensor

* experimental: Rewrite trigger in SimpleCriterionTrigger

* [ci/skip] fix comments

* Faster setter for SimpleCriterionTrigger

* extra: Cache and optimize fluidOnEyes

* Sync changes

* [ci/skip] cleanup

* extra: QuadTree implementation for isChunkNearPlayer

* [ci/skip] cleanup

* [ci/skip] cleanup

* [ci/skip] clean up

* [ci/skip] cleanup

* Only player pushable

* Store chunkPos with keys

* [ci/skip] cleanup

* [ci/skip] cleanup

* cleanup

* rebuild patches

* cache some more stuff

* extra: optimize collectTickingChunks

* remove quadTree optimization for now (will open a new PR just for that)

* temp: Lazily optimize isChunkNearPlayer

* Inline filter & merge as a single loop

* [ci/skip] Add diff on change

* extra: optimize everything but the testing itself on getEntities

* [ci/skip] cleanup

* Optimize chunkUnloadQueue

* Remove iterators from inventory

* [ci/skip] Add TODOs

* i hate programming

* remove forEach

* extra: Alternative Brain Behaviour

* remove: opt getEntities + cache fluidOnEyes

* extra: Improve checkDespawn - credits: @kidofcubes

* extra: Improve pushEntity and getEntities

* yeet this

* VERY EXPERIMENTAL: getEntities Optimization

* fix bunch of issues from getEntities patch

* extra: slightly optimize getNearestPlayer - credits: @kidofcubes

* drop a patch for now (will open a new pr)

* move these to a new branch

* fix and optimize checkDespawn patches

* Rebuild Patches

* [ci/skip] Update benchmark

* [ci/skip] cleanup

* Drop

* [ci/skip] Drop

* Rebuild

* [ci/skip]

* Add configurable brain running behavior cache update interval

* Move to new pr

* [ci/skip] Update benchmark

---------

Co-authored-by: MachineBreaker <saltspigotpp@gmail.com>
Co-authored-by: kidofcubes <kidofcubes@gmail.com>
Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
2025-02-22 02:23:53 -05:00
Dreeam
329bc97960 [ci skip] Update LeafConfig 2025-02-20 17:30:35 -05:00
Creeam
1b09a2169d Fix DAB entity blacklist & Fix config modules (#227) 2025-02-14 12:44:48 -05:00
Creeam
b3276615b5 Adjust default config values (#226)
* Adjust default config values

* Adjust
2025-02-12 15:37:47 -05:00