Basic html dialogs inside minecraft

this is a paste from bukkit plugin suggestion forums, that now i think would be great if could be implemented on sponge !!

my idea is that minecraft client (trought forge?) could request an EXTERNAL HTTP SERVER PAGE (could be localhost running php) and parse some plain html tags response (or bbcode or whatever, no javascript nor css) … mainly tables, forms, background colors, font color with default pixelated ones, stretched tiny images to save bandwidth and force to look pixelated, and links

that way you could design whatever interface in your web server you want to be shown inside your minecraft game … for example a custom ingame “view/edit skin”, “recipe lookup”, “my map waypoints”, “player profile(s)”, “player login” or any interface, by a yml configurable request like – url: "http://localhost/minecrafthtml/profile.php?player=%P – or some … then your webserver build your page and send to minecraft, and it parses and show you, with some degree of interactivity

see pasted bukkit forums message below for more details

category = mechanics, informational, miscelaneous

suggested name = html pages, minecraft html

what i want = put some web pages on my web server with images, forms, and links
that i can read inside minecraft … NOT A WEB BROWSER WITH ADDRESS BAR
INSIDE MINECRAFT … example: suppose i wrote a web interface to search recipes
and i can view inside minecraft, connected to my webserver, and intecact
with it, without recipe plugin … example: i can view the players rank
realtime inside mc, and query stats, thougth http/html, inside minecraft
… example: player profile view/edit inside mc, with html forms

ideas for commands = if you type /recipe internally opens htttp://localhost/minecrafthtml/recipes.php?player=$player or so, then it opens in a mc window interface … if you type /profile it opens htttp://localhost/minecrafthtml/profile.php? and renders a player profile window inside minecraft, retrieved from the webserver, limited to the controls the page have

i think this will add so much flexibility to minecraft game interface,
game experience, and plugin development … i could not find anybody did
some like this … i found an ingame web browser once but , until could
be based on it, i think is too heavy and is not that i am searching for

only thought on page rendering and send forms … all logic can be processed
on web server trough php, only pure html (JUST SOME HTML TAGS like
images, forms, tables, anchors, no font styles) … the more complex,
the more hard to develop and insecure

think on some like this

          <td><img src='none.jpg'/></td>
          <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
          <td><img src='none.jpg'/></td>
        <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
        <td><a href='recipe.php?item=redst'><img src='redst.jpg'/></a></td>
          <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
          <td><img src='none.jpg'/></td>
          <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
          <td><img src='none.jpg'/></a></td>
<img src='clock.jpg'/>
<form action='recipe-php' method='get'>
  <input name='item'/><br/>
  <input type='submit' value='Search'/>

[CODE]# config.yml
commands:- recipe: ‘http://localhost/minecrafthtml/recipe.php?recipe=$1

ingame view/edit password, skin, etc

Sponge will work with the vanilla MC client, so that’s not possible. Also, a local PHP server is a security hole (JavaScript could be as well)

i wrote a concept for something like this using the chat. as a player enters a site he gets locked out of chat and can browse through plaintext and textlinks. after leaving the missed chat gets dumped to the player.
The server im working for was not intrrested so i got no finished plugin for bukkit

Oh, that’s a nice idea. It could be a chat-based protocol with a singleplayer mod that features a html window. Nice idea!

i know there was a plugin or mod that adds a full web browser inside minecraft, but it would be a huge software in all aspects and i cant really see the point … so considering this, doing a simpler task as requesting some link internally (by the client/mod/forge/plugin, not by the player, except by clicking an already rendered element) and parse some basic html tags and draw the result could be possible

it would open a huge world of new functionality and interfaces to the game

I would suggest Mojang to implement the whole interface using HTML5 :slight_smile:


Check this mod out:
It really is a web browser!

boformer: i was thinking only a limited set of html2-3 tags to keep it lightweight: <table>, <tr>, <td>, <form>, <input>, <textarea>, <font color>, <img>, <a>, <br>

simon816: i think that is the plugin i was talking for, but if you catch the idea i only wish to give minecraft the ability to render interface dialogs in basic html by quering an external http server, not a WHOLE web browser

@boformer glad i could give some inspiration.
back then i was too lazy too code a html parser, so i decided to use it plaintext with bbcode like urls. you simply typed the link word in chat to follow it. and a header tag to pipe input as GET/POST request and md5-hashed if necessary. thinking about it… i might revisit this project if you don’t mind :wink:

Maybe use a webkit-based webview?
The problem is that you can’t embed Swing Objects in LWJGL applications… ( + performance issues)