mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
LevelDB: fixed leftover usage of the old CompoundTag API
This commit is contained in:
parent
dcb53b1cbb
commit
8222b16d9a
@ -368,6 +368,7 @@ class LevelDB extends BaseLevelProvider{
|
||||
|
||||
$nbt = new LittleEndianNBTStream();
|
||||
|
||||
/** @var CompoundTag[] $entities */
|
||||
$entities = [];
|
||||
if(($entityData = $this->db->get($index . self::TAG_ENTITY)) !== false and strlen($entityData) > 0){
|
||||
$nbt->read($entityData, true);
|
||||
@ -377,9 +378,10 @@ class LevelDB extends BaseLevelProvider{
|
||||
}
|
||||
}
|
||||
|
||||
/** @var CompoundTag $entityNBT */
|
||||
foreach($entities as $entityNBT){
|
||||
if($entityNBT->id instanceof IntTag){
|
||||
$entityNBT["id"] &= 0xff;
|
||||
if($entityNBT->hasTag("id", IntTag::class)){
|
||||
$entityNBT->setInt("id", $entityNBT->getInt("id") & 0xff); //remove type flags - TODO: use these instead of removing them)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user