22w13d LAST 'FREE' UPDATE [part 5] fixed sneaking on 1.8 skins, added ?server= option for the client index.html to auto connect to a specific server

This commit is contained in:
LAX1DUDE 2022-03-31 20:03:46 -07:00
parent e132a59aa3
commit 436315c15e
21 changed files with 97789 additions and 97709 deletions

View File

@ -39,25 +39,26 @@ Keep both the first and second terminal window you opened, just minimize them do
13. **It should allow you to connect, if not, check the two terminal windows for errors**
14. If you are okay with regularly checking for updates to [Offline_Download_Version.html](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/Offline_Download_Version.html), you are now finished
15. If you are playing with friends and want a shared website that can be updated, see the `stable-download/web` folder
16. To install, create a website and upload the contents of `stable-download/web` to the URL you want to have Eaglercraft on.
Edit `index.html`, remove line 19 containing the `alert(` stuff, then search the file for `https://g.eags.us/eaglercraft/` and replace it everywhere with the URL to your own site instead of g.eags.us.
16. To install, create a website and upload the contents of `stable-download/web` to the URL you want to have Eaglercraft on. Edit `index.html`, remove line 19 containing the `alert(` stuff, then search the file for `https://g.eags.us/eaglercraft/` and replace it everywhere with the URL to your own site instead of g.eags.us.
17. To modify the default list of servers, download [servers_template.dat](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/servers_template.dat) and open it in [NBTExplorer](https://github.com/jaquadro/NBTExplorer/releases). Make your changes and then save
18. Upload your modified `servers_template.dat` to [base64encode.org](https://www.base64encode.org/) and press 'Encode'.
19. Download and open the encoded file, copy and paste the text in the file back between the quotes in `index.html` at line 21 (or 22) in place of the old text that also begins with `CgAACQAHc2Vydm` between the quotes
20. To change your server's MOTD and icon, edit the second line of `java/bungee_command/config.yml`, and replace `server-icon.png` in the same folder. Use `&` instead of `§` to add color/formatting codes
21. You can give your MOTD multiple lines, read [yaml-multiline.info](https://yaml-multiline.info/) to see how
22. For an animated MOTD and icon, see: [eaglercraft-plugins/EaglerMOTD](https://github.com/LAX1DUDE/eaglercraft-plugins/tree/main/EaglerMOTD) (WIP, may not be complete)
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/](https://github.com/LAX1DUDE/eaglercraft-plugins/) to download some supported plugins
26. To add `/login` and `/register`, install [AuthMe](https://github.com/LAX1DUDE/eaglercraft-plugins/tree/main/AuthMe) and carefully [read it's documentation](https://github.com/AuthMe/AuthMeReloaded/wiki) to set it up correctly
27. **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**
28. To connect to your server through a `ws://` or `wss://` URL instead of `ip:port`, set up [nginx](https://nginx.org/) 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.
29. 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/`
30. 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
31. To make a custom resource pack for your site, clone this repository and edit the files in [lwjgl-rundir/resources](https://github.com/LAX1DUDE/eaglercraft/tree/main/lwjgl-rundir/resources).
32. When you are done, navigate to [epkcompiler/](https://github.com/LAX1DUDE/eaglercraft/tree/main/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
33. 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
18. **If you can't install NBTExplorer, try [WebNBT](https://irath96.github.io/webNBT/)**
19. Upload your modified `servers_template.dat` to [base64encode.org](https://www.base64encode.org/) and press 'Encode'.
20. Download and open the encoded file, copy and paste the text in the file back between the quotes in `index.html` at line 21 (or 22) in place of the old text that also begins with `CgAACQAHc2Vydm` between the quotes
21. **To create a link to your site that automatically joins the server,** add a `?server=` variable to the URL, like (for example): [https://g.eags.us/eaglercraft/?server=127.0.0.1:25565](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 skin
22. 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 `&` instead of `§` to add color/formatting codes
23. You can give your MOTD multiple lines, add a `motd2:` to define a second line
24. For an animated MOTD and icon, see: [eaglercraft-plugins/EaglerMOTD](https://github.com/LAX1DUDE/eaglercraft-plugins/tree/main/EaglerMOTD) (WIP, may not be complete)
25. To add some bukkit plugins, download the plugin's JAR file for CraftBukkit 1.5.2 and place it in `java/bukkit_command/plugins`
26. To add some bungee plugins, download the plugin's JAR file and place it in `java/bungee_command/plugins`
27. See [https://github.com/LAX1DUDE/eaglercraft-plugins/](https://github.com/LAX1DUDE/eaglercraft-plugins/) to download some supported plugins
28. To add `/login` and `/register`, install [AuthMe](https://github.com/LAX1DUDE/eaglercraft-plugins/tree/main/AuthMe) and carefully [read it's documentation](https://github.com/AuthMe/AuthMeReloaded/wiki) to set it up correctly
29. **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**
30. To connect to your server through a `ws://` or `wss://` URL instead of `ip:port`, set up [nginx](https://nginx.org/) 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.
31. 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/`
32. 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
33. To make a custom resource pack for your site, clone this repository and edit the files in [lwjgl-rundir/resources](https://github.com/LAX1DUDE/eaglercraft/tree/main/lwjgl-rundir/resources).
34. When you are done, navigate to [epkcompiler/](https://github.com/LAX1DUDE/eaglercraft/tree/main/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
35. 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
## Singleplayer?

View File

@ -145,8 +145,19 @@ public class YamlConfig implements ConfigurationAdapter {
//forcedDef.put("pvp.md-5.net", "pvp");
final Collection<ListenerInfo> ret = new HashSet<ListenerInfo>();
for (final Map<String, Object> val : base) {
String motd = this.get("motd", "&6&lbungeecord eaglercraft server |>", val);
String motd = this.get("motd", null, val);
if(motd != null) {
val.remove("motd");
}
motd = this.get("motd1", motd, val);
if(motd == null) {
motd = this.get("motd1", "&6An Eaglercraft server", val);
}
motd = ChatColor.translateAlternateColorCodes('&', motd);
String motd2 = this.get("motd2", null, val);
if(motd2 != null && motd2.length() > 0) {
motd = motd + "\n" + ChatColor.translateAlternateColorCodes('&', motd2);
}
final int maxPlayers = this.get("max_players", 60, val);
final String defaultServer = this.get("default_server", "lobby", val);
final String fallbackServer = this.get("fallback_server", defaultServer, val);

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -4,10 +4,21 @@
<title>eagler</title>
<script type="text/javascript" src="classes.js"></script>
<script type="text/javascript">
window.addEventListener("load", function(){ window.minecraftOpts = [
window.addEventListener("load", function(){
window.minecraftOpts = [
"game_frame","assets.epk",
"CgAACQAHc2VydmVycwoAAAABCAACaXAAFXdzOi8vMTI3LjAuMC4xOjI1NTY1LwgABG5hbWUAC3Rlc3Qgc2VydmVyAQALaGlkZUFkZHJlc3MACAAKZm9yY2VkTU9URAAabG9jYWwgc2VydmVyIG9uIHBvcnQgMjU1NjUAAA=="
]; main(); });
"CgAACQAHc2VydmVycwoAAAABCAACaXAAIHdzKHMpOi8vIChhZGRyZXNzIGhlcmUpOihwb3J0KSAvCAAEbmFtZQAIdGVtcGxhdGUBAAtoaWRlQWRkcmVzcwEIAApmb3JjZWRNT1REABl0aGlzIGlzIG5vdCBhIHJlYWwgc2VydmVyAAA="
];
(function(){
var q = window.location.search;
if(typeof q === 'string' && q.startsWith("?")) {
q = new URLSearchParams(q);
var s = q.get("server");
if(s) window.minecraftOpts.push(s);
}
})();
main();
});
</script>
</head>
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">

View File

@ -1,13 +1,7 @@
package net.lax1dude.eaglercraft;
import java.util.Arrays;
import javax.swing.JOptionPane;
import org.lwjgl.input.Keyboard;
import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.LocalStorageManager;
import net.minecraft.client.Minecraft;
import net.minecraft.src.ServerList;
@ -24,6 +18,9 @@ public class MinecraftMain {
if(b != null) {
ServerList.loadDefaultServers(Base64.encodeBase64String(b));
}
if(par0ArrayOfStr.length > 0) {
EaglerAdapter.setServerToJoinOnLaunch(par0ArrayOfStr[0]);
}
Minecraft mc = new Minecraft();
mc.run();

View File

@ -1306,4 +1306,14 @@ public class EaglerAdapterImpl2 {
}
}
private static String serverToJoinOnLaunch = null;
public static final void setServerToJoinOnLaunch(String s) {
serverToJoinOnLaunch = s;
}
public static final String getServerToJoinOnLaunch() {
return serverToJoinOnLaunch;
}
}

View File

@ -4,7 +4,7 @@ public class ConfigConstants {
public static boolean profanity = false;
public static final String version = "22w13c";
public static final String version = "22w13d";
public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";

View File

@ -71,11 +71,11 @@ public class ModelBipedNewSkins extends ModelBiped {
*/
public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) {
super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_);
EaglerAdapter.glPushMatrix();
//EaglerAdapter.glPushMatrix();
if (p_78088_1_ != null && p_78088_1_.isSneaking()) {
EaglerAdapter.glTranslatef(0.0F, 0.2F, 0.0F);
}
//if (p_78088_1_ != null && p_78088_1_.isSneaking()) {
// EaglerAdapter.glTranslatef(0.0F, 0.2F, 0.0F);
//}
this.field_178733_c.render(p_78088_7_);
this.field_178731_d.render(p_78088_7_);
@ -83,7 +83,7 @@ public class ModelBipedNewSkins extends ModelBiped {
this.field_178732_b.render(p_78088_7_);
this.field_178730_v.render(p_78088_7_);
EaglerAdapter.glPopMatrix();
//EaglerAdapter.glPopMatrix();
}
public void func_178727_b(float p_178727_1_) {

View File

@ -246,7 +246,12 @@ public class Minecraft implements Runnable {
this.sndManager.playTheTitleMusic();
showIntroAnimation();
this.displayGuiScreen(new GuiScreenEditProfile(new GuiMainMenu()));
String s = EaglerAdapter.getServerToJoinOnLaunch();
if(s != null) {
this.displayGuiScreen(new GuiScreenEditProfile(new GuiConnecting(new GuiMainMenu(), this, new ServerData("Eaglercraft Server", s))));
}else {
this.displayGuiScreen(new GuiScreenEditProfile(new GuiMainMenu()));
}
this.loadingScreen = new LoadingScreenRenderer(this);

View File

@ -126,7 +126,7 @@ public class RenderPlayer extends RenderLiving {
}
}
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = this.modelBipedMainNewSkin.isSneak = this.modelBipedMainNewSkinSlim.aimedBow = par1EntityPlayer.isSneaking();
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = this.modelBipedMainNewSkin.isSneak = this.modelBipedMainNewSkinSlim.isSneak = par1EntityPlayer.isSneaking();
double var14 = par4 - (double) par1EntityPlayer.yOffset;
if (par1EntityPlayer.isSneaking() && !(par1EntityPlayer instanceof EntityPlayerSP)) {
@ -136,7 +136,7 @@ public class RenderPlayer extends RenderLiving {
this.mainModel = (DefaultSkinRenderer.isPlayerNewSkin(par1EntityPlayer) ? (DefaultSkinRenderer.isPlayerNewSkinSlim(par1EntityPlayer) ? this.modelBipedMainNewSkinSlim : this.modelBipedMainNewSkin) : this.modelBipedMain);
this.mainModel.isChild = false;
super.doRenderLiving(par1EntityPlayer, par2, var14, par6, par8, par9);
this.mainModel = this.modelBipedMain;
//this.mainModel = this.modelBipedMain;
this.modelArmorChestplate.aimedBow = this.modelArmor.aimedBow = this.modelBipedMain.aimedBow = this.modelBipedMainNewSkin.aimedBow = this.modelBipedMainNewSkinSlim.aimedBow = false;
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = this.modelBipedMainNewSkin.isSneak = this.modelBipedMainNewSkinSlim.isSneak = false;
this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = this.modelBipedMainNewSkin.heldItemRight = this.modelBipedMainNewSkinSlim.heldItemRight = 0;

View File

@ -1,9 +1,6 @@
package net.lax1dude.eaglercraft;
import java.io.PrintWriter;
import java.io.StringWriter;
import org.teavm.jso.JSBody;
import org.teavm.jso.JSExceptions;
import org.teavm.jso.browser.Window;
import org.teavm.jso.core.JSError;
import org.teavm.jso.dom.html.HTMLDocument;
@ -24,9 +21,12 @@ public class Client {
String[] e = getOpts();
EaglerAdapterImpl2.initializeContext(rootElement = Window.current().getDocument().getElementById(e[0]), e[1]);
LocalStorageManager.loadStorage();
if(e.length > 2) {
if(e.length > 2 && e[2].length() > 0) {
ServerList.loadDefaultServers(e[2]);
}
if(e.length > 3) {
EaglerAdapterImpl2.setServerToJoinOnLaunch(e[3]);
}
run0();
//}catch(Throwable t) {
// StringWriter s = new StringWriter();

View File

@ -1737,4 +1737,14 @@ public class EaglerAdapterImpl2 {
return new ServerQueryImpl(type, uri);
}
private static String serverToJoinOnLaunch = null;
public static final void setServerToJoinOnLaunch(String s) {
serverToJoinOnLaunch = s;
}
public static final String getServerToJoinOnLaunch() {
return serverToJoinOnLaunch;
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,22 +5,31 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="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. You can join real Minecraft 1.5.2 servers with it through a custom proxy based on Bungeecord." />
<meta name="keywords" content="calder, young, lax1dude, games, eaglercraft, eagler, minecraft" />
<meta name='url' content="https://g.eags.us/eaglercraft/" />
<meta name="author" content="Calder Young" />
<meta name="keywords" content="minecraft, applet, chromebook, lax1dude, games, eaglercraft, eagler" />
<meta name="author" content="LAX1DUDE" />
<meta property="og:title" content="Eaglercraft" />
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://g.eags.us/eaglercraft/" />
<meta property="og:image" content="https://media.discordapp.net/attachments/378764518081429506/932053915061587978/thumbnail2.png" />
<meta property="og:description" content="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. You can join real Minecraft 1.5.2 servers with it through a custom proxy based on Bungeecord." />
<!-- Change this: <meta property="og:url" content="https://g.eags.us/eaglercraft/" /> -->
<script type="text/javascript" src="classes.js"></script>
<script type="text/javascript">
alert("Make sure you replace the URL 'https://g.eags.us/eaglercraft/' in the meta tags of this HTML file with the URL to your own site!");
window.addEventListener("load", function(){ window.minecraftOpts = [
window.addEventListener("load", function(){
window.minecraftOpts = [
"game_frame","assets.epk",
"CgAACQAHc2VydmVycwoAAAABCAACaXAAIHdzKHMpOi8vIChhZGRyZXNzIGhlcmUpOihwb3J0KSAvCAAEbmFtZQAIdGVtcGxhdGUBAAtoaWRlQWRkcmVzcwEIAApmb3JjZWRNT1REABl0aGlzIGlzIG5vdCBhIHJlYWwgc2VydmVyAAA="
]; main(); });
];
(function(){
var q = window.location.search;
if(typeof q === 'string' && q.startsWith("?")) {
q = new URLSearchParams(q);
var s = q.get("server");
if(s) window.minecraftOpts.push(s);
}
})();
main();
});
</script>
</head>
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">