14657 Commits

Author SHA1 Message Date
Dylan K. Taylor
18ca3a37d9
CrashDump: fixed crashdump generation failure on fatal error
closes #6007
2023-08-21 14:51:54 +01:00
Dylan K. Taylor
5c915a3dfe
Merge branch 'minor-next' into major-next 2023-08-18 12:33:54 +01:00
Dylan K. Taylor
b2414b4c29
EnchantTransaction: cleanup XP cost checking logic 2023-08-18 12:33:07 +01:00
Dylan K. Taylor
b3c740081e
Merge branch 'stable' into minor-next 2023-08-18 12:28:45 +01:00
Dylan K. Taylor
4b41fca991
Merge branch 'legacy/pm4' into stable 2023-08-18 12:28:29 +01:00
Dylan K. Taylor
9f09acc079
Workaround for slot IDs not changing client side when old item == new item
this is a really dumb bug and seems similar to the armor bug I fixed a while ago.

fixes #5987

it's unlikely that #5727 will be solved by this, but one can hope...
2023-08-18 12:27:27 +01:00
Dylan K. Taylor
beaca8bb6d
EnchantTransaction: fixed XP level costs when minimum level is less than the XP cost
this can happen and happens in vanilla too. In these cases, as much of the XP cost as possible is deducted.
2023-08-16 14:51:47 +01:00
Dylan T
e323c5dd76
Implement pressure plate activation logic and events (#5991)
closes #5936

This implements all of the basic activation logic for pressure plates.
It also introduces a PressurePlateUpdateEvent, which is called in pulses when entities are standing on top of the plate and when it deactivates. Deactivation can be detected by checking if the list of activating entities is empty.

---------

Co-authored-by: Javier León <58715544+JavierLeon9966@users.noreply.github.com>
2023-08-16 13:00:23 +01:00
Dylan K. Taylor
f516c3c502
EnchantCommand: ensure that books are turned into enchanted book items 2023-08-15 19:10:48 +01:00
Dylan K. Taylor
5afbb9d807
Allow enchanted books to be enchanted
if an enchanted book is obtained via /give without enchantments, it should be able to receive enchantments in an enchanting table, exactly the same as regular books.
2023-08-15 19:10:03 +01:00
Dylan K. Taylor
8c594fd126
Merge branch 'minor-next' into major-next 2023-08-15 17:41:50 +01:00
Dylan K. Taylor
b330cbe8e2
Merge remote-tracking branch 'origin/stable' into minor-next 2023-08-15 17:41:41 +01:00
S3v3Nice
39867b97c5
Implement enchanting using enchanting tables (#5953)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2023-08-15 17:28:26 +01:00
ipad54
af9ae445fc
Fix cake drops (#5985)
closes #5984
2023-08-10 17:42:32 +01:00
Dylan K. Taylor
91d5a3ddfe
PotionCauldron: fixed setPotionItem() not validating the given item
we should probably remove this API and have enums for potion container and type tbh... this API was a mistake
2023-08-10 16:06:41 +01:00
Dylan K. Taylor
e48b5b2ec0
GeneratorManager: allow aliasing existing generators 2023-08-10 13:07:03 +01:00
Hugo_
f03e708f64
Fix chorus not working if the destination would be below y=0 (#5979) 2023-08-10 09:42:58 +01:00
Dylan K. Taylor
9fd6653f36
Remove deprecated APIs 2023-08-09 16:38:09 +01:00
Dylan K. Taylor
32d67080e5
Merge branch 'minor-next' into major-next 2023-08-09 16:35:32 +01:00
Dylan K. Taylor
37f2dafae1
PluginBase: make saveResource() use copy() instead of overengineered streams garbage 2023-08-09 16:16:11 +01:00
Dylan K. Taylor
7826e0a11e
Merge branch 'stable' into minor-next 2023-08-09 16:14:05 +01:00
Dylan T
97700636c6
PluginBase: added getResourceFolder() and getResourcePath(), deprecate getResource() (#5961)
This is a step towards #5958.

While it's not actually necessary to add these functions (since people could just use getFile() . "/resources/whatever.yml" instead), this helps preserve the convention of using the `resources` folder, which might be helpful for external tools.

As an example:
stream_get_contents($this->getResource("lang/eng.ini"));
(which is actually incorrect, since it leaks a resource)
can now be replaced by
file_get_contents($this->getResourcePath("lang/eng.ini"));
quite trivially.

getResourceFolder() can be used with scandir() to enumerate resources instead of using getResources(), although getResources() still provides utility in the relativized resource paths.
2023-08-09 16:09:16 +01:00
Dylan K. Taylor
447f061566
Use Event::hasHandlers() for a few more hot events 2023-08-09 15:46:20 +01:00
Dylan K. Taylor
e27121a437
5.4.3 is next 2023-08-09 14:04:57 +01:00
Dylan K. Taylor
2d5c9e64ce
Release 5.4.2 2023-08-09 14:04:57 +01:00
Dylan K. Taylor
78f5fbddf3
Merge branch 'legacy/pm4' into stable 2023-08-09 13:58:14 +01:00
Dylan K. Taylor
aa3f4f2545
4.23.6 is next 2023-08-09 13:56:19 +01:00
Dylan K. Taylor
f7279b6672
Release 4.23.5 2023-08-09 13:56:19 +01:00
Dylan K. Taylor
b4c5f5d58d
PluginBase: fixed resource leak
all this time we've been harping at plugin devs to fix their own leaks, and here's one right under our noses that no one spotted for 10 years ...

this leak is rather common, since it will occur whenever a plugin attempts to save a resource which already exists in the data folder.

This bug was introduced in 2014 by commit 63288346814b7b827f1f7cc7a16419af43bd0bfa.
2023-08-09 13:28:05 +01:00
Hugo_
a5d8ef7a6c
Add FarmlandHydrationChangeEvent (#5916) 2023-08-09 12:33:25 +01:00
Dylan K. Taylor
59c88fe7f7
Added WorldDifficultyChangeEvent 2023-08-09 12:22:03 +01:00
Dylan K. Taylor
735d9a5bf4
CandleTrait: allow candle to be lit by fire charges 2023-08-09 12:04:02 +01:00
Dylan K. Taylor
f4a06605b1
Cake: only accept candle when no slices have been taken
otherwise, cake slices can be regenerated using candle
2023-08-09 11:42:08 +01:00
ipad54
77dfbc4e23
Implemented pink petals (#5940) 2023-08-09 11:33:33 +01:00
Dylan K. Taylor
662f2495e9
5.4.2 is next 2023-08-08 18:41:09 +01:00
Dylan K. Taylor
b8a4ca45e4
Release 5.4.1 2023-08-08 18:41:06 +01:00
Dylan K. Taylor
ebcd6a0bb2
CraftItemEvent: fixed inputs and outputs not being cloned 2023-08-08 18:29:49 +01:00
Dylan K. Taylor
5ec0e0f20b
Merge branch 'minor-next' into major-next 2023-08-08 17:48:23 +01:00
Dylan K. Taylor
9f14901820
Merge branch 'stable' into minor-next 2023-08-08 17:48:12 +01:00
Dylan K. Taylor
9c1ab943bc
Bump ext-pmmpthread min version to 6.0.7 2023-08-08 17:43:31 +01:00
Dylan K. Taylor
c1638ffaab
Ban foreach by-reference at the PHPStan level 2023-08-08 17:08:13 +01:00
Dylan K. Taylor
710177ceb5
CS
this mistake actually hasn't happened for a while
2023-08-08 15:10:31 +01:00
Dylan K. Taylor
2559d1719f
All pocketmine\thread\Thread now log uncaught exceptions and fatal errors by default 2023-08-08 14:56:54 +01:00
Dylan K. Taylor
2e58387a43
Fixed thread error capture fail in shutdown function
the shutdown handler currently isn't called until join(), which sets isKilled to true and stops the error information from being recorded.
2023-08-08 14:55:53 +01:00
Dylan K. Taylor
515f8eae4c
ÂResourcePackManager: allow setting force_resources from a plugin 2023-08-07 17:05:45 +01:00
Dylan K. Taylor
cb251069dd
PluginLoader: rename parameters 2023-08-07 16:39:54 +01:00
Dylan K. Taylor
e0ad39b70a
Remove ResourceProvider cruft
this had no obvious reason for existing, and with #5958 looming, this will become altogether useless anyway.
2023-08-07 16:14:01 +01:00
ipad54
35a28300f6
Podzol should be affected by silk touch (#5969) 2023-08-07 11:47:29 +01:00
Dylan K. Taylor
1cf508abdb
World: use Facing::OFFSET in getHighestAdjacentLight() 2023-08-03 16:51:09 +01:00
Dylan K. Taylor
6ac45526f9
Use new features in pocketmine/math 1.0.0 2023-08-03 16:46:16 +01:00