summaryrefslogtreecommitdiffstats
path: root/src/Generating/PieceGenerator.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-27 22:05:50 +0200
committermadmaxoft <github@xoft.cz>2014-05-27 22:05:50 +0200
commitff99373237178e9f7da02f51581f9a83d0e624d9 (patch)
treee5214df93dfbeb166d8b65ccb094175285c0068b /src/Generating/PieceGenerator.h
parentBiome generators: biome lists can contain spaces. (diff)
downloadcuberite-ff99373237178e9f7da02f51581f9a83d0e624d9.tar
cuberite-ff99373237178e9f7da02f51581f9a83d0e624d9.tar.gz
cuberite-ff99373237178e9f7da02f51581f9a83d0e624d9.tar.bz2
cuberite-ff99373237178e9f7da02f51581f9a83d0e624d9.tar.lz
cuberite-ff99373237178e9f7da02f51581f9a83d0e624d9.tar.xz
cuberite-ff99373237178e9f7da02f51581f9a83d0e624d9.tar.zst
cuberite-ff99373237178e9f7da02f51581f9a83d0e624d9.zip
Diffstat (limited to 'src/Generating/PieceGenerator.h')
-rw-r--r--src/Generating/PieceGenerator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Generating/PieceGenerator.h b/src/Generating/PieceGenerator.h
index 21c155c96..fd8576706 100644
--- a/src/Generating/PieceGenerator.h
+++ b/src/Generating/PieceGenerator.h
@@ -120,6 +120,15 @@ public:
const cPiece & a_NewPiece
) { return 1; }
+ /** Returns the relative weight with which the a_NewPiece is to be selected for placing as the first piece.
+ This allows the pool to tweak the piece's chances.
+ The higher the number returned, the higher the chance the piece will be chosen. 0 means the piece will not be chosen.
+ If all pieces return 0, a random piece is chosen, with all equal chances.
+ */
+ virtual int GetStartingPieceWeight(
+ const cPiece & a_NewPiece
+ ) { return 1; }
+
/** Called after a piece is placed, to notify the pool that it has been used.
The pool may adjust the pieces it will return the next time. */
virtual void PiecePlaced(const cPiece & a_Piece) = 0;