Block.getdata();

Discussion in 'Plugin Development' started by ulsa, Jul 7, 2014.

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

    ulsa

    guys im trying to use that method which is deprecated
    im trying to get the data value as id but it seems its impossible..
    how cant i get the id and/or name instead of this id text mixture thing : ORANGE WOOL(1)

    i know its not wanted in new versions but i want my yml to look simplier by using id's
    do i have to loop thru all the characters to find ints and add together ?
     
  2. Offline

    THEREDBARON24

    well. ORANGE_WOOL is not a material. You could use WOOL and then add an id. In this case, you could split the string. you can set the string to be WOOL : 1 and then use that to have the server get the type from the first argument and the data from the second.
     
  3. Offline

    tommycake50

    Don't use ID's they will cause you unwanted stress and there really is no point when they're being deprecated.
    It will be more user friendly if you don't use ID's anyway.
     
  4. Offline

    ulsa

    well tommy i do have it as an update .
    the thing is im not good with bukkit plugins so im just building it and ill fix the issues as an update
    thx to Traks i found out that a.getData().getData() works
    but problem is potions .. so how can i properly store potion data values ?

    if its splash potion it gives me 35 for fire resistance and when i add
    16384 to it i have the correct value
    so do i have to find out if its splash or so ?
    and also there is
    Can become splash potion which i have no idea which potions can and not
    http://minecraft.gamepedia.com/Data_values#Potions
     
  5. Offline

    Necrodoom

    ulsa all potions can become splash. I don't understand your question.
     
  6. Offline

    ulsa

    well thats what i know but there is a number for can become splash which is i dont know why is there
    also i cant get spash data i only got 1 number which if i add splash number to it it becomes correct data
    but how can i get the correct data ... getdata && look if splash || (look if not splash) && look if has extended duration ??
     
  7. Necrodoom Even mundane splash potion?

    But no, I know what you mean. All finished potions can be splash :p

    ulsa If you want to determine if a specific potion is currently in splash form, then you can use isSplash()
     
  8. Offline

    ulsa

Thread Status:
Not open for further replies.

Share This Page