1
0
Fork 0
Commit Graph

21 Commits

Author SHA1 Message Date
Tiger Wang 9518a27357
Prepare for 1.15+ (#4856)
+ Add type-safe container for states
* Split registry Blocks into BlockTypes, BlockStates so the block types enumeration can be #included without too much penalty
* Ensure Registry uses type-safe container
2020-12-21 13:54:04 +00:00
peterbell10 a9031b6bae
Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)
* 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-10-05 10:27:14 +00:00
Tiger Wang 6183b28f93
Implement redstone quasi-connectivity (#4889) 2020-09-21 20:39:58 +01:00
Tiger Wang d8c8d0124d Replace PowerData struct with PowerLevel
* We no longer need to track the powering block with the removal of SolidBlockHandler. PowerLevel is now just an unsigned char
2020-08-21 00:50:09 +01:00
Tiger Wang 3143d6ce67 Remove std::make_unique from redstone handler creation 2020-08-21 00:50:09 +01:00
Tiger Wang 40eba5244d Remove the redstone solid block handler
- 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-08 18:22:16 +01:00
Tiger Wang 6c47f46c31 Ensure updating relatives calls the correct base case
* Fixed recursive base unintentionally scheduling the origin position for an update because it called the wrong function
2020-08-02 15:52:06 +01:00
Tiger Wang 4e5ab02a58 Use SimulateChunk in redstone simulator
+ 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-26 14:16:46 +01:00
Tiger Wang a9e06d33c5 Add some comments about terracing 2020-05-08 10:52:35 +01:00
Tiger Wang 6ac11925f1 Update RedstoneWireHandler style 2020-05-08 10:52:35 +01:00
mBornand 5b92e6654f Update src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2020-05-03 11:51:11 +01:00
mBornand 1c579f58aa Update src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2020-05-03 11:51:11 +01:00
Marc_Bornand 83193f132c Made some style update and add comments 2020-05-03 11:51:11 +01:00
Marc_Bornand 055c9ef90e Fix the connexion to the side of the repeater 2020-05-03 11:51:11 +01:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Bond-009 104f9e127b Changed some int parameters to vector parameters (#3937) 2017-09-07 10:25:34 +02:00
peterbell10 60dfaa0967 Allocate redstone component handlers upfront 2017-07-17 21:40:43 +02:00
Austin Martin 8c7cc3ffe9 Fixed issue #2218 2016-01-10 20:53:02 -05:00
Safwat Halaby 75fea3cd1e Silenced the Redstone Simulator console spam 2015-12-24 17:58:34 +02:00
Lukas Pioch 50a908fdc9 Fixes for clang-3.7 2015-12-19 22:43:37 +01:00
Tiger Wang 5b62c4c314 Reorganised the redstone simulator
-> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan!
* Uses classes and inheritance now
* Speed should be improved
2015-12-18 13:17:38 +00:00