This project wil have the official Code of minecraft 1.9.4 and this respository will be updated (rip-off of 1.8.8 code)
online-mode=false in their server.properties to allow free login but now that’s their legal screw up instead of mine’
Eaglercraft is real Minecraft 1.9 that you can play in any regular web browser. That includes school chromebooks, it works on all chromebooks. You can join real Minecraft 1.9 servers with it through a custom proxy based on Bungeecord.
java/bungee_command folderrun.bat. It should open a new terminal window
cd command to navigate to java/bungee_commandchmod +x run_unix.sh and then run ./run_unix.sh. It should start the same serverjava/bukkit_command folder that was also extracted from the ZIPrun.bat in the folder. It should open a second terminal window.java/bukkit_command folder127.0.0.1:25565 and press ‘Join Server’stable-download/web folderstable-download/web to the URL you want to have Eaglercraft onservers_template.dat to base64encode.org and press ‘Encode’.index.html at line 21 (or 22) in place of the old text that also begins with CgAACQAHc2Vydm between the quotes?server= variable to the URL, like (for example): https://g.eags.us/eaglercraft/?server=127.0.0.1:25565 will automatically join ws://127.0.0.1:25565/ as soon as the player finishes setting their username and skinmotd1: tag of the listener config in java/bungee_command/config.yml, and replace server-icon.png in the folder where the config file is. Use & to add color/formatting codes. The server list will downscale your icon to 64x64 pixelsmotd2: to define a second linejava/bukkit_command/pluginsjava/bungee_command/plugins/login and /register, install AuthMe and carefully read it’s documentation to set it up correctlyeag-ban <username>eag-ban-ip <ip>, or eag-ban-ip <name> to ban the IP of a player automaticallyeag-ban-ip 192.168.0.0/8eag-ban-wildcard <text>* or eag-ban-wildcard *<text> or eag-ban-wildcard *<text>*eag-ban-regex <regex> with a regular expression to match the username in lowercasews:// or wss:// URL instead of ip:port, set up nginx as a reverse proxy to the ip:port of you EaglercraftBungee server you want the URL to connect to. Use a location URL template with the proxy_pass directive.127.0.0.1 is the same as typing ws://127.0.0.1:80/X-Real-IP header on the request to websocket when it is proxiedrun.bat. Wait for the window to say Press any key to continue... and close it. Then, go to ../javascript in the repository and copy javascript/assets.epk to the assets.epk on your websitecd and run chmod +x run_unix.sh and then ./run_unix.sh to do this, then copy the same javascript/assets.epk to the assets.epk on your website(no singleplayer yet)
Eaglercraft uses the decompiled source code of the official build of Minecraft 1.5.2 direct from Mojang. It is decompiled by MCP and then recompiled to Javascript using TeaVM. Therefore it can join real Minecraft 1.9 servers, as it is really running Minecraft 1.9 in the browser. However, due to security limitations in modern browsers, it must use javascript Websocket objects for multiplayer instead of direct TCP connections to it’s servers. A modified version of Bungeecord is included with Eaglercraft which accepts browser HTTP Websocket connections from Eaglercraft clients and unwraps the streams internally to regular TCP so they can be forwarded to regular Bukkit servers with no plugins. For graphics, a custom GPU compatibility layer allows Mojang’s fixed function OpenGL 1.3 based rendering engine to render directly to an HTML5 WebGL 2.0 canvas on the page with minimal changes to the source, preserving the game’s graphics to look exactly the same as desktop vanilla Minecraft 1.9 (comming soon)
(discord channel will be Made a Later Date)
EaglercraftBungee translates WebSockets to a raw Minecraft 1.9 TCP connection. It is just regular BungeeCord with more config.yml options, and a built in plugin for syncing people’s custom skins between clients so people can see each other’s skins
Enable forward_ip and pass a X-Real-IP header from your proxy to use rate limiting and IP bans on a URL
Nginx example: add proxy_set_header X-Real-IP $remote_addr to your proxy configuration
The server has built in DoS protection, reset it via typing ‘eag-ratelimit reset’ in the bungee console
ratelimit:
ip:
enable: true
period: 90
limit: 60
limit_lockout: 80
lockout_duration: 1200
exceptions: []
enable enable rate limiting
period and limit set the number of requests (limit) can be made in (period) number of seconds
limit_lockout and lockout_duration set the number of requests (limit_lockout) that can be made in (period) seconds before the IP is blocked for lockout_duration number of seconds
exceptions a list of IP addresses that should never get rate limited. Local IPs like 127.0.0.1 and 192.168.*.* and such are set as exceptions by default
To develop a plugin, download stable-download/java/bungee_command/bungee_dist.jar and add it to the Build Path of your Java IDE. Develop the plugin just like a regular BungeeCord plugin, see EaglerMOTD for an example.
Test your plugin by exporting it as a jar and putting it in the ‘/plugins’ directory of EaglercraftBungee and then clicking ‘run.bat’
net.md_5.bungee.api.event.WebsocketMOTDEvent: Triggered when a client or website requests the MOTD
net.md_5.bungee.api.event.WebsocketQueryEvent: Triggered when a client or website requests a query. This happens when a site opens a text WebSocket to a listener and sends a single string Accept: <query> packet. Can be used to provide additional custom statistics to server list sites supporting integrated WebSocket queries
Register event handlers using the standard BungeeCord @EventHandler annotation in your Listener class
If you want to use this project but don’t want to compile it from scratch, download stable-download/stable-download-new.zip and extract
Within stable-download-new.zip there is a ‘java’ and a ‘web’ folder. Upload the contents of the web folder to your web server. The web folder will not work if it is opened locally via file:///, it needs to be opened on an http:// or https:// page. Try this extensions if you are on chrome or if that’s not possible then download the alternative single-file html offline version that does work on file URLs. If you use this alternative version, please make sure you and your peers keep your copies up to date by regularly downloading any newer versions of the html file at this link to avoid getting stuck with a version that has a game-breaking glitch or mistake. The eaglercraft bungeecord executable is in the java/bungee_command folder along with the sample configuration file and a run.bat script to launch it. CraftBukkit for minecraft 1.5.2 configured to work with the eaglercraft bungee executable is in java/bukkit_command. The available version of Spigot 1.5.2 has a bug when used with bungee so you are limited to CraftBukkit and CraftBukkit plugins only on your servers
Here are some Bukkit plugins compatible with Eaglercraft: https://github.com/LAX1DUDE/eaglercraft-plugins
To play the game, launch the run.bat script in both the bungee_command and bukkit_command folders. Then navigate to the URL where the contents of the web folder ended up. The game should load without any issues. Go to the Multiplayer screen and select ‘Direct Connect’. Type 127.0.0.1:25565. Press connect or whatever and enjoy, the default port configured in the bungeecord config.yml is 25565 instead of 80 to avoid any potential conflict with the local web server or the OS (and linux desktop users can’t use port numbers under 1024 without sudo).
The default behavior in Eaglercraft if no :port is provided when connecting to a server is to use port 80, not port 25565. This is so the game’s multiplayer connections in a production environment do not default to a port that is currently blocked by any firewalls. Also this enables you to use Cloudflare and nginx to create reverse proxy connections on your site to host multiple servers on the same domain using different ws:// URLs for each socket.
If you want SSL, set up nginx as a reverse proxy from port 443 to the port on the bungeecord server. You can very easily configure SSL on an nginx virtual host when it is in proxy mode, much more easily than you could if I created my own websocket SSL config option in bungee. To connect to a server running an SSL websocket on the multiplayer screen, use this format: wss://[url]/. You can also add the :port option again after the domain or ip address at the beggining of the URL to change the port and connect with SSL. If you set up the Eaglercraft index.html on an https:// URL, Chrome will only allow you to make wss:// connections from the multiplayer screen. It is a security feature in Chrome, if you want to support both ws:// and wss:// you have to host the Eaglercraft index.html on an http:// URL. The best advice I have for security is to use Cloudflare to proxy both the site and the websocket, because you can use http and ws on your servers locally and then you can configure cloudflare to do the SSL for you when the connections are proxied. And it conceils your IP address to the max and you can also set up a content delivery network for the big assets.epk and classes.js files all for free on their little starter package
To change the default servers on the server list, download stable-download/servers_template.dat and open the file with NBTExplorer (the minecraft one). You will see the list of default servers in a ‘servers’ tag stored as NBT components, and you can edit them and add more as long as you follow the same format the existing servers have. When you’re done, save the file and encode the file back to base64 using the upload option on base64encode.org, then download the encoded file and open it and replace the base64 between the quotes on line 8 of your index.html with the new base64 in the encoded file you downloaded.
There is a plugin hard coded into the bungeecord server to auto synchronize the eaglercraft profile skins between players and worlds
You should probably use a plugin like AuthMe to keep griefers from logging in to other people’s profiles
To compile for the web, run the gradle ‘teavm’ compile target to generate the classes.js file.
To complile to regular desktop Java for quick debugging, using native OpenGL for rendering instead of WebGL:
-Djava.library.path=natives, and make sure the working directory for the run configuration is the lwjgl-rundir folder.To modify the game’s resource pack (javascript/assets.epk), view the readme in the /epkcompiler directory
this project is just a proof of concept to show what can be accomplished when using TeaVM to cross compile an existing java program to javascript. It is not very fast or stable, and the only real useful portion is the emulator code which creates a makeshift fixed function OpenGL 1.3 context using webgl (based on OpenGL 3.3) operational in the browser. Maybe it can be used to port other games in the future.
All I really have to say is, tabs not spaces, and format the code to be like the eclipse auto format tool on factory settings, but also run-on lines of code long enough to go off the screen and single line if statements and other format violations in that category are welcome if it helps enhance the contrast between the less important code and the more important code in a file. Don’t commit changes to javascript/classes.js or javascript/assets.epk or anything in stable-download/. I’ll recompile those myself when I merge the pull request.