Need more effects

Discussion in 'Plugin Development' started by andf54, Aug 21, 2012.

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

    andf54

    I'm looking for a way to generate some effects that are not available for world.playEffect(Effect) and entity.playEffect(EntityEffect).

    I'm mostly interested in the effect that is played on critical hits and the one where exp orbs orbit the player. If there are any other effect then I want to hear about them too.
     
  2. Offline

    turqmelon

    If they aren't available through either of those, it's more then likely that the effect is client-side and can't be called.
     
  3. Offline

    devilquak

    It can be, you can call any sound that is in the game in normal Bukkit.
    Which ones were you thinking of?
     
  4. Offline

    andf54

    Thins one: http://media-mcw.cursecdn.com/thumb/f/f7/Crits.png/180px-Crits.png

    I can't find a picture for experience effect. It happens when you pick up a lot of exp orbs. The orbs start flying around the player. Although I'm not sure is it's an effect at all.

    I could use nether portal sparks: http://media-mcw.cursecdn.com/thumb/0/07/2011-10-23_20.57.56.png/800px-2011-10-23_20.57.56.png

    Also, I'm not sure if you can call all sounds, because the client recognises note sounds when they are generated where a note block is.
     
  5. Offline

    devilquak

    I don't know about getting those effects. I think it could be done if you somehow just sent those packets with the effects in them and then grabbed the one you want, but other than that I don't know.

    Not true :)

    Go to your Minecraft folder and open "resources". Go to "newsound", and take a look at everything there. That folder contains almost every sound in Minecraft, and you can call any of them that you want using packets.
     
  6. Offline

    andf54

    I figured that I had to use packets. Is there a list of what packet does what so I can narrow it down.

    Can someone help me with that?
     
  7. Offline

    Icyene

    Yes. Decompile Craftbukkit.jar, and look through the net.minecraft.server classes. You are looking for something among the lines of world.a(....). You can do alot of other effects with CB that you can't with bukkit.
     
  8. Offline

    devilquak

    Taken from my code, but I think V10lator originally found it out.

    PHP:
    Packet62NamedSoundEffect packet = new Packet62NamedSoundEffect("random.eat"pLoc.getBlockX(), pLoc.getBlockY(), pLoc.getBlockZ(), 1.0F1.0F);
    ((
    CraftPlayer)player).getHandle().netServerHandler.sendPacket(packet);
    You can replace "random.eat" with anything in minecraft/resources/newsound. "random" is the folder the sound is in and "eat" is where the sound you want goes.
     
    andf54 likes this.
  9. Offline

    andf54

    Thanks for the help, I will dig trough Packets when I get the time. Will bump this topic when I stumble on it.
     
    devilquak likes this.
  10. Offline

    CarPet

    Noob question but how did you declare pLoc?
     
  11. Offline

    xWatermelon

    player.getLocation()
     
Thread Status:
Not open for further replies.

Share This Page