Solved PacketPlayOutWorldParticles with decimals of a block

Discussion in 'Plugin Development' started by Chr0mosom3, Feb 3, 2019.

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

    Chr0mosom3

    Hello there, I need your help. My new code has been BAMBOOZLING me. I saw people do some sick particles and I wanted to give it a shot. I did and I created this:

    Code:
      PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(effects.get(p), true, (float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 1, 1, 1, 0, 3); 
    Now I realized some problems, the X and the Z offsets where too big, and maybe the Y also so I wanted to shrink them down to 0.2, 0.5, 0,2 but my IDE tells me it's wrong, I tested it and also is wrong, any solutions?


    Figured it out! I need to put (float) so Java knows it's a float and not a double!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited: Feb 5, 2019
Thread Status:
Not open for further replies.

Share This Page