Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | List of all members
cPiece::cPieceModifier Class Referenceabstract

Base class (interface) for piece modifiers. More...

#include <PiecePool.h>

Inheritance diagram for cPiece::cPieceModifier:
Inheritance graph
[legend]

Public Member Functions

virtual void AssignSeed (int a_Seed)
 Called when the piece pool is assigned to a generator, so that the modifiers can access world seed. More...
 
virtual bool InitializeFromString (const AString &a_Params, bool a_LogWarnings)=0
 Initializes the modifier's parameters from the string representation. More...
 
virtual void Modify (cBlockArea &a_Image, const Vector3i a_PiecePos, const int a_PieceNumRotations)=0
 Called prior to writing piece to a chunk, so that modifiers can modify blocks in the blockarea. More...
 
virtual ~cPieceModifier ()
 

Detailed Description

Base class (interface) for piece modifiers.

Definition at line 152 of file PiecePool.h.

Constructor & Destructor Documentation

◆ ~cPieceModifier()

virtual cPiece::cPieceModifier::~cPieceModifier ( )
inlinevirtual

Definition at line 156 of file PiecePool.h.

Member Function Documentation

◆ AssignSeed()

virtual void cPiece::cPieceModifier::AssignSeed ( int  a_Seed)
inlinevirtual

Called when the piece pool is assigned to a generator, so that the modifiers can access world seed.

Reimplemented in cPieceModifierRandomizeBlocks.

Definition at line 170 of file PiecePool.h.

◆ InitializeFromString()

virtual bool cPiece::cPieceModifier::InitializeFromString ( const AString a_Params,
bool  a_LogWarnings 
)
pure virtual

Initializes the modifier's parameters from the string representation.

a_Params is the string containing only the parameters If a_LogWarnings is true, logs any problems to the console. Returns true if successful, false if the string parsing failed. Used when loading the modifier from a file.

Implemented in cPieceModifierRandomizeBlocks.

◆ Modify()

virtual void cPiece::cPieceModifier::Modify ( cBlockArea a_Image,
const Vector3i  a_PiecePos,
const int  a_PieceNumRotations 
)
pure virtual

Called prior to writing piece to a chunk, so that modifiers can modify blocks in the blockarea.

Implemented in cPieceModifierRandomizeBlocks.


The documentation for this class was generated from the following file: