changelog: VanillaEffects -> VanillaEnchantments (#3884) [ci skip]

This commit is contained in:
Stephen B 2020-10-27 17:51:55 -04:00 committed by GitHub
parent 587a4c0095
commit ddc0f137e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -501,7 +501,7 @@ This version features substantial changes to the network system, improving coher
- It's planned to remove runtime NBT from items completely, but this currently presents unresolved backwards-compatibility problems.
#### Enchantment
- `VanillaEffects` class has been added. This exposes all vanilla enchantment types as static methods, replacing the old `Enchantment::get()` nastiness.
- `VanillaEnchantments` class has been added. This exposes all vanilla enchantment types as static methods, replacing the old `Enchantment::get()` nastiness.
- Example: `Enchantment::get(Enchantment::PROTECTION)` is replaced by `VanillaEnchantments::PROTECTION()`
- These methods also provide proper type information to static analysers instead of just generic `Enchantment`, making them easier to code with.
- The boundaries between MCPE enchantment IDs and PocketMine-MP internals are now more clear.