[LIB] PrettyScaryLib

Discussion in 'Resources' started by stirante, Nov 9, 2012.

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


    I created library that handles some of new features introduced in Pretty Scary Update.(Source included)

    This features are:
    • Colored wolf collars
    • Custom fuse and explosion radius for creepers
    • Custom skin of skull
    • API for Beacon
    • API for Zombie villager and baby
    • API for Fireworks(changing type, trail, colors, fade colors, flickering)
    • API for Enchanted books
    • Adding recipes which returns items with NBT Tags
    • Adding enchanted-like glow to items
    Download: Link
    JavaDocs: Link
    GitHub: Link

    Example of new recipes:
            ItemStack item = new CraftItemStack(Material.DIAMOND_SWORD);
            ((CraftItemStack)item).getHandle().c(ChatColor.RESET + "" + ChatColor.AQUA + "Diamond Dagger");
            ItemStack item1 = new CraftItemStack(Material.IRON_SWORD);
            ((CraftItemStack)item1).getHandle().c(ChatColor.RESET + "" + ChatColor.GRAY + "Iron Dagger");
            ItemStack item2 = new CraftItemStack(Material.SKULL_ITEM, 1, (short) 3);
            item2 = setSkin(item2, "stirante");
            CustomShapedRecipe.addRecipe("Diamond dagger", item, new Object[]{"X", "Y", 'X', Material.DIAMOND, 'Y', Material.STICK});
            CustomShapedRecipe.addRecipe("Iron dagger", item1, new Object[]{"X", "Y", 'X', new ItemStack(Material.IRON_INGOT), 'Y', new ItemStack(Material.STICK)});
            CustomShapelessRecipe.addRecipe("head", item2, new Object[]{Material.INK_SACK, new ItemStack(Material.SKULL_ITEM, 1, (short) 3)});
    What you think about this?
  2. Offline


    /me thinks you should submit a PR to Bukkit.
  3. Offline


    Could I request some documentation? Would save me looking through the code :)
    Looks awesome though, I agree with the PR (whether it'll be accepted though is another matter)
  4. Offline


    I submited 2 PRs and both were closed. That's why I created this lib.
    Ne0nx3r0 likes this.
  5. Offline


    Any reasoning as to why? Can I take a look at them?
    This one? https://github.com/Bukkit/Bukkit/pull/710

    "Need a space before brace here" particularly frustrated me. When I process pull requests for my project, I don't complain about small issues - I'm grateful for the fact that somebody has taken the time to contribute to my project. I'm not worried if there are small errors, it helps with the development process and I can easily correct them.

    Formatting is not important. The compiler doesn't care about it, and if the lack of consistency annoys you, eclipse can easily format code to your specification in 2 clicks.
  6. Offline


  7. Offline


    stirante Maybe try committing again, fixing the formatting error and committing separately?
  8. Offline


    I would commit again, but fieldmaster said " Thanks for suggesting api's though... I will add these myself, however."

    EDIT: Added Javadocs, but it's not completed yet
  9. Offline


    Amazing, thank you.
  10. Offline


    JavaDocs completed :)
    hawkfalcon likes this.
  11. Offline


    Im trying to use your library stirante but it just isn't setting the text of the tooltip item for some reason...
  12. Offline


    Very nice, excellent work.
  13. Offline


    Maybe it's bug caused by converting into Maven project and then disabling Maven. I'll see what's wrong. For now You can use class in http://forums.bukkit.org/threads/item-name-changing-class.104249/

    Added API for Zombie villager, Zombie baby and Wither skeleton

    Added tester
            description: 'Gives potion with custom effects'
            usage: 'Usage: /<command>'
            description: 'Spawns tamed wolf with green collar'
            usage: 'Usage: /<command>'
            description: 'Spawns creeper with 10 seconds fuse'
            usage: 'Usage: /<command>'
            description: 'Spawns zombie baby villager with diamond helmet'
            usage: 'Usage: /<command>'
            description: 'Spawns wither skeleton'
            usage: 'Usage: /<command>'
            description: 'Builds beacon'
            usage: 'Usage: /<command>'
            description: 'Sets name of held item to given name'
            usage: 'Usage: /<command> name'
            description: 'Sets players chestplate to green leather chestplate'
            usage: 'Usage: /<command>'
            description: 'Gives players head'
            usage: 'Usage: /<command>'
    Download: Link

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 29, 2016
  14. Offline


    I believe we would use this in DiabloDrops if it didn't require this to be on the server as well. Thanks for the code you've done here, mate.
  15. Offline


    It requires to be on server, but you can use sources in jar file
  16. Offline


    I don't mean to take this offtopic, but you're talking about your project. When dealing with code on such a massive scale, it's vital to sanity that people format and follow best practices that are defined by the team. You're not updating CB, so I would have to say you aren't quite qualified to base this off your experiences. You can't just submit stuff to Bukkit with "small errors" - because they don't end that way.
    Not even close to true. Formatting your code is one of the most important aspects of working as a community on a project like this. Again, I'd have to say you can't talk about "lack of consistency annoying you" until you see what the people who update CB go through.
    Codex Arcanum likes this.
  17. Offline


    Seems like a pretty easy thing for you to fix for it to get approved. The team really has a lot to handle without having to put in that time on your behalf.
    Codex Arcanum likes this.
  18. Offline


    I can understand that such practices will differ when you have a larger project (I do like everything neat, but then again I have the time to go through and sort the code out myself). It just frustrated me somewhat that new features are not easily accessible to those who don't know how to reference CB and setup NBT tags manually, etc. In no way am I trying to attack the performance of the development team, they do a fantastic job maintaining CraftBukkit & Bukkit with new updates and protocol changes.
    glen3b likes this.
  19. Offline


    I agree, I try to keep my formatting stuff in shape, eg. always try to use tabs, not spaces... also is that a new avatar? Nice :)
  20. I just got an idea, if you want people to format their code, just give them a format profile from eclipse.
    I don't know if there is something like that for netbeans too...
    Than you can just ask them to format it with that format profile and the code will be formatted for you.
    stirante likes this.
  21. Offline


    Added GitHub :)
  22. Offline


    Added API for fireworks and enchanted books.
    KeybordPiano459 and monstuhs like this.
  23. Offline


    You sir, are awesome!
  24. Offline


    Fireworks already? I'm pretty sure they added those like... two days ago or something. Impressive!
  25. Offline


    Added 2 days ago, today was snapshot :D
  26. Offline


  27. Offline



    I appreciate the work you've done on this!
  28. Offline


    ^ xD
  29. Offline


    In skull.java line 59, I get an error about the skull.a() not being applicable with no arguments. Is this supposed to be skull.a or is it just something that has to be ignored?
  30. Offline


    I think name of this method changed since 1.4.2

    EDIT:Code fixed and uploaded to github :)
Thread Status:
Not open for further replies.

Share This Page