updated pocketmine/nbt dependency

this is going to need work on exception handling, but right now it's so inconsistent that it doesn't matter anyway.
This commit is contained in:
Dylan K. Taylor
2020-03-04 17:53:37 +00:00
parent 6e39e34c1e
commit 995309424e
16 changed files with 45 additions and 32 deletions

View File

@@ -248,15 +248,15 @@ class Human extends Living implements ProjectileSource, InventoryHolder{
$this->inventory->setHeldItemIndex($nbt->getInt("SelectedInventorySlot", 0), false);
$this->hungerManager->setFood((float) $nbt->getInt("foodLevel", (int) $this->hungerManager->getFood(), true));
$this->hungerManager->setExhaustion($nbt->getFloat("foodExhaustionLevel", $this->hungerManager->getExhaustion(), true));
$this->hungerManager->setSaturation($nbt->getFloat("foodSaturationLevel", $this->hungerManager->getSaturation(), true));
$this->hungerManager->setFoodTickTimer($nbt->getInt("foodTickTimer", $this->hungerManager->getFoodTickTimer(), true));
$this->hungerManager->setFood((float) $nbt->getInt("foodLevel", (int) $this->hungerManager->getFood()));
$this->hungerManager->setExhaustion($nbt->getFloat("foodExhaustionLevel", $this->hungerManager->getExhaustion()));
$this->hungerManager->setSaturation($nbt->getFloat("foodSaturationLevel", $this->hungerManager->getSaturation()));
$this->hungerManager->setFoodTickTimer($nbt->getInt("foodTickTimer", $this->hungerManager->getFoodTickTimer()));
$this->xpManager->setXpAndProgressNoEvent(
$nbt->getInt("XpLevel", 0, true),
$nbt->getFloat("XpP", 0.0, true));
$this->xpManager->setLifetimeTotalXp($nbt->getInt("XpTotal", 0, true));
$nbt->getInt("XpLevel", 0),
$nbt->getFloat("XpP", 0.0));
$this->xpManager->setLifetimeTotalXp($nbt->getInt("XpTotal", 0));
if($nbt->hasTag("XpSeed", IntTag::class)){
$this->xpSeed = $nbt->getInt("XpSeed");

View File

@@ -60,7 +60,7 @@ class PrimedTNT extends Entity implements Explosive{
protected function initEntity(CompoundTag $nbt) : void{
parent::initEntity($nbt);
$this->fuse = $nbt->getShort("Fuse", 80, true);
$this->fuse = $nbt->getShort("Fuse", 80);
$this->getWorld()->addSound($this->location, new IgniteSound());
}

View File

@@ -78,7 +78,7 @@ class Arrow extends Projectile{
protected function initEntity(CompoundTag $nbt) : void{
parent::initEntity($nbt);
$this->pickupMode = $nbt->getByte(self::TAG_PICKUP, self::PICKUP_ANY, true);
$this->pickupMode = $nbt->getByte(self::TAG_PICKUP, self::PICKUP_ANY);
$this->collideTicks = $nbt->getShort("life", $this->collideTicks);
}