17846 Commits

Author SHA1 Message Date
Dylan K. Taylor
1da7e3586b
Updated composer dependencies 2023-10-16 20:45:44 +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
7d200247f8
Cactus: do not update if only age changed
I'd prefer a smarter solution for this that automatically disables updates depending on which type of property was changed, but for now, this will significantly improve the performance of cactus farms.
The newly placed cactus block at the top cannot have updates disabled, though, since it needs to check its surroundings in case it grew into a space with a solid block next to it.

Thanks @KingOfTurkey38 for bringing this to light.
2023-10-13 12:45:11 +01:00
ace
8b52a5cd9e
Fix book placed in wrong slot in Chiseled Bookshelf (#6085) 2023-10-10 12:35:50 +01:00
ace
c9163a1505
ChiseledBookshelf: Fix duplication bug (#6086)
Also fixes being able to put more than 1 book in the slot
2023-10-10 10:59:39 +01:00
Dylan K. Taylor
2d697c5f04
A random change that Composer 2.6 wanted to make 2023-10-09 18:27:20 +01:00
Dylan K. Taylor
364f408eb1
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable 2023-10-09 18:22:54 +01:00
Dylan K. Taylor
660e2b8173
Update build/php to pmmp/php-build-scripts@a34e48e7da 2023-10-09 18:22:28 +01:00
dependabot[bot]
9facb98327
Bump phpunit/phpunit from 10.3.5 to 10.4.1 (#6082)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.3.5 to 10.4.1.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.4.1/ChangeLog-10.4.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.3.5...10.4.1)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 17:16:15 +01:00
dependabot[bot]
7e42a03db3
Bump phpstan/phpstan from 1.10.37 to 1.10.38 (#6081)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.37 to 1.10.38.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.37...1.10.38)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 17:15:50 +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
Doge
94a17f59d2
fix(Entity): broadcastSound() not firing WorldSoundEvent (#6069) 2023-10-08 19:25:19 +01:00
dependabot[bot]
ed4088755f
Bump phpstan/phpstan from 1.10.35 to 1.10.37 (#6073)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.35 to 1.10.37.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.35...1.10.37)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-05 22:23:13 +01:00
Dylan K. Taylor
006f78c0a7
Updated block consistency check 2023-09-29 12:57:39 +01:00
Dylan K. Taylor
55cc5a6651
NetherVines: optimize condition order 2023-09-29 12:45:55 +01:00
Dylan K. Taylor
390cc3060a
Disable random ticking for some blocks depending on their states
we don't need to waste CPU time attempting to tick fully grown crops.
2023-09-29 12:45:37 +01:00
Dylan K. Taylor
ca69f08da0
ChorusFlower: move ticksRandomly() to a more appropriate place 2023-09-29 12:44:27 +01:00
Dylan K. Taylor
eac0564792
Fix CS 2023-09-29 12:31:11 +01:00
Dylan K. Taylor
628d77f8d7
Implemented pitcher plants, crops and pods 2023-09-29 12:30:52 +01:00
Dylan K. Taylor
fe543a4789
AgeableTrait: fixed incorrect number of bits
the original method breaks if MAX_AGE is 0 or any power of 2.
2023-09-29 12:05:39 +01:00
Dylan K. Taylor
31cd096b4b
Implement torchflower, its seeds and its crop 2023-09-28 17:13:33 +01:00
Dylan K. Taylor
78cc5ba635
CS again 2023-09-28 16:06:38 +01:00
Dylan K. Taylor
4b9d170954
RuntimeDataDescriber: added dynamic method for reading and writing enum sets
this was previously only needed for brewing stands, but it's now become needed for chiselled bookshelves too.
2023-09-28 16:06:17 +01:00
HimmelKreis4865
d94391af57
Implement Chiseled Bookshelf (#5827) 2023-09-28 15:56:46 +01:00
Dylan K. Taylor
ff89d4d055
Updated composer dependencies 2023-09-28 14:55:55 +01:00
Dylan K. Taylor
a6b030f2b3
Fix CSÂ 2023-09-27 17:07:02 +01:00
Dylan K. Taylor
56d7039086
Implemented budding amethyst and amethyst clusters 2023-09-27 17:02:37 +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
4f13e446a1
StringToItemParser: clean up hardcoded potion aliases
these were needed in PM4, but the type is dynamic in PM5.
2023-09-27 13:18:02 +01:00
Dylan K. Taylor
6ec340359b
Implemented crimson and warped roots 2023-09-27 13:07:46 +01:00
Dylan K. Taylor
c3bca9e172
tools/generate-bedrock-data-from-packets: fixed interpreting item metadata as blockstates when the item ID could be interpreted as a block ID
this broke crafting recipes which accepted skulls as inputs, as well as nether wart and bed recipes.
2023-09-27 12:37:26 +01:00
dependabot[bot]
c028bb9055
Bump docker/setup-buildx-action from 2 to 3 (#6049)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 14:50:57 +01:00
dependabot[bot]
f151047b5e
Bump docker/login-action from 2 to 3 (#6050)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 14:50:40 +01:00
dependabot[bot]
77566db766
Bump docker/build-push-action from 4.1.1 to 5.0.0 (#6051)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 5.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 14:50:17 +01:00
dependabot[bot]
dd2e6ea33f
Bump shivammathur/setup-php from 2.25.5 to 2.26.0 (#6055)
Bumps [shivammathur/setup-php](https://github.com/shivammathur/setup-php) from 2.25.5 to 2.26.0.
- [Release notes](https://github.com/shivammathur/setup-php/releases)
- [Commits](https://github.com/shivammathur/setup-php/compare/2.25.5...2.26.0)

---
updated-dependencies:
- dependency-name: shivammathur/setup-php
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 14:49:38 +01:00
Tobias Grether
ee6d551729
Include TitleID in PlayerInfo extraData (#6054) 2023-09-21 14:48:50 +01:00
Dylan K. Taylor
04b815a87a
Merge branch 'stable' into minor-next 2023-09-21 13:27:11 +01:00
Dylan K. Taylor
d138a15a32
Merge branch 'legacy/pm4' into stable 2023-09-21 13:27:04 +01:00
Dylan K. Taylor
7a2cfa92b6
Update composer dependencies 2023-09-21 13:23:09 +01:00
Dylan K. Taylor
912fd3f5c6
PHPStan 1.10.35, plus workarounds 2023-09-21 13:22:14 +01:00
Dylan K. Taylor
3906600d44
Fix CS 2023-09-20 19:44:53 +01:00
Dylan K. Taylor
3f7abf29a8
Added PHPStan rule to flag usages of legacy enum accessors provided by LegacyEnumShimTrait
closes #6061
2023-09-20 19:42:21 +01:00
Dylan K. Taylor
fe3e2cc90a
Merge branch 'stable' into minor-next 2023-09-20 19:14:34 +01:00
Dylan K. Taylor
5eca90d478
5.6.1 is next 2023-09-20 19:00:51 +01:00
Dylan K. Taylor
338bb3fe6d
Release 5.6.0 5.6.0 2023-09-20 19:00:51 +01:00
Dylan K. Taylor
f485f7fb46
Updated composer dependencies 2023-09-20 18:57:36 +01:00
Dylan K. Taylor
63eba3eb53
Merge branch 'legacy/pm4' into stable 2023-09-20 18:40:58 +01:00
Dylan K. Taylor
914eb62e94
4.24.1 is next 2023-09-20 18:40:07 +01:00
Dylan K. Taylor
a85814d0c9
Release 4.24.0 4.24.0 2023-09-20 18:40:07 +01:00