Add custom items to bukkit?, get XYZ of block?, ect.

Discussion in 'Plugin Development' started by jakepozaic, Dec 28, 2011.

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

    jakepozaic

    I have made a mod (not openly released yet) and I want to make this compatible with bukkit, the mod adds 5 new items (staffs)... is there a way to add new items to bukkit? I have done at least 3 hours of searching for similar questions and answers but nothing yet

    How do I get the X, Y, Z of the current block being looked at (cursor on it) server sided not client sided? [SOLVED]

    How would I be able to have my custom items shoot a ghast ball on left click (client sided would be preferred if it will work on smp) [SOLVED]

    thanks in advanced for your time.
     
  2. Offline

    Trc202

    Check out spoutcraft. Pretty sure you can add custom items to it (or it may still be in the planning stages, not sure). Oh, almost forgot. Only people with the spoutcraft client will be able to see the custom block.
     
  3. Offline

    Father Of Time

    Okay, so to answer your questions one at a time:

    1) sadly at this time it is impossible to add custom items utilizing only a Bukkit plug-in. To do something like this you would need to utilize Spout (a clientside/server side plug-in combo).

    2) This might help:
    http://jd.bukkit.org/doxygen/d4/d7b...Entity.html#a889b8d9fb7d4a9ad042392a1cdd7e284
    Get the blocks that are targeted by your cursor, however this one returns a HashSet of ALL blocks along your line of sight, and I'm pretty sure their is one that just returns the specific block you are staring at, so you might want to keep looking on this one.

    3) A gaust fireball is simply a projectile entity like anything other projectile (arrow, snowball):
    http://jd.bukkit.org/doxygen/db/d66/Fireball_8java_source.html#l00008

    Simply create an instance using the world variable and then set its direction and velocity to what it needs to be.

    These are simply pointers to where you need to look for the answers, if you need further assistance with any of the three suggestions let us know.

    Take care! :D
     
  4. Offline

    ZNickq

    getTargetBlock() get the target block! :)
     
    Father Of Time likes this.
  5. Offline

    Father Of Time

    There she be, I knew there was one but couldn't locate it. ;)
     
  6. Offline

    jakepozaic

    Thanks guys ill update this post a bit
    thing is im making this plugin private for a friends server but i think ill be ale to get him to goo spout
     
Thread Status:
Not open for further replies.

Share This Page