mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-03 10:32:33 +00:00
tools/generate-bedrock-data-from-packets: fixed interpreting item metadata as blockstates when the item ID could be interpreted as a block ID
this broke crafting recipes which accepted skulls as inputs, as well as nether wart and bed recipes.
This commit is contained in:
parent
c028bb9055
commit
c3bca9e172
@ -276,7 +276,7 @@ class ParserPacketHandler extends PacketHandler{
|
||||
$meta = $descriptor->getMeta();
|
||||
if($meta !== 32767){
|
||||
$blockStateId = $this->blockTranslator->getBlockStateDictionary()->lookupStateIdFromIdMeta($data->name, $meta);
|
||||
if($blockStateId !== null){
|
||||
if($this->blockItemIdMap->lookupBlockId($data->name) !== null && $blockStateId !== null){
|
||||
$blockState = $this->blockTranslator->getBlockStateDictionary()->generateDataFromStateId($blockStateId);
|
||||
if($blockState !== null && count($blockState->getStates()) > 0){
|
||||
$data->block_states = self::blockStatePropertiesToString($blockState);
|
||||
|
Loading…
x
Reference in New Issue
Block a user