Botcraft 26.3
Loading...
Searching...
No Matches
ServerboundRecipeBookUpdatePacket.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 316 /* > 1.11.2 */ && PROTOCOL_VERSION < 737 /* < 1.16.2 */
2#pragma once
3
5#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
7#endif
8
9namespace ProtocolCraft
10{
11 class ServerboundRecipeBookUpdatePacket : public BasePacket<ServerboundRecipeBookUpdatePacket>
12 {
13 public:
14 static constexpr std::string_view packet_name = "Recipe Book Update";
15
16 DEFINE_CONDITION(Purpose0, GetPurpose() == 0);
17 DEFINE_CONDITION(Purpose1, GetPurpose() == 1);
18
19 SERIALIZED_FIELD(Purpose, VarInt);
20#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
21 SERIALIZED_FIELD(Recipe, Internal::Conditioned<Identifier, &THIS::Purpose0>);
22#else
23 SERIALIZED_FIELD(Recipe, Internal::Conditioned<int, &THIS::Purpose0>);
24#endif
25 SERIALIZED_FIELD(GuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
26 SERIALIZED_FIELD(FilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
27#if PROTOCOL_VERSION > 358 /* > 1.12.2 */
28 SERIALIZED_FIELD(FurnaceGuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
29 SERIALIZED_FIELD(FurnaceFilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
30#endif
31#if PROTOCOL_VERSION > 450 /* > 1.13.2 */
32 SERIALIZED_FIELD(BlastFurnaceGuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
33 SERIALIZED_FIELD(BlastFurnaceFilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
34 SERIALIZED_FIELD(SmokerGuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
35 SERIALIZED_FIELD(SmokerFilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
36#endif
37
39 };
40} //ProtocolCraft
41#endif
#define DEFINE_CONDITION(Name,...)
Define a condition that can be used later inside an Internal::Conditioned type.
#define DECLARE_READ_WRITE_SERIALIZE
Define auto serializable utilities and declare ReadImpl, WriteImpl and SerializeImpl virtual function...
#define SERIALIZED_FIELD(Name,...)