summaryrefslogblamecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator/RedstoneHandler.h
blob: 5b3dcdeac1dcf3819fb5ae73cf6334d19e83ea4b (plain) (tree)
1
2
3
4
5
6
7
8
9


            
                                       
 

                            
 
                         
 
                                                                                                                                                                                 
 
                                                                                                                                                   
 
                                                                                                                                                      
 

                                                                   

#pragma once

#include "RedstoneSimulatorChunkData.h"

class cChunk;
class ForEachSourceCallback;

namespace RedstoneHandler
{
	unsigned char GetPowerDeliveredToPosition(const cChunk & Chunk, Vector3i Position, BLOCKTYPE BlockType, Vector3i QueryPosition, BLOCKTYPE QueryBlockType, bool IsLinked);

	void Update(cChunk & Chunk, cChunk & CurrentlyTicking, Vector3i Position, BLOCKTYPE BlockType, NIBBLETYPE Meta, PoweringData PoweringData);

	void ForValidSourcePositions(const cChunk & Chunk, Vector3i Position, BLOCKTYPE BlockType, NIBBLETYPE Meta, ForEachSourceCallback & Callback);

	void SetWireState(const cChunk & Chunk, Vector3i Position);
}