summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-06-18Additional Y height checks (#5405)Debucquoy Anthony tonitch1-1/+3
For redstone wire, block area bindings, and fire simulator. Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2022-04-20Valid Height is now checked by vector.x12xx12x1-1/+1
2021-03-28Move some redstone implementations into the source fileTiger Wang1-17/+112
2020-10-05Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)peterbell101-2/+2
* Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-08-21Remove std::make_unique from redstone handler creationTiger Wang1-128/+5
2020-08-08Remove the redstone solid block handlerTiger Wang1-42/+27
- Remove cSolidBlockHandler * Functionality now integrated into simulator dispatcher * Fix door double open/close issues, arisen due to the top/bottom halves getting different power + Small migration to block states for redstone wire
2020-08-04Do not GetBlock individually in simulatorsTiger Wang1-49/+36
* Have the simulator manager get the block and pass it on + Add new overload for WakeUp, called when the manager wakes face positions
2020-08-02Always use relative coordinates in AddBlockTiger Wang1-13/+5
+ Pass block, use relatives * Fixes everything immediately converting abs back to rel and getting block, when these data were already available
2020-08-02Add WakeUp/AddBlock distinctionTiger Wang1-40/+53
* WakeUp is for singular changes (block breaking for example). The simulator should check blocks around the position and discover other affected blocks as it sees fit * AddBlock is for when you know a whole area is to be updated; chunk loading, or area wakeups for example + Prepares for correct handling of destroyed blocks after removal of SolidBlockHandler in the redstone simulator
2020-08-01Replaced cpp14::make_unique<> with std::make_unique<>.Mattes D1-22/+22
2020-07-26Remove redundant ErasePowerData callTiger Wang1-7/+5
* Also fix a return that should've been continue
2020-07-26Use SimulateChunk in redstone simulatorTiger Wang1-58/+84
+ Improved performance, reduces bottleneck in chunkmap lookup * Stop allocating and throwing away lots of small vectors in Update/GetValidSourcePositions return values - Remove unused GetPowerLevel virtual
2020-07-24Redstone: check validity of GetBlockTiger Wang1-1/+5
2020-04-16ಠ_ಠ (#4660)Tiger Wang1-0/+3
+ Provisional handling for observers
2020-04-05Filter blocks to add to redstone sim's wake queue (#4621)peterbell101-2/+61
2020-03-27 Lock hopper when powered by redstone (#4347)Bond-0091-0/+2
* Lock hopper when powered by redstone * Add to manual bindings * Add hopper API documentation Co-authored-by: Mat <mail@mathias.is>
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell101-1/+1
Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-1/+0
Add check for number of empty lines between functions and fix the corresponding failures
2017-07-17Allocate redstone component handlers upfrontpeterbell101-26/+49
2017-04-29Fix fence gates (#3683)Bond-0091-0/+5
This commit fixes an issue where a pressureplate would only open oak fence gates
2016-07-01Revert "Made redstone handlers static"Lukas Pioch1-90/+30
2016-06-15- Add a activation flag to droppers and dispensers. Previously droppers and dispensers shot items with every block update.QUSpilPrgm1-3/+3
- Fixes a range check inside cIncrementalRedstoneSimulator::Simulate
2016-05-28Don't let redstone blocks power adjacent blocks. (#3214)QUSpilPrgm1-1/+1
* Don't let redstone blocks power adjacent blocks. This fixes issue #2966
2016-05-28Made redstone handlers staticTiger Wang1-30/+90
* Improvements to performance? Maybe. Can't hurt (he says).
2016-02-09Update RedstoneSimulator to delete unused cached PowerDataMarvin Kopf1-1/+4
When a new block was placed that has a corresponding RedstoneHandler the PowerData for the position was cached, but never deleted and remained unchanged when the block got destroyed. The RedstoneSimulator now erases all cached PowerData for positions where the block doesn't have a RedstoneHandler (i.e. Air).
2015-12-28Removed excessive logging in redstone simulator.Mattes D1-7/+0
2015-12-19Fixes for clang-3.7Lukas Pioch1-2/+2
2015-12-18Reorganised the redstone simulatorTiger Wang1-0/+170
-> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan! * Uses classes and inheritance now * Speed should be improved