I hope you like spiders.

Discussion in 'Plugin Development' started by jeffd, May 4, 2011.

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

    jeffd

    Two questions :D

    1) How would I access a collection of all the spiders (or monsters/entities) currently spawned? I want to be able to pick a spider from that list at random to build some funny web stuff around it.
    Entire blocks of code shouldn't be necessary. Just need someone to point me to the right classes and methods.

    2) Is it possible to fire a snowball from a spider, at a specific block or player? How?

    3) Bonus question: Is anyone interested in a plugin that gives spiders really overpowered web abilities? :D
     
  2. Offline

    cjc343

    for (Entity e : world.getEntities()) { if (e instanceof CraftSpider) {//do stuff} } //something like that probably

    .setTarget(LivingEntity t) and .throwSnowball()

    I don't want to die at the hands of snowball throwing spiders that trap me in webs with their snowballs and then come eat me with their faster-than-me jumps. Unless they also get super-slow in their own web.
     
    jeffd likes this.
  3. Offline

    jeffd

    Thanks! Will have a go at that when I get home

    Sorry, I should have mentioned. I tried this and no snowballs are being fired. Or at least not when this is called from an entity target event. :/

    The idea is to use question 1 to make them weave large webs, possibly on some sort of timer. Snowballs for as a visual effect for shooting webs and I've already finished the part where a web appears at the feet of whoever they're fighting. It's gonna be fun, I promise.
    Just had another brilliant idea... What if players wielding a web block can right click to fire their own webs in the same way. Ooh, I can't wait to get started on this.

    Thanks again, cjc343
     
  4. Offline

    PopeUrban

    [​IMG]

    It's a fantastic idea.
     
Thread Status:
Not open for further replies.

Share This Page