mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 13:35:29 +00:00
Fix furnaces and wrong smelting data recipe encoding
This commit is contained in:
parent
46af92f781
commit
06f8390b30
@ -77,7 +77,7 @@ class CraftingManager{
|
||||
case 2:
|
||||
$result = $recipe["Result"];
|
||||
$resultItem = Item::get($result["ID"], $result["Damage"], $result["Count"]);
|
||||
$this->registerRecipe(new FurnaceRecipe($resultItem, Item::get($recipe["Ingredients"], 0, 1)));
|
||||
$this->registerRecipe(new FurnaceRecipe($resultItem, Item::get($recipe["Ingredients"], null, 1)));
|
||||
break;
|
||||
case 3:
|
||||
$result = $recipe["Result"];
|
||||
|
@ -91,8 +91,8 @@ class CraftingDataPacket extends DataPacket{
|
||||
|
||||
private static function writeFurnaceRecipe(FurnaceRecipe $recipe, BinaryStream $stream){
|
||||
if($recipe->getInput()->getDamage() !== null){ //Data recipe
|
||||
$stream->putVarInt($recipe->getInput()->getDamage());
|
||||
$stream->putVarInt($recipe->getInput()->getId());
|
||||
$stream->putVarInt($recipe->getInput()->getDamage());
|
||||
$stream->putSlot($recipe->getResult());
|
||||
|
||||
return CraftingDataPacket::ENTRY_FURNACE_DATA;
|
||||
|
Loading…
x
Reference in New Issue
Block a user