15 Commits

Author SHA1 Message Date
Drew DeVault
a361703746 Implement walking sounds
These sounds change depending on what kind of block you're walking in.

Still to come: sound effects for mining and placing blocks
2015-10-05 22:06:59 -04:00
Drew DeVault
14aa3ce07a Add "InteractiveBoundingBox" to IBlockProvider
This is used to determine the bounding box for interaction in the client
(the ray that's cast from your camera interacts with it to determine the
highlighted block).

TODO: Make it work better with metadata.

This commit also fixes one of the issues with snow: ref #194
2015-10-02 08:15:29 -04:00
Drew DeVault
08c313a651 Add names to events for profiling puproses 2015-09-07 16:13:18 -04:00
Drew DeVault
14661c7110 Add profiler, improve event scheduler performance 2015-09-07 16:07:39 -04:00
Drew DeVault
f7bd7a109d Optimize event scheduling when loading chunks 2015-07-07 00:49:54 -06:00
Drew DeVault
940b2217c1 Add mechanism for scheduling updates on chunk load 2015-07-06 20:41:25 -06:00
Drew DeVault
8b1930eeac Switch to DateTime.UtcNow for everything 2015-07-02 12:14:55 -06:00
Drew DeVault
7da2ca5a27 Track the subject of each scheduled event
This allows us to cancel events when the subject is no longer around.
For example, if a chunk is unloaded due to inactivity, the events within
it are cancelled (growth of wheat, propegation of fluids, etc). When a
client disconnects, events associated with it are cancelled.

To use this for your own scheduled events, pick a subject. If your
subject does not implement IEventSubject, implement it. Then, you can
pass the subject into ScheduleEvent and that's it. When the subject
dies, your events will die with it. So long as the subject remains
alive, your events still fire.

`null` is a valid subject for events that should happen regardless of
any subject expiring.

Closes #1
2015-07-01 14:02:41 -06:00
Drew DeVault
9d1f5377ef Drop different items based on tool used to mine
For example, mining stone with your hand now drops nothing, and mining
leaves with shears will drop the leaves.
2015-06-26 17:15:51 -06:00
Drew DeVault
8697994737 Add wheat and farmland renderers 2015-06-20 13:56:57 -04:00
Drew DeVault
4dd99e4e93 Refactor the water block provider
This makes the fluid dynamics model much easier to understand and
maintain.
2015-02-10 21:21:24 -07:00
Drew DeVault
a64c943997 Implement wheat farming
This includes farmland behavior as well as the growth of wheat crops
2015-02-08 17:21:35 -07:00
Daniel Vidmar
351ab96f99 Block modifications.
Added two new properties.
- Opaque: Whether or not the block is opaque
- LightModifier: The amount removed from the light level as it passes
through the block(for transparent blocks).

Merged all rail block classes into RailBlock.cs and made them extend
RailBlock
2015-01-26 00:14:58 -05:00
Daniel Vidmar
eb1329e3f9 Added new block properties. 2015-01-22 00:49:50 -05:00
Drew DeVault
f230ab3345 Generate classes for all blocks 2014-12-28 18:55:46 -07:00