summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-08-04 23:56:48 +0200
committerAlexander Harkness <me@bearbin.net>2020-08-05 00:01:39 +0200
commit5e3f51f5ff39ac7219f1f0fcbc27340949f95ade (patch)
tree1e685ab1a9012f3f4c3ee2ae485e1b69d48498c4
parentCode cleanup in cChunk.PlaceBlock() for checking if BlockEntity should be spawned (#4812) (diff)
downloadcuberite-5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.tar
cuberite-5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.tar.gz
cuberite-5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.tar.bz2
cuberite-5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.tar.lz
cuberite-5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.tar.xz
cuberite-5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.tar.zst
cuberite-5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.zip
-rw-r--r--src/Protocol/Protocol_1_12.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp
index a67a82eaf..1f136148e 100644
--- a/src/Protocol/Protocol_1_12.cpp
+++ b/src/Protocol/Protocol_1_12.cpp
@@ -980,7 +980,7 @@ void cProtocol_1_12::HandleCraftRecipe(cByteBuffer & a_ByteBuffer)
auto CuberiteRecipeId = cRoot::Get()->GetRecipeMapper()->GetCuberiteRecipeId(RecipeID, m_Client->GetProtocolVersion());
if (CuberiteRecipeId.has_value())
{
- m_Client->HandleCraftRecipe(CuberiteRecipeId.value());
+ m_Client->HandleCraftRecipe(*CuberiteRecipeId);
}
}
@@ -1320,7 +1320,7 @@ void cProtocol_1_12_2::SendUnlockRecipe(UInt32 a_RecipeID)
Pkt.WriteBool(true);
Pkt.WriteBool(false);
Pkt.WriteVarInt32(1);
- Pkt.WriteVarInt32(ProtocolRecipeId.value());
+ Pkt.WriteVarInt32(*ProtocolRecipeId);
}
}
@@ -1350,8 +1350,8 @@ void cProtocol_1_12_2::SendInitRecipes(UInt32 a_RecipeID)
else
{
Pkt.WriteVarInt32(1);
- Pkt.WriteVarInt32(ProtocolRecipeId.value());
+ Pkt.WriteVarInt32(*ProtocolRecipeId);
Pkt.WriteVarInt32(1);
- Pkt.WriteVarInt32(ProtocolRecipeId.value());
+ Pkt.WriteVarInt32(*ProtocolRecipeId);
}
}