Minecraft 1.13: API Preview 4

Discussion in 'News and Announcements' started by md_5, Jan 14, 2018.

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

    Moderator

    Proper English
     
    • Agree Agree x 1
    • Funny Funny x 1
    • Winner Winner x 1
  2. Both are great reasons!
     
  3. Is there any reference for the format of the serialised data string that BlockData.getAsString() will return?
     
  4. Choco

    Moderator

    The same String you would use in Minecraft. material[someData=whatever]. As an example, cake with bites eaten would be "minecraft:cake[bites=3]".

    See Block States and block-related command format (the Blocks category) for 1.13
     
    • Informative Informative x 2
    • Friendly Friendly x 1
    • Optimistic Optimistic x 1
  5. Thank you, that's just what I was looking for :)
     
    • Like Like x 1
  6. md_5

    Administrator Developer

    Pretty sure that's literally my unit test
     
    • Optimistic Optimistic x 1
  7. Choco

    Moderator

    Caught redistributing Bukkit code! *runs* Nah. My go-to example is just cake because it's the only block state I can remember. lol. Coincidence I suppose.
     
    • Optimistic Optimistic x 1
  8. The Block States list doesn't seem to be complete - there is no iron_door listed for example - I presume it will be something like:
    minecraft:iron_door[half=lower,hinge=right,facing=east,open=false]
    Will the order of the data values matter, and will all possible data values need to be present (e.g. the above does not include powered=true|false) if the string is constructed manually and passed to Bukkit.createBlockData(String data)?

    Looking at Bukkit.createBlockData(Material material, String data) the java doc specifies "all properties initialized to unspecified defaults, except for those provided in data"
     
    #428 eccentric, Jul 2, 2018
    Last edited: Jul 2, 2018
  9. Choco

    Moderator

    Values may be omitted from the String passed to #createBlockData() without any real issue. The documentation indicates that values do have defaults, they're just not properly documented in most cases. Also, as far as I'm aware, if an unknown state is provided, Bukkit will just ignore it. Order does not matter whatsoever.
     
    • Informative Informative x 1
    • Optimistic Optimistic x 1
  10. md_5

    Administrator Developer

    Preview 4 released
     
    • Like Like x 1
    • Winner Winner x 1
    • Informative Informative x 1
  11. Yay! 1.13 here we come
     
  12. It's great if some plugins die! It offers smaller devs a shot at getting big ;)
     
  13. MiniDigger

    Supporter

    Or you make something better and then replacing old plugins, like luck perms for example. You don't need breaking API changes and dieing plugins for that. If you rely on that, that just means you are not capable of making something better, just smth that is good enough to be used when the og doesn't work anymore. It's not smth ppl would switch to when they had a choice.
     
    • Agree Agree x 3
    • Optimistic Optimistic x 1
  14. Thanks for the info.

    I can't wait for --dev starts creating builds using it!
     
  15. upload_2018-7-11_17-18-13.png

    OMG. I feel hyped cause of the aproching date but worried cause I know how many bugs they still need to fix. :unsure:

    Let's keep our fingers crossed that this won't be a hurried release fulkl of bugs.
     
  16. Drekryan

    Supporter

    I mean it’s not the end of the world, they will continue developing the game and I’m sure there will be a 1.13.1 release regardless
     
    • Like Like x 1
  17. Choco

    Moderator

    Although it would be best if there were not. I would very much appreciate if there were only a 1.13.0 release, but who knows.
     
    • Like Like x 1
  18. gzx

    gzx

    What will be the proper way to store blocks and their data in binary files? I don't think using strings are that efficient compared to numeric IDs.
     
  19. MiniDigger

    Supporter

    Depending for what kind of storage. Generally it's just fine to store strings, for the region format mojang adopted the format the packets use.
     
  20. gzx

    gzx

    What format do the packets use?
     
Thread Status:
Not open for further replies.