Cuberite
A lightweight, fast and extensible game server for Minecraft
RedstoneHandler.h
Go to the documentation of this file.
1 
2 #pragma once
3 
5 
6 
7 
8 
9 
10 class cChunk;
12 
13 
14 
15 
16 
17 namespace RedstoneHandler
18 {
22  PowerLevel GetPowerDeliveredToPosition(const cChunk & Chunk, Vector3i Position, BLOCKTYPE BlockType, Vector3i QueryPosition, BLOCKTYPE QueryBlockType, bool IsLinked);
23 
27  void Update(cChunk & Chunk, cChunk & CurrentlyTicking, Vector3i Position, BLOCKTYPE BlockType, NIBBLETYPE Meta, PowerLevel PowerLevel);
28 
30  void ForValidSourcePositions(const cChunk & Chunk, Vector3i Position, BLOCKTYPE BlockType, NIBBLETYPE Meta, ForEachSourceCallback & Callback);
31 
33  void SetWireState(const cChunk & Chunk, Vector3i Position);
34 }
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:44
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
BlockType
Definition: BlockTypes.h:4
unsigned char PowerLevel
void SetWireState(const cChunk &Chunk, const Vector3i Position)
Temporary: compute and set the block state of a redstone wire.
void Update(cChunk &Chunk, cChunk &CurrentlyTicking, const Vector3i Position, const BLOCKTYPE BlockType, const NIBBLETYPE Meta, const PowerLevel PowerLevel)
Tells a redstone component at this position to update itself.
PowerLevel GetPowerDeliveredToPosition(const cChunk &Chunk, const Vector3i Position, const BLOCKTYPE BlockType, const Vector3i QueryPosition, const BLOCKTYPE QueryBlockType, const bool IsLinked)
Asks a redstone component at the source position how much power it will deliver to the querying posit...
void ForValidSourcePositions(const cChunk &Chunk, const Vector3i Position, const BLOCKTYPE BlockType, const NIBBLETYPE Meta, ForEachSourceCallback &Callback)
Invokes Callback for each position this component can accept power from.
Definition: Chunk.h:36