mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Extract a HungerManager unit from Human
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user