Commit Graph

245 Commits

Author SHA1 Message Date
cf7d42b3ea Fix CS according to new rules 2022-06-07 20:02:24 +01:00
1ff69136a3 Merge branch 'next-major' into modern-world-support 2022-06-07 20:01:40 +01:00
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
bd8dd48dee Assign new IDs to every block 2022-05-27 18:07:31 +01:00
a2ea0cea86 Update unit tests 2022-05-24 14:47:46 +01:00
68491be847 Merge branch 'next-major' into modern-world-support 2022-05-20 11:21:35 +01:00
1e59679ec2 Implemented Stonecutter (#4732) 2022-05-17 16:01:03 +01:00
2f2ffe0aa4 fix phpstan 2022-05-13 21:03:49 +01:00
643556a366 Broaden scope of testing for item serializer/deserializer
this change will cause failing tests; it has found a problem with coral fans of which I was previously unaware
2022-05-13 13:35:58 +01:00
d922f003f6 Fixed consistency check 2022-05-12 20:39:03 +01:00
d17032dd8c Test all known blockstates, not just the ones found in VanillaBlocks
VanillaBlocks isn't guaranteed to be a complete record. For example, I've considered moving chemistry blocks to a separate EducationBlocks registry.
In such a case, the blocks are still expected to serialize correctly, but they won't be in VanillaBlocks.
2022-05-12 16:45:44 +01:00
7769857f6a Added unit test to verify all VanillaBlocks serialize and deserialize correctly 2022-05-12 16:34:24 +01:00
cb97f37d13 First look at modern-spec serializer/deserializer for items
this is not yet used by anything
2022-05-12 16:26:38 +01:00
60d3bddfbc Merge branch 'next-major' into modern-world-support 2022-05-11 13:14:42 +01:00
b875b68fc7 Fix PHPStan error in CommandStringHelperTest 2022-05-10 15:24:14 +01:00
eda4ae9181 Added unit tests for CommandStringHelper 2022-05-10 15:11:29 +01:00
3c5300556a Fixed tests 2022-03-23 15:27:57 +00:00
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
905eee3198 BlockStateUpgrader: do not apply backwards-incompatible schemas to blockstates already on the correct version
this notably led to corruption of glow_lichen and sculk_vein in 1.18.10.
2022-02-10 20:51:31 +00:00
c2d3b23449 fixed BlockFactory consistency test - remapped states are no longer returned by getAllKnownStates() 2022-02-07 18:04:02 +00:00
7a0f62ce5a Merge branch 'next-minor' into modern-world-support 2022-02-07 17:23:19 +00:00
e9dd9df0a0 Merge remote-tracking branch 'origin/stable' into staging/4.1 2022-02-07 17:22:18 +00:00
032b15efe0 fix BlockFactory consistency check 2022-02-07 15:49:32 +00:00
e58b3ba46c First look at loading 1.13+ worlds 2022-02-07 03:06:59 +00:00
0cc997f531 Checking in BlockStateUpgrader and a bunch of unit tests 2022-02-04 00:16:48 +00:00
40e46dbca2 Fixed tests 2022-02-01 04:08:28 +00:00
82f1c2766c Merge branch 'stable' into next-minor 2022-01-22 01:00:40 +00:00
94c4f58667 Fixed bogus test 2022-01-21 19:13:36 +00:00
6846f1e78a Replace disallowed operators in tests/ 2022-01-20 16:48:36 +00:00
42d07c74d7 added missing redstone power flag logic 2022-01-15 22:19:47 +00:00
1366c49f1f Implemented Lectern (#4708)
Co-authored-by: Covered123 <58715544+JavierLeon9966@users.noreply.github.com>
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2022-01-15 21:21:29 +00:00
661848c5e7 fix more EOF newlines 2022-01-07 20:39:43 +00:00
75fc7a2d1f Merge branch 'stable' into next-minor 2022-01-07 20:16:35 +00:00
6d249026cc Merge branch 'legacy/pm3' into stable 2022-01-07 20:15:15 +00:00
60938c8c9d Random: fixed nextSignedInt() not actually returning signed ints
closes #4646
closes #4645

Impact assessment by core usage search and poggit suggests that the impact of this change will be close to zero.
However, since it changes behaviour which plugins might be unknowingly relying on, it's going into 4.1 rather than a patch release.
2021-12-15 00:59:10 +00:00
8b73549355 Use JSON_THROW_ON_ERROR for json_encode() and json_decode() 2021-12-08 19:14:07 +00:00
0c012ca5d9 Replace usages of ItemFactory in tests with VanillaItems 2021-12-06 23:45:36 +00:00
52f0c4f3ed Removed dodgy test using invalid block metadata 2021-11-27 22:51:14 +00:00
e2815eed60 BlockFactory: remap a bunch more invalid states 2021-11-27 20:07:58 +00:00
1bc7869f6e Added remapping for almost 4000 invalid blockstates
when a block has sole ownership of an ID, the state bitmask can be ignored and we can just claim the whole metadata range for that single block.
This fixes a large number of issues with unknown blocks on older worlds where world editors did not remove the metadata, although update blocks will currently still appear on initial chunk send due to lack of AOT conversion (TODO).
2021-11-26 01:58:52 +00:00
b784a04e08 Utils: fixed parseDocComment() ignoring tags containing hyphens 2021-11-24 16:38:37 +00:00
1d99cd329a CS again 2021-10-26 00:50:43 +01:00
bd8cba1a7f Added unit tests for Utils::testValidInstance() 2021-10-26 00:49:41 +01:00
baba25953f Chunk: make all parameters of __construct() mandatory and non-nullable
having the constructor fill in defaults for these invariably causes bugs.
2021-10-25 20:22:50 +01:00
49c1e4c06e Implement fletching table (#4501) 2021-10-12 21:21:05 +01:00
62f11360ee Added unit tests for getAddableItemQuantity() 2021-10-11 21:52:27 +01:00
dd4abe7f7a Updated test 2021-09-07 12:27:24 +01:00
df3b112877 Implemented slime blocks 2021-09-05 20:46:59 +01:00
aa5a9f6d12 Enchantment: use Translatable instead of hardcoded translation keys 2021-09-03 20:52:05 +01:00
27e0ecf7ee Implemented Blast Furnace and Smoker (#4362) 2021-08-12 23:27:05 +01:00