Development Assistance How to make 1.7 code 1.8 pls help

Discussion in 'Plugin Help/Development/Requests' started by quinster08, Jun 19, 2015.

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

    quinster08

    I have this code:

    Code:
        public static void regenerateBlock(Block block, final Material type, final byte data){
            final Location loc = block.getLocation();
           
            loc.getWorld().playEffect(loc, Effect.STEP_SOUND, (type == Material.AIR ? block.getType().getId() : type.getId()));
            block.setTypeIdAndData(type.getId(), data, false);
        }
    How to make Id to 1.8? Pls help!
     
  2. Offline

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives.
    @quinster08 That is the nice thing about an API: you don't need to change a thing
     
  3. Offline

    quinster08

    @timtower It doesn't work so I do have to change the code. There are no more ID's in mc tho.
     
  4. Offline

    timtower Administrator Administrator Moderator

    @quinster08 And what isn't working anymore? Building with an 1.8 api?
     
  5. Offline

    quinster08

    @timtower Its derpreicated so I need to update the code but idk how.
     
  6. When something is deprecated, it doesn't say it doesn't work anymore. It should still work, and if it doesn't just set the type with setType(Material), and the data with setData(byte).
     
Thread Status:
Not open for further replies.

Share This Page