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

87 Commits

Author SHA1 Message Date
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
Taiyou
3509e736d5 Fix async chunk send (#252)
If a chunk is already in the sentChunks set, we simply return early instead of throwing an exception.

Made moonrise$addReceivedChunk call to gracefully handle the case where a chunk is already marked as received.

If the chunk was already received, we remove the chunk from our sent list and return early.
2025-03-09 16:18:21 -04:00
Dreeam
5603fe2984 Updated Upstream (Paper/Gale)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@8e69d981 Player - Expose player score (#12243)
PaperMC/Paper@2526fe06 Add type to represent unimplemented data component types (#12222)
PaperMC/Paper@20df25d3 Don't resync all attributes when updating scaled health (#12232)
PaperMC/Paper@43f37b1b Remove ItemFactory#enchantWithLevels range check for vanilla parity (#12209)
PaperMC/Paper@a2b0ff06 Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)
PaperMC/Paper@df96f8a0 Correctly handle events for end portal (#12246)
PaperMC/Paper@25654978 Cancel PlayerLaunchProjectileEvent properly for enderpearls (#12223)
PaperMC/Paper@34c794dc ServerTickManager#requestGameToSprint - Silence command like feedback (#12220)
PaperMC/Paper@3d13b115 fix: switch back to using a snapshot for velocity-natives
PaperMC/Paper@7afae7f4 Add client tick end event (#12199)
PaperMC/Paper@e5d988df Revert "Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)"
PaperMC/Paper@743346a5 Force update attributes
PaperMC/Paper@1a7288aa Adjust unloaded chunk check for block digging

Gale Changes:
Dreeam-qwq/Gale@7fa44170 Updated Upstream (Paper)
Dreeam-qwq/Gale@071288bc Updated Upstream (Paper)
Dreeam-qwq/Gale@52645592 Updated Upstream (Paper)
2025-03-09 15:30:21 -04:00
Taiyou06
c23e385f25 potentially fix async mob spawning cap calculation 2025-03-09 19:04:53 +01:00
HaHaWTH
77759079e1 Add experimental comment to AsyncChunkSend 2025-03-09 19:29:50 +14:00
Creeam
4e00b55022 Fix structure locate issue related to faster random generator (#248) 2025-03-08 14:07:31 -05:00
Dreeam
0d57b02c40 Updated Upstream (Paper/Gale)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@45198578 Set old position / rotation for newly created entities

Gale Changes:
Dreeam-qwq/Gale@e007f34a Updated Upstream (Paper)
2025-03-08 10:05:31 -05:00
Dreeam
8c1ad8d658 Updated Upstream (Paper/Gale)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@b5066268 Remove unused light queue size option (#12201)
PaperMC/Paper@1d5e5a57 Document replacement for Skull owner profile methods (#12195)
PaperMC/Paper@8de7e356 Add null check to level ref in Entity constructor (#12218)
PaperMC/Paper@a866e366 Fix MenuType.SMITHING JavaDocs (#12226)
PaperMC/Paper@5538d24d Fix "DEFAULT" SpawnReason of fish spawned by bucket (#12227)
PaperMC/Paper@0a4eb8f3 Send the pong response packet immediately. This packet is similar to the keep alive packet and is processed async. (#12242)
PaperMC/Paper@7a3d0c4e Fix recipe being always null in PrepareItemCraftEvent from the api (#12237)
PaperMC/Paper@a6ce734f Fix zombie villager not dropping item once cured (#12230)
PaperMC/Paper@ce300162 Skip alpha channel for custom model data component (#12205)

Gale Changes:
Dreeam-qwq/Gale@ef499e4c Updated Upstream (Paper)
2025-03-08 01:31:44 -05:00
Dreeam
e38a717f8a [ci skip] cleanup (6/14) 2025-03-07 15:49:01 -05: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
Taiyou06
bf437d81b1 temp: remove BFS on getSlopeDistance in fluids 2025-03-06 10:06:30 +01:00
Taiyou06
2d54fdea9b fixed a small concurrency issue on flushQueue(?) 2025-03-05 22:24:28 +01: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
Taiyou06
62d81685c1 Merge remote-tracking branch 'refs/remotes/origin/ver/1.21.4' into networking 2025-03-03 17:33:35 +01:00
Creeam
2e5ea6957e Fix async entity tracker (#241)
* Fix Multithreaded Tracker

* [ci skip] Add comments
2025-02-27 15:11:28 -05:00
Dreeam
ae05e90944 ShreddedPaper: Don't block main thread in Connection#syncAfterConfigurationChange 2025-02-27 06:25:34 -05:00
Dreeam
d801e88a2a Updated Upstream (Paper/Gale/Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@5e2a3bc0 Call EntityChangeBlockEvent with correct block when waxing (#12154)
PaperMC/Paper@ab984a07 Always pass event block to damage source (#12158)
PaperMC/Paper@7b4d44f5 Revert "Always pass event block to damage source (#12158)"
PaperMC/Paper@e5a8ee84 Hide soul speed particles for vanished players (#12152)
PaperMC/Paper@fcb2e815 Clear lastSection on game event listener removal
PaperMC/Paper@636ae0cd Add missing Paper comments to player movement patch
PaperMC/Paper@9be4e07a Pin snapshot dependencies (#12185)
PaperMC/Paper@f12d33f0 Track codec writing
PaperMC/Paper@1d9b3994 Add config option for failed beehive release cooldowns (#12186)
PaperMC/Paper@5f2ee83e Fix first execution of async delayed/repeating tasks being sync (#12166)
PaperMC/Paper@b00875f8 Add a method on Registry to get the size (#12182)
PaperMC/Paper@ca261090 Don't process empty rcon commands (#12188)
PaperMC/Paper@a501c459 Deprecate server config getters (#12189)
PaperMC/Paper@7f3d3591 Use MiniMessage#deserialize(String, Pointered) in sendRichMessage for send messages (#12177)
PaperMC/Paper@9b9f046f Remove broken code (#12171)
PaperMC/Paper@fc56c728 Add methods for Creaking (#12094)
PaperMC/Paper@f63dbeaf Fix cancelled HangingPlaceEvent inventory desync (#12161)
PaperMC/Paper@9421f223 Make CustomArgumentType use parse(reader,source) (#12191)
PaperMC/Paper@0a6e7435 Fix invulnerability damage and armour (#12190)

Gale Changes:
Dreeam-qwq/Gale@b2c11564 Updated Upstream (Paper)
Dreeam-qwq/Gale@a9e4baae Updated Upstream (Paper)
Dreeam-qwq/Gale@32a291bc [ci/skip] Update comment

Purpur Changes:
PurpurMC/Purpur@62cbd47a Updated Upstream (Paper)
PurpurMC/Purpur@d41aaca1 Updated Upstream (Paper)
PurpurMC/Purpur@3f8e6134 Fix EntityTameEvent not being called when `always-tame-in-creative` option is enabled (#1645)
PurpurMC/Purpur@b34d675f fix `zombie_horse.spawn-chance` option not working
2025-02-27 06:03:30 -05:00
Dreeam
d2417540ee Update workflow
* Separate build and pr build workflows
* Expose build number env var to Leaf
2025-02-26 16:30:33 -05:00
Dreeam
6185246a78 [ci skip] cleanup 2025-02-24 13:56:27 -05:00
Dreeam
be4bee9a10 Add back configurable tripwire dupe 2025-02-24 03:25:32 -05:00
Taiyou06
ab0e8da1dc swap to the guava's Interners.weakInterner() 2025-02-22 19:55:50 +01:00
Taiyou06
dc2f706b67 fix inventory updates 2025-02-22 19:08:36 +01:00
Dreeam
61754c8ffd [ci skip] cleanup 2025-02-22 04:49:13 -05:00
Dreeam
04500614b2 [ci skip] cleanup 2025-02-22 04:28:10 -05:00
Taiyou06
d5f3cba67c rebase 1.21.4 2025-02-22 10:17:03 +01:00
Taiyou06
5da371a215 Merge remote-tracking branch 'refs/remotes/origin/ver/1.21.4' into networking 2025-02-22 10:14:25 +01: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
Taiyou06
79b64b314d just use netty event loop, lol lmao. 2025-02-21 16:14:36 +01:00
Dreeam
329bc97960 [ci skip] Update LeafConfig 2025-02-20 17:30:35 -05:00
Kaan D.
1e6bd865d6 Only broadcast carried item if changed (#234)
* perf: Logic optimizations to AbstractContainerMenu.broadcastChanges
2025-02-20 17:09:21 -05:00
Dreeam
5e3428c1a7 Add PlayerInventoryOverflowEvent (#232)
* Add PlayerInventoryOverflowEvent

* Add missing toggle

* Move to correct package

* Use handlerList to check instead of using explicit enable / isEnabled
2025-02-19 19:21:15 -05:00
Dreeam
86564bf6ce Updated Upstream (Paper/Gale/Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@fd69140d Fix `disable-tripwire-updates` option not cancelling tripwire hook updates (#12129)
PaperMC/Paper@3b9106c7 Readd dead redirect recovery (#12136)
PaperMC/Paper@d26a9e90 Fix plugin commands (#12144)
PaperMC/Paper@142695eb Default minecraft alias to redirect (#12146)
PaperMC/Paper@e494f289 Correctly call BlockFadeEvents (#12141)
PaperMC/Paper@b386a8f5 Add simpler JavaPlugin command registration (#12142)
PaperMC/Paper@f0700818 Remove Experimental from TypedKey (#12134)
PaperMC/Paper@09f1f88f Fix getForwards/SidewaysMovement for players (#12140)
PaperMC/Paper@edda0db1 Fix server crash when no enchantments are present (#12149)

Gale Changes:
Dreeam-qwq/Gale@55793e9d Updated Upstream (Paper)
Dreeam-qwq/Gale@8372ff60 Updated Upstream (Paper)

Purpur Changes:
PurpurMC/Purpur@b0d36cae Updated Upstream (Paper)
PurpurMC/Purpur@97dcff40 set DamageCause to `SUICIDE` for scissor's DamageSource
PurpurMC/Purpur@a9862d7e Updated Upstream (Paper)
PurpurMC/Purpur@196c1768 Updated Upstream (Paper)
2025-02-19 15:28:34 -05:00
Dreeam
d0f5bd99cb Update plugins command behavior
follow same in previous
2025-02-17 14:45:19 -05:00
Dreeam
d877167e16 [ci skip] Improve output of plugins command back 2025-02-17 12:33:58 -05:00
Dreeam
7d718932e9 Fix build 2025-02-17 11:03:19 -05:00
Dreeam
17ea36ff6b Updated Upstream (Paper/Gale/Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@13c80a5e [ci/skip] Fix PlayerShearBlockEvent javadoc typos (#12101)
PaperMC/Paper@db2aa180 [ci/skip] Fix incomplete example in javadocs for PreFlattenTagRegistrar (#12102)
PaperMC/Paper@cf7c6c74 [ci/skip] Fix incomplete example in javadocs for PostFlattenTagRegistrar (#12103)
PaperMC/Paper@072a8317 Add proper attached blocks API to AbstractArrow (#12099)
PaperMC/Paper@1be2e5f3 Fix vanilla map decorations sending when not dirty (#12098)
PaperMC/Paper@a06179a0 Update entity effect (#12104)
PaperMC/Paper@e616498e Add Vault block API (#12068)
PaperMC/Paper@0a04c3fe Fix some NPEs (#12105)
PaperMC/Paper@06804850 Expand TrialSpawner API (#12025)
PaperMC/Paper@46f4fdaa Add support for rotation argument handling (#12090)
PaperMC/Paper@6cfa2f7f [ci/skip] Add missing nullability annotation to sendEquipmentChange method (#12112)
PaperMC/Paper@9b9de827 Update Alternate Current patch to v1.9.1 (#12115)
PaperMC/Paper@c62252e1 Add lore content guard (#12116)
PaperMC/Paper@40416784 [ci/skip] Mention missing World#regenerateChunk implementation in jd (#12109)
PaperMC/Paper@a6e82d90 [ci/skip] Clarify getChunkAtAsyncUrgently javadocs (#12125)
PaperMC/Paper@cb25c0cf [ci/skip] Fix annotation fields used in NMS getBukkitEntity (#12120)
PaperMC/Paper@00701267 [ci/skip] improvement example in javadoc for DatapackRegistrar (#12122)
PaperMC/Paper@608f004a add method on ItemStack to edit pdc (#12022)
PaperMC/Paper@7bee9971 Cleanup damage source a bit (#12106)
PaperMC/Paper@b9023b5d Add EntityAttemptSmashAttackEvent (#12113)
PaperMC/Paper@a3781ff3 Separate tick count to ensure vanilla parity (#12077)
PaperMC/Paper@2a4a1154 Add EntityEquipmentChangedEvent (#12011)
PaperMC/Paper@06f96dd6 Improvement in /plugins command (#12121)
PaperMC/Paper@28d07dc5 use correct spigot plugin count
PaperMC/Paper@60394c5b Fix PlayerReadyArrowEvent cancellation desync (#12111)
PaperMC/Paper@b27e11cc Fix bad world to chunk coordinate example in javadocs (#12131)
PaperMC/Paper@88cdd220 Fixup luck and random implementation in CB loot-tables (#11926)
PaperMC/Paper@84609dc0 Don't auto-create any brig redirects (#11954)
PaperMC/Paper@8eb8e44a Allow For Default Titles in InventoryView Builders (#12013)

Gale Changes:
Dreeam-qwq/Gale@a224af13 Updated Upstream (Paper)
Dreeam-qwq/Gale@82f1e30e Updated Upstream (Paper)
Dreeam-qwq/Gale@a41cd227 Updated Upstream (Paper)
Dreeam-qwq/Gale@73519d55 Updated Upstream (Paper)

Purpur Changes:
PurpurMC/Purpur@9b046f36 Updated Upstream (Paper)
PurpurMC/Purpur@22bd4186 Updated Upstream (Paper)
2025-02-17 10:49:50 -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
Dreeam
541e5914ef Updated Upstream (Paper/Gale)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@fa5824e4 Add skipTripwireHookPlacementValidation (#12091)
PaperMC/Paper@3bd69f2e [ci/skip] Enhance javadoc for World#setAutoSave method (#12088)

Gale Changes:
Dreeam-qwq/Gale@94af07ac Register gale command in correct place
2025-02-12 00:44:33 -05:00
Creeam
bdccf345b7 Thread safety fixes (#224) 2025-02-11 16:12:47 -05:00
Dreeam
19fbe8ce15 Cleanup cache chunk key
Reuse existing chunk key field instead of making new one, also prevent unnecessary increase of ChunkPos object size
2025-02-11 11:27:17 -05:00
Dreeam
1046685bbf Drop Configurable tripwire dupe, since Paper added it back 2025-02-11 11:18:50 -05:00
Creeam
3b6ce17b1f Dont throw in async thread & Clean up (#222)
* Dont throw in async thread

* Fix typo
2025-02-11 11:03:00 -05:00
Dreeam-qwq
b26dc8d3f0 Updated Upstream (Gale)
Upstream has released updates that appear to apply and compile correctly

Gale Changes:
Dreeam-qwq/Gale@6f89f224 Updated Upstream (Paper)
2025-02-11 01:39:20 +00:00
Dreeam
9ead0ae73d Updated Upstream (Paper/Gale/Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@597dcfff Add support for lz4 (#12053)
PaperMC/Paper@53ae5c95 Make Sittable interface extend Entity (#12016)
PaperMC/Paper@786ddf53 Default piston block entity direction to DOWN (#12039)
PaperMC/Paper@cb6c57e0 Fix Squid and Dolphin spawn height (#12045)
PaperMC/Paper@51acc802 Prevent duplicate raider in RaidSpawnWaveEvent list (#12040)
PaperMC/Paper@61312fdb Switch to jspecify annotations for Player (#12042)
PaperMC/Paper@1a04e96a Fix EntityBreedEvent cancellation (#12046)
PaperMC/Paper@eff617b8 [ci/skip] Deprecate Server#setSpawnRadius (#12024)
PaperMC/Paper@edacfdf4 Do not queue player info packets (#12080)
PaperMC/Paper@cafef9ce [ci/skip] Move EntityUtil to correct directory (#12092)

Gale Changes:
Dreeam-qwq/Gale@1c139da5 Updated Upstream (Paper)

Purpur Changes:
PurpurMC/Purpur@c038d785 Updated Upstream (Paper)
PurpurMC/Purpur@708a2fd9 fix: properly apply breeding-delay-ticks option for turtles
PurpurMC/Purpur@e6a1ebd3 Updated Upstream (Paper)
2025-02-10 10:53:52 -05:00