15class ByteTag :
public ::Tag {
19 template <std::
integral T>
20 constexpr ByteTag& operator=(T value) {
25 template <std::
integral T>
26 [[nodiscard]]
constexpr operator T()
const {
30 [[nodiscard]]
constexpr operator std::byte()
const {
return (std::byte)data; }
32 template <std::
integral T>
33 [[nodiscard]]
constexpr explicit ByteTag(T value = 0) : data((schar)value) {}
35 [[nodiscard]]
constexpr explicit ByteTag(std::byte b) : data(std::to_integer<schar>(b)) {}
37 [[nodiscard]] ByteTag operator-()
const {
return ByteTag{-data}; }
44 virtual ::Bedrock::Result<void> load(
::IDataInput& dis) ;
46 virtual ::Tag::Type getId()
const ;
48 virtual ::std::string toString()
const ;
50 virtual bool equals(::Tag
const& rhs)
const ;
52 virtual ::std::unique_ptr<::Tag> copy()
const ;
54 virtual uint64 hash()
const ;
56 virtual ~ByteTag() =
default;
72 MCFOLD ::Tag::Type $getId()
const;
74 MCAPI ::std::string $toString()
const;
76 MCAPI
bool $equals(::Tag
const& rhs)
const;
78 MCAPI ::std::unique_ptr<::Tag> $copy()
const;
80 MCAPI uint64 $hash()
const;