LeviLamina
Loading...
Searching...
No Matches
ByteTag.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/nbt/Tag.h"
7#include "mc/platform/Result.h"
8
9class ByteTag : public ::Tag {
10public:
11 schar data;
12
13 template <std::integral T>
14 constexpr ByteTag& operator=(T value) {
15 data = (schar)value;
16 return *this;
17 }
18
19 template <std::integral T>
20 [[nodiscard]] constexpr operator T() const {
21 return (T)data;
22 }
23
24 [[nodiscard]] constexpr operator std::byte() const { return (std::byte)data; }
25
26 template <std::integral T>
27 [[nodiscard]] constexpr explicit ByteTag(T value = 0) : data((schar)value) {}
28
29 [[nodiscard]] constexpr explicit ByteTag(std::byte b) : data(std::to_integer<schar>(b)) {}
30
31 [[nodiscard]] ByteTag operator-() const { return ByteTag{-data}; }
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 // vIndex: 2
37 virtual void write(::IDataOutput& dos) const /*override*/;
38
39 // vIndex: 3
40 virtual ::Bedrock::Result<void> load(::IDataInput& dis) /*override*/;
41
42 // vIndex: 5
43 virtual ::Tag::Type getId() const /*override*/;
44
45 // vIndex: 4
46 virtual ::std::string toString() const /*override*/;
47
48 // vIndex: 6
49 virtual bool equals(::Tag const& rhs) const /*override*/;
50
51 // vIndex: 9
52 virtual ::std::unique_ptr<::Tag> copy() const /*override*/;
53
54 // vIndex: 10
55 virtual uint64 hash() const /*override*/;
56
57 // vIndex: 0
58 virtual ~ByteTag() /*override*/ = default;
59 // NOLINTEND
60
61public:
62 // destructor thunk
63 // NOLINTBEGIN
64 MCFOLD void $dtor();
65 // NOLINTEND
66
67public:
68 // virtual function thunks
69 // NOLINTBEGIN
70 MCAPI void $write(::IDataOutput& dos) const;
71
72 MCAPI ::Bedrock::Result<void> $load(::IDataInput& dis);
73
74 MCFOLD ::Tag::Type $getId() const;
75
76 MCAPI ::std::string $toString() const;
77
78 MCAPI bool $equals(::Tag const& rhs) const;
79
80 MCAPI ::std::unique_ptr<::Tag> $copy() const;
81
82 MCAPI uint64 $hash() const;
83 // NOLINTEND
84
85public:
86 // vftables
87 // NOLINTBEGIN
88 MCAPI static void** $vftable();
89 // NOLINTEND
90};
91namespace ll::inline literals::inline nbt_literals {
92[[nodiscard]] inline ByteTag operator""_b(uint64 num) { return ByteTag{(schar)num}; }
93} // namespace ll::inline literals::inline nbt_literals
Definition ByteTag.h:9
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition Tag.h:39