1197 Commits

Author SHA1 Message Date
ipad54
05a9e9c76e
Implemented sound when drinking a potion (#6444) 2024-11-10 15:07:18 +00:00
Dylan K. Taylor
3c96e72f7d
Merge remote-tracking branch 'origin/stable' into minor-next 2024-11-03 14:01:47 +00:00
Dries C
8ef5e737de
Temporary resolve loading old skulls from storage (#6476) 2024-10-27 01:29:34 +01:00
github-actions
a4a07a8e5a Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/10986731877
2024-09-23 02:36:00 +00:00
Dries C
60cac18104
Assemble 1.21.30 (#6453) 2024-09-20 18:47:25 -05:00
IvanCraft623
92f380bb9c
Merge branch 'stable' into sync-minor-next 2024-08-17 11:17:48 -05:00
Dries C
0f365886e0
Assemble 1.21.20 (#6423)
Co-authored-by: Dylan T. <dktapps@pmmp.io>
Co-authored-by: IvanCraft623 <ivancraft623@gmail.com>
2024-08-16 11:26:49 +01:00
Dylan K. Taylor
ee17ac5246
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into minor-next 2024-08-09 13:32:07 +01:00
dependabot[bot]
237677c028
Bump phpstan/phpstan from 1.11.2 to 1.11.8 in the development-patch-updates group (#6410) 2024-07-30 06:47:56 +00:00
Aleksey
df4ada81e5
BedrockWorldData: Update version constants to 1.21.2 (#6399)
Co-authored-by: Dylan T <14214667+dktapps@users.noreply.github.com>
2024-07-16 00:51:06 -05:00
ipad54
2ffc38c835
Implement campfire & soul campfire (#4696) 2024-07-07 15:01:34 -05:00
Dylan K. Taylor
f121654452
Assemble 1.21.0 2024-06-13 18:41:41 +01:00
Dylan K. Taylor
6077748caa
Changes for 1.20.80 2024-04-25 11:31:41 +01:00
ipad54
f799cfaba6
Implemented sound when equipping armor (#6303) 2024-03-25 14:15:54 +00:00
ipad54
b680a1693c
Added sound when picking sweet berries (#6287) 2024-03-19 10:18:30 +00:00
Dylan K. Taylor
a835069564
Merge remote-tracking branch 'origin/stable' into minor-next 2024-03-14 12:47:04 +00:00
Dylan K. Taylor
9f3533d870
Improved logging for block decode errors
this is still noisy, but less so than before.
this also adds logging to places where it was previously missing.
2024-03-13 16:42:23 +00:00
Dylan K. Taylor
ba48f258f3
Support for 1.20.70 2024-03-13 14:53:27 +00:00
Dylan K. Taylor
d211392b67
Merge remote-tracking branch 'origin/stable' into minor-next 2024-02-12 11:46:48 +00:00
Dylan K. Taylor
6492e7f4a2
1.20.60 support 2024-02-07 12:33:44 +00:00
Dylan K. Taylor
74cb0be868
Noise: give PHPStan some help understanding SplFixedArray 2023-12-20 14:43:36 +00:00
DiamondStrider1
c8da9dea95
WorldManager: Remove unused if in unloadWorld() (#6203) 2023-12-20 10:38:00 +00:00
Dylan K. Taylor
d3d7f24015
Noise: make calls with many parameters less nauseating to read 2023-12-15 15:32:54 +00:00
Dylan K. Taylor
06b2e61d3c
Merge remote-tracking branch 'origin/stable' into minor-next 2023-12-14 14:02:15 +00:00
Dylan K. Taylor
927f129c6e
Fixed borked world loading 2023-12-06 14:41:19 +00:00
Dylan K. Taylor
67ad2bad17
World: fixed edge case that could lead to crash during block update sending 2023-11-17 13:24:06 +00:00
Dylan K. Taylor
e9c5846a06
World: simplify condition 2023-11-16 10:06:43 +00:00
Dylan K. Taylor
58ea94bab8
... 2023-11-10 15:41:17 +00:00
Dylan K. Taylor
22b10e4cb0
Timings: Stop using BREAKDOWN group
with tree timings, the breakdown is actually pretty annoying, since it makes it hard to find a timer in the aggregate lists.
2023-11-10 15:36:35 +00:00
Dylan K. Taylor
d09af2e30d
World: don't assume that random Vector3 are int vectors
we can safely assume this for blocks (though the type info doesn't reflect it) but this is not safe to assume for random APIs that might be used by plugins.
2023-11-06 17:15:17 +00:00
Dylan K. Taylor
457660235e
Crops must have access to a light level of at least 9 2023-11-06 16:02:57 +00:00
Dylan K. Taylor
9832fe899f
Merge branch 'stable' into minor-next 2023-11-01 16:39:44 +00:00
Dylan K. Taylor
e6e2c54ec9
Fixed various reentrant-unsafe 2D array element unsets (similar to previous commit)
this pattern was used in various places
2023-11-01 16:28:59 +00:00
Dylan K. Taylor
9eb2a46942
World: remove useless isChunkLoaded checks
getChunkEntities() will return an empty array if the chunk isn't loaded anyway, so this is just wasting CPU cycles.
2023-11-01 15:53:37 +00:00
Dylan K. Taylor
b41960dfec
Merge branch 'stable' into minor-next 2023-10-26 12:55:47 +01:00
Dylan K. Taylor
53a740433f
Changes for 1.20.40 2023-10-26 12:32:59 +01:00
Dylan K. Taylor
8491d3c6c0
Merge branch 'stable' into minor-next 2023-10-24 11:56:51 +01:00
Dylan K. Taylor
af432c1a7f
Give neighbour block updates its own timer
this way we aren't conflating them with scheduled updates, which are usually caused by e.g. water
2023-10-23 12:33:36 +01:00
Dylan K. Taylor
41c5f63565
World: remove dead code 2023-10-23 12:17:41 +01:00
Dylan K. Taylor
8fa5c7cdab
World: do not apply fake state properties from tile if the block doesn't expect this tile type
This was causing a variety of crashes due to incorrect tiles, presumably from PM3 worlds.
2023-10-20 10:28:46 +01:00
Dylan K. Taylor
7dd3a70d2e
Revert "World: discard tiles on load if they aren't the correct type or no tile is expected"
This reverts commit 8f804f6f342e650156767372bac2d42b55297361.

This change is too disruptive, since popular plugins like
ExtendedBlocks and ExtendedBlocksConverter relied on custom tiles.
Deleting them at this stage would prevent these plugins from working,
making it impossible to upgrade old data.

An alternative solution to this problem will need to be developed.
2023-10-20 10:16:49 +01:00
Dylan K. Taylor
73659318f6
World: Avoid unnecessary Vector3 usages in neighbour block update scheduling
The old code was allocating 6 Vector3s which were all immediately discarded. In addition, we didn't need to take the performance hit of reading Vector3 properties when we could have just passed integers directly.
The real performance difference of this is likely to be close to zero, but it's still worth doing.
2023-10-19 16:46:52 +01:00
Dylan K. Taylor
ccd2cdd324
World: improve performance of calculating non-cached AABBs for a cell
Avoiding getSide() improved the performance by 2x ...
2023-10-19 13:13:46 +01:00
Dylan K. Taylor
c7a358a56f
World: extract getBlockCollisionBoxes() from getCollisionBoxes()
closes #6104

This function has been a footgun for anyone using it, since it also returns entity AABBs by default.
In all core use cases, this functionality was disabled, and we were paying a needless (admittedly micro) performance penalty for passing the extra useless argument and useless condition check.
2023-10-19 12:52:24 +01:00
Dylan K. Taylor
3c614b505d
Merge branch 'stable' into minor-next 2023-10-16 21:28:59 +01:00
Dylan K. Taylor
538b698a00
Revert "World: specialize nearby entity updating for block updates"
This reverts commit 128eb500ebee5163583b84640a9c4f28c0218d42.

This breaks when entities in neighbouring chunks overlap into the
current chunk without actually being tracked by it.
Perhaps it might be worth having entities tracked by all chunks their
AABB touches in the future, so that we don't have to check padding
chunks and waste CPU time.
2023-10-14 19:43:46 +01:00
Dylan K. Taylor
128eb500eb
World: specialize nearby entity updating for block updates
this slashes the cost of checking this with no entities by 50%, which should be the common case for farms and such.
once factoring in other things, this translates into a real-world performance gain of about 15% for block updates.
2023-10-13 17:35:47 +01:00
Dylan K. Taylor
ee26d6d570
LightUpdate: avoid trying to propagate light into nodes with higher light levels
Track which direction the current node's light came from, and don't
check it again when we check the current node's adjacent blocks.

e.g. if this node was the eastern neighbour of a light source, we don't
need to check this node's western neighbour, as we already know it has
a higher light level than our own.

This improves performance of basic light spread in a void by about 6%,
which isn't a huge amount, but it's something.

I've yet to explore whether light removal could also benefit from this
change.
2023-10-09 17:06:02 +01:00
Dylan K. Taylor
8f804f6f34
World: discard tiles on load if they aren't the correct type or no tile is expected
in many instances, remnants of improperly removed blocks from PM3 have been causing problems, such as flower pot tiles where there are no flower pots.

this change might break some plugins which are using tiles for custom purposes, but this is a misuse that was never supported properly in the first place.
2023-09-27 14:57:06 +01:00
Dylan K. Taylor
fe3e2cc90a
Merge branch 'stable' into minor-next 2023-09-20 19:14:34 +01:00