Podzol

Discussion in 'Plugin Development' started by ryr11, Jan 10, 2014.

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

    ryr11

    How would I use the Podzol block? in MATERIAL.PODZOL it does not show up.
     
  2. Offline

    Jogy34

    Podzol is a dirt block with a data value of 2
     
  3. Offline

    ryr11

    How do I change the data value?
     
  4. Offline

    Jogy34

    Code:java
    1.  
    2. Block block = /*Some Block*/;
    3. block.setData((byte) 2);
    4.  
    5. ItemStack itemStack = /*Some ItemStack*/;
    6. itemStack.getData().setData((byte) 2); //The first getData() returns a MaterialData object
    7. //OR
    8. itemStack.setData(new MaterialData(Material.DIRT, (byte) 2));
     
    UltraMC likes this.
  5. Offline

    ryr11

    Will that also work if I want to get a BLOCK, not a MATERIAL (I want to get if they walk on podzol)
     
  6. ryr11
    What do you mean? When you check if they walk on podzol, you check the block Material, so you would use it the same way as shown in this thread.
     
  7. Offline

    ryr11

    Ok Thanks!
     
Thread Status:
Not open for further replies.

Share This Page