18110 Commits

Author SHA1 Message Date
Dylan T.
f01d87474d Final cleanup: fix imports and indentation
- Remove unused imports (array_map, count) from SubChunk.php
- Fix indentation in ChunkSerializer.php serializeSubChunk method
- Fix indentation in FastChunkSerializer.php serialize/deserialize methods
- Ensure consistent tab-based indentation throughout all modified files
- Clean up whitespace and formatting issues
2025-06-27 16:25:17 +00:00
Dylan T.
7472c5b73d Fix indentation in LevelDB saveChunk method
- Correct indentation for putByte and foreach loop calls
- Ensure consistent tab-based indentation throughout the method
2025-06-27 16:16:56 +00:00
Dylan T.
941632bed9 Fix formatting issue in LevelDB.php
- Restore missing newline on line 782
- Ensure proper indentation for liquid layer check
2025-06-27 16:15:00 +00:00
Dylan T.
e5a38f270c Clean up BlockLightUpdate::recalculateChunk
- Remove unnecessary null checks for blockLayer and liquidLayer (they are now non-nullable)
- Deduplicate code by scanning both layers in a single loop
- Simplify logic flow by checking palettes first before scanning blocks
2025-06-27 16:08:08 +00:00
Dylan T.
7c651928ea Simplify LevelDB saveChunk using layers array pattern
- Use the same pattern as ChunkSerializer by building an array of non-empty layers
- Cleaner and more maintainable code with fewer changes from original
- Remove inline comment for cleaner appearance
2025-06-27 16:01:14 +00:00
Dylan T.
48cc87d066 Remove deprecated and unused methods from SubChunk
- Remove deprecated getBlockLayers() method that was replaced by getBlockLayer() and getLiquidLayer()
- Remove setBlockLayer() and setLiquidLayer() setter methods as layers are now managed internally
- Simplifies the API and prevents external mutation of internal layer state
2025-06-27 15:58:10 +00:00
Dylan T.
72781f4042 Add helper methods for layer emptiness checks and update serializers
- Add isBlockLayerEmpty() and isLiquidLayerEmpty() methods to SubChunk to avoid code duplication
- Update ChunkSerializer to use emptiness checks instead of null checks for layers
- Update LevelDB to use the new helper methods for cleaner code
- Ensures consistent emptiness checking logic across all serializers
2025-06-27 15:54:42 +00:00
Dylan T.
30d13508b4 Update LevelDB to check for layer emptiness instead of null
- Check if layers are empty (bitsPerBlock == 0 and value == emptyBlockId) instead of null when saving subchunks
- This aligns with the refactored SubChunk class that now uses non-nullable blockLayer and liquidLayer fields
2025-06-27 15:49:43 +00:00
Dylan T.
ba2a7cceaf Refactor SubChunk to use non-nullable block and liquid layers
- Changed SubChunk constructor to accept null for layers and initialize empty PalettedBlockArray internally
- Updated all SubChunk getters to return non-nullable PalettedBlockArray
- Modified serialization/deserialization logic to check for layer emptiness instead of null
- Updated all SubChunk constructor calls across codebase to pass null for empty layers
- Simplified code by removing unnecessary null checks throughout the codebase
- Updated tests to match new SubChunk API
2025-06-27 15:47:58 +00:00
Dylan T.
8005c74681 Refactor SubChunk to use separate block and liquid layer fields
Replace blockLayers array with individual blockLayer and liquidLayer fields.
Update constructor and all usages throughout the codebase.
Deprecate getBlockLayers() method for backward compatibility.
2025-06-26 00:00:45 +00:00
Dylan T.
7ea0f2ff43
copilot-setup-steps: also add extension stubs 2025-06-26 00:14:34 +01:00
Dylan T.
6dbd4282cb
fix cache key 2025-06-26 00:12:12 +01:00
Dylan T.
3176e7549e
woops 2025-06-26 00:11:26 +01:00
Dylan T.
92c3ce7f02
Create copilot-setup-steps.yml 2025-06-26 00:10:46 +01:00
dependabot[bot]
3a5432b316
Bump build/php from 1549433 to ce1b095 (#6741) 2025-06-25 00:16:12 +00:00
ItzxDwi
40a3ee68dd
fix typo in changelog (#6745) 2025-06-24 13:35:32 +01:00
pmmp-admin-bot[bot]
e415518435 5.30.2 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/15834488047
2025-06-23 20:31:58 +00:00
ipad54
cb508f4382
Release 5.30.1 (#6744) 5.30.1 2025-06-23 23:30:48 +03:00
ipad54
177fa76434
Disable client-side locator bar (#6743)
Without a propper server-side implementation, it just a mess of white dots of nearby players
2025-06-23 14:57:33 -05:00
ipad54
2a97b4294d
Fixed held block placement after respawn anchor explosion (#6742) 2025-06-23 16:59:40 +01:00
Dylan T.
04494e845c
EntityExplodeEvent: Fixed accidental BC break introduced by #6646
thanks @Yexeed
2025-06-20 15:26:42 +01:00
Dylan K. Taylor
0e511ff783
smh 2025-06-18 21:55:53 +01:00
pmmp-admin-bot[bot]
6826420876 5.30.1 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/15743323722
2025-06-18 20:49:31 +00:00
Dylan T.
f0161c84b9
Merge pull request #6737 from pmmp/r5.30.0
5.30.0
5.30.0
2025-06-18 21:48:30 +01:00
Dylan K. Taylor
3643d3aeb8
Ready 5.30.0 release 2025-06-18 20:42:10 +01:00
Dylan K. Taylor
a662510cca
Merge remote-tracking branch 'origin/stable' into minor-next 2025-06-18 19:56:02 +01:00
Dylan T.
670d3fb997
Mention developer team in draft release notification 2025-06-18 19:29:28 +01:00
pmmp-admin-bot[bot]
8843b1b568 5.29.1 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/15720776704
2025-06-18 00:16:13 +00:00
Dries C
9c71f4fc1c
Assemble 1.21.90 (#6736) 5.29.0 2025-06-18 01:15:00 +01:00
pmmp-admin-bot[bot]
bd39caccb0 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/15598290427
2025-06-12 00:02:56 +00:00
Dylan T.
95b4db5169
Fix slow SubChunk garbage collection check, closes #6574 (#6731) 2025-06-11 21:29:03 +01:00
Dylan K. Taylor
48b80ecf78
Change crashdump file name format
this has bothered me for ages since it sorts into some absurd order by default due to the name starting with the day of the week.

this way it'll ensure that the files are always alphanumerically ordered, which means the most recent crashdump should always be
at the bottom.
2025-06-08 19:01:11 +01:00
Dylan K. Taylor
4c3a2ef46e
Update dependencies (minor-next) 2025-06-08 18:44:37 +01:00
Dylan K. Taylor
d053e9e168
Merge branch 'stable' into minor-next 2025-06-08 18:43:31 +01:00
Dylan T.
5ebbcd5d33
Move to newer systems for movement and block break handling (#6718)
MS is due to remove the non-server-auth versions of all of this stuff.

Fortunately v3 server auth movement works just fine without any changes,
although we will need to start sending player tick in some packets if
someone wants to actually use the rewind stuff.
2025-06-02 15:24:25 +01:00
Dylan K. Taylor
a4ac28592c
Updated dependencies 2025-06-02 15:17:00 +01:00
dependabot[bot]
e99665fb12
Bump docker/build-push-action in the github-actions group (#6719) 2025-06-02 14:08:14 +00:00
Dylan K. Taylor
b4b6bbe29f
BaseInventory: fixed internalAddItem() setting air slots to air
this bug was introduced in #4237, but it was unnoticed due to having no adverse
effects other than noisy debugs and network traffic.
2025-05-29 17:18:45 +01:00
Dylan K. Taylor
0910a219d4
Fixed improper pre-checking of PlayerAuthInputPacket flags 2025-05-28 23:29:37 +01:00
Dylan K. Taylor
56da492e48
World: make less noise about deleted tile entities
no need to repeat the same message 100 times
2025-05-28 22:10:20 +01:00
Dylan K. Taylor
035d2dec23
LevelDB: make unknown block errors way less annoying
these would previously generate a new line for every error.
since errors are often repeated for different offsets (e.g. different states of the same block),
we can save a lot of spam by deduplicating them and telling which offsets the errors occurred in.
2025-05-28 22:03:29 +01:00
Dylan K. Taylor
b40b99fe72
Player: fixed crash on action item return
this can happen if the old item had a lower max damage than the new one, and the new
one has a damage higher than the old one's max damage.

it can also happen if the damage was overridden to some illegal value by a custom item
as seen in https://crash.pmmp.io/view/12754811
2025-05-28 21:32:48 +01:00
Dylan K. Taylor
baafaed362
Stem drops seeds according to binomial distribution
fixes #6709

we really need a better way to reverse-engineer the chance parameter for these
as the wiki just gives a probability table, which is quite tiresome to extract
patterns from.
2025-05-28 21:00:40 +01:00
Adam
bf33a625c9
Implemented Respawn Anchor (#6646)
PlayerRespawnAnchorUseEvent is also added with options SET_SPAWN and EXPLODE, which allows plugins to customise the outcome of using the anchor in PM, which currently doesn't support dimensions. The event is also cancellable.
2025-05-27 21:57:28 +01:00
Dylan T.
059f4ee7bf
Extract GeneratorExecutor system from World, v2 (#6682)
- `AsyncGeneratorExecutor` class added that encapsulates the logic of generating chunks using async tasks as previously
- `GeneratorExecutor` interface added that can be implemented to provide chunks in other ways
- `SyncGeneratorExecutor` which invokes the generator directly on the main thread, useful for simple generators like `Flat` where async tasks are not needed
- Some redundant APIs were removed from `World` (these will probably come back as deprecated stubs for the remainder of 5.x, but I was having too much fun deleting code)
- Removed internal `World->registerGeneratorToWorker()` (no longer useful)
- `World` now invokes generator executor instead of posting AsyncTasks directly
- Some internal classes moved to `pocketmine\world\generator\executor` (PopulationTask excluded because plugins use it in lieu of being able to regenerate chunks
- Generators can opt into main-thread execution by setting the `$fast` parameter to `true` in `GeneratorManager::register()`
2025-05-27 21:51:10 +01:00
Dylan K. Taylor
dd17adeaaf
Reintroduce step height additions for minor-next
Revert "Revert change that can't go on stable"

This reverts commit a554d2acf5db00f577493517e36bb3ad07a6bdd0.
2025-05-25 11:33:47 +01:00
Dylan K. Taylor
98f28f8b6d
Merge branch 'stable' into minor-next 2025-05-25 11:33:32 +01:00
Dylan K. Taylor
a554d2acf5
Revert change that can't go on stable
API additions need to wait for the next minor release

Revert "Entity: make stepHeight accessable (#6702)"

This reverts commit 5527a0c6bf4343b39cd6ed4526f75539ac6ddf19.
2025-05-25 11:32:40 +01:00
ItzxDwi
5527a0c6bf
Entity: make stepHeight accessable (#6702) 2025-05-25 10:07:41 +02:00
zSALLAZAR
eee2e62d81
Add EntityFrostWalkerEvent (#6673) 2025-05-25 10:01:46 +02:00