1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How to update block temporarily without saving?

Discussion in 'Development' started by asyven, Nov 21, 2016.

  1. asyven

    asyven Spider

    Messages:
    14
    I wanna update block temporarily without saving (visual), for example: block A transition in block B about 10 seconds.
    And can this block be different for each player?
     
  2. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    theres a plugin, that changes a wools color/basically block every random time interval, try to find it and study the source
     
  3. Lambo

    Lambo Spider

    Messages:
    14
    GitHub:
    Lambo16
    You could send raw packets to the selected players. That should work.
     
    Reid likes this.
  4. asyven

    asyven Spider

    Messages:
    14
    Tell me more about raw packets, please
    with example, if u can
     
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Use Level::sendBlocks(). It will send some UpdateBlockPacket to the player without modifying the data known by the Level. In other words, PocketMine knows nothing about what blocks you have sent; it just sends them.
    Note that anti-hack code may be triggered because nothing else on the server is notified of these block changes you make.
     
    ifvictr, asyven and Lambo like this.
  6. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    Somehow with LDX's Land Protect, you can place a block client side walk on it, but to everyone else your floating in gm 0. And the anti cheat doesn't get triggered.
     
  7. Lambo

    Lambo Spider

    Messages:
    14
    GitHub:
    Lambo16
    Well said. I forgot to mention that if the player can get on those blocks that they would probably get kicked because they are basically flying in the eyes of anti-cheat plugins.
     
  8. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    I would replace X blocks ex glass to designated block so it wont be that troublesome
     
  9. asyven

    asyven Spider

    Messages:
    14
    thx, work fine for me
    https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/level/Level.php#L795


    Lets try - https://github.com/AndroidHackPro/P...d636/ToyBox/src/aliuly/toybox/MagicCarpet.php
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.