Botcraft 1.21.4
Loading...
Searching...
No Matches
ServerboundRecipeBookUpdatePacket.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION < 737 /* < 1.16.2 */
2#pragma once
3
6
7namespace ProtocolCraft
8{
9 class ServerboundRecipeBookUpdatePacket : public BaseMessage<ServerboundRecipeBookUpdatePacket>
10 {
11 public:
12 static constexpr std::string_view packet_name = "Recipe Book Update";
13
14 DEFINE_CONDITION(Purpose0, GetPurpose() == 0);
15 DEFINE_CONDITION(Purpose1, GetPurpose() == 1);
16
17 SERIALIZED_FIELD(Purpose, Internal::Conditioned<VarInt, &THIS::Purpose0>);
18 SERIALIZED_FIELD(Recipe, Internal::Conditioned<Identifier, &THIS::Purpose0>);
19 SERIALIZED_FIELD(GuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
20 SERIALIZED_FIELD(FilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
21#if PROTOCOL_VERSION > 358 /* > 1.12.2 */
22 SERIALIZED_FIELD(FurnaceGuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
23 SERIALIZED_FIELD(FurnaceFilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
24#endif
25#if PROTOCOL_VERSION > 450 /* > 1.13.2 */
26 SERIALIZED_FIELD(BlastFurnaceGuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
27 SERIALIZED_FIELD(BlastFurnaceFilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
28 SERIALIZED_FIELD(SmokerGuiOpen, Internal::Conditioned<bool, &THIS::Purpose1>);
29 SERIALIZED_FIELD(SmokerFilteringCraftable, Internal::Conditioned<bool, &THIS::Purpose1>);
30#endif
31
33 };
34} //ProtocolCraft
35#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,...)