diff options
author | Damián Imrich <damian@haze.sk> | 2021-04-08 12:24:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 12:24:59 +0200 |
commit | befe132861b1995dfe776d4e134a90fc243d1a17 (patch) | |
tree | ee11f50ccb917718a4da7282a8e5243193571847 /src/Generating/PieceModifier.h | |
parent | Obsidian pillars, end fountain, not Ender dragon spawning (#4993) (diff) | |
download | cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.gz cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.bz2 cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.lz cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.xz cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.zst cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.zip |
Diffstat (limited to 'src/Generating/PieceModifier.h')
-rw-r--r-- | src/Generating/PieceModifier.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/Generating/PieceModifier.h b/src/Generating/PieceModifier.h new file mode 100644 index 000000000..88fba5070 --- /dev/null +++ b/src/Generating/PieceModifier.h @@ -0,0 +1,45 @@ + +// PieceModifier.h + +// Declares the public interface for cPiece's cPieceModifier implementations + + + + + +#pragma once + +#include "PiecePool.h" + + + + + +bool CreatePieceModifierFromString(const AString & a_Definition, std::shared_ptr<cPiece::cPieceModifiers> & a_Modifiers, bool a_LogWarnings); + + + + + +/** Used to store block type, meta, weight and some more params */ +class cRandomizedBlock +{ +public: + BLOCKTYPE m_Type; + + int m_Weight; + + /** Minimum meta to randomize */ + int m_MinMeta = 0; + + /** Maximum meta to randomize */ + int m_MaxMeta = -1; + + /** Maximum meta in noise range */ + int m_MaxNoiseMeta = 0; + + /** Minimum meta in noise range */ + int m_MinNoiseMeta = 0; +}; + +typedef std::vector<cRandomizedBlock> cRandomizedBlocks; |