Library [1.8] ParticleEffect v1.7

Discussion in 'Resources' started by DarkBladee12, Jun 20, 2013.

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

    MrDplugins

    @DarkBladee12 This line works in your Demo plugin but not in eclipse due do the second varaible needing to be a byte? why does it work in your demo but not in eclipse?
    ParticleEffect.displayBlockCrack(57, 1, 0, 2, 0, 25, player.getLocation(), 16);
    ^ <--- thats the byte.
     
  2. Offline

    RingOfStorms

    Post the error that makes you think it doesn't work with latest version. He can't help you based on "it doesn't work" - paste the corresponding error/message
     
  3. Offline

    zipzapzopzup

    Here it is :
    Code:
    java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at com.nisovin.magicspells.MagicSpells$1.execute(MagicSpells.java:808)
       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
       at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:487)
       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:472)
       at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:223)
       at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:193)
       at net.minecraft.network.NetHandlerPlayServer.func_147350_a(NetHandlerPlayServer.java:1414)
       at net.minecraft.network.play.client.C0APacketAnimation.func_148833_a(SourceFile:43)
       at net.minecraft.network.play.client.C0APacketAnimation.func_148833_a(SourceFile:9)
       at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:206)
       at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173)
       at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:953)
       at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:432)
       at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:783)
       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:646)
       at java.lang.Thread.run(Unknown Source)
    Caused by: fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket$VersionIncompatibleException: Your current bukkit version seems to be incompatible with this library
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.initialize(ParticleEffect.java:645)
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.<init>(ParticleEffect.java:611)
       at fr.diagamma.lyricraft.customspells.ParticleEffect.display(ParticleEffect.java:424)
       at fr.diagamma.lyricraft.customspells.Deflagration.castSpell(Deflagration.java:30)
       at com.nisovin.magicspells.Spell.handleCast(Spell.java:651)
       at com.nisovin.magicspells.Spell.cast(Spell.java:611)
       at com.nisovin.magicspells.Spell.cast(Spell.java:560)
       at com.nisovin.magicspells.CastListener.castSpell(CastListener.java:185)
       at com.nisovin.magicspells.CastListener.onPlayerInteract(CastListener.java:68)
       ... 19 more
    Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R1.PacketPlayOutWorldParticles
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at fr.diagamma.lyricraft.customspells.ReflectionUtils$PackageType.getClass(ReflectionUtils.java:414)
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.initialize(ParticleEffect.java:639)
       ... 27 more
    
    fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket$VersionIncompatibleException: Your current bukkit version seems to be incompatible with this library
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.initialize(ParticleEffect.java:645)
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.<init>(ParticleEffect.java:611)
       at fr.diagamma.lyricraft.customspells.ParticleEffect.display(ParticleEffect.java:424)
       at fr.diagamma.lyricraft.customspells.Deflagration.castSpell(Deflagration.java:30)
       at com.nisovin.magicspells.Spell.handleCast(Spell.java:651)
       at com.nisovin.magicspells.Spell.cast(Spell.java:611)
       at com.nisovin.magicspells.Spell.cast(Spell.java:560)
       at com.nisovin.magicspells.CastListener.castSpell(CastListener.java:185)
       at com.nisovin.magicspells.CastListener.onPlayerInteract(CastListener.java:68)
       at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at com.nisovin.magicspells.MagicSpells$1.execute(MagicSpells.java:808)
       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
       at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:487)
       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:472)
       at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:223)
       at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:193)
       at net.minecraft.network.NetHandlerPlayServer.func_147350_a(NetHandlerPlayServer.java:1414)
       at net.minecraft.network.play.client.C0APacketAnimation.func_148833_a(SourceFile:43)
       at net.minecraft.network.play.client.C0APacketAnimation.func_148833_a(SourceFile:9)
       at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:206)
       at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173)
       at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:953)
       at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:432)
       at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:783)
       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:646)
       at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R1.PacketPlayOutWorldParticles
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at fr.diagamma.lyricraft.customspells.ReflectionUtils$PackageType.getClass(ReflectionUtils.java:414)
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.initialize(ParticleEffect.java:639)
       ... 27 more
    
    java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R1.PacketPlayOutWorldParticles
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at fr.diagamma.lyricraft.customspells.ReflectionUtils$PackageType.getClass(ReflectionUtils.java:414)
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.initialize(ParticleEffect.java:639)
       at fr.diagamma.lyricraft.customspells.ParticleEffect$ParticleEffectPacket.<init>(ParticleEffect.java:611)
       at fr.diagamma.lyricraft.customspells.ParticleEffect.display(ParticleEffect.java:424)
       at fr.diagamma.lyricraft.customspells.Deflagration.castSpell(Deflagration.java:30)
       at com.nisovin.magicspells.Spell.handleCast(Spell.java:651)
       at com.nisovin.magicspells.Spell.cast(Spell.java:611)
       at com.nisovin.magicspells.Spell.cast(Spell.java:560)
       at com.nisovin.magicspells.CastListener.castSpell(CastListener.java:185)
       at com.nisovin.magicspells.CastListener.onPlayerInteract(CastListener.java:68)
       at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at com.nisovin.magicspells.MagicSpells$1.execute(MagicSpells.java:808)
       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
       at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:487)
       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:472)
       at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:223)
       at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:193)
       at net.minecraft.network.NetHandlerPlayServer.func_147350_a(NetHandlerPlayServer.java:1414)
       at net.minecraft.network.play.client.C0APacketAnimation.func_148833_a(SourceFile:43)
       at net.minecraft.network.play.client.C0APacketAnimation.func_148833_a(SourceFile:9)
       at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:206)
       at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173)
       at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:953)
       at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:432)
       at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:783)
       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:646)
       at java.lang.Thread.run(Unknown Source)
    
    Server version: git-Cauldron-MCPC-Plus-1.7.2-1.1147.04.103 (MC: 1.7.2)
    MagicSpells version: 3.1
    
    
     
  4. Offline

    DarkBladee12

    The new version has been released, I'm sorry that i couldn't finish it yesterday! I'm going to set up a GitHub repository soon in order to allow pull requests ;)
     
    PickNChew likes this.
  5. Offline

    Olof Larsson

  6. Offline

    DarkBladee12

  7. Offline

    zipzapzopzup

    Do you have an idea for Cauldron ? ^^"
     
  8. Offline

    DarkBladee12

    @zipzapzopzup Well Cauldron doesn't include the nms classes somehow and this library won't work without them :/
     
  9. Offline

    zipzapzopzup

    @DarkBladee12 Arf... :/
    There isn't a way to bypass that ? Or include the NMS classes ?
     
  10. Offline

    VictoryShot

    How how do we use this new one?
     
  11. Offline

    tcvs

    @VictoryShot There is not much of a change. just update your code with the new code.
     
  12. Offline

    Corndogoz

    can someone help me, here is my code:
    Code:
    ParticleEffect.FLAME.display(null, 0, p.getLocation(), 0);
    the error is:
    Code:
    Corndogoz issued server command: /superhero enable
    [14:54:55] [Thread-31/WARN]: Exception in thread "Thread-31"
    [14:54:55] [Thread-31/WARN]: java.lang.NullPointerException
    [14:54:55] [Thread-31/WARN]:     at heropolice.ParticleEffect$ParticlePacket.<init>(ParticleEffect.java:989)
    [14:54:55] [Thread-31/WARN]:     at heropolice.ParticleEffect.display(ParticleEffect.java:634)
    [14:54:55] [Thread-31/WARN]:     at heropolice.hero.run(hero.java:30)
    [14:54:55] [Thread-31/WARN]:     at java.lang.Thread.run(Thread.java:744)
    
    
    plz help, it would be very helpful for my plugin, thx
     
  13. Offline

    tcvs

    @Corndogoz I am going to assume it is because you have null instead of whatever should be in there(A vector I believe).
     
  14. Offline

    RingOfStorms

    @DarkBladee12 I just looked at your code and I noticed you use the distance method every single time display is called. I would highly recommend changing it from "player.getLocation().distance(location) < 256" to "player.getLocation().distanceSquared(location) < 65536" - square rooting is a rather expensive, and less accurate, task and there are many plugins that call display rather frequently, not to mention you have no need to use the Euclidean distance in this scenario.
     
    DarkBladee12 likes this.
  15. Offline

    Olof Larsson

  16. Offline

    DarkBladee12

    @Olof Larsson I just set up a GitHub repo here. However wouldn't backwards compatibility methods be nonsense, because I changed the enum names of almost all effects?
     
  17. Offline

    Benlewis9000

    @DarkBladee12
    Both classes showed up with numerous errors in Eclipse. I tried to fix them, but it was beyond my level of Java and Eclipse's fixes also failed to work.

    EDIT: Fixed all errors except one;
    Code:
    id += data.getPacketDataString();
    The Operator += is underfined for the argument type(s) Object, String.
     
    Last edited: Dec 15, 2014
  18. Offline

    DarkBladee12

    @Benlewis9000 change it to this then:

    Code:
    id = ((String) id) + data.getPacketDataString();
    What were the other errors that showed up? It's very strange since these classes work perfectly for me and don't show up errors either...
     
    Last edited: Dec 15, 2014
  19. Offline

    Benlewis9000

    @DarkBladee12
    First of all I apologise for saying 'numerous errors', that was just me being a beginner and I cleared them up after posting here :p. However, on line 1132 (according to the GitHub file) of ParticleEffect.java the piece of code I stated above is not valid. Do get around this I just //'d the phrase (which I know will not benefit me in the long term) to make the error go away, and managed to get the plugin working.
     
  20. Offline

    guitargun

    @DarkBladee12 can you change the color if certain particles?
    if so how would this be possible to do?
     
  21. Offline

    RingOfStorms

    Nope
     
  22. Offline

    zipzapzopzup

    @DarkBladee12
    Oh, I found something.
    The Magic plugin uses particles, and WORKS on Cauldron.
    And... the plugin uses EffectLib, and EffectLib uses ParticleEffect.
    I've seen a ParticlePacket class in their plugin (Magic), but don't know how to use it... :/
     
  23. Offline

    DarkBladee12

  24. Offline

    zipzapzopzup

    Okay, I'll try that. ^^
    I'm not sure if you have understand, but I don't use EffectLib. ^^
     
  25. Offline

    MisterErwin

    @zipzapzopzup @DarkBladee12
    I also had to do various changed in EffectLib do get it working (again).
    I just ended up using the (new) Particleeffect Lib and changed the Effect classes so they work & call the right methods :)
     
  26. Offline

    zipzapzopzup

  27. Offline

    DarkBladee12

  28. Offline

    zipzapzopzup

    Yeah, I changed this one. =P
    But it didn't work with. :/
     
  29. Offline

    guitargun

    @RingOfStorms do you know another way to add more colors to particles or is that some kind of advance magic.
     
  30. Offline

    PickNChew

    If you don't cast it to String, you need to use Java 7 or 8.
     
    Benlewis9000 likes this.
Thread Status:
Not open for further replies.

Share This Page