1149 Commits

Author SHA1 Message Date
Dylan K. Taylor
2eb05a2420
Updated block factory consistency check 2021-04-27 21:00:22 +01:00
Dylan T
127b57048c
Allow plugins to use PSR-4 namespace mapping (#4188)
* Allow plugins to use PSR-4 namespace mapping
this is a reduced implementation which serves the 99% use case without being horribly breakable.

Plugins may now specify a `src-namespace-prefix`, which should be set to the namespace of the classes in `src`.
If the old system is used, `src-namespace-prefix` can be omitted, or set to an empty string.

Examples:
- If `src-namespace-prefix` is `dktapps\test`, `dktapps\test\Main` will be searched for in `src/Main.php`, instead of `src/dktapps/test/Main.php`.

* Migrate TesterPlugin to PSR-4
2021-04-23 19:34:46 +01:00
Dylan K. Taylor
4e0bc6c98e
Scrub PHPStan baselines 2021-04-19 16:18:22 +01:00
Dylan K. Taylor
73f913e279
Modernize TesterPlugin 2021-04-19 14:16:05 +01:00
Covered123
9c1b4fd1cd
Added CancelTaskException (#4186) 2021-04-19 13:41:51 +01:00
Dylan K. Taylor
5872b2fe23
Merge remote-tracking branch 'origin/stable' 2021-04-19 13:32:15 +01:00
Dylan K. Taylor
09a2402f01
Fixed precondition on double chunk send being useless
this is messy, but necessary for now.
2021-04-19 00:50:43 +01:00
Dylan K. Taylor
d19c21e2e1
Updated PHPStan baseline 2021-04-19 00:38:27 +01:00
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
53ebe4f9f9
World: added getHighestAdjacentFullLightAt() 2021-04-18 20:20:08 +01:00
Dylan K. Taylor
a32eb4ebc3
Implemented coral and coral fans
this implementation is very rough due to having to hack around lots more MCPE bullshit, and currently doesn't allow dynamic coral types; but it's there. We'll clean this up after 1.13 migration is done.
2021-04-17 02:04:10 +01:00
Dylan K. Taylor
9abdcd8ee5
shut 2021-04-16 21:45:22 +01:00
Dylan K. Taylor
01c3668375
ItemFactory: Check the bounds of durability, instead of trying to catch exceptions 2021-04-16 21:30:48 +01:00
Dylan K. Taylor
81ced66bd0
BlockIdentifier: variant parameter of constructor is now mandatory 2021-04-16 20:14:29 +01:00
Dylan K. Taylor
5d83f4670a
RegionLoader: Switch to using named constructors
this makes the code more self-descriptive, and also helps to detect potential bugs.
2021-04-15 21:57:23 +01:00
Dylan K. Taylor
32c4a165cf
Removed RegionLoader::open()
this is nothing but a source of bugs.
2021-04-15 15:38:18 +01:00
Dylan K. Taylor
0312b62c8a
DataPacket no longer keeps its own serializer
since a while ago, we're anyway just discarding the internal buffer anyway when the packet is repeatedly encoded, so this doesn't serve any advantage anymore.
We do need a system to be able to reuse encoded packet buffers, but right now we're not reusing them anyway.
2021-04-09 15:37:58 +01:00
Dylan K. Taylor
7aa336f5e4
Remove dead baseline 2021-04-07 19:44:00 +01:00
Dylan K. Taylor
7578bca006
Merge tag '3.18.2' 2021-04-07 19:41:57 +01:00
Dylan K. Taylor
e22b6ff566
Revert "Revert "Backport InventoryTransactionPacket impl from PM4""
This reverts commit c7cdaeae8569c766df7db9f889c67f4e65a38d15.
2021-04-07 18:42:07 +01:00
Dylan K. Taylor
21378b7f27
Regenerate PHPStan baselines
this should be the last time we get baselines randomly rearranging themselves on changes ...
2021-04-03 22:36:15 +01:00
Ali
3b3fb5e662
fix ItemFrames (#4101)
removing items from item frames was broken due to behavioural changes in 1.16.210.
2021-03-28 18:53:46 +01:00
Dylan K. Taylor
06f20234f7
Scrub unused imports 2021-03-26 22:56:09 +00:00
Dylan K. Taylor
0d775f8731
Require ext-chunkutils2 at ^0.2.0 2021-03-23 22:23:17 +00:00
Dylan K. Taylor
9ee80357b0
phpstan baselines cleanup 2021-03-23 15:24:20 +00:00
Dylan K. Taylor
ad048f0b7f
Merge remote-tracking branch 'origin/stable' 2021-03-23 15:17:10 +00:00
Dylan K. Taylor
c7cdaeae85
Revert "Backport InventoryTransactionPacket impl from PM4"
This reverts commit cb06be615aa3780d4c83a947520fa55c0d908618.

we can't push this to stable because it would break plugins without any
way to know (no protocol or API change).

At most, this should have been wrapped into a protocol change.
2021-03-22 21:21:11 +00:00
Dylan K. Taylor
cb06be615a
Backport InventoryTransactionPacket impl from PM4
this version is far better, and we're going to need it to deal with the PlayerAuthInputPacket bullshit.
2021-03-19 22:16:30 +00:00
Dylan K. Taylor
0d3c11699c
Clean up PHPStan baselines 2021-03-19 22:14:07 +00:00
Dylan K. Taylor
b3c6c11b20
BulkCurlTask now accepts a closure callback for onCompletion
this requires much less boilerplate code than an anonymous class.
2021-03-16 23:56:14 +00:00
Dylan K. Taylor
6d622c4020
Merge branch 'stable' 2021-03-14 23:32:09 +00:00
Yosshi999
cbc8576d4a
Implement UPnP support without dotNET (#3378)
UPnP forwarding is now available on all supported platforms.
com_dotnet is no longer required for UPnP forwarding to work.

Closes #3216 .
2021-03-14 22:50:33 +00:00
Dylan K. Taylor
19bb8a00df
Updated PHPStan baselines 2021-03-12 22:05:15 +00:00
Dylan K. Taylor
c1e5dd2a4e
Merge branch 'stable' 2021-03-07 20:15:11 +00:00
Dylan K. Taylor
fac2bd3379
Liquid: mark getSmallestFlowDecay() as impure
this fixes two bogus PHPStan warnings.
2021-02-25 22:41:07 +00:00
Dylan K. Taylor
dff13a884f
Merge branch 'stable' 2021-02-12 17:34:25 +00:00
Dylan K. Taylor
094102fe92
fopen() might return FALSE if permission was denied to read/write the file 2021-02-12 16:16:36 +00:00
Dylan K. Taylor
9a1cef0d4f
Merge branch 'stable' 2021-02-11 22:35:33 +00:00
Dylan K. Taylor
f72163c173
Fixed build not failing when PHP build gets borked 2021-02-11 17:06:03 +00:00
Dylan K. Taylor
fd5141745d
Use a valid commit hash for pmmp/leveldb
the previous one pointed to the main repository, and not the pmmp fork. (Why am I maintaining a fork again? ...)
2021-02-11 17:01:10 +00:00
Dylan K. Taylor
de0766dbef
actions: update PM4-specific extensions to PHP 8.0 compatible versions 2021-02-11 16:48:10 +00:00
Dylan K. Taylor
7573a01b17
Merge branch 'stable' 2021-02-11 16:42:23 +00:00
Dylan K. Taylor
0e396dc47d
actions: update PHP extension versions 2021-02-11 16:24:09 +00:00
Dylan K. Taylor
298034549e
actions: drop ext-ds from PHP build 2021-02-11 15:56:19 +00:00
Dylan K. Taylor
c61f66d973
Removed ext-ds dependency 2021-02-11 15:40:37 +00:00
Dylan K. Taylor
e80c1a0ce9
Split Mushroom Stem away from other mushroom variants
mushroom stem (and all-sided stem) are unique blocks, which don't drop anything and which don't stack with other shroom variants when block-picked.
They also get mapped to the same block when placed, and there's no distinction between red mushroom stem and brown mushroom stem.
2021-02-07 22:02:50 +00:00
Dylan K. Taylor
8d5cc9adc3
Merge branch 'stable' 2021-02-07 20:57:19 +00:00
Dylan K. Taylor
fd2ebd84b4
Recognize underwater TNT 2021-02-06 23:37:05 +00: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
169650dc5b
MainLogger: accept timezone as a constructor parameter
this makes it easier to unit-test, as well as making it independent of Timezone.
2021-02-04 21:50:06 +00:00