[WorldGeneration] setting blocks dataValue?

Discussion in 'Plugin Development' started by valon750, May 5, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    valon750

    Hello there everyone,

    Picking up an old project of mine, which involves terrain generation with some lovely features given to us in the fairly recent updates.

    However I'm looking to have certain blocks during the generation be one with a certain dataValue, much like how wool and clay have various dataValues depending on the colour.

    I have here a snippet of code for the different blocks to use in the event of different biomes.

    Code:
    case PLAINS: return Material.WOOL;
    However I'm not too sure on how I would go about applying the dataValue.
     
  2. Datavalues are bytes, so just have a void that returns bytes. Then check what biome it is in, and return de Datavalues.

    And the Block class has a method called setData
     
Thread Status:
Not open for further replies.

Share This Page