Just something random I was curious about.

Discussion in 'Plugin Development' started by Taketheword, Aug 1, 2013.

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

    Taketheword

    I try to help a lot of people on here with things but now I have a question of my own :p.
    Does anyone know of a way to give water the characteristic of a block? To add a "walking on water" affect?
     
  2. Offline

    Pawnguy7

    If it looks like water to the walker, perhaps check if they are in water, and teleport them above it (but to the same position besides the y changE)
     
  3. Offline

    valon750

    Perhaps you can run a PlayerMoveEvent, that checks the block under the player, and if the block underneath them is water, set the block's pass through feature to false?
     
  4. Offline

    Taketheword

    valon750
    Wouldn't that be too heavy on the server? That would check a ton of events.
     
  5. Offline

    valon750

    Taketheword

    It's surprising how capable a server is with these events, personally I've not found it to be too intensive.
     
  6. Offline

    Pawnguy7

    Pass through feature?

    Anyway, I tested this with teleportation, but as expected, has... well, it just isn't good. So, I used player.sendBlockChange instead, and it is working pretty well. The walker sees stone. Note this is also in the player move event, though it only does most of it if their block location has changed.
     
  7. Offline

    Taketheword

    Pawnguy7
    Awesome :)

    Thanks guys I might attempt to make some sort of a semipermeable water mechanic.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  8. Offline

    Pawnguy7

    Notable, though, is that if you manage to go faster than the server sends them - which, this wasn't a very valid test of, because it is localhost - which can make you walk on water, underwater, if that makes sense. So, I am trying to make it choose the top water block, basically, now.

    The other issues is, if they cause it to update, and get sent what it really is - say, if they click on the stone they are working. Might be able to able to stop at least that occurrence, but I imagine many things could cause updates, and stopping them all would be difficult unless you constantly monitor the packets themselves, not the events that send them.
     
Thread Status:
Not open for further replies.

Share This Page