Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Private Types | List of all members
cRedstoneNoopSimulator Class Referencefinal

#include <NoopRedstoneSimulator.h>

Inheritance diagram for cRedstoneNoopSimulator:
Inheritance graph
[legend]
Collaboration diagram for cRedstoneNoopSimulator:
Collaboration graph
[legend]

Public Member Functions

virtual void AddBlock (cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override
 Called to simulate a new block. More...
 
virtual cRedstoneSimulatorChunkDataCreateChunkData () override
 
 cRedstoneNoopSimulator (cWorld &a_World)
 
virtual void SimulateChunk (std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk *a_Chunk) override
 
- Public Member Functions inherited from cSimulator
 cSimulator (cWorld &a_World)
 
virtual ~cSimulator ()
 

Private Types

using Super = cRedstoneSimulator
 

Additional Inherited Members

- Static Public Member Functions inherited from cSimulator
static std::array< Vector3i, 5 > GetLinkedOffsets (Vector3i Offset)
 For a given offset from a position, return the offsets that represent the adjacents of the newly offset position, excluding the old position. More...
 
- Static Public Attributes inherited from cSimulator
static constexpr std::array< Vector3i, 6 > AdjacentOffsets
 Contains offsets for direct adjacents of any position. More...
 
- Protected Member Functions inherited from cSimulator
virtual void Simulate (float a_Dt)
 
virtual void WakeUp (cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block)
 Called to simulate a single new block, typically as a result of a single block break or change. More...
 
virtual void WakeUp (cChunk &a_Chunk, Vector3i a_Position, Vector3i a_Offset, BLOCKTYPE a_Block)
 Called to simulate a single block, synthesised by the simulator manager. More...
 
- Protected Attributes inherited from cSimulator
cWorldm_World
 

Detailed Description

Definition at line 10 of file NoopRedstoneSimulator.h.

Member Typedef Documentation

◆ Super

Definition at line 13 of file NoopRedstoneSimulator.h.

Constructor & Destructor Documentation

◆ cRedstoneNoopSimulator()

cRedstoneNoopSimulator::cRedstoneNoopSimulator ( cWorld a_World)
inline

Definition at line 17 of file NoopRedstoneSimulator.h.

Member Function Documentation

◆ AddBlock()

virtual void cRedstoneNoopSimulator::AddBlock ( cChunk a_Chunk,
Vector3i  a_Position,
BLOCKTYPE  a_Block 
)
inlineoverridevirtual

Called to simulate a new block.

Unlike WakeUp this function will perform minimal checking. It queues the block to be simulated as fast as possible, suitable for area wakeups.

Implements cSimulator.

Definition at line 30 of file NoopRedstoneSimulator.h.

◆ CreateChunkData()

virtual cRedstoneSimulatorChunkData* cRedstoneNoopSimulator::CreateChunkData ( void  )
inlineoverridevirtual

Implements cRedstoneSimulator.

Definition at line 36 of file NoopRedstoneSimulator.h.

◆ SimulateChunk()

virtual void cRedstoneNoopSimulator::SimulateChunk ( std::chrono::milliseconds  a_Dt,
int  a_ChunkX,
int  a_ChunkZ,
cChunk a_Chunk 
)
inlineoverridevirtual

Implements cSimulator.

Definition at line 22 of file NoopRedstoneSimulator.h.


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