mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 00:55:14 +00:00
Merge remote-tracking branch 'origin/stable' into minor-next
This commit is contained in:
@ -165,7 +165,7 @@ class ParserPacketHandler extends PacketHandler{
|
||||
$data->block_states = self::blockStatePropertiesToString($blockState);
|
||||
}
|
||||
}elseif($itemStack->getBlockRuntimeId() !== ItemTranslator::NO_BLOCK_RUNTIME_ID){
|
||||
throw new PacketHandlingException("Non-blockitems should have a zero block runtime ID");
|
||||
throw new PacketHandlingException("Non-blockitems should have a zero block runtime ID (" . $itemStack->getBlockRuntimeId() . " on " . $itemStringId . ")");
|
||||
}elseif($meta !== 0){
|
||||
$data->meta = $meta;
|
||||
}
|
||||
|
@ -94,9 +94,14 @@ foreach($files as $file){
|
||||
$newDiff = [];
|
||||
|
||||
foreach($target["simple"] as $oldId => $newId){
|
||||
if(($merged["simple"][$oldId] ?? null) !== $newId){
|
||||
$newDiff["renamedIds"][$oldId] = $newId;
|
||||
$previousNewId = $merged["simple"][$oldId] ?? null;
|
||||
if(
|
||||
$previousNewId === $newId || //if previous schemas already accounted for this
|
||||
($previousNewId !== null && isset($target["simple"][$previousNewId])) //or the item's ID has been changed for a second time
|
||||
){
|
||||
continue;
|
||||
}
|
||||
$newDiff["renamedIds"][$oldId] = $newId;
|
||||
}
|
||||
if(isset($newDiff["renamedIds"])){
|
||||
ksort($newDiff["renamedIds"], SORT_STRING);
|
||||
|
Reference in New Issue
Block a user