diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-05 17:17:45 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 17:17:45 -0600 |
| commit | 0666959d312dc74903f55d1071488a90239330f1 (patch) | |
| tree | 5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.World/NotGateTile.cpp | |
| parent | 9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff) | |
| parent | eed770b121aa4ce38f002db042d0137c24c6d344 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.World/NotGateTile.cpp')
| -rw-r--r-- | Minecraft.World/NotGateTile.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Minecraft.World/NotGateTile.cpp b/Minecraft.World/NotGateTile.cpp index 464e0ca5..3aa9aee1 100644 --- a/Minecraft.World/NotGateTile.cpp +++ b/Minecraft.World/NotGateTile.cpp @@ -28,10 +28,9 @@ bool NotGateTile::isToggledTooFrequently(Level *level, int x, int y, int z, bool if (add) recentToggles[level]->push_back(Toggle(x, y, z, level->getGameTime())); int count = 0; - AUTO_VAR(itEnd, recentToggles[level]->end()); - for (AUTO_VAR(it, recentToggles[level]->begin()); it != itEnd; it++) + for (const auto& it : *recentToggles[level]) { - if (it->x == x && it->y == y && it->z == z) + if (it.x == x && it.y == y && it.z == z) { count++; if (count >= MAX_RECENT_TOGGLES) @@ -122,7 +121,7 @@ void NotGateTile::tick(Level *level, int x, int y, int z, Random *random) } } - if (on) + if (on) { if (neighborSignal) { @@ -153,7 +152,7 @@ void NotGateTile::tick(Level *level, int x, int y, int z, Random *random) level->setTileAndData(x, y, z, Tile::redstoneTorch_on_Id, level->getData(x, y, z), Tile::UPDATE_ALL); } else - { + { app.DebugPrintf("Torch at (%d,%d,%d) has toggled too many times\n",x,y,z); } } @@ -236,9 +235,9 @@ void NotGateTile::levelTimeChanged(Level *level, __int64 delta, __int64 newTime) if (toggles != NULL) { - for (AUTO_VAR(it,toggles->begin()); it != toggles->end(); ++it) + for (auto& toggle : *toggles) { - (*it).when += delta; + toggle.when += delta; } } } |
