Solved Make water wave

Discussion in 'Plugin Development' started by negative_codezZ, Jul 12, 2014.

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


    It isn't like that at all...

    Has nobody noticed that he DIDN'T ACTUALLY GET ANY CODE FROM THIS THREAD?

    It's one thing if he took code from this thread, changed it a bit to make it work, then refused to release it, but that's not the case at all. He took PRIVATE code and used it, and if it is under license is is probably illegal for him to release it on here.
    KingFaris11 likes this.
  2. Offline


    .... What don't you get about that...
  3. ty bby
  4. Offline


    PandazNWafflez The arguments used to not display the source code are invalid though. (referring to the possibility of his 'boss' not allowing him/firing him) His 'boss' doesn't have anything to do with this. Also, as far as I know, receiving help never implies being obliged to return something. That, however, doesn't mean you should keep solutions to yourself, but instead share it, to help others. This would be a horrible place if people helped each other solely if they owe them something.
  5. Offline


    It's more the principle, he expected help but if I asked him how silky did it, would he help me (in 3rd person since he won't reply)? Of course not. Wow meepcraft and hypixle, so important. Many players. Such fame.
    AdamQpzm and Dragonphase like this.
  6. Offline


    Okay.. I didn't read all the hate here, but you win. Here have the source: Compatible to EffectLib

    1. package de.slikey.effectlib.effect;
    3. import de.slikey.effectlib.EffectManager;
    4. import de.slikey.effectlib.EffectType;
    5. import de.slikey.effectlib.util.MathUtils;
    6. import de.slikey.effectlib.util.ParticleEffect;
    7. import de.slikey.effectlib.util.VectorUtils;
    8. import org.bukkit.Location;
    9. import org.bukkit.util.Vector;
    11. import java.util.Collection;
    12. import java.util.HashSet;
    14. public class WaveLocationEffect2 extends LocationEffect {
    16. public final Vector velocity = new Vector();
    18. protected boolean firstStep = true;
    19. protected final Collection<Vector> waterCache, cloudCache;
    21. public WaveLocationEffect2(EffectManager effectManager, Location location) {
    22. super(effectManager, location);
    24. type = EffectType.REPEATING;
    25. period = 5;
    26. iterations = 50;
    27. velocity.copy(location.getDirection().multiply(0.2));
    28. waterCache = new HashSet<Vector>();
    29. cloudCache = new HashSet<Vector>();
    30. }
    32. public void invalidate() {
    33. firstStep = false;
    34. Vector s1 = new Vector(-1.5f, 0, 0), s2 = new Vector(3, 0, 0), h = new Vector(-0.5 * 1.5f, 2, 0);
    35. Vector n1, n2, n1h, n2h, c1, c2, s1h, h2;
    36. float l1h, l2h, yaw;
    37. s1h = h.clone().subtract(s1);
    38. c1 = s1.clone().add(s1h.clone().multiply(0.5));
    39. l1h = (float) s1h.length();
    40. n1h = s1h.clone().multiply(1f / l1h);
    41. n1 = new Vector(s1h.getY(), -s1h.getX(), 0).normalize();
    42. if (n1.getX() < 0) n1.multiply(-1);
    43. h2 = h.clone().subtract(s2);
    44. c2 = s2.clone().add(h2.clone().multiply(0.5));
    45. l2h = (float) h2.length();
    46. n2h = h2.clone().multiply(1f / l2h);
    47. n2 = new Vector(h2.getY(), -h2.getX(), 0).normalize();
    48. if (n2.getX() < 0) n2.multiply(-1);
    49. yaw = (-location.getYaw() + 90) * MathUtils.degreesToRadians;
    50. for (int i = 0; i < 10; i++) {
    51. float ratio = (float) i / 10;
    52. float x = (ratio - .5f) * l1h;
    53. float y = (float) (-1 / Math.pow((l1h / 2), 2) * Math.pow(x, 2) + 1);
    54. Vector v = c1.clone();
    55. v.add(n1h.clone().multiply(x));
    56. v.add(n1.clone().multiply(y));
    57. for (int j = 0; j < 20; j++) {
    58. float z = ((float) j / 20 - .5f) * 5;
    59. Vector vec = v.clone().setZ(v.getZ() + z);
    60. VectorUtils.rotateAroundAxisY(vec, yaw);
    61. if (i == 0 || i == 10 - 1) cloudCache.add(vec);
    62. else waterCache.add(vec);
    63. }
    64. }
    65. for (int i = 0; i < 10; i++) {
    66. float ratio = (float) i / 10;
    67. float x = (ratio - .5f) * l2h;
    68. float y = (float) (-.5f / Math.pow((l2h / 2), 2) * Math.pow(x, 2) + .5f);
    69. Vector v = c2.clone();
    70. v.add(n2h.clone().multiply(x));
    71. v.add(n2.clone().multiply(y));
    72. for (int j = 0; j < 20; j++) {
    73. float z = ((float) j / 20 - .5f) * 5;
    74. Vector vec = v.clone().setZ(v.getZ() + z);
    75. VectorUtils.rotateAroundAxisY(vec, yaw);
    76. if (i == 10 - 1) cloudCache.add(vec);
    77. else waterCache.add(vec);
    78. }
    79. }
    80. }
    82. @Override
    83. public void onRun() {
    84. if (firstStep) invalidate();
    85. location.add(velocity);
    86. for (Vector v : cloudCache) {
    87. location.add(v);
    88. ParticleEffect.CLOUD.display(location, visibleRange, 0, 0, 0, 0, 1);
    89. location.subtract(v);
    90. }
    91. for (Vector v : waterCache) {
    92. location.add(v);
    93. ParticleEffect.DRIP_WATER.display(location, visibleRange, 0, 0, 0, 0, 1);
    94. location.subtract(v);
    95. }
    96. }
    97. }

    And now, please close this thread.
  7. Offline


    Luke_Lax Your signature confused me greatly.
    Anrza likes this.
  8. Offline



    Your arguments kinda outlines my point. While there are positives in sharing it, they are outweighed by his trust with his 'boss'. I don't think he actually mentioned a 'boss' - that was his friend.
  9. Offline



    This discussion is so poorly.

    negative_codezZ had a nice idea, but not the knowledge how to code it. Then a community member (@Slikey) grab his idea for Hypixel.
    But Silkey was so nice, to share his code with negative_codezZ, because it was his idea. Silkey has 100% of rights for his code, he did NOT need to give negative_codezZ his code, but he did. That was nice and helpful, but not necessary.

    So if negative_codezZ would show us the code, this would be very wrong, since it is NOT HIS code. He'd release someone else's code (which would be against bukkit dev EULA btw.). Not a good idea, since he has 0% of any rights for it.

    So you want to force @Silkey to open-sources his code? Why? Only because he grab the idea from negative_codezZ and was so fair to give him the source?

    I thought this was a place, where people are FREE to help other ones, not a place where you will be FORCED to give YOUR WORK to everyone. Do you know how much these two people helped or will help the community? Only because he doesn't want everyone profit from his code he made THIS TIME, you attack them?

    I hope this thread get closed soon, as it is totally OT now, and people get abused here for no valid reason.
    LCastr0, Anrza and Slikey like this.
  10. Offline


    Slikey Cool code. Very amaze. Big fan.
  11. Offline


    If it was Slikey's code, I certainly understand why he wouldn't post it.

    1. He didn't say that at first, so there was backlash there.
    2. If he's doing a job, he shouldn't be outsourcing the development to a Bukkit Forums post...
    Luke_Lax likes this.
  12. Offline


    The Point is that if you are going to ask the public for help, you should share the solution with the public. Its not morally right to cover the solution and hover it right in front of everyone's faces.

    PandazNWafflez No one may have posted code directly on this thread, but there were people who took their own time to direct him to the proper person for the problem.
  13. Offline


    As it isn't his code, he would violate other one's rights, if he would release it.
  14. Offline


    This thread is still going on?

    Alright let me straighten some things out here. If Slikey didn't want his code to be made public he shouldn't have offered it to someone asking for it on a public forum, and request not to have it made public. That's like giving candy to a baby and telling him not to share it with the other kids in the yard. It's dumb. If you want to avoid an "if I give you candy then everyone else will want some" situation, don't give the candy.

    But it's done now, he shared the code, and it's over. Can this thread now be locked?
  15. Offline


    Both sides of the debate raise valid points.
    • You have rights to the code you have written; you choose whether to release it or not, you are not forced to either BUT...
    • It is good forum etiquette, if you have found a solution on your own, to:
      1. Publicly release it, else...
      2. Allow discussion to continue, don't post how you have found it on your own, as this is no help to anyone and just begs questions, let others find a solution so if anyone looks back at this thread in the future they will know what to do
    • The code has now been posted here
    There is no longer reason for discussion on the ethics of releasing the code.
    bobacadodl and ferrybig like this.
  16. Offline


    My god, just finished my version and bam, the source is released. I just got ninja'd.
    KingFaris11 likes this.
  17. Offline


    JBoss925 You can release it anyway ;) I am always happy to see other ways of doing it^^ (maybe more efficient ways)
  18. Slikey So much for that NDA
  19. Offline


    The thing is, AdamQpzm, I think he's saying he wrote it but he thought that since he gave it to Hypixel (or Mineplex or Minetime or whatever, lost track) that means he couldn't give it to us.
  20. Offline


    Yeah, it's no problem since I gave out the first version of it. I have a more advanced one (not compatible to EffectLib) for Hypixel. So there is no conflict.
  21. Offline


    so you gave us the crappy one? :l
    Lol, jk but this is so cool.
    Is there a surfing game coming?
  22. Offline


    Slikey Thank you for releasing your code, but I totally agree with your "I don't want to share the code since it's for Hypixel". You wrote the code, you own it and you do whatever you want to with it.

    Thanks a lot,
    ~DevilMental (I can't believe I'm talking to Hypixel's developer \o/)
  23. The novelty quickly wares off (hint: they're normal people too ;))
  24. Offline


    AdamQpzm I've always been fan of famous developers and I sort of admire them, for they do. So I tend to be egocentric too ;) (you know why :p )

    ~DevilMental (god damnit, I love myself!)
    AdamQpzm likes this.
  25. Offline


    Hey, thank you, but I am a normal person too with normal problems. :) I started in Bukkit lik everyone else..^^
    thomasb454 and TigerHix like this.
  26. Offline


    What? I thought you were a robot! No way!
    KingFaris11 likes this.
  27. Offline


    They're all front end developers...
Thread Status:
Not open for further replies.

Share This Page