1
0
Commit Graph

87 Commits

Author SHA1 Message Date
Howaner
87e79de4b7 Add Fence Gate to Redstone Simulator 2014-02-15 16:30:27 +01:00
Tiger Wang
a0a44b969e Improved pressure plates
+ Two (or more) pressure plates can be triggered at the same time
* Fixed issues caused by pressure plates not being in the sources list
2014-02-11 23:13:49 +00:00
STRWarrior
3a897844a0 Renamed cRedstoneManager to cRedstoneSimulator and renamed cRedstoneSimulator to cIncrementalRedstoneSimulator (Might change later). 2014-02-07 22:59:08 +01:00
STRWarrior
09a23fa114 Fixed some end of lines 2014-02-07 22:25:15 +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
Tycho
8ba6f73169 Fixed most of the reordering warnings 2014-02-05 09:43:49 -08:00
Tycho
8464f689ea Improved Type safety of eBlockFace
May Fix #640
2014-02-04 10:59:05 -08:00
Tycho
f8881622a4 Removed unused lookups 2014-02-03 12:31:18 -08:00
Mattes D
b090547c17 Merge pull request #602 from mc-server/improvementsandfixes
Redstone crash fix and current console line replace function
2014-02-02 22:02:25 -08:00
Tycho
b82fc394dd Changed Signiture of OnUpdate 2014-02-02 06:49:37 -08:00
Tiger Wang
b0784d1931 Split cCoord template into one and two data types 2014-02-01 21:40:02 +00:00
Tycho
c6304b2b4f Changed pointers to references 2014-02-01 05:06:32 -08:00
Tycho
25ec7750aa Changed signitures of Several BLockHandler Methods
Changed the signitures of the following to use interfaces:
GetPlacementBlockTypeMeta
OnPlaced
OnPlacedByPlayer
OnDestroyed
OnNeighbourChanged
NeighbourChanged
OnUse
CanBeAt
Check
2014-01-31 15:17:41 -08: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
1d81db6446 Fixed wire, rail, and pressure plate unpowering 2014-01-12 23:19:08 +00:00
Tiger Wang
318c353ee4 Fixed rails powering 2014-01-11 21:32:42 +00:00
Tiger Wang
ff57381631 Did some stuff with the vectors 2014-01-11 14:26:18 +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
d5b38402ed Fixed doors, fixes #453 2014-01-10 21:35:41 +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
2e1588820d fixed warnings in World.cpp 2013-12-31 09:16:42 +01: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
Mattes D
e0e01d0615 Merge pull request #461 from mc-server/repeaters
Repeaters, pressure plates, and others
2013-12-25 23:57:02 -08:00
Tiger Wang
d0572e73a0 Moved increment operator to back of variables 2013-12-26 00:12:06 +00:00
Tiger Wang
c6314e8935 Implemented stone and wooden pressure plates 2013-12-24 15:02:55 +00:00
Tiger Wang
76444470a4 Provides an enhancement to daylight sensors 2013-12-23 15:22:05 +00:00
Tiger Wang
11fbfb458d Daylight sensor sensing enhancement 2013-12-22 23:20:43 +00:00
Tiger Wang
48b388aa97 A fix for daylight sensors 2013-12-22 20:06:15 +00:00
Tiger Wang
acb5a36a6a Daylight sensors 2013-12-22 00:33:22 +00:00
Tiger Wang
5b2ac381b6 Fixed them again, confound it 2013-12-22 00:30:21 +00:00
Tycho Bickerstaff
5034ae29b8 Piston is now warnings clean 2013-12-21 15:08:01 +00:00
Tycho Bickerstaff
38f808ac3d ChunkSender is now warnings clean 2013-12-21 15:00:31 +00:00
Tycho Bickerstaff
779aca6051 Merge branch 'master' into cmake 2013-12-21 13:32:40 +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
Tycho Bickerstaff
32e6be002d Merge branch 'master' into cmake 2013-12-20 15:33:04 +00:00
madmaxoft
8610d45ef1 Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT). 2013-12-20 16:01:34 +01:00
Tycho Bickerstaff
0e6107bfdd Merge branch 'master' into cmake 2013-12-19 16:16:35 +00:00
Tiger Wang
b083979cb2 Fixed repeaters not updating power 2013-12-19 15:57:15 +00:00
Tycho Bickerstaff
e627f2f98c Merge branch 'master' into cmake 2013-12-18 19:06:11 +00:00
Tiger Wang
13a22918e5 Fixed wire powering blocks beneath 2013-12-17 23:05:42 +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
ba4eae2d16 Implemented xoft's suggestions 2013-12-15 15:36:20 +00:00
Tiger Wang
b87055f7a5 Fixed wire repeater checking 2013-12-15 13:56:32 +00:00
Tiger Wang
bbcef6d6eb Wires now power repeaters properly 2013-12-15 13:08:08 +00:00
Tiger Wang
ceb11cb477 Fixed the hopefully final wire self-powering bug 2013-12-15 12:17:29 +00:00
Tiger Wang
765b847281 Potentially fixed debug asserts 2013-12-14 19:29:50 +00:00
Tiger Wang
7f9f6f5095 Wires no longer power if a block cuts them off
Also reduced more unneeded code.
2013-12-14 19:11:15 +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