Skip to content

Commit

Permalink
u29
Browse files Browse the repository at this point in the history
  • Loading branch information
PeytonPlayz595 committed May 31, 2024
1 parent 86f35de commit 38e086f
Show file tree
Hide file tree
Showing 173 changed files with 7,394 additions and 759 deletions.
Binary file added desktopRuntime/UnsafeMemcpy.dll
Binary file not shown.
Binary file added desktopRuntime/UnsafeMemcpy.jar
Binary file not shown.
Binary file not shown.
Binary file added desktopRuntime/libUnsafeMemcpy.so
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
66 changes: 65 additions & 1 deletion desktopRuntime/resources/assets/minecraft/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ gui.all=All
eaglercraft.recording.unsupported=Recording Unsupported!
eaglercraft.recording.stop=Stop Recording
eaglercraft.recording.start=Record Screen...
eaglercraft.soundCategory.voice=Voice
eaglercraft.soundCategory.voice=Recording Voice

eaglercraft.resourcePack.prompt.title=What do you want to do with '%s'?
eaglercraft.resourcePack.prompt.text=Tip: Hold Shift to skip this screen when selecting a resource pack!
Expand All @@ -44,6 +44,15 @@ eaglercraft.editProfile.playerSkin=Player Skin
eaglercraft.editProfile.addSkin=Add Skin
eaglercraft.editProfile.clearSkin=Clear List

eaglercraft.editProfile.capes=Capes
eaglercraft.editProfile.disableFNAW=(Note: go to 'Video Settings...' > 'Other...' to disable FNAW skins)
eaglercraft.editProfile.enableFNAW=(Note: go to 'Video Settings...' > 'Other...' to enable FNAW skins)

eaglercraft.editCape.title=Edit Cape
eaglercraft.editCape.playerCape=Player Cape
eaglercraft.editCape.addCape=Add Cape
eaglercraft.editCape.clearCape=Clear List

eaglercraft.editProfile.importExport=Import/Export

eaglercraft.settingsBackup.importExport.title=What do you wanna do?
Expand Down Expand Up @@ -599,6 +608,60 @@ eaglercraft.updateList.refresh=Refresh
eaglercraft.updateList.note.0=Note: Updates are digitally signed, EaglercraftX will block any
eaglercraft.updateList.note.1=updates that were not created by lax1dude or ayunami2000

eaglercraft.voice.title=Voice Channel
eaglercraft.voice.titleNoVoice=Voice is disabled on this server
eaglercraft.voice.titleVoiceUnavailable=Voice is unavailable
eaglercraft.voice.titleVoiceBrowserError=(browser issue)
eaglercraft.voice.ptt=Press '%s' to speak
eaglercraft.voice.pttChangeDesc=(Press Any Key)
eaglercraft.voice.changeKey=Change
eaglercraft.voice.off=OFF
eaglercraft.voice.radius=NEARBY
eaglercraft.voice.global=GLOBAL
eaglercraft.voice.volumeTitle=Change Volume
eaglercraft.voice.volumeListen=Speakers Volume:
eaglercraft.voice.volumeSpeak=Microphone Volume:
eaglercraft.voice.radiusTitle=Change Listener Radius
eaglercraft.voice.radiusLabel=Players Within:
eaglercraft.voice.radiusChange=change
eaglercraft.voice.notConnected=Not Connected
eaglercraft.voice.connecting=Connecting...
eaglercraft.voice.unavailable=Could not connect!
eaglercraft.voice.connectedGlobal=Connected - Global
eaglercraft.voice.connectedRadius=Connected - $f$Within $radius$m
eaglercraft.voice.playersListening=Players Listening:
eaglercraft.voice.muted=Players Muted:
eaglercraft.voice.unmute=unmute
eaglercraft.voice.mute=mute
eaglercraft.voice.apply=Apply
eaglercraft.voice.volumeSpeakerLabel=Speakers:
eaglercraft.voice.volumeMicrophoneLabel=Microphone:

eaglercraft.voice.unsupportedWarning1=Voice Warning
eaglercraft.voice.unsupportedWarning2=Your network's firewall may not support
eaglercraft.voice.unsupportedWarning3=eaglercraft's voice chat.
eaglercraft.voice.unsupportedWarning4=If your game doesn't work it's your issue
eaglercraft.voice.unsupportedWarning5=to solve, not ayunami2000's or lax1dude's.
eaglercraft.voice.unsupportedWarning6=Don't ask them to 'fix' it for you because
eaglercraft.voice.unsupportedWarning7=they won't help you fix a problem that only
eaglercraft.voice.unsupportedWarning8=you or your network's administrator has the
eaglercraft.voice.unsupportedWarning9=ability to correctly resolve.
eaglercraft.voice.unsupportedWarning10=Continue
eaglercraft.voice.unsupportedWarning11=Cancel

eaglercraft.voice.ipGrabWarning1=IP Logger Warning
eaglercraft.voice.ipGrabWarning2=Using Eaglercraft voice chat may allow your
eaglercraft.voice.ipGrabWarning3=IP address to be logged by other players
eaglercraft.voice.ipGrabWarning4=also using voice on the server.
eaglercraft.voice.ipGrabWarning5=This issue will not be fixed, it is an
eaglercraft.voice.ipGrabWarning6=internal browser issue, not a mistake in the
eaglercraft.voice.ipGrabWarning7=game. Fortunately, this can only be done if
eaglercraft.voice.ipGrabWarning8=the other player uses a hacked web browser
eaglercraft.voice.ipGrabWarning9=or has Wireshark to capture the voice
eaglercraft.voice.ipGrabWarning10=packets, as there exists no real javascript
eaglercraft.voice.ipGrabWarning11=method to log IPs using a normal skidded
eaglercraft.voice.ipGrabWarning12=eaglercraft hacked client.

selectServer.title=Select Server
selectServer.empty=empty
selectServer.select=Join Server
Expand Down Expand Up @@ -799,6 +862,7 @@ options.chat.height.focused=Focused Height
options.chat.height.unfocused=Unfocused Height
options.skinCustomisation=Skin Customization...
options.skinCustomisation.title=Skin Customization
options.skinCustomisation.enableFNAWSkins=Show FNAW Skins
options.modelPart.cape=Cape
options.modelPart.hat=Hat
options.modelPart.jacket=Jacket
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public static final byte[] getResourceBytes(String path) {
public static final ImageData loadImageFile(InputStream data) {
try {
BufferedImage img = ImageIO.read(data);
if(img == null) {
throw new IOException("Data is not a supported image format!");
}
int w = img.getWidth();
int h = img.getHeight();
boolean a = img.getColorModel().hasAlpha();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
public class PlatformBufferFunctions {

public static void put(ByteBuffer newBuffer, ByteBuffer flip) {
int len = flip.remaining();
for(int i = 0; i < len; ++i) {
newBuffer.put(flip.get());
}
newBuffer.put(flip);
}

public static void put(IntBuffer intBuffer, int index, int[] data) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package net.lax1dude.eaglercraft.v1_8.internal;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException;
import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFSIterator2.BreakLoop;
import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.DebugFilesystem;
import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.JDBCFilesystem;
import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.JDBCFilesystemConverter;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;

Expand All @@ -30,183 +28,104 @@ public class PlatformFilesystem {

public static final Logger logger = LogManager.getLogger("PlatformFilesystem");

public static final File filesystemRoot = (new File("filesystem/sp")).getAbsoluteFile();
public static final File debugFilesystemRoot = (new File("filesystem/sp")).getAbsoluteFile();

private static IFilesystemProvider provider = null;

public static String jdbcUri = null;
public static String jdbcDriver = null;

public static void initialize() {
if(!filesystemRoot.isDirectory() && !filesystemRoot.mkdirs()) {
throw new EaglerFileSystemException("Could not create directory for virtual filesystem: " + filesystemRoot.getAbsolutePath());
if(provider == null) {
if(jdbcUri != null && jdbcDriver != null) {
provider = JDBCFilesystem.initialize(jdbcUri, jdbcDriver);
if(((JDBCFilesystem)provider).isNewFilesystem() && debugFilesystemRoot.isDirectory() && debugFilesystemRoot.list().length > 0) {
JDBCFilesystemConverter.convertFilesystem("Converting filesystem, please wait...", debugFilesystemRoot, provider, true);
}
}else {
provider = DebugFilesystem.initialize(debugFilesystemRoot);
}
}
}

public static void setUseJDBC(String uri) {
jdbcUri = uri;
}

public static void setJDBCDriverClass(String driver) {
jdbcDriver = driver;
}

public static interface IFilesystemProvider {

boolean eaglerDelete(String pathName);

ByteBuffer eaglerRead(String pathName);

void eaglerWrite(String pathName, ByteBuffer data);

boolean eaglerExists(String pathName);

boolean eaglerMove(String pathNameOld, String pathNameNew);

int eaglerCopy(String pathNameOld, String pathNameNew);

int eaglerSize(String pathName);

void eaglerIterate(String pathName, VFSFilenameIterator itr, boolean recursive);

}

private static void throwNotInitialized() {
throw new UnsupportedOperationException("Filesystem has not been initialized!");
}

public static boolean eaglerDelete(String pathName) {
File f = getJREFile(pathName);
if(!f.exists()) {
logger.warn("Tried to delete file that doesn't exist: \"{}\"", pathName);
return false;
}
if(f.delete()) {
deleteParentIfEmpty(f);
return true;
}
return false;
if(provider == null) throwNotInitialized();
return provider.eaglerDelete(pathName);
}

public static ByteBuffer eaglerRead(String pathName) {
File f = getJREFile(pathName);
if(f.isFile()) {
long fileSize = f.length();
if(fileSize > 2147483647L) throw new EaglerFileSystemException("Too large: " + fileSize + " @ " + f.getAbsolutePath());
ByteBuffer buf = PlatformRuntime.allocateByteBuffer((int)fileSize);
try(FileInputStream is = new FileInputStream(f)) {
byte[] copyBuffer = new byte[4096];
int i;
while((i = is.read(copyBuffer, 0, copyBuffer.length)) != -1) {
buf.put(copyBuffer, 0, i);
}
if(buf.remaining() > 0) {
throw new EaglerFileSystemException("ERROR: " + buf.remaining() + " bytes are remaining after reading: " + f.getAbsolutePath());
}
buf.flip();
ByteBuffer tmp = buf;
buf = null;
return tmp;
}catch (IOException e) {
throw new EaglerFileSystemException("Failed to read: " + f.getAbsolutePath(), e);
}catch(ArrayIndexOutOfBoundsException ex) {
throw new EaglerFileSystemException("ERROR: Expected " + fileSize + " bytes, buffer overflow reading: " + f.getAbsolutePath(), ex);
}finally {
if(buf != null) {
PlatformRuntime.freeByteBuffer(buf);
}
}
}else {
logger.warn("Tried to read file that doesn't exist: \"{}\"", f.getAbsolutePath());
return null;
}
if(provider == null) throwNotInitialized();
return provider.eaglerRead(pathName);
}

public static void eaglerWrite(String pathName, ByteBuffer data) {
File f = getJREFile(pathName);
File p = f.getParentFile();
if(!p.isDirectory()) {
if(!p.mkdirs()) {
throw new EaglerFileSystemException("Could not create parent directory: " + p.getAbsolutePath());
}
}
try(FileOutputStream fos = new FileOutputStream(f)) {
byte[] copyBuffer = new byte[Math.min(4096, data.remaining())];
int i;
while((i = data.remaining()) > 0) {
if(i > copyBuffer.length) {
i = copyBuffer.length;
}
data.get(copyBuffer, 0, i);
fos.write(copyBuffer, 0, i);
}
}catch (IOException e) {
throw new EaglerFileSystemException("Failed to write: " + f.getAbsolutePath(), e);
}
if(provider == null) throwNotInitialized();
provider.eaglerWrite(pathName, data);
}

public static boolean eaglerExists(String pathName) {
return getJREFile(pathName).isFile();
if(provider == null) throwNotInitialized();
return provider.eaglerExists(pathName);
}

public static boolean eaglerMove(String pathNameOld, String pathNameNew) {
File f1 = getJREFile(pathNameOld);
File f2 = getJREFile(pathNameNew);
if(f2.exists()) {
logger.warn("Tried to rename file \"{}\" to \"{}\" which already exists! File will be replaced");
if(!f2.delete()) {
return false;
}
}
if(f1.renameTo(f2)) {
deleteParentIfEmpty(f1);
return true;
}
return false;
if(provider == null) throwNotInitialized();
return provider.eaglerMove(pathNameOld, pathNameNew);
}

public static int eaglerCopy(String pathNameOld, String pathNameNew) {
File f1 = getJREFile(pathNameOld);
File f2 = getJREFile(pathNameNew);
if(!f1.isFile()) {
return -1;
}
if(f2.isDirectory()) {
throw new EaglerFileSystemException("Destination file is a directory: " + f2.getAbsolutePath());
}
File p = f2.getParentFile();
if(!p.isDirectory()) {
if(!p.mkdirs()) {
throw new EaglerFileSystemException("Could not create parent directory: " + p.getAbsolutePath());
}
}
int sz = 0;
try(FileInputStream is = new FileInputStream(f1)) {
try(FileOutputStream os = new FileOutputStream(f2)) {
byte[] copyBuffer = new byte[4096];
int i;
while((i = is.read(copyBuffer, 0, copyBuffer.length)) != -1) {
os.write(copyBuffer, 0, i);
sz += i;
}
}
}catch (IOException e) {
throw new EaglerFileSystemException("Failed to copy \"" + f1.getAbsolutePath() + "\" to file \"" + f2.getAbsolutePath() + "\"", e);
}
return sz;
if(provider == null) throwNotInitialized();
return provider.eaglerCopy(pathNameOld, pathNameNew);
}

public static int eaglerSize(String pathName) {
File f = getJREFile(pathName);
if(f.isFile()) {
long fileSize = f.length();
if(fileSize > 2147483647L) throw new EaglerFileSystemException("Too large: " + fileSize + " @ " + f.getAbsolutePath());
return (int)fileSize;
}else {
return -1;
}
if(provider == null) throwNotInitialized();
return provider.eaglerSize(pathName);
}

public static void eaglerIterate(String pathName, VFSFilenameIterator itr, boolean recursive) {
try {
iterateFile(pathName, getJREFile(pathName), itr, recursive);
}catch(BreakLoop ex) {
}
if(provider == null) throwNotInitialized();
provider.eaglerIterate(pathName, itr, recursive);
}

private static void iterateFile(String pathName, File f, VFSFilenameIterator itr, boolean recursive) {
if(!f.exists()) {
return;
}
if(!f.isDirectory()) {
itr.next(pathName);
return;
}
File[] fa = f.listFiles();
for(int i = 0; i < fa.length; ++i) {
File ff = fa[i];
String fn = pathName + "/" + ff.getName();
if(ff.isDirectory()) {
if(recursive) {
iterateFile(fn, ff, itr, true);
}
}else {
itr.next(fn);
public static void platformShutdown() {
if(provider != null) {
if(provider instanceof JDBCFilesystem) {
((JDBCFilesystem)provider).shutdown();
}
provider = null;
}
}

private static File getJREFile(String path) {
return new File(filesystemRoot, path);
}

private static void deleteParentIfEmpty(File f) {
String[] s;
while((f = f.getParentFile()) != null && (s = f.list()) != null && s.length == 0) {
f.delete();
}
}
}
}
Loading

0 comments on commit 38e086f

Please sign in to comment.