1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-07 08:52:59 +00:00

Merge pull request #238 from SquidDev-CC/feature/binary-handles

Refactor the filesystem and HTTP code
This commit is contained in:
Daniel Ratcliffe
2017-05-16 20:02:34 +01:00
committed by GitHub
15 changed files with 593 additions and 642 deletions

View File

@@ -41,4 +41,17 @@ public class StringUtil
{
return net.minecraft.util.text.translation.I18n.translateToLocalFormatted( key, format );
}
public static byte[] encodeString( String string )
{
byte[] chars = new byte[ string.length() ];
for( int i = 0; i < chars.length; ++i )
{
char c = string.charAt( i );
chars[ i ] = c < 256 ? (byte) c : 63;
}
return chars;
}
}