Cuberite
A lightweight, fast and extensible game server for Minecraft
PieceModifier.h
Go to the documentation of this file.
1 
2 // PieceModifier.h
3 
4 // Declares the public interface for cPiece's cPieceModifier implementations
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "PiecePool.h"
13 
14 
15 
16 
17 
18 bool CreatePieceModifierFromString(const AString & a_Definition, std::shared_ptr<cPiece::cPieceModifiers> & a_Modifiers, bool a_LogWarnings);
19 
20 
21 
22 
23 
26 {
27 public:
29 
30  int m_Weight;
31 
33  int m_MinMeta = 0;
34 
36  int m_MaxMeta = -1;
37 
39  int m_MaxNoiseMeta = 0;
40 
42  int m_MinNoiseMeta = 0;
43 };
44 
45 typedef std::vector<cRandomizedBlock> cRandomizedBlocks;
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
bool CreatePieceModifierFromString(const AString &a_Definition, std::shared_ptr< cPiece::cPieceModifiers > &a_Modifiers, bool a_LogWarnings)
std::vector< cRandomizedBlock > cRandomizedBlocks
Definition: PieceModifier.h:45
std::string AString
Definition: StringUtils.h:11
Used to store block type, meta, weight and some more params.
Definition: PieceModifier.h:26
int m_MinMeta
Minimum meta to randomize.
Definition: PieceModifier.h:33
int m_MaxMeta
Maximum meta to randomize.
Definition: PieceModifier.h:36
int m_MinNoiseMeta
Minimum meta in noise range.
Definition: PieceModifier.h:42
BLOCKTYPE m_Type
Definition: PieceModifier.h:28
int m_MaxNoiseMeta
Maximum meta in noise range.
Definition: PieceModifier.h:39