How to open demo minecraft gui ?

Discussion in 'Plugin Development' started by Soekya, Feb 16, 2016.

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

    Soekya

    In HexionMc, before launch the game, we can see the demo background !

    [​IMG]
    he transorm it to
    [​IMG]

    How can open it in my plugin ?
     
  2. Offline

    Zombie_Striker

    @Soekya
    This looks like they know a lot a bout packets.

    Most likely the found the packet for the "demomode" GUI, and used a resourcepack for the image.

    If you wish to hunt for that packet:
    http://wiki.vg/Protocol
     
  3. Offline

    Soekya

    I have many problem with packets can you help me create it ?
     
  4. Offline

    Gerov

  5. Offline

    Zombie_Striker

    @Soekya
    No. You can use google to find out how to create and send packets if you need to learn how to do it, but we will not spoonfeed you code. If you are uncomfortable working with packets, post in the Plugin Request forums so someone else can do this for you.
     
  6. Offline

    Soekya

    It's ok, i asked just an example ^^
    Now i go search, thanks for help :)
     
  7. Offline

    Xerox262

    I just attempted this and it was quite easy, however when you're doing it remember to delay it by a tick (If doing it on join) and look into a way of closing it for them, otherwise there's a possibility they'll click on the purchase window trying to guess where the ok button is.

    I was thinking maybe the close window packet however after looking at it, it appears to only close inventories (And you need the window id), you could still try though, I know that for some reason Player#closeInventory() closes the chat gui if the player has it open, so it could possibly close the demo window.

    Edit: You also need to find a way to remove the buttons/text, If the server you mentioned is able to do it then it must be somewhere in the resource pack, I haven't really checked.

    [​IMG]

    Edit: Found out the best way to remove the text and a way to remove the buttons, a horrible way to remove the buttons.

    [​IMG]

    Remove the text by editing the lang file and clearing
    • demo.day.1
    • demo.day.2
    • demo.day.3
    • demo.day.4
    • demo.day.5
    • demo.day.warning
    • demo.day.6
    • demo.reminder
    • demo.remainingTime
    • demo.demoExpired
    • demo.help.movement
    • demo.help.movementShort
    • demo.help.movementMouse
    • demo.help.jump
    • demo.help.inventory
    • demo.help.title
    • demo.help.fullWrapped
    • demo.help.buy
    • demo.help.later
    You will need to do this for all lang files, or else it will display the text for anyone using a lang file you didn't edit.

    However the way I removed the buttons was clearing them from the widgets.png ofcourse the major problem doing this is...

    [​IMG]

    While I like it and might keep it without the buttons it's best to not remove them.

    P.S. Felt silly when I removed the ascii text textures then got stuck and had to restart minecraft change my resource pack.
     
    Last edited: Feb 17, 2016
  8. Offline

    Soekya

    @Xerox262
    I know ot but my problem is to open this demo gui ^^
     
  9. Offline

    Xerox262

    @Soekya @Gerov told you what to do, I just used what he showed.
     
  10. Offline

    Soekya

    Hum ok, thanks anyway
     
  11. Offline

    Xerox262

    @Soekya What? If you're expecting someone to just give you the code you need to think again, if you want someone else to do it for you then make a plugin request in that section. If you post/show you're actually attempting then we can guide you to the correct direction, all I'll say for now is since it's going to the client it's a packet play out, and as @Gerov said it's a game state change. That should at least find you the packet you need.
     
Thread Status:
Not open for further replies.

Share This Page