22w29b fix bugs, fixed bungee protocolsupport

This commit is contained in:
LAX1DUDE 2022-07-22 17:50:21 -07:00
parent b65f67def9
commit b0406bdf7d
15 changed files with 59736 additions and 59729 deletions

View File

@ -1,31 +1,27 @@
# Eaglercraft # Eaglercraft
### Client: [https://g.eags.us/eaglercraft/](https://g.eags.us/eaglercraft/) ### Note: someone got eags.us suspended for copyright infringement, use [https://eaglercraft.us/](https://eaglercraft.us/) for now (until it gets deleted too)
### Client: [https://eaglercraft.us/](https://eaglercraft.us/)
### Offline Download: [Offline_Download_Version.html](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/Offline_Download_Version.html) ### Offline Download: [Offline_Download_Version.html](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/Offline_Download_Version.html)
**Scroll down for the 'secure client', if it is required for a server**
### Minecraft Beta: [https://github.com/LAX1DUDE/eaglercraft-beta/](https://github.com/LAX1DUDE/eaglercraft-beta/) ### Minecraft Beta: [https://github.com/LAX1DUDE/eaglercraft-beta/](https://github.com/LAX1DUDE/eaglercraft-beta/)
### Note: we will be transitioning away from Eaglercraft being standalone 'free browser minecraft' to Eaglercraft being a bukkit/bungee plugin for servers to allow 'online access' to players who register with a command as their real online-mode Minecraft account on the server. Server owners can still elect to set `online-mode=false` in their server.properties to allow free login but now that's their legal screw up instead of mine ### Note: we will be transitioning away from Eaglercraft being standalone 'free browser minecraft' to Eaglercraft being a bukkit/bungee plugin for servers to allow 'online access' to players who register with a command as their real online-mode Minecraft account on the server. Server owners can still elect to set `online-mode=false` in their server.properties to allow free login but now that's their legal screw up instead of mine
![eaglercraft](https://cdn.discordapp.com/attachments/378764518081429506/964047481849643018/new_github_screenshot.png) ![eaglercraft](https://cdn.discordapp.com/attachments/378764518081429506/964047481849643018/new_github_screenshot.png)
### Official Demo URL: [https://g.eags.us/eaglercraft/](https://g.eags.us/eaglercraft/) ### Official Demo URL: [https://eaglercraft.us/](https://eaglercraft.us/)
### Download Locally: [stable-download/Offline_Download_Version.html](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/Offline_Download_Version.html) ### Download Locally: [stable-download/Offline_Download_Version.html](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/Offline_Download_Version.html)
(right click the link and press 'Save link as...' to download the file) (right click the link and press 'Save link as...' to download the file)
### Play Minecraft Beta Singleplayer: [https://g.eags.us/eaglercraft/beta/](https://g.eags.us/eaglercraft/beta/) ### Play Minecraft Beta Singleplayer: use [https://eaglercraft.us/beta/](https://eaglercraft.us/beta/) for now until I fix eags.us
**For any questions you can join the discord server and hit me up there [https://discord.gg/Ekzcgs3DKZ](https://discord.gg/Ekzcgs3DKZ)** **For any questions you can join the discord server and hit me up there [https://discord.gg/Ekzcgs3DKZ](https://discord.gg/Ekzcgs3DKZ)**
### 'Secure' Client: [https://g.eags.us/eaglercraft/secure.html](https://g.eags.us/eaglercraft/secure.html)
**'Secure' Offline Download: [Offline_Download_Version_SECURE.html](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/Offline_Download_Version_SECURE.html)**
## What is Eaglercraft? ## 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. You can join real Minecraft 1.5.2 servers with it through a custom proxy based on Bungeecord. 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.
@ -70,20 +66,21 @@ Keep both the first and second terminal window you opened, just minimize them do
26. 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 bukkit plugins, download the plugin's JAR file for CraftBukkit 1.5.2 and place it in `java/bukkit_command/plugins`
27. To add some bungee plugins, download the plugin's JAR file and place it in `java/bungee_command/plugins` 27. To add some bungee plugins, download the plugin's JAR file and place it in `java/bungee_command/plugins`
28. See [https://github.com/LAX1DUDE/eaglercraft-plugins/](https://github.com/LAX1DUDE/eaglercraft-plugins/) to download some supported plugins 28. See [https://github.com/LAX1DUDE/eaglercraft-plugins/](https://github.com/LAX1DUDE/eaglercraft-plugins/) to download some supported plugins
29. 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. **To disable voice chat, set `voice_enabled: false` in the bungeecord config.yml**
30. **To ban a username on Eaglercraftbungee, use:** `eag-ban <username>` 30. 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
31. **To ban an IP on Eaglercraftbungee, use:** `eag-ban-ip <ip>`, or `eag-ban-ip <name>` to ban the IP of a player automatically 31. **To ban a username on Eaglercraftbungee, use:** `eag-ban <username>`
32. To ban a range of IP addresses, use slash notation to define a subnet. Example: `eag-ban-ip 192.168.0.0/8` 32. **To ban an IP on Eaglercraftbungee, use:** `eag-ban-ip <ip>`, or `eag-ban-ip <name>` to ban the IP of a player automatically
33. To ban users by wildcard (\*) use: `eag-ban-wildcard <text>*` or `eag-ban-wildcard *<text>` or `eag-ban-wildcard *<text>*` 33. To ban a range of IP addresses, use slash notation to define a subnet. Example: `eag-ban-ip 192.168.0.0/8`
34. **You can edit bans.txt in your EaglercraftBungee folder, the server automatically reloads the file when it is saved** 34. To ban users by wildcard (\*) use: `eag-ban-wildcard <text>*` or `eag-ban-wildcard *<text>` or `eag-ban-wildcard *<text>*`
35. To ban users by regular expression, use: `eag-ban-regex <regex>` with a regular expression to match the username in **lowercase** 35. **You can edit bans.txt in your EaglercraftBungee folder, the server automatically reloads the file when it is saved**
36. **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** 36. To ban users by regular expression, use: `eag-ban-regex <regex>` with a regular expression to match the username in **lowercase**
37. 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. 37. **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**
38. 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/` 38. 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.
39. 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 39. 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/`
40. 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). 40. 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
41. 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 41. 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).
42. 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 42. 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
43. 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? ## Singleplayer?
@ -103,6 +100,8 @@ I got tired of closing duplicate 'how to maek sever' and 'add single player' iss
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 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
**EaglercraftBungee has a built in domain blacklist that updates automatically, you can disable it by setting this in config.yml:** **EaglercraftBungee has a built in domain blacklist that updates automatically, you can disable it by setting this in config.yml:**
```yaml ```yaml
@ -154,7 +153,7 @@ origin_blacklist_block_offline_download: true
add_header X-Frame-Options "SAMEORIGIN"; add_header X-Frame-Options "SAMEORIGIN";
add_header Referrer-Policy "strict-origin"; add_header Referrer-Policy "strict-origin";
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' 'unsafe-inline' data: blob:; connect-src 'self' ws: wss:; upgrade-insecure-requests"; 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) (not fully tested, excuse the scroll bar)
@ -198,7 +197,7 @@ ratelimit:
**Register event handlers using the standard BungeeCord** `@EventHandler` **annotation in your** `Listener` **class** **Register event handlers using the standard BungeeCord** `@EventHandler` **annotation in your** `Listener` **class**
## Installing (detailed) ## Installing (outdated guide, detailed)
If you want to use this project but don't want to compile it from scratch, download [stable-download/stable-download-new.zip](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/stable-download-new.zip) and extract If you want to use this project but don't want to compile it from scratch, download [stable-download/stable-download-new.zip](https://github.com/LAX1DUDE/eaglercraft/raw/main/stable-download/stable-download-new.zip) and extract

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1253,6 +1253,9 @@ public class EaglerAdapterImpl2 {
public static final void setPlaybackOffsetDelay(float f) { public static final void setPlaybackOffsetDelay(float f) {
// nah // nah
} }
public static final void setMasterVolume(float v) {
ss.setMasterVolume(v);
}
private static int playbackId = 0; private static int playbackId = 0;
public static final int beginPlayback(String fileName, float x, float y, float z, float volume, float pitch) { public static final int beginPlayback(String fileName, float x, float y, float z, float volume, float pitch) {
int id = ++playbackId; int id = ++playbackId;

View File

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

View File

@ -909,6 +909,8 @@ public class EntityRenderer {
EffectPipelineFXAA.displayHeight = this.mc.displayHeight; EffectPipelineFXAA.displayHeight = this.mc.displayHeight;
EffectPipelineFXAA.beginPipelineRender(); EffectPipelineFXAA.beginPipelineRender();
RenderManager.instance.voiceTagsDrawnThisFrame.clear();
for (int var13 = 0; var13 < 2; ++var13) { for (int var13 = 0; var13 < 2; ++var13) {
if (this.mc.gameSettings.anaglyph) { if (this.mc.gameSettings.anaglyph) {
anaglyphField = var13; anaglyphField = var13;

View File

@ -503,7 +503,7 @@ public abstract class RenderLiving extends Render {
String nm = ((EntityOtherPlayerMP) par1EntityLiving).username; String nm = ((EntityOtherPlayerMP) par1EntityLiving).username;
boolean mute = EaglerAdapter.getVoiceMuted().contains(nm); boolean mute = EaglerAdapter.getVoiceMuted().contains(nm);
if(mute || EaglerAdapter.getVoiceSpeaking().contains(nm)) { if((mute || EaglerAdapter.getVoiceSpeaking().contains(nm)) && renderManager.voiceTagsDrawnThisFrame.add(nm)) {
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING); EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING);
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D); EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);

View File

@ -1,8 +1,10 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Set;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
@ -38,6 +40,8 @@ public class RenderManager {
public double viewerPosZ; public double viewerPosZ;
public static boolean field_85095_o = false; public static boolean field_85095_o = false;
public final Set<String> voiceTagsDrawnThisFrame = new HashSet();
public RenderManager() { public RenderManager() {
this.entityRenderMap.put(EntitySpider.class, new RenderSpider()); this.entityRenderMap.put(EntitySpider.class, new RenderSpider());
this.entityRenderMap.put(EntityCaveSpider.class, new RenderSpider()); this.entityRenderMap.put(EntityCaveSpider.class, new RenderSpider());

View File

@ -2466,12 +2466,12 @@ public class EaglerAdapterImpl2 {
public static final void tickVoice() { public static final void tickVoice() {
recentlyNearbyPlayers.checkForExpirations(); recentlyNearbyPlayers.checkForExpirations();
speakingSet.clear();
for (String username : voiceAnalysers.keySet()) { for (String username : voiceAnalysers.keySet()) {
AnalyserNode analyser = voiceAnalysers.get(username); AnalyserNode analyser = voiceAnalysers.get(username);
Uint8Array array = Uint8Array.create(analyser.getFrequencyBinCount()); Uint8Array array = Uint8Array.create(analyser.getFrequencyBinCount());
analyser.getByteFrequencyData(array); analyser.getByteFrequencyData(array);
int len = array.getLength(); int len = array.getLength();
speakingSet.remove(username);
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
if (array.get(i) >= 0.1f) { if (array.get(i) >= 0.1f) {
speakingSet.add(username); speakingSet.add(username);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long