Commit Graph

14929 Commits

Author SHA1 Message Date
Dylan K. Taylor
42474c14aa World: reduce blockhash padding for Y axis to accommodate new height range 2022-04-15 19:47:25 +01:00
Dylan K. Taylor
63b2e7cc4f fix CS 2022-04-15 19:25:39 +01:00
Dylan K. Taylor
3edb735850 Regenerate PHPStan baseline 2022-04-15 19:12:08 +01:00
Dylan K. Taylor
eafbc3a468 Expand height range to include -64 to 320 2022-04-15 19:10:24 +01:00
Dylan K. Taylor
c1c3475e5a RuntimeBlockMapping: reuse the state ID for unknown blocks
this doesn't really provide any meaningful benefit, unless there are a very large number of unrecognized states
2022-04-15 19:06:56 +01:00
Dylan K. Taylor
ede9e78fbd ItemBlock: make final, and document its purpose more clearly 2022-03-29 12:49:49 +01:00
Dylan K. Taylor
4c433fd75b Remap invalid metadata values to zero
this is a bit less sophisticated than the way we do it with BlockFactory, but this shouldn't usually have any relevance anyway - it's only used for correcting bogus states.
2022-03-28 18:13:14 +01:00
Dylan K. Taylor
53c2c4939e Merge branch 'next-major' into modern-world-support 2022-03-28 17:23:13 +01:00
Dylan K. Taylor
7d1464f0a1 Merge branch 'stable' into next-minor 2022-03-28 17:18:54 +01:00
Dylan K. Taylor
8cc7fb9dd9 fix CS 2022-03-28 17:16:35 +01:00
Dylan K. Taylor
194cb1fb84 phpstan 1.5.1 2022-03-28 17:12:00 +01:00
Dylan K. Taylor
8ea106c091 4.2.6 is next 2022-03-28 16:35:10 +01:00
Dylan K. Taylor
a6cb3313b0 Release 4.2.5 4.2.5 2022-03-28 16:34:57 +01:00
Dylan K. Taylor
c6374b79b0 Improve crashdump ergonomics
hopefully this will result in less people making useless pastes that don't contain backtraces ...
2022-03-24 19:46:11 +00:00
Dylan K. Taylor
993adc8c82 LevelDB: remove deprecated constants
there's no point pretending we can maintain BC on this now
2022-03-24 12:59:45 +00:00
Dylan K. Taylor
9f4418e01d Wall: separate connection calculation into its own method
we'll need this once wall connections start actually being stored instead of just being recalculated on every read.
2022-03-24 12:52:51 +00:00
Dylan K. Taylor
8bf1fb7b1d Merge branch 'next-minor' into modern-world-support 2022-03-24 12:50:45 +00:00
Dylan K. Taylor
f25beab6cb Use constants for compound meta values 2022-03-23 15:58:27 +00:00
Dylan K. Taylor
3c5300556a Fixed tests 2022-03-23 15:27:57 +00:00
Dylan K. Taylor
334c9daa6a BlockFactory: change property cache arrays to use regular arrays instead of SplFixedArray
this does come at a performance cost, but is necessary for metadata expansion.

we finally concede that this is not going to happen without BC breaks, however small they might be ...
2022-03-23 15:22:57 +00:00
Dylan K. Taylor
b52bb5016c BlockIdentifier: enforce that ID and variant must be non-negative 2022-03-23 14:39:02 +00:00
Dylan K. Taylor
310104f786 BlockFactory: change fullList to non-fixed array
when we expand the metadata range, having a fixed array here will present some problems due to significantly increased memory footprint (2x for every bit added).
2022-03-23 14:34:15 +00:00
Dylan K. Taylor
901449b0b1 Player: simplify PlayerItemHeldEvent calling on content change
the second parameter to this callback is the OLD slots, not the changed slots. This means that ALL slots are included, including empty and unchanged slots.
2022-03-23 13:47:01 +00:00
Dylan K. Taylor
ed95679953 Merge branch 'next-minor' into modern-world-support 2022-03-23 13:42:46 +00:00
Dylan K. Taylor
a9f2766a8b Merge branch 'stable' into next-minor 2022-03-23 13:39:41 +00:00
Dylan K. Taylor
4e777572c9 fix CS 2022-03-23 13:28:21 +00:00
Dylan K. Taylor
90a8595a40 Check for mismatched inventory slot predictions in transactions
this should limit the problems caused by mismatched gameplay features that result in ghost items, such as #4896.
2022-03-22 17:42:19 +00:00
Dylan K. Taylor
bf71eb448a Reduce chaos in inventory classes 2022-03-22 17:19:55 +00:00
Dylan K. Taylor
2c29d272ad BaseInventory: move setMaxStackSize() to a more sensible place 2022-03-22 17:11:48 +00:00
Dylan K. Taylor
98aa2b9ff9 Inventory: move removeItem() next to remove()
this should hopefully be more attention grabbing and a bit less misleading, since people will wonder why there are 'remove' and 'removeItem' both.

we really need to rename one of these...
2022-03-22 17:08:30 +00:00
Dylan K. Taylor
ea33a04d00 Player: ensure that PlayerItemHeldEvent is called when the contents of the held slot changes
in PM3, this was done by implicitly relying on the client to send a MobEquipmentPacket selecting the same hotbar slot when the slot contents changes.
In PM4, we avoid relying on this, and fire the event directly when the listener detects a held slot change.
This ensures that the behaviour remains consistent regardless of what the client starts doing in the future.

closes #4905
2022-03-22 16:53:02 +00:00
Dylan K. Taylor
9963fcf849 PluginManager: return the created RegisteredListener from registerEvent()
this allows the handler to be later unregistered when used with a plain closure instead of a magic `Listener`.
2022-03-22 16:20:37 +00:00
Dylan K. Taylor
ab93135b84 Merge branch 'stable' into next-minor 2022-03-22 15:49:58 +00:00
Dylan K. Taylor
4a94cb85a2 fix CS 2022-03-22 15:44:11 +00:00
Dylan K. Taylor
b7e6854189 RegistryTrait: enforce name validation rules on everything, not just enums
fixes #4916
2022-03-22 15:41:17 +00:00
Dylan K. Taylor
2b8a54f8ff Entity: added a guard to prevent __construct() from running multiple times
this typically happens due to flawed logic in child classes in plugins which causes parent::__construct() to get called multiple times.
2022-03-22 15:33:31 +00:00
dependabot[bot]
a5dab0f61e Bump build/php from b6bb711 to 1fae6b8 (#4918)
Bumps [build/php](https://github.com/pmmp/php-build-scripts) from `b6bb711` to `1fae6b8`.
- [Release notes](https://github.com/pmmp/php-build-scripts/releases)
- [Commits](b6bb7114b3...1fae6b8d4a)

---
updated-dependencies:
- dependency-name: build/php
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 21:05:13 +00:00
Dylan T
824f1f24ff Build release Docker images on GitHub Actions (#4891)
this has been tested on a fork using GitHub Container Registry, but we'll have to do an actual release to test if it will work with Docker Hub. However, I don't expect there to be any problems.

This is one of two remaining jobs to be migrated off Jenkins.
2022-03-20 01:03:27 +00:00
PJZ9n
f4f5c3128f EnumTrait: fixed regex not accepting member names with 1 character
this also fixes EnumTrait accepting invalid non-numeric characters for the first character, such as @.
2022-03-19 16:47:36 +00:00
Dylan K. Taylor
fdd42fd15f 4.2.5 is next 2022-03-18 20:20:47 +00:00
Dylan K. Taylor
05a5e5eac1 Release 4.2.4 4.2.4 2022-03-18 20:20:32 +00:00
Dylan K. Taylor
c8e1cfcbee TypeConverter: account for possible out-of-range meta in items 2022-03-18 19:34:51 +00:00
dependabot[bot]
869dda9a45 Bump phpunit/phpunit from 9.5.18 to 9.5.19 (#4900)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.18 to 9.5.19.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.18...9.5.19)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  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>
2022-03-15 19:39:49 +00:00
dependabot[bot]
e2c647ef91 Bump phpstan/phpstan from 1.4.9 to 1.4.10 (#4899)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.4.9 to 1.4.10.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.5.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.4.9...1.4.10)

---
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>
2022-03-15 12:04:50 +00:00
Dylan K. Taylor
05fdd94754 fix CS 2022-03-12 00:57:32 +00:00
dependabot[bot]
4a599b58ff Bump phpstan/phpstan from 1.4.8 to 1.4.9 (#4893)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.4.8 to 1.4.9.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.4.8...1.4.9)

---
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>
2022-03-10 20:18:53 +00:00
Dylan K. Taylor
05792826bc EntityFactory: use import aliases to improve readability slightly 2022-03-09 23:39:45 +00:00
Dylan K. Taylor
fbf7ad4295 4.2.4 is next 2022-03-09 22:52:42 +00:00
Dylan K. Taylor
6c1c0c867e Release 4.2.3 4.2.3 2022-03-09 22:52:38 +00:00
Dylan K. Taylor
5c0eb92d81 Entity: harden setRotation(), setMotion(), addMotion() and teleport() against NaN/INF values 2022-03-09 22:36:44 +00:00