Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What is wrong?

Comments in 'Plugin Development' started by JackboyPlay, Jul 27, 2016.

  1. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Hello, I have an error in my plugin but I dont know whats the error I've tried a bit but it doesnt work!
    PHP:
    $o $this->getOwner();
    for(
    $x 911$x >= 926$x++){
        for(
    $y 4$y >= 10$y++){
            for(
    $z 931$z >= 943$z++){
                
    $p->getLevel()->setBlock(new Vector3($x$y$z), BLOCK::get(0), truetrue);
            }
        }
    }
    This plugin shall place the block 0
    And yeah the plugin is in a task!
    $p is foreach($o->getServer()->getOnlinePlayers() as $p)
  2. Sergey_D
    Offline

    Sergey_D Active Member

    Joined:
    Jan 19, 2014
    Posts:
    75
    Minecraft User:
    CLILLZ
    if you set x = 911,x cant be bigger than 926,it must work
    PHP:
    $o $this->getOwner();
    for(
    $x 911$x <= 926$x++){
        for(
    $y 4$y <= 10$y++){
            for(
    $z 931$z <= 943$z++){
                
    $p->getLevel()->setBlock(new Vector3($x$y$z), BLOCK::get(0), truetrue);
            }
        }
    }
  3. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Now it works "a bit" beacause only a few blocks were resettet [Randomly with gaps]
  4. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Try rejoining. Most likely some packets missed.
  5. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Edists an way to fix it without rejoin?
  6. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Better connection?
  7. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    What do you mean with "better connection"?
  8. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    The issue is probably caused by poor connection that led to packet loss.
  9. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    I and the Server havent poor connection and this error is only with leaves is it possible to "resend" the packet?
  10. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Is it possible to send the packets again to the player?
  11. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Theoretically, if the player hasn't received the packet, RakNet should resend the packet. So maybe it's not a packet issue, but a rendering issue? Have you made sure that the blocks really did not get cleared, or just visually?

    Try using PacketLogger to track UpdateBlockPacket and see if really all of the blocks got sent?

    If the block is really not cleared client-side, click on the block with hand to make sure that it is still there server-side.

Share This Page

Advertisement