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

Is there any way to do this on 1.16?

Discussion in 'Development' started by Moonafic, Jan 22, 2021.

  1. Moonafic

    Moonafic Silverfish

    Messages:
    24
    So im trying to make automatic guns on 1.16. On 1.1 i did this with DataPacketReceiveEvent but that event is gone and i cant do that with PlayerInteractEvent because if you hold screen it registers it as 1 click. Any suggestions how to do this?
     
  2. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    You can do so with a simple task.

    Just run task on interact
     
  3. Moonafic

    Moonafic Silverfish

    Messages:
    24
    But then you will need to interact 1 more time to stop but thats not what im looking for
     
  4. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Then what are you looking for?
     
  5. Moonafic

    Moonafic Silverfish

    Messages:
    24
    I said that it was possible on 1.1 to just hold finger on screen and it will send player action packets but on 1.16 if you hold it will only send 1
     
  6. Moonafic

    Moonafic Silverfish

    Messages:
    24
    so i wonder if theres any way to recreate what happens on 1.1
     
  7. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
  8. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
    The client sends an animate packet, then an inventory transaction packet, then afterwards a mob equipment packet
     
  9. Moonafic

    Moonafic Silverfish

    Messages:
    24
    on 1.1 client sent player action packets when you hold your screen
     
  10. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
    Does this happen even when nothing is in the player's hand?
     
  11. Moonafic

    Moonafic Silverfish

    Messages:
    24
    yea, but thats the point you can make automatic guns like on pc, hold to shoot.
    but on 1.16 only way i figured out is adding food items and making autofire through them
     
  12. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Using items like snowball, splash potions, exp bottle etc should work? You just need to cancel PlayerInteractEvent to prevent them from actually throwing it
     
  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.