Particle effects class 1.7.2 ?

Discussion in 'Plugin Development' started by Weszzz, Feb 1, 2014.

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

    Weszzz

    Hi there, my files where gone but ive got them back now so i decided to proceed with my minigame project but i got still the particle effects class from 1.6.2 and if i change import net.minecraft.server.v1_6_R2.Packet63WorldParticles; to import net.minecraft.server.v1_7_R2.Packet63WorldParticles; its not working..
    This is my particle effects class atm:
    Code:java
    1. package me.Weszzz.SurviveIt;
    2.  
    3. import net.minecraft.server.v1_6_R2.Packet63WorldParticles;
    4. import org.bukkit.Location;
    5. import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
    6. import org.bukkit.entity.Player;
    7.  
    8. public enum ParticleEffects
    9. {
    10. HUGE_EXPLOSION("hugeexplosion"),
    11. LARGE_EXPLODE("largeexplode"),
    12. FIREWORKS_SPARK("fireworksSpark"),
    13. BUBBLE("bubble"),
    14. SUSPEND("suspend"),
    15. DEPTH_SUSPEND("depthSuspend"),
    16. TOWN_AURA("townaura"),
    17. CRIT("crit"),
    18. MAGIC_CRIT("magicCrit"),
    19. MOB_SPELL("mobSpell"),
    20. MOB_SPELL_AMBIENT("mobSpellAmbient"),
    21. SPELL("spell"),
    22. INSTANT_SPELL("instantSpell"),
    23. WITCH_MAGIC("witchMagic"),
    24. NOTE("note"),
    25. PORTAL("portal"),
    26. ENCHANTMENT_TABLE("enchantmenttable"),
    27. EXPLODE("explode"),
    28. FLAME("flame"),
    29. LAVA("lava"),
    30. FOOTSTEP("footstep"),
    31. SPLASH("splash"),
    32. LARGE_SMOKE("largesmoke"),
    33. CLOUD("cloud"),
    34. RED_DUST("reddust"),
    35. SNOWBALL_POOF("snowballpoof"),
    36. DRIP_WATER("dripWater"),
    37. DRIP_LAVA("dripLava"),
    38. SNOW_SHOVEL("snowshovel"),
    39. SLIME("slime"),
    40. HEART("heart"),
    41. ANGRY_VILLAGER("angryVillager"),
    42. HAPPY_VILLAGER("happerVillager"),
    43. ICONCRACK("iconcrack_"),
    44. TILECRACK("tilecrack_");
    45.  
    46. private String particleName;
    47.  
    48. private ParticleEffects(String particleName) {
    49. this.particleName = particleName;
    50. }
    51.  
    52. public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count) throws Exception {
    53. Packet63WorldParticles packet = new Packet63WorldParticles();
    54. ReflectionUtilities.setValue(packet, "a", this.particleName);
    55. ReflectionUtilities.setValue(packet, "b", Float.valueOf((float)location.getX()));
    56. ReflectionUtilities.setValue(packet, "c", Float.valueOf((float)location.getY()));
    57. ReflectionUtilities.setValue(packet, "d", Float.valueOf((float)location.getZ()));
    58. ReflectionUtilities.setValue(packet, "e", Float.valueOf(offsetX));
    59. ReflectionUtilities.setValue(packet, "f", Float.valueOf(offsetY));
    60. ReflectionUtilities.setValue(packet, "g", Float.valueOf(offsetZ));
    61. ReflectionUtilities.setValue(packet, "h", Float.valueOf(speed));
    62. ReflectionUtilities.setValue(packet, "i", Integer.valueOf(count));
    63. ((CraftPlayer)player).getHandle().playerConnection.sendPacket(packet);
    64. }
    65. }
     
  2. Offline

    ccrama

    Did you change both 1_6_R2.entity and packet?
     
  3. Offline

    Weszzz

  4. Offline

    clienthax

Thread Status:
Not open for further replies.

Share This Page