35 #define INVOKE_FOR_HANDLERS(Callback) \
40 case E_BLOCK_ACTIVATOR_RAIL: \
41 case E_BLOCK_DETECTOR_RAIL: \
42 case E_BLOCK_POWERED_RAIL: return PoweredRailHandler::Callback; \
43 case E_BLOCK_ACTIVE_COMPARATOR: \
44 case E_BLOCK_INACTIVE_COMPARATOR: return RedstoneComparatorHandler::Callback; \
45 case E_BLOCK_DISPENSER: \
46 case E_BLOCK_DROPPER: return DropSpenserHandler::Callback; \
47 case E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE: \
48 case E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE: \
49 case E_BLOCK_STONE_PRESSURE_PLATE: \
50 case E_BLOCK_WOODEN_PRESSURE_PLATE: return PressurePlateHandler::Callback; \
51 case E_BLOCK_ACACIA_FENCE_GATE: \
52 case E_BLOCK_BIRCH_FENCE_GATE: \
53 case E_BLOCK_DARK_OAK_FENCE_GATE: \
54 case E_BLOCK_FENCE_GATE: \
55 case E_BLOCK_IRON_TRAPDOOR: \
56 case E_BLOCK_JUNGLE_FENCE_GATE: \
57 case E_BLOCK_SPRUCE_FENCE_GATE: \
58 case E_BLOCK_TRAPDOOR: return SmallGateHandler::Callback; \
59 case E_BLOCK_REDSTONE_LAMP_OFF: \
60 case E_BLOCK_REDSTONE_LAMP_ON: return RedstoneLampHandler::Callback; \
61 case E_BLOCK_REDSTONE_REPEATER_OFF: \
62 case E_BLOCK_REDSTONE_REPEATER_ON: return RedstoneRepeaterHandler::Callback; \
63 case E_BLOCK_REDSTONE_TORCH_OFF: \
64 case E_BLOCK_REDSTONE_TORCH_ON: return RedstoneTorchHandler::Callback; \
65 case E_BLOCK_OBSERVER: return ObserverHandler::Callback; \
66 case E_BLOCK_PISTON: \
67 case E_BLOCK_STICKY_PISTON: return PistonHandler::Callback; \
68 case E_BLOCK_DAYLIGHT_SENSOR: \
69 case E_BLOCK_INVERTED_DAYLIGHT_SENSOR: return DaylightSensorHandler::Callback; \
71 case E_BLOCK_STONE_BUTTON: \
72 case E_BLOCK_WOODEN_BUTTON: return RedstoneToggleHandler::Callback; \
73 case E_BLOCK_BLOCK_OF_REDSTONE: return RedstoneBlockHandler::Callback; \
74 case E_BLOCK_COMMAND_BLOCK: return CommandBlockHandler::Callback; \
75 case E_BLOCK_HOPPER: return HopperHandler::Callback; \
76 case E_BLOCK_NOTE_BLOCK: return NoteBlockHandler::Callback; \
77 case E_BLOCK_REDSTONE_WIRE: return RedstoneWireHandler::Callback; \
78 case E_BLOCK_TNT: return TNTHandler::Callback; \
79 case E_BLOCK_TRAPPED_CHEST: return TrappedChestHandler::Callback; \
80 case E_BLOCK_TRIPWIRE_HOOK: return TripwireHookHandler::Callback; \
83 if (cBlockDoorHandler::IsDoorBlockType(BlockType)) \
85 return DoorHandler::Callback; \
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
#define INVOKE_FOR_HANDLERS(Callback)
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.
static void SetWireState(const cChunk &a_Chunk, const Vector3i a_Position)
Temporary.