Rework class pet parsing and handling.
This commit changes the pet parsing and handling such that it is a lot more dynamic. Rather than limiting pets to wolves and ocelots, any living entity is now a potential pet. This means that we can do away with the logic that specifically targets the Wolf and Ocelot interfaces and instead work with the more general Tameable interface. As a result, the discrepancies between Minecraft 1.13 and 1.14 in this regard are largely irrelevant, because server owners can just specify which entity they want to spawn given which item in their config-files. MonsterManager's two Wolf- and Ocelot-specific addPet() methods are replaced with a generic addPet() method that takes an owner (Player) and a pet (Entity). This is technically a breaking API change, but MonsterManager is an internal component that is very unlikely to be used outside of MobArena. The `global-settings` node in the config-file can no longer be forced into strict compliance via ConfigUtils, because the `pet-items` node is now dynamic rather than static. The default `pet-items` node in the config-file no longer has `ocelot` in there to avoid confusion on 1.14. It now only contains `wolf` and people will have to add their own ocelot/cat in if they haven't added it already. Fixes #563
This commit is contained in:
@@ -13,6 +13,7 @@ These changes will (most likely) be included in the next version.
|
||||
## [Unreleased]
|
||||
- Extended and upgraded potions are now supported in the item syntax by prepending `long_` or `strong_` to the data portion of a potion item (e.g. `potion:strong_instant_heal:1` will yield a Potion of Healing II). Check the wiki for details.
|
||||
- MobArena now has basic tab completion support for most of the commands that take arguments.
|
||||
- The `pet-items` node in `global-settings` now supports any living entity as a pet (but only tameable entities will _behave_ as pets). This should allow 1.14 servers to replace `ocelot` with `cat` in their `pet-items` node to get cat pets working again.
|
||||
- Tridents and crossbows are now considered weapons with regards to the `unbreakable-weapons` flag. All class items that have durability now have their unbreakable flag set to true unless the `unbreakable-weapons` and/or `unbreakable-armor` flags are set to `false`.
|
||||
- Leaderboards now work again on servers running Minecraft 1.14+.
|
||||
- Class chests (non-linked) now work again on servers running Minecraft 1.14+.
|
||||
|
||||
Reference in New Issue
Block a user