34 Commits

Author SHA1 Message Date
TheNewHEROBRINEX
8d1a1628de
Item: Remove "ench" tag when all enchantments are removed from an item (#4184)
fixes #4144
2021-04-18 20:56:07 +01:00
Dylan K. Taylor
c5bdd7dd64
Added a unit test to ensure valid format of MINECRAFT_VERSION_NETWORK 2021-02-04 22:36:40 +00:00
Dylan K. Taylor
fe731b9018
Added failing test case for region header validation
fucking PHP... what genius thought it was a good idea to cache file stats without even an attempt at keeping the cache up to date on modifications?
2021-02-02 13:43:12 +00:00
Dylan K. Taylor
e2e960e43d tests: add missing function imports 2020-10-26 15:59:42 +00:00
Dylan K. Taylor
500fd2d842 tests: strip useless phpdoc 2020-10-26 15:59:17 +00:00
Dylan K. Taylor
81c1613e5d StupidJsonDecodeTest: added a callable prototype
for some reason this causes a new error to be reported which previously didn't show. I have no idea why.
2020-08-31 13:45:46 +01:00
Dylan K. Taylor
e05bee5ffb RegionLoader: do a full check for chunk overlaps during initial load 2020-06-14 22:39:01 +01:00
Dylan K. Taylor
717b866605 Merge branch 'stable' into next-minor 2020-05-06 20:25:11 +01:00
Dylan T
ef97c8f99e
Utils: fix parsing of single-line doc comments, closes #3388 (#3469)
* Utils: fix parsing of single-line doc comments, closes #3388

* correctly handle the empty doc-comment case, add another test case

* ignore an extra phpstan bug
2020-05-06 14:17:08 +01:00
Dylan K. Taylor
f8ce01e2fd ItemFactory: extract fromStringSingle() from fromString()
on PM4, the multiple functionality is removed, but on PM3 this is a problem for phpstan.
2020-03-13 17:54:25 +00:00
Dylan K. Taylor
7aa8bd18d3 Revert "Item: restrict bounds of count to 0-255"
This reverts commit 10317527e4012fb1dbb1661f2f7fc33b05a7a6d1.

this breaks user code which exceeds stack limits in legitimate
circumstances. For example, it should be OK to add 6000x diamond to a
player's inventory without being forced to manually split the count up
for addItem().
2020-02-25 20:42:03 +00:00
Dylan K. Taylor
04581e2700 DataPacket: account for splitscreen header when decoding 2020-02-24 21:20:25 +00:00
Dylan K. Taylor
10317527e4 Item: restrict bounds of count to 0-255 2020-02-23 17:23:53 +00:00
Dylan K. Taylor
a1622fa345 UtilsTest: silence a phpstan-strict-rules warning 2020-02-06 18:53:05 +00:00
Dylan K. Taylor
5ad66c3c9b BlockTest: throw exception instead of always-false assert 2020-02-06 13:21:39 +00:00
Dylan K. Taylor
532dc0fb6f tests/phpunit: populate iterable types for phpstan 2020-02-06 13:11:56 +00:00
Dylan K. Taylor
e12618c705 tests/phpunit: added missing native typehints 2020-02-06 12:13:42 +00:00
Dylan K. Taylor
8a6381c3fa StupidJsonDecodeTest: add some extra test vectors 2019-10-01 13:25:20 +01:00
Dylan K. Taylor
d0d61597c7 StupidJsonDecodeTest: use getClosure() instead of traditional mess
this is faster and requires less code.
2019-09-26 11:28:40 +01:00
Dylan T
d724374d1a
StupidJsonDecodeTest: add failing test case for #3113 2019-09-16 15:53:00 +01:00
Dylan K. Taylor
810bdeb965 Test one extra case for LevelProviderManager 2019-04-26 12:01:12 +01:00
Dylan K. Taylor
6f5d4d6b80 RegionLoader: fixed handling of invalid chunk coordinates 2019-03-05 10:52:36 +00:00
Dylan K. Taylor
df1ef7fe0c Improve RegionLoader tests 2019-03-05 10:51:44 +00:00
Dylan K. Taylor
a30b1fb6d5 Inventory: Add failing test case for itemstack NBT duplication 2019-03-03 11:11:33 +00:00
Dylan K. Taylor
c83b7d9b69 Utils: fixed getNiceClosureName() not processing namespaced closures properly 2019-01-26 12:08:07 +00:00
Dylan K. Taylor
beb5d72299 RegionLoader: fix off-by-one bug with large chunks, closes #2615 2018-12-29 00:02:54 +00:00
Dylan K. Taylor
2da2fdd6d4 Added a test for Item->equals() when both items have no NBT 2018-10-29 12:42:03 +00:00
Dylan K. Taylor
9d17c9a09d Merge branch 'release/3.1' into release/3.2 2018-08-19 11:22:58 +01:00
Dylan K. Taylor
3892f2f404 Config: Properly prevent keys getting transformed into bools
The original regex almost completely failed at its objective, because it a) only worked if there was no value for the key, and b) did not prevent all such occurrences getting transformed, while quoting patterns that would not get transformed anyway.
2018-08-19 11:22:36 +01:00
Dylan K. Taylor
bfa415e108 Add unit tests for json decoding hack 2018-08-19 10:30:52 +01:00
Dylan K. Taylor
6ab2fa84da added some tests for ItemFactory::fromString() 2018-07-17 14:52:47 +01:00
Dylan K. Taylor
40030e9800 added some LevelProviderManager tests 2018-07-17 12:02:08 +01:00
Dylan K. Taylor
b01b477a2a Properly fixed newline issues when parsing doc comments
fixes #2110 properly

fixed @notHandler and such not being detected when CRLF is used
2018-07-10 12:46:20 +01:00
Dylan K. Taylor
9d16863b1a Convert some TesterPlugin tests into PHPUnit tests, add PHPUnit configuration 2018-06-05 19:33:21 +01:00