mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
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:
@@ -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");
|
||||
|
@@ -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());
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user