Skip to content

Commit

Permalink
chore: add member functions for some template
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Jan 5, 2025
1 parent 1719578 commit 7039f75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 9 additions & 7 deletions src/mc/world/level/block/states/BlockStateVariant.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
template <typename T0>
class BlockStateVariant : public ::BlockState {
public:
// prevent constructor by default
BlockStateVariant& operator=(BlockStateVariant const&);
BlockStateVariant(BlockStateVariant const&);
BlockStateVariant();
using Type = T0;

public:
// virtual functions
// NOLINTBEGIN
virtual ~BlockStateVariant();
// vIndex: 0
virtual ~BlockStateVariant() /*override*/ = default;

virtual void toNBT(class CompoundTag&, int) const;
// vIndex: 1
virtual void toNBT(::CompoundTag&, int) const /*override*/;

virtual bool fromNBT(class CompoundTag const&, int&) const;
// vIndex: 2
virtual bool fromNBT(::CompoundTag const&, int&) const /*override*/;
// NOLINTEND
};
12 changes: 7 additions & 5 deletions src/mc/world/level/block/states/BuiltInBlockStateVariant.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#pragma once

#include "mc/_HeaderOutputPredefine.h"
#include "mc/world/level/block/states/BlockStateVariant.h"

template <typename T0>
class BuiltInBlockStateVariant {
class BuiltInBlockStateVariant : public ::BlockStateVariant<T0> {
public:
// prevent constructor by default
BuiltInBlockStateVariant& operator=(BuiltInBlockStateVariant const&);
BuiltInBlockStateVariant(BuiltInBlockStateVariant const&);
BuiltInBlockStateVariant();
// virtual functions
// NOLINTBEGIN
// vIndex: 0
virtual ~BuiltInBlockStateVariant() /*override*/ = default;
// NOLINTEND
};

0 comments on commit 7039f75

Please sign in to comment.