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