[LIB] PrettyScaryLib

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

  1. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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:
    Code:
            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?

    This post has been edited 7 times. It was last edited by stirante Dec 19, 2012.
  2. Offline

    Icyene

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    /me thinks you should submit a PR to Bukkit.
  3. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I submited 2 PRs and both were closed. That's why I created this lib.
    Ne0nx3r0 likes this.
  5. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.

    This post has been edited 3 times. It was last edited by lol768 Nov 9, 2012.
  6. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME

    This post has been edited 1 time. It was last edited by stirante Nov 9, 2012.
  7. Offline

    Icyene

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @stirante Maybe try committing again, fixing the formatting error and committing separately?

    This post has been edited 1 time. It was last edited by Icyene Nov 10, 2012.
  8. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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

    This post has been edited 1 time. It was last edited by stirante Nov 10, 2012.
  9. Offline

    hawkfalcon BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Amazing, thank you.
  10. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    JavaDocs completed :)
    hawkfalcon likes this.
  11. Offline

    Appljuze

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Im trying to use your library @stirante but it just isn't setting the text of the tooltip item for some reason...
  12. Offline

    Timr

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Very nice, excellent work.
  13. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  14. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Added API for Zombie villager, Zombie baby and Wither skeleton

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

    This post has been edited 1 time. It was last edited by stirante Nov 11, 2012.
  15. Offline

    rmh4209

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  16. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    It requires to be on server, but you can use sources in jar file
  17. Offline

    Gravity BukkitDev Team Lead Moderator BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  18. Offline

    TnT Trinitrotoluene Maximus Administrator Bukkit Help

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.

    This post has been edited 1 time. It was last edited by TnT Nov 20, 2012.
    Codex Arcanum likes this.
  19. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  20. Offline

    KeybordPiano459

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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 :)
  21. Offline

    blackwolf12333

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  22. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Added GitHub :)
  23. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Added API for fireworks and enchanted books.
    KeybordPiano459 and monstuhs like this.
  24. Offline

    monstuhs

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    You sir, are awesome!
  25. Offline

    KeybordPiano459

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @stirante
    Fireworks already? I'm pretty sure they added those like... two days ago or something. Impressive!
  26. Offline

    stirante

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Added 2 days ago, today was snapshot :D
  27. Offline

    KeybordPiano459

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  28. Offline

    Ne0nx3r0

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @stirante

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

    brord

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  30. Offline

    aviator14

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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?

Share This Page