x
  • IP Copied!
    Click to Copy IP
    0 Players Online
  • Join our Discord!
    0 Users Online
  • Infection @ this to your dev

    Discussion in 'Suggestions' started by HotProtato, Oct 28, 2019.

    1. HotProtato
      Offline

      HotProtato Active Member

      Joined:
      Aug 14, 2014
      Messages:
      94
      Likes Received:
      20
      Use
      PacketPlayOutAnimation for each player with the value "2". This will have players still be in survival but puts them in adventure mode client-side which means no more block glitching :p but, you're still able to place down items (aka redstone torch).

      When infection starts:

      Code:
              players.stream().map(this::getEntityPlayer).forEach(ep -> ep.playerConnection.sendPacket(new PacketPlayOutAnimation(ep, 2)));
      
      EntityPlayer getEntityPlayer(Player p){ return ((CraftPlayer)p).getHandle(); }
      When a player joins Infection:

      Code:
              EntityPlayer ep = getEntityPlayer(p);
              ep.playerConnection.sendPacket(new PacketPlayOutAnimation(ep, 2));
      This basically makes it look like you are in adventure mode when you are actually in survival.
       
      Last edited: Oct 28, 2019

    Share This Page