{HARD} Water trickery

Discussion in 'Plugin Development' started by pokuit, Jan 20, 2014.

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

    pokuit

    Hello,
    I need to be able to trick the client into thinking it's vision is in water though they can't see the water current block like this:

    Water Current ( I don't want to see this ) :
    [​IMG]

    What I want to see:

    [​IMG]
    From third person:

    [​IMG]

    Though I want it to follow the player wherever he moves.
    Any questions please ask, I realise I may be being a bit vague

    Thanks in advance,
    pokuit
     
  2. Offline

    Garris0n

    Run a timer that checks if the player is in a water block and if so use .sendBlockChange() to make it look like the full water block. Also save the location of the last block their head was in so that you can undo it behind them.
     
  3. Offline

    pokuit

    That's what I was thinking but first of all i need a certain water level spawned + you'll be able to escape the water if you sprint very fast Garris0n
     
  4. Offline

    pokuit

  5. Offline

    Qwahchees

    This is a cool idea, I can't help but, can't this be done by packet spoofing?
     
  6. Offline

    pokuit

    Well the only way I can think to do this is make it so a 5x5 area around the players head is set as that water level. Unfortunatly that seems like a bad way of doing it. Otherwise if we don't do 5x5 area than a person can jump or sprint and they can escape the water.
     
  7. Offline

    Maurdekye

    The water obscurance fog and color is likely client side, which means Bukkit cant interact with it. The only real way is to constantly chase the player's camera with water blocks, which is very unreliable and bound to cause immeasurable lag. You're better off making a client side mod for your server users, and forcing them to have it installed to join your server. In other words, its more trouble than its worth.
     
  8. Offline

    pokuit

    Mhm that's what I feared. :/
    Thanks anyway :)
     
  9. Offline

    ase34

    pokuit : As Qwahchees already suggested, I would send the player packets telling the player to place/remove water in the world. This would be far less resource-intensive for the server and the other players couldn't see the water blocks of this player in the world. Of course, the plugin needs to react fast to player movements to prevent players escaping their "water-bubble".
     
  10. Offline

    Qwahchees

    Is it possible to make the water bubble bigger then? Just a suggestion.
     
Thread Status:
Not open for further replies.

Share This Page