Extract a HungerManager unit from Human

This commit is contained in:
Dylan K. Taylor
2019-07-06 18:50:34 +01:00
parent 119cb083bf
commit da0358529a
6 changed files with 300 additions and 201 deletions

View File

@ -150,6 +150,7 @@ This version features substantial changes to the network system, improving coher
- The following API methods have been added:
- `ItemEntity->getDespawnDelay()`
- `ItemEntity->setDespawnDelay()`
- `Human->getHungerManager()`
- The following methods have signature changes:
- `Entity->entityBaseTick()` is now `protected`.
- `Entity->move()` is now `protected`.
@ -157,6 +158,7 @@ This version features substantial changes to the network system, improving coher
- `Living->getEffects()` now returns `EffectManager` instead of `Effect[]`.
- The following classes have been added:
- `effect\EffectManager`: contains effect-management functionality extracted from `Living`
- `HungerManager`: contains hunger-management functionality extracted from `Human`
- The following API methods have been moved / renamed:
- `Living->removeAllEffects()` -> `EffectManager->clear()`
- `Living->removeEffect()` -> `EffectManager->remove()`
@ -165,6 +167,17 @@ This version features substantial changes to the network system, improving coher
- `Living->hasEffect()` -> `EffectManager->has()`
- `Living->hasEffects()` -> `EffectManager->hasEffects()`
- `Living->getEffects()` -> `EffectManager->all()`
- `Human->getFood()` -> `HungerManager->getFood()`
- `Human->setFood()` -> `HungerManager->setFood()`
- `Human->getMaxFood()` -> `HungerManager->getMaxFood()`
- `Human->addFood()` -> `HungerManager->addFood()`
- `Human->isHungry()` -> `HungerManager->isHungry()`
- `Human->getSaturation()` -> `HungerManager->getSaturation()`
- `Human->setSaturation()` -> `HungerManager->setSaturation()`
- `Human->addSaturation()` -> `HungerManager->addSaturation()`
- `Human->getExhaustion()` -> `HungerManager->getExhaustion()`
- `Human->setExhaustion()` -> `HungerManager->setExhaustion()`
- `Human->exhaust()` -> `HungerManager->exhaust()`
- The following API methods have been removed:
- `Human->getRawUniqueId()`: use `Human->getUniqueId()->toBinary()` instead
- The following classes have been removed: