anchor.diff:  ifdef::env-github,env-browser[:outfilesuffix: .adoc]
   
   
  -To add blocks to the framework, you just have to add them to the BlockManager - This happens by specifying a block object (has to extend *cubes.Block*, by overriding methods you can specify own behaviours). Each block needs at least one “skin, which you have to pass in the constructor of the *cubes.Block* class). A “skin contains all information to display the block - Texture-Index in the Atlas, Transparency and so on.
  +To add blocks to the framework, you just have to add them to the BlockManager - This happens by specifying a block object (has to extend *cubes.Block*, by overriding methods you can specify own behaviours). Each block needs at least one "`skin`", which you have to pass in the constructor of the *cubes.Block* class). A "`skin`" contains all information to display the block - Texture-Index in the Atlas, Transparency and so on.
   
   After initialising your object, you have to register it in the BlockManager:
   
  
positive.code: 
  Last but not least: What if a block wants to change its texture according to its environment?
  
  
  image::http://destroflyer.mania-community.de/other/imagehost/cubes/block_grass.png[block_grass.png,width="150",height="",align="right"]
  
  A nice example would be a grass block - If it's on the surface, it contains a nice grass texture at the top face and a little earth-grass-transition at the sides. Otherwise, all 6 sides should display an earth texture.
  Special behaviours like this can be achieved by overwriting the *getSkinIndex* method:
  
negative.code: 
  == Face-Dependant Textures Block
  
  [.right.text-left]
  image::http://destroflyer.mania-community.de/other/imagehost/cubes/block_wood.png[block_wood.png,width="150",height=""]
  
  Now it's time to get prettier blocks - The wood block as known in Minecraft has two textures: Top/Bottom (cross-section) and Left/Right/Front/Back (bark). A simple way to set the texture for each face is to just give 6 textures to the skin (in the right order :P):
  
  