22w30a Configurable splash screens & voice bug fix

This commit is contained in:
LAX1DUDE 2022-07-26 19:44:54 -07:00
parent c8a3c0d60c
commit 12aac00d41
13 changed files with 75307 additions and 75166 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@ alert("You're not supposed to 'open' this file in your browser. Please upload th
window.addEventListener("load", function(){
window.minecraftOpts = [
"game_frame","assets.epk",
"CgAACQAHc2VydmVycwoAAAABCAAEbmFtZQARTG9jYWwgVGVzdCBTZXJ2ZXIIAAJpcAAPMTI3LjAuMC4xOjI1NTY1CAALaGlkZUFkZHJlc3MABWZhbHNlCAAKZm9yY2VkTU9URAAAAAkACHNwbGFzaGVzCAAAAAoACkRhcnZpZ2xldCEADkRhcnZpZ2xvcGhpbGUhAAtZb3UgRWFnbGVyIQALWWVlZWVlZWVlZSEAC1lvdSBZZWVsZXIhAA1FRUVFRUVFRUVFRUUhAAtZb3UgRGFydmlnIQAJWW91IFZpZ2chAAI6PgACfD4BAAxlbmFibGVTcGxhc2gBAA=="
"CgAACQAHc2VydmVycwoAAAABCAAEbmFtZQAMbG9jYWwgc2VydmVyCAACaXAAD2xvY2FsaG9zdDoyNTU2NQEAC2hpZGVBZGRyZXNzAAAKAAhtYWluTWVudQkACHNwbGFzaGVzCAAAAAoACkRhcnZpZ2xldCEADkRhcnZpZ2xvcGhpbGUhAAtZb3UgRWFnbGVyIQALWWVlZWVlZWVlZSEAC1lvdSBZZWVsZXIhAA1FRUVFRUVFRUVFRUUhAAtZb3UgRGFydmlnIQAJWW91IFZpZ2chAAI6PgACfD4AAA=="
];
(function(){
var q = window.location.search;

View File

@ -1,12 +1,12 @@
package net.lax1dude.eaglercraft;
import net.minecraft.src.NBTTagList;
import java.util.List;
public class ConfigConstants {
public static boolean profanity = false;
public static final String version = "22w29b";
public static final String version = "22w30a";
public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
@ -21,7 +21,6 @@ public class ConfigConstants {
public static String mainMenuItemLine2 = null;
public static String mainMenuItemLink = null;
public static boolean enableSplash = false;
public static NBTTagList splashTexts = null;
public static List<String> splashTexts = null;
}

View File

@ -3,6 +3,7 @@ package net.minecraft.src;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import net.lax1dude.eaglercraft.ConfigConstants;
import net.lax1dude.eaglercraft.EaglerAdapter;
@ -73,11 +74,11 @@ public class GuiMainMenu extends GuiScreen {
public boolean showAck = false;
public GuiMainMenu() {
if (ConfigConstants.enableSplash) {
NBTTagList splashesList = ConfigConstants.splashTexts;
if(splashesList.tagCount() > 0) {
List<String> lst = ConfigConstants.splashTexts;
if (lst != null) {
if(lst.size() > 0) {
EaglercraftRandom rand = new EaglercraftRandom();
this.splashText = ((NBTTagString) splashesList.tagAt(rand.nextInt(splashesList.tagCount()))).data;
this.splashText = lst.get(rand.nextInt(lst.size()));
}else {
this.splashText = "missingno";
}

View File

@ -33,10 +33,6 @@ public class ServerList {
public static void loadDefaultServers(String base64) {
try {
NBTTagCompound nbt = CompressedStreamTools.readUncompressed(Base64.decodeBase64(base64));
ConfigConstants.enableSplash = nbt.getBoolean("enableSplash");
if (ConfigConstants.enableSplash) {
ConfigConstants.splashTexts = nbt.getTagList("splashes");
}
ConfigConstants.profanity = nbt.getBoolean("profanity");
hideDownDefaultServers = nbt.getBoolean("hide_down");
ConfigConstants.ayonullTitle = nbt.hasKey("serverListTitle") ? nbt.getString("serverListTitle") : null;
@ -49,6 +45,13 @@ public class ServerList {
ConfigConstants.mainMenuItemLine1 = cmp.getStringOrNull("itemLine1");
ConfigConstants.mainMenuItemLine2 = cmp.getStringOrNull("itemLine2");
}
if(cmp.hasKey("splashes")) {
ConfigConstants.splashTexts = new ArrayList();
NBTTagList t = cmp.getTagList("splashes");
for(int i = 0, l = t.tagCount(); i < l; ++i) {
ConfigConstants.splashTexts.add(((NBTTagString)t.tagAt(i)).data);
}
}
}
forcedServers.clear();
NBTTagList list = nbt.getTagList("servers");

File diff suppressed because one or more lines are too long

Binary file not shown.

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

@ -22,7 +22,7 @@ alert("You're not supposed to 'open' this file in your browser. Please upload th
window.addEventListener("load", function(){
window.minecraftOpts = [
"game_frame","assets.epk",
"CgAACQAHc2VydmVycwoAAAABCAAEbmFtZQAIdGVtcGxhdGUIAAJpcAAgd3Mocyk6Ly8gKGFkZHJlc3MgaGVyZSk6KHBvcnQpIC8IAAtoaWRlQWRkcmVzcwAEdHJ1ZQgACmZvcmNlZE1PVEQAAAAJAAhzcGxhc2hlcwgAAAAKAApEYXJ2aWdsZXQhAA5EYXJ2aWdsb3BoaWxlIQALWW91IEVhZ2xlciEAC1llZWVlZWVlZWUhAAtZb3UgWWVlbGVyIQANRUVFRUVFRUVFRUVFIQALWW91IERhcnZpZyEACVlvdSBWaWdnIQACOj4AAnw+AQAMZW5hYmxlU3BsYXNoAQA="
"CgAACQAHc2VydmVycwoAAAABCAAEbmFtZQAMbG9jYWwgc2VydmVyCAACaXAAD2xvY2FsaG9zdDoyNTU2NQEAC2hpZGVBZGRyZXNzAAAKAAhtYWluTWVudQkACHNwbGFzaGVzCAAAAAoACkRhcnZpZ2xldCEADkRhcnZpZ2xvcGhpbGUhAAtZb3UgRWFnbGVyIQALWWVlZWVlZWVlZSEAC1lvdSBZZWVsZXIhAA1FRUVFRUVFRUVFRUUhAAtZb3UgRGFydmlnIQAJWW91IFZpZ2chAAI6PgACfD4AAA=="
];
(function(){
var q = window.location.search;