mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 19:24:12 +00:00
RuntimeBlockMapping::toRuntimeId() now accepts a single integer instead of id/meta
the expectation is that eventually this will receive arbitrary internal runtime IDs instead of static id/meta, and RuntimeBlockMapping doesn't really care about this crap anyway.
This commit is contained in:
@ -38,6 +38,6 @@ class BlockBreakSound implements Sound{
|
||||
}
|
||||
|
||||
public function encode(?Vector3 $pos){
|
||||
return LevelSoundEventPacket::create(LevelSoundEventPacket::SOUND_BREAK, $pos, RuntimeBlockMapping::getInstance()->toRuntimeId($this->block->getId(), $this->block->getMeta()));
|
||||
return LevelSoundEventPacket::create(LevelSoundEventPacket::SOUND_BREAK, $pos, RuntimeBlockMapping::getInstance()->toRuntimeId($this->block->getFullId()));
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,6 @@ class BlockPlaceSound implements Sound{
|
||||
}
|
||||
|
||||
public function encode(?Vector3 $pos){
|
||||
return LevelSoundEventPacket::create(LevelSoundEventPacket::SOUND_PLACE, $pos, RuntimeBlockMapping::getInstance()->toRuntimeId($this->block->getId(), $this->block->getMeta()));
|
||||
return LevelSoundEventPacket::create(LevelSoundEventPacket::SOUND_PLACE, $pos, RuntimeBlockMapping::getInstance()->toRuntimeId($this->block->getFullId()));
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class BlockPunchSound implements Sound{
|
||||
return LevelSoundEventPacket::create(
|
||||
LevelSoundEventPacket::SOUND_HIT,
|
||||
$pos,
|
||||
RuntimeBlockMapping::getInstance()->toRuntimeId($this->block->getId(), $this->block->getMeta())
|
||||
RuntimeBlockMapping::getInstance()->toRuntimeId($this->block->getFullId())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class EntityLandSound implements Sound{
|
||||
return LevelSoundEventPacket::create(
|
||||
LevelSoundEventPacket::SOUND_LAND,
|
||||
$pos,
|
||||
RuntimeBlockMapping::getInstance()->toRuntimeId($this->blockLandedOn->getId(), $this->blockLandedOn->getMeta()),
|
||||
RuntimeBlockMapping::getInstance()->toRuntimeId($this->blockLandedOn->getFullId()),
|
||||
$this->entity::getNetworkTypeId()
|
||||
//TODO: does isBaby have any relevance here?
|
||||
);
|
||||
|
Reference in New Issue
Block a user