14792 Commits

Author SHA1 Message Date
Dylan K. Taylor
093b1e1b18
Merge branch 'stable' into minor-next 2023-09-08 12:48:40 +01:00
Dylan K. Taylor
d7f69c5e24
CaveVines: fixed incorrect support condition 2023-09-08 12:47:46 +01:00
ShockedPlot7560
d60fca0a1c
Age blocks logic moved into dedicated trait (#5962) 2023-09-08 12:25:26 +01:00
Dylan K. Taylor
0e87ee1e0e
ÂHangingRoots: fixed incorrect support face 2023-09-08 12:22:00 +01:00
Dylan K. Taylor
03ecc98a24
HangingRoots: fixed support conditions 2023-09-08 12:16:45 +01:00
Dylan K. Taylor
a5aeabd836
RegistryTrait: fixed mishandling of self::$members
Since PHPStan doesn't warn about potential nulls on untyped properties, this flew under the radar.
2023-09-08 12:16:16 +01:00
Dylan K. Taylor
d3ab516ba4
CS 2023-09-08 11:26:58 +01:00
Dylan K. Taylor
aa916b2c49
WoodLikeBlockIdHelper: reduce obnoxious code 2023-09-08 11:17:47 +01:00
Dylan K. Taylor
7ce33d9375
Migrate final remaining EnumTrait users to native enums 2023-09-08 10:34:12 +01:00
Dylan K. Taylor
14f2368454
ToolTier: remove legacy EnumTrait annotations and doc comment info 2023-09-08 10:02:50 +01:00
Dylan T
7dcd2592d4
RuntimeDataDescriber: Support dynamically describing arbitrary enums (#6039)
Previously, we were using codegen to support describing a fixed set of enums.

Instead, we implement an enum() function, allowing any native PHP enum to be described.
All enums used in runtime data have been migrated to native PHP 8.1 enums in minor-next to facilitate this.

This implementation:

- is faster (in extreme cases by 40x, such as with PotionType)
- requires way less code
- does not require a build step
- is way more flexible

This fixes #5877, increasing the range of stuff that plugins are now able to do.

EnumTrait enums are not supported, as it's easier and cleaner to just support native enums. Most core EnumTrait enums have been migrated to native enums by now to facilitate this.
2023-09-07 20:07:14 +01:00
Dylan K. Taylor
6887fcd590
RuntimeEnum(De)SerializerTrait no longer uses legacy accessors for enum members 2023-09-07 19:40:14 +01:00
Dylan K. Taylor
c168818311
missed one 2023-09-07 19:39:13 +01:00
Dylan K. Taylor
b50efbc15a
Fix CS 2023-09-07 19:38:29 +01:00
Dylan K. Taylor
94d98fb5c4
Migrate all but two remaining legacy enums to native PHP 8.1 enums 2023-09-07 19:32:45 +01:00
Dylan K. Taylor
ae564e445d
Start migrating EnumTrait enums to PHP 8.1 native enums 2023-09-07 17:20:52 +01:00
Dylan K. Taylor
fe94379a93
Fixed connection requirements for fences, glass, bars and walls
these connect to the back faces of stairs and to glass, for example.
2023-09-06 12:56:47 +01:00
Dylan K. Taylor
79acc4fed4
5.5.1 is next 2023-09-06 12:13:26 +01:00
Dylan K. Taylor
c8d357f4eb
Release 5.5.0 2023-09-06 12:13:26 +01:00
Dylan K. Taylor
ec1cd5967d
Added private constructors for new internal classes 2023-09-06 12:12:11 +01:00
Dylan K. Taylor
5a010e8213
Merge branch 'minor-next' into stable 2023-09-06 12:06:15 +01:00
Dylan K. Taylor
73a44d50ee
5.4.5 is next 2023-09-06 11:53:04 +01:00
Dylan K. Taylor
6aab07debd
Release 5.4.4 2023-09-06 11:53:01 +01:00
Dylan K. Taylor
b160b87e24
Server: stop discriminating against crashes caused by folder plugins
these are the de facto standard, which means that a lot of crashes aren't getting reported from servers with folder plugins.
2023-09-06 11:34:03 +01:00
Dylan K. Taylor
690ee4c574
CrashDump: fixed empty elements in lastError trace
as shown by #6010
2023-09-06 11:24:08 +01:00
Dylan K. Taylor
857c2edc2c
Server: update obsoletion notice with new announcement and cutoff date 2023-09-06 10:58:41 +01:00
Jonathan B
ce04478395
Fix SmithingTableInventory size (#6035)
Since 1.20 SmithingTable has a new Template slot, size is now 3

Fix debug error from InventoryManager
2023-09-06 08:15:27 +01:00
ねらひかだ
19e3d339f6
InGamePacketHandler: subtract from raw position before rounding it (#6022)
This allows better compensation for floating point errors introduced by the subtraction of the 1.62 height offset.

For example, if the player is at y=7 exactly, their Y coordinate will be reported as 8.62, which, because of floating point errors, will be something like `8.619999999`. Subtracting `1.62` from this (really something like `1.62000000000005...`) leads to the calculated Y coordinate being slightly below 7.

Rounding after subtracting this offset allows this to be rounded to 7 sharp. Similar errors appear in various other coordinates.
2023-08-29 11:43:21 +01:00
Dylan K. Taylor
9fdb6ba5aa
Mark some new things as internal 2023-08-25 14:02:49 +01:00
Dylan K. Taylor
31d8cc1cb5
Generate and use constants for pocketmine.yml constant names
a couple of usages of properties that no longer exist couldn't be migrated.
in addition, this revealed a couple of dead properties in the default file.

this is not an ideal solution (I'd much rather model the configs using classes and map them) but in the absence of a good and reliable library to do that, this is the next best thing.
2023-08-25 13:23:38 +01:00
Dylan K. Taylor
506d8d1064
CS 2023-08-25 12:49:56 +01:00
Dylan K. Taylor
d1a7c1d453
Constify server.properties references 2023-08-25 12:49:39 +01:00
Dylan K. Taylor
b56f1b679e
Deduplicate a bunch of repeated type ID map code 2023-08-25 12:30:54 +01:00
Dylan K. Taylor
ce53a221a5
5.5.0-BETA2 is next 2023-08-23 17:09:34 +01:00
Dylan K. Taylor
c8100480ac
Release 5.5.0-BETA1 2023-08-23 17:09:34 +01:00
Dylan K. Taylor
8814d06dfd
Fix CS 2023-08-23 17:00:18 +01:00
Dylan K. Taylor
923f7561fb
Enchantment: added @see tags to @deprecated methods 2023-08-23 16:53:09 +01:00
Dylan K. Taylor
f4e1c31dcf
Change some weird constant names 2023-08-23 16:52:47 +01:00
Dylan K. Taylor
998fcf20db
Remove useless Cancellable from PressurePlateUpdateEvent 2023-08-23 16:52:22 +01:00
Dylan K. Taylor
1504fdca24
Use 'enchanting' terminology
'enchant' just didn't feel right, being a verb.
All these things pertain to the act of enchanting.

This is now also consistent with CraftingTransaction etc. The ship already sailed on EnchantInventory, which will have to be renamed at a later datte. However, that was already inconsistent with 'enchanting table', so that's the odd one out here.
2023-08-23 16:14:17 +01:00
Dylan K. Taylor
bf668c0f6c
Rename EnchantHelper related stuff
Perhaps this and EnchantOption should be called EnchantingHelper and EnchantingOption respectively. The terminology used is rather inconsistent, but 'enchantment' definitely isn't the right word here.
2023-08-23 16:07:02 +01:00
Dylan K. Taylor
d942748203
Move enchanting seed generation to EnchantmentHelper 2023-08-23 15:52:49 +01:00
Dylan K. Taylor
29fdc8b08d
Private constructor for EnchantmentHelper 2023-08-23 15:49:31 +01:00
Dylan K. Taylor
20a41b00ba
StringToTParser: added registerAlias() 2023-08-23 15:24:29 +01:00
Dylan K. Taylor
f4d5605de1
Use hasHandlers() on more warm-hot events 2023-08-23 14:35:53 +01:00
Dylan K. Taylor
d03e4d17ec
Use hasHandlers() for events in player movement processing pathway
this should offer a minor performance improvement.
2023-08-23 14:26:17 +01:00
Dylan K. Taylor
4cc858829f
5.4.4 is next 2023-08-21 18:31:45 +01:00
Dylan K. Taylor
e852a43821
Release 5.4.3 2023-08-21 18:31:45 +01:00
Dylan K. Taylor
7aaef8cb89
4.23.7 is next 2023-08-21 18:26:50 +01:00
Dylan K. Taylor
9d4c37fc3a
Release 4.23.6 2023-08-21 18:26:47 +01:00