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
Tiger Wang
85c298d73e
Cleaned up simulators
2014-10-25 21:54:00 +01:00
Tycho
f6979642e6
Use factory method to construct redstone simulator data
2014-09-28 15:36:00 +01:00
tycho
ad5d0eda9c
Fixed issue with casting
2014-09-26 17:00:34 +01:00
Tycho
26a4845a99
IncrementalRedstoneSimulator now has no dependencies on cChunk
2014-09-16 20:29:31 +01:00
Tycho
0b044e1c83
Possibly decoupled IncrementalRedstoneSimulator from the rest of the server
...
THis wil hopefully allow for unit testing
2014-09-11 17:48:21 +01:00
STRWarrior
3a897844a0
Renamed cRedstoneManager to cRedstoneSimulator and renamed cRedstoneSimulator to cIncrementalRedstoneSimulator (Might change later).
2014-02-07 22:59:08 +01:00
STRWarrior
176664810b
Implemented an easy way of adding new redstone simulators.
...
Also added a "noop" redstone simulator that does the same as the fluid version.
2014-02-07 22:13:55 +01:00
Tiger Wang
ed7816419d
Fixed redstone simulator crash found in #570
2014-01-29 19:19:14 +00:00
andrew
9a9b51a513
Basic command block implementation
2014-01-18 15:16:47 +02:00
Tiger Wang
318c353ee4
Fixed rails powering
2014-01-11 21:32:42 +00:00
Tiger Wang
6b25ef4fa3
Fixed a door bug and reduced code
...
Doors wouldn't get powered by repeaters, and some blocks, like glass,
were viable middle blocks when they shouldn't have been.
2014-01-11 01:52:14 +00:00
Tiger Wang
e7fba08e6c
Major refactoring of redstone
...
This commit is a refactoring of the redstone code, mainly the functions
handling the removal of invalid blocks from power supplier data
structures. Its aim is to improve performance and potentially reduce the
memory footprint of the data structures.
It works to reduce the amount of GetBlock()s triggered every tick.
Before, a GetBlock() was requested for every single item in the data
lists, as well as for every single redstone block in a chunk. Following
these changes, the AddBlock() event is utilised more effectively to only
update the lists when needed (a block is changed), as well as to insert
the block type (and update it when needed) alongside the coordinates
into the main redstone simulator chunkdata list.
In short, a single GetBlock() is now cached, with this cache being
updated when the simulator is awoken due to a block change.
At least, I *hope* that this is what it does :P
2014-01-10 20:31:05 +00:00
Tycho Bickerstaff
d724241407
converted commneted paramater names to the unused macro
2013-12-22 13:46:55 +00:00
Tycho Bickerstaff
94ca07cfbf
Merge branch 'master' of github.com:mc-server/MCServer
2013-12-22 13:19:27 +00:00
Tiger Wang
c6314e8935
Implemented stone and wooden pressure plates
2013-12-24 15:02:55 +00:00
Tycho Bickerstaff
5034ae29b8
Piston is now warnings clean
2013-12-21 15:08:01 +00:00
Tiger Wang
432a28d935
Fixed repeaters delay, maybe
...
Also added basic daylight sensors, though because GetBlockSkylight
always is 15, it doesn't work.
2013-12-20 21:19:13 +00:00
Tiger Wang
09c47fabd2
Fixed bad repeater power queuing in corner case
...
Repeaters remain queued to power even if their original source has since
unpowered. Also functionised and cleaned up code.
2013-12-17 23:05:27 +00:00
Tiger Wang
95be80cdb5
Implemented note block playing and fixed wire
...
Game of Thrones music in Minecraft, here I come!
2013-12-14 16:52:22 +00:00
Tiger Wang
0aeece7fda
Fixes to redstone wire and torches
...
+ Wires now power blocks around the block beneath
* Torches no longer power off if it is on a linked powered block
* Enhanced code, split functions, etc.
2013-12-14 02:40:54 +00:00
Tiger Wang
cd35bd2c49
Fixed pistons being viable middle block
...
Also an excuse to update submodules
2013-12-11 18:42:38 +00:00
Tiger Wang
1dec73be0b
Added repeater delays
...
They DO sometimes get stuck though :P
2013-12-10 00:21:24 +00:00
Tiger Wang
1932cc38a1
Fixed trapdoors not toggling
...
The redstone simulator kept on resetting them.
2013-12-07 14:41:58 +00:00
Tiger Wang
455686e3ad
Pistons no longer accept power through front face
...
This fixes #60 .
2013-11-30 12:11:39 +00:00
Tiger Wang
1d69c80ad3
Implemented trapdoors, fixes #43 and #105
...
Also updated redstone simulator to support it
2013-11-29 22:27:08 +00:00
Tiger Wang
a6630d3239
Merged master into redstonefixes
2013-11-27 21:35:13 +00:00
Alexander Harkness
c3cd436ec3
Merge remote-tracking branch 'origin/master' into foldermove2
...
Conflicts:
GNUmakefile
2013-11-24 14:37:03 +00:00
Alexander Harkness
675b4aa878
Moved source to src
2013-11-24 14:19:41 +00:00