Eaglercraft 1.5 - source files and history
Go to file
2022-09-01 23:44:01 -07:00
eaglercraftbungee 22w35a Bug fixes & ability to disable title screen panorama blur 2022-08-30 22:38:41 -04:00
epkcompiler LAN ready for testing 2022-08-19 01:34:04 -07:00
gradle/wrapper uploaded source 2020-09-01 17:19:08 -07:00
javascript merged bullshit 2022-09-01 22:19:55 -07:00
lwjgl-rundir more various changes from my TODO list 2022-09-01 23:44:01 -07:00
samples Fix sample files. 2022-04-30 09:27:20 -04:00
sp-relay 22w34a SINGLEPLAYER + LAN WORLDS! ;> 2022-08-28 00:23:33 -07:00
sp-server fix pointer lock in chrome via funny packet manipulation 2022-08-25 23:12:18 -04:00
src more various changes from my TODO list 2022-09-01 23:44:01 -07:00
stable-download 22w35a Bug fixes & ability to disable title screen panorama blur 2022-08-30 22:38:41 -04:00
zip-generator more various changes from my TODO list 2022-09-01 23:44:01 -07:00
.classpath server generates and saves both world and player and ticks entities 2022-03-03 23:02:41 -08:00
.gitattributes removed offline download from language stats 2022-08-14 01:35:38 -07:00
.gitignore more various changes from my TODO list 2022-09-01 23:44:01 -07:00
.project fixed client syntax 2022-07-27 21:42:58 -07:00
build.gradle added some features, fixed random bullshit 2022-08-24 23:25:01 -07:00
CompileEPK.bat added some "features" 2022-09-01 22:18:52 -07:00
gradlew uploaded source 2020-09-01 17:19:08 -07:00
gradlew.bat uploaded source 2020-09-01 17:19:08 -07:00
LICENSE Update LICENSE 2022-01-09 03:03:44 -08:00
README.md 22w35a Bug fixes & ability to disable title screen panorama blur 2022-08-30 22:38:41 -04:00
settings.gradle Fix large packets on LAN connections causing End of Stream (RIP). 2022-08-28 18:58:44 -04:00
ZipStableDownload.bat fixed replit support in zip-generator 2022-08-26 17:41:13 -07:00
ZipStableDownload.sh fixed replit support in zip-generator 2022-08-26 17:41:13 -07:00

Eaglercraft

Currently maintained by ayunami2000

Client: https://g.deev.is/eaglercraft/

Offline Download: Offline_Download_Version.html

eaglercraft

Official Demo URL: https://g.deev.is/eaglercraft/

Download Locally: stable-download/Offline_Download_Version.html

(right click the link and press 'Save link as...' to download the file)

Play Minecraft Beta Singleplayer: https://g.deev.is/eaglercraft/beta/

For any questions you can join the discord server and hit us up there https://discord.gg/Ekzcgs3DKZ

What is Eaglercraft?

Eaglercraft is real Minecraft 1.5.2 that you can play in any regular web browser. That includes school chromebooks, it works on all chromebooks. It supports both singleplayer and multiplayer.

Ayonull's server list: https://eagler.nully.tech/servers

Ayonull's FAQ site: https://eagler.nully.tech/

Singleplayer?

Eaglercraft now fully supports singleplayer!

Simply press the 'Singleplayer' button on the main menu and you can create a regular vanilla minecraft and play it any time.

The worlds are stored in your browser's local storage, you can export them as EPK files and import them again on all other Eaglercraft sites that also support singleplayer. You can even copy an exported world to an entirely different computer, or send it to a friend, and import it and continue playing with all your progress saved.

Link: https://g.deev.is/eaglercraft/

LAN Worlds?

Eaglercraft fully supports LAN worlds, you can share your world with any player and they can connect directly to it as if you are running a server in your browser.

LAN worlds will work between any two devices connected to the internet, you are not limited to only players connected to your Wi-Fi network

To open your world to LAN, go to the pause menu and click 'Open to LAN'. You can configure the gamemode and cheats and if you would like to hide your LAN world. When you do not hide your LAN world, it will appear on the Multiplayer screen from the main menu to anybody else also on your Wi-Fi network. Set the world hidden if you are at school or something and don't want everyone else in your class to join as well and start griefing.

When you open the world to LAN it will give you a 'join code'. Simply share the code with your friends and they can visit the Multiplayer screen from the main menu and click 'Direct Connect' and enter the code and they will be able to join your world.

Make sure they add the relay server your game opens the LAN world on to their "Network Settings" menu accessable from the Multiplayer screen. You simply must send them the URL indicated in the pause menu once the world is opened and they can use the "Add Relay" option to add the URL to their list.

THIS IS A REQUIRED STEP FOR A PERSON TO JOIN YOUR WORLD, IF THEY DO NOT HAVE THE RELAY YOUR WORLD IS HOSTED ON ADDED TO THEIR "Network Settings" THE GAME WILL BE UNABLE TO LOCATE THE WORLD

Here are some public relay servers you can use:

  • wss://relay.deev.is/
  • wss://relay.lax1dude.net/
  • wss://relay.shhnowisnottheti.me/

Issues?

I got tired of closing duplicate 'how to maek sever' issues almost every day so I disabled it because honestly I don't really care anymore, join discord if you've got an issue to report that you are confident can be backed up with source code

How to make a server

If replit is acceptable, you can use this:

https://replit.com/@ayunami2000/eaglercraft-server

  1. Check if Java is installed. You can download it from https://www.java.com/en/download/
  2. Download the stable-download/stable-download.zip file from this repository
  3. Extract the ZIP file you downloaded to a new folder
  4. Open the new folder, go into the java/bungee_command folder
  5. In Windows, double-click run.bat. It should open a new terminal window
    run.bat
    Some computers may just say 'run' instead of 'run.bat', both are correct
  6. On macOS or Linux, google how to open the terminal and use the cd command to navigate to java/bungee_command
    Then, in that folder, run chmod +x run_unix.sh and then run ./run_unix.sh. It should start the same server
  7. Go to the other java/bukkit_command folder that was also extracted from the ZIP
  8. Again, on Windows, double-click run.bat in the folder. It should open a second terminal window.
    Keep both the first and second terminal window you opened, just minimize them don't close
  9. Again, on macOS or Linux, repeat step 7 except in the java/bukkit_command folder
  10. Your server is now ready. Download and open stable-download/Offline_Download_Version.html
  11. Go to 'Multiplayer' from the main menu. Select 'Direct Connect', type 127.0.0.1:25565 and press 'Join Server'
  12. It should allow you to connect, if not, check the two terminal windows for errors
  13. If you are okay with regularly checking for updates to Offline_Download_Version.html, you are now finished
  14. If you are playing with friends and want a shared website that can be updated, see the stable-download/web folder
  15. To install, create a website and upload the contents of stable-download/web to the URL you want to have Eaglercraft on
  16. The 'web' folder will not work if you open it in your browser locally! If you see 'file:///' in the URL you are doing it wrong. You need to upload the folder to an HTTP or HTTPS server and access it over the internet via http:// or https://. The game will not load otherwise, this is not a bug
  17. To modify the list of default servers, modify the window.eaglercraftOpts variable in index.html.
  18. A full guide on how to configure eaglercraftOpts is coming soon, but it should be fairly intuitive to figure out how to set it up based on what the default values already are when you look in stable-download
  19. To create a link to your site that automatically joins the server, add a ?server= variable to the URL, like (for example): https://g.deev.is/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 skin
  20. To change your server's MOTD and icon, edit the motd1: 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 pixels
  21. You can give your MOTD multiple lines, add a motd2: to define a second line
  22. For an animated MOTD and icon, install EaglerMOTD: https://github.com/lax1dude/eaglercraft-motd/
  23. To add some bukkit plugins, download the plugin's JAR file for CraftBukkit 1.5.2 and place it in java/bukkit_command/plugins
  24. To add some bungee plugins, download the plugin's JAR file and place it in java/bungee_command/plugins
  25. See https://github.com/lax1dude/eaglercraft-plugins/ to download some supported plugins
  26. To disable voice chat, set voice_enabled: false in the bungeecord config.yml
  27. To add /login and /register, install AuthMe and carefully read it's documentation to set it up correctly
  28. To ban a username on Eaglercraftbungee, use: eag-ban <username>
  29. To ban an IP on Eaglercraftbungee, use: eag-ban-ip <ip>, or eag-ban-ip <name> to ban the IP of a player automatically
  30. To ban a range of IP addresses, use slash notation to define a subnet. Example: eag-ban-ip 192.168.0.0/8
  31. To ban users by wildcard (*) use: eag-ban-wildcard <text>* or eag-ban-wildcard *<text> or eag-ban-wildcard *<text>*
  32. You can edit bans.txt in your EaglercraftBungee folder, the server automatically reloads the file when it is saved
  33. To ban users by regular expression, use: eag-ban-regex <regex> with a regular expression to match the username in lowercase
  34. If you use /op on your server, keep in mind that if you "/op LAX1DUDE", a player joining as 'laX1DUDE' or 'LaX1dUdE' or 'lax1dude' will all have /op too. To solve this problem, force all operators to only be able to join with all lowercase ('lax1dude') letters in their usernames by moving 'BitchFilterPlugin.jar" into "java/bukkit_command/plugins" and then register every op username lowercase
  35. To connect to your server through a ws:// 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.
  36. Eaglercraft uses port 80 for IP connections by default, typing 127.0.0.1 is the same as typing ws://127.0.0.1:80/
  37. To forward a client's remote IP address from a request on nginx to EaglercraftBungee for enforcing IP bans, set the X-Real-IP header on the request to websocket when it is proxied
  38. To make a custom resource pack for your site, clone this repository and edit the files in lwjgl-rundir/resources.
  39. When you are done, navigate to epkcompiler/ and double-click run.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 website
  40. If you're on mac or linux, navigate to the epkcompiler folder via cd 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

EaglercraftBungee

EaglercraftBungee translates WebSockets to a raw Minecraft 1.5.2 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

If voice chat causes moderation problems, set voice_enabled: false in config.yml

To enable the /login and /register commands in EaglercraftBungee, you can edit this portion of config.yml

authservice:
  enabled: false
  register_enabled: true
  authfile: auths.db
  ip_limit: 0
  join_messages:
  - '&3Welcome to my &aEaglercraftBungee &3server!'
  login_timeout: 30
  • enable Turns login commands on and off

  • register_enabled Turns register command on and off

  • authfile Sets the authentication database file, which is compatible with AuthMe

  • ip_limit Sets the max number of registrations per IP, 0 = unlimited

  • join_messages List of messages to show the player when they join

  • login_timeout Sets how many seconds players have to log in before they are kicked

EaglercraftBungee has a built in domain blacklist that updates automatically, you can disable it by setting this in config.yml:

enable_web_origin_blacklist: false

To block all clients on replit from joining, set this to true in config.yml:

origin_blacklist_block_replit_clients: true

To block all offline-download clients, set this to true in config.yml:

origin_blacklist_block_offline_download: true

To block the debug runtime (or other desktop clients), set this to true in config.yml:

origin_blacklist_block_missing_origin_header: true

To add your own blacklisted domains, create a file called origin_blacklist.txt in your bungeecord directory and put the regular expressions inside, one on each line. There 's also a domain command in the console to view a player's domain, and a block-domain and block-domain-name and unblock-domain command to manage the local origin_blacklist.txt from the bungee console (if you don't know how to edit a file on your own). The list reloads automatically when changes to the file are detected.

To configure bungee to block connections from all clients except your own, set this option:

origin_blacklist_use_simple_whitelist: true

Then, add your domain to origin_blacklist_simple_whitelist like this:

origin_blacklist_simple_whitelist:
- type the name of your client's domain here

Then, unless still you want it as an option for your players, disable the offline download so hackers don't use it to bypass the whitelist, as it is not blocked in whitelist mode by default:

origin_blacklist_block_offline_download: true

To stop people from using bookmarklets to load a client from a different URL onto your official URL via XXS, add these headers to NGINX:

add_header X-Frame-Options "SAMEORIGIN";
add_header Referrer-Policy "strict-origin";
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline'; img-src 'self' 'unsafe-inline' data: blob:; connect-src 'self' ws: wss:; upgrade-insecure-requests";

(not fully tested, excuse the scroll bar)

To use IP bans and rate limiting, enable forward_ip and pass a X-Real-IP header from your proxy to the bungeecord's websocket port

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

you need forward_ip configured to use rate limiting, otherwise it will be disabled by defualt

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'

New Events:

Register event handlers using the standard BungeeCord @EventHandler annotation in your Listener class

Hosting a LAN server relay

Simply download stable-download/sp-relay.jar and run java -jar sp-relay.jar

Run java -jar sp-relay.jar --debug to view debug info like all the IPs of incoming connections, as it is not shown by default because logging all that info will reduce performance when the relay is being pinged many times a second depending on it's popularity.

Edit the relayConfig.ini file generated on first launch to change the port and configure ratelimiting and such, and relays.txt to change the list of STUN and TURN relays reported to clients connecting to the relay, which are required to correctly establish a P2P LAN world connection in browsers

The origin-whitelist config variable is a semicolon (;) seperated list of domains used to restrict what sites are to be allowed to use your relay. When left blank it allows all sites. Add offline to allow offline download clients to use your relay as well, and null to allow connections that do not specify an Origin: header. Use * as a wildcard, for example: *.deev.is allows all domains ending with "deev.is" to use the relay.

Compiling

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:

  • Create a new empty eclipse project
  • Link the src/main/java and src/lwjgl/java as source folders and add the jars in lwjgl-rundir as dependencies
  • Create a run configuration and add a jvm argument pointing to the lwjgl natives folder (lwjgl-rundir/natives) like this: -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

Contributing

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/classes_server.js or javascript/assets.epk or anything in stable-download/. I'll recompile those myself when I merge the pull request.