diff options
author | x12xx12x <44411062+12xx12@users.noreply.github.com> | 2022-04-20 00:10:35 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2022-04-20 09:41:02 +0200 |
commit | fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6 (patch) | |
tree | a5c9f00728af0f2ca841bb5d881b8d0d785b24ae /src/Simulator/IncrementalRedstoneSimulator | |
parent | Updated protocol functions to Vector3x (diff) | |
download | cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.gz cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.bz2 cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.lz cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.xz cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.zst cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.zip |
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator')
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp b/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp index e8a8515eb..9c7560a6c 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp @@ -26,7 +26,7 @@ ForEachSourceCallback::ForEachSourceCallback(const cChunk & Chunk, const Vector3 void ForEachSourceCallback::operator()(Vector3i Location) { - if (!cChunkDef::IsValidHeight(Location.y)) + if (!cChunkDef::IsValidHeight(Location)) { return; } @@ -96,7 +96,7 @@ PowerLevel ForEachSourceCallback::QueryLinkedPower(const cChunk & Chunk, const V for (const auto & Offset : cSimulator::GetLinkedOffsets(SolidBlockPosition - QueryPosition)) { auto SourcePosition = QueryPosition + Offset; - if (!cChunkDef::IsValidHeight(SourcePosition.y)) + if (!cChunkDef::IsValidHeight(SourcePosition)) { continue; } diff --git a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp index c27f6d04d..c23af9f75 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp @@ -217,7 +217,7 @@ void cIncrementalRedstoneSimulator::WakeUp(cChunk & a_Chunk, Vector3i a_Position for (const auto & Offset : cSimulator::GetLinkedOffsets(a_Offset)) { auto Relative = a_Position - a_Offset + Offset; - if (!cChunkDef::IsValidHeight(Relative.y)) + if (!cChunkDef::IsValidHeight(Relative)) { continue; } diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h index cfdecb246..5f2026842 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h @@ -313,7 +313,7 @@ namespace RedstoneWireHandler const auto YMDiagonalPosition = Relative + OffsetYM; if ( BLOCKTYPE QueryBlock; - cChunkDef::IsValidHeight(YMDiagonalPosition.y) && + cChunkDef::IsValidHeight(YMDiagonalPosition) && a_Chunk.UnboundedRelGetBlockType(YMDiagonalPosition, QueryBlock) && (QueryBlock == E_BLOCK_REDSTONE_WIRE) ) |