mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Merge branch 'master' into api3/network_mcpe-1.0.5
This commit is contained in:
@ -470,7 +470,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
if(isset($this->effects[$effect->getId()])){
|
||||
$oldEffect = $this->effects[$effect->getId()];
|
||||
if(
|
||||
abs($effect->getAmplifier()) <= ($oldEffect->getAmplifier())
|
||||
abs($effect->getAmplifier()) < ($oldEffect->getAmplifier())
|
||||
or (abs($effect->getAmplifier()) === abs($oldEffect->getAmplifier())
|
||||
and $effect->getDuration() < $oldEffect->getDuration())
|
||||
){
|
||||
|
@ -408,6 +408,12 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
|
||||
public function saveNBT(){
|
||||
parent::saveNBT();
|
||||
|
||||
$this->namedtag->foodLevel = new IntTag("foodLevel", $this->getFood());
|
||||
$this->namedtag->foodExhaustionLevel = new FloatTag("foodExhaustionLevel", $this->getExhaustion());
|
||||
$this->namedtag->foodSaturationLevel = new FloatTag("foodSaturationLevel", $this->getSaturation());
|
||||
$this->namedtag->foodTickTimer = new IntTag("foodTickTimer", $this->foodTickTimer);
|
||||
|
||||
$this->namedtag->Inventory = new ListTag("Inventory", []);
|
||||
$this->namedtag->Inventory->setTagType(NBT::TAG_Compound);
|
||||
if($this->inventory !== null){
|
||||
|
Reference in New Issue
Block a user