How to place light source?

Sep 20, 2012 at 3:09 PM

How to place light source?

Sep 25, 2012 at 7:32 PM

I'm assuming you're using the NewTake latest source rather than the much earlier .Net 4 conversion which doesn't have the coloured lighting.

At the moment the lighting is hardwired to the RedFlower blocktype which you can cause to be added in the terrain generator you are using - I think by default it uses model/terrain/biome/duallayerterrainwithvalleysforrivers.cs (Some very descriptive class naming there from someone). Flowers are added in the GenerateTreesFlowers method. 

The actual lighting is then done in the view/processors/lightingchunkprocessor.cs in the ClearLighting method. 

In the current engine the lighting is as i say hardwired to that block type a nicer way to do it would be to add a couple of methods to BlockInformation.cs 

IsEmissive and GetEmissiveColor which can then be used to determine if any block should emit light and which color of light it emits and use the results of these in the ClearLighting method.

We stopped development on the current version of the engine pending a complete rethink of the structure and mechanics of the engine and developed a replacement for Techcraft (which we will release here at some point), this is why the lighting code contains such horrible things as the hardwired RedFlower block type.  

Hope this helps - feel free to contact me here or on sunburn if you need more info