decompiled and patched minecraft.jar
83
build.gradle
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath 'io.github.zebalu:teavm-gradle-plugin:1.0.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'eclipse'
|
||||||
|
apply plugin: 'io.github.zebalu.teavm-gradle-plugin'
|
||||||
|
|
||||||
|
sourceCompatibility = 1.8
|
||||||
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
java {
|
||||||
|
srcDir 'src/main/java'
|
||||||
|
srcDir 'src/teavm/java'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.teavm:teavm-platform:0.6.1'
|
||||||
|
implementation 'org.teavm:teavm-classlib:0.6.1'
|
||||||
|
}
|
||||||
|
|
||||||
|
teavm {
|
||||||
|
|
||||||
|
compileScopes = null;
|
||||||
|
minifying = false;
|
||||||
|
maxTopLevelNames = 10000;
|
||||||
|
properties = null;
|
||||||
|
debugInformationGenerated = false;
|
||||||
|
sourceMapsGenerated = true;
|
||||||
|
sourceFilesCopied = false;
|
||||||
|
incremental = false;
|
||||||
|
transformers = null;
|
||||||
|
|
||||||
|
/** Where to save the result */
|
||||||
|
targetDirectory = file("javascript");
|
||||||
|
|
||||||
|
/** The directory to monitor to decide if compile is up-to-date or not */
|
||||||
|
sourceDirectory = file("src");
|
||||||
|
|
||||||
|
/** How to name the result file. */
|
||||||
|
targetFileName = "classes.js";
|
||||||
|
|
||||||
|
/** Which class holds your public static void main(Strin[] args) method */
|
||||||
|
mainClass = 'net.lax1dude.eaglercraft.Client';
|
||||||
|
|
||||||
|
/** This will be the name of your main method after compilation. */
|
||||||
|
entryPointName = 'main';
|
||||||
|
|
||||||
|
classesToPreserve = null;
|
||||||
|
stopOnErrors = false;
|
||||||
|
optimizationLevel = "FULL"; //org.teavm.vm.TeaVMOptimizationLevel.SIMPLE;
|
||||||
|
fastGlobalAnalysis = false;
|
||||||
|
targetType = "JAVASCRIPT"; //org.teavm.tooling.TeaVMTargetType.JAVASCRIPT;
|
||||||
|
cacheDirectory = null;
|
||||||
|
wasmVersion = "V_0x1"; //org.teavm.backend.wasm.render.WasmBinaryVersion.V_0x1;
|
||||||
|
minHeapSize = 4;
|
||||||
|
maxHeapSize = 128;
|
||||||
|
outOfProcess = false;
|
||||||
|
processMemory = 512;
|
||||||
|
longjmpSupported = true;
|
||||||
|
heapDump = false;
|
||||||
|
|
||||||
|
/** Add name of configurations here where to look for jarfiles. */
|
||||||
|
includeJarsFrom = [];
|
||||||
|
|
||||||
|
/** By default teavmc taskd epends on javaCompile task, unless this varaibale is true. */
|
||||||
|
skipJavaCompile = false;
|
||||||
|
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
5
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-bin.zip
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
183
gradlew
vendored
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=`expr $i + 1`
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
0) set -- ;;
|
||||||
|
1) set -- "$args0" ;;
|
||||||
|
2) set -- "$args0" "$args1" ;;
|
||||||
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
100
gradlew.bat
vendored
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
BIN
lwjgl-rundir/Java-WebSocket-1.5.1-with-dependencies.jar
Normal file
BIN
lwjgl-rundir/OpenAL32.dll
Normal file
BIN
lwjgl-rundir/OpenAL64.dll
Normal file
BIN
lwjgl-rundir/liblwjgl.jnilib
Normal file
BIN
lwjgl-rundir/liblwjgl.so
Normal file
BIN
lwjgl-rundir/liblwjgl64.so
Normal file
BIN
lwjgl-rundir/libopenal.so
Normal file
BIN
lwjgl-rundir/libopenal64.so
Normal file
BIN
lwjgl-rundir/lwjgl.dll
Normal file
BIN
lwjgl-rundir/lwjgl.jar
Normal file
BIN
lwjgl-rundir/lwjgl64.dll
Normal file
BIN
lwjgl-rundir/lwjgl_util.jar
Normal file
BIN
lwjgl-rundir/openal.dylib
Normal file
23
lwjgl-rundir/options.txt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
music:1.0
|
||||||
|
sound:1.0
|
||||||
|
invertYMouse:false
|
||||||
|
mouseSensitivity:0.5
|
||||||
|
viewDistance:1
|
||||||
|
bobView:true
|
||||||
|
anaglyph3d:false
|
||||||
|
limitFramerate:false
|
||||||
|
difficulty:2
|
||||||
|
fancyGraphics:false
|
||||||
|
ao:true
|
||||||
|
skin:Default
|
||||||
|
lastServer:
|
||||||
|
key_key.forward:17
|
||||||
|
key_key.left:30
|
||||||
|
key_key.back:31
|
||||||
|
key_key.right:32
|
||||||
|
key_key.jump:57
|
||||||
|
key_key.sneak:42
|
||||||
|
key_key.drop:16
|
||||||
|
key_key.inventory:18
|
||||||
|
key_key.chat:20
|
||||||
|
key_key.fog:33
|
BIN
lwjgl-rundir/resources/armor/chain_1.png
Normal file
After Width: | Height: | Size: 964 B |
BIN
lwjgl-rundir/resources/armor/chain_2.png
Normal file
After Width: | Height: | Size: 523 B |
BIN
lwjgl-rundir/resources/armor/cloth_1.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
lwjgl-rundir/resources/armor/cloth_2.png
Normal file
After Width: | Height: | Size: 710 B |
BIN
lwjgl-rundir/resources/armor/diamond_1.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
lwjgl-rundir/resources/armor/diamond_2.png
Normal file
After Width: | Height: | Size: 724 B |
BIN
lwjgl-rundir/resources/armor/gold_1.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
lwjgl-rundir/resources/armor/gold_2.png
Normal file
After Width: | Height: | Size: 708 B |
BIN
lwjgl-rundir/resources/armor/iron_1.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
lwjgl-rundir/resources/armor/iron_2.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
lwjgl-rundir/resources/art/kz.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
lwjgl-rundir/resources/environment/clouds.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
lwjgl-rundir/resources/environment/rain.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
lwjgl-rundir/resources/environment/snow.png
Normal file
After Width: | Height: | Size: 818 B |
10
lwjgl-rundir/resources/font.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# This file NEEDS to be in UTF-8 format!
|
||||||
|
!"#$%&'()*+,-./
|
||||||
|
0123456789:;<=>?
|
||||||
|
@ABCDEFGHIJKLMNO
|
||||||
|
PQRSTUVWXYZ[\]^_
|
||||||
|
'abcdefghijklmno
|
||||||
|
pqrstuvwxyz{|}~⌂
|
||||||
|
ÇüéâäàåçêëèïîìÄÅ
|
||||||
|
ÉæÆôöòûùÿÖÜø£Ø׃
|
||||||
|
áíóúñѪº¿®¬½¼¡«»
|
BIN
lwjgl-rundir/resources/font/default.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
lwjgl-rundir/resources/gui/background.png
Normal file
After Width: | Height: | Size: 1011 B |
BIN
lwjgl-rundir/resources/gui/container.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
lwjgl-rundir/resources/gui/crafting.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
lwjgl-rundir/resources/gui/furnace.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
lwjgl-rundir/resources/gui/gui.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
lwjgl-rundir/resources/gui/icons.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
lwjgl-rundir/resources/gui/inventory.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
lwjgl-rundir/resources/gui/items.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
lwjgl-rundir/resources/gui/logo.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
lwjgl-rundir/resources/gui/trap.png
Normal file
After Width: | Height: | Size: 937 B |
BIN
lwjgl-rundir/resources/gui/unknown_pack.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
lwjgl-rundir/resources/item/arrows.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
lwjgl-rundir/resources/item/boat.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
lwjgl-rundir/resources/item/cart.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
lwjgl-rundir/resources/item/door.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
lwjgl-rundir/resources/item/sign.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
531
lwjgl-rundir/resources/lang/en_US.lang
Normal file
|
@ -0,0 +1,531 @@
|
||||||
|
|
||||||
|
gui.done=Done
|
||||||
|
gui.cancel=Cancel
|
||||||
|
gui.toMenu=Back to title screen
|
||||||
|
gui.up=Up
|
||||||
|
gui.down=Down
|
||||||
|
gui.yes=Yes
|
||||||
|
gui.no=No
|
||||||
|
|
||||||
|
menu.singleplayer=Singleplayer
|
||||||
|
menu.multiplayer=Multiplayer
|
||||||
|
menu.mods=Mods and Texture Packs
|
||||||
|
menu.options=Options...
|
||||||
|
menu.quit=Quit Game
|
||||||
|
|
||||||
|
selectWorld.title=Select World
|
||||||
|
selectWorld.empty=empty
|
||||||
|
selectWorld.world=World
|
||||||
|
selectWorld.select=Play Selected World
|
||||||
|
selectWorld.create=Create New World
|
||||||
|
selectWorld.delete=Delete
|
||||||
|
selectWorld.rename=Rename
|
||||||
|
selectWorld.deleteQuestion=Are you sure you want to delete this world?
|
||||||
|
selectWorld.deleteWarning=will be lost forever! (A long time!)
|
||||||
|
selectWorld.deleteButton=Delete
|
||||||
|
selectWorld.renameButton=Rename
|
||||||
|
selectWorld.renameTitle=Rename World
|
||||||
|
selectWorld.conversion=Must be converted!
|
||||||
|
selectWorld.newWorld=New World
|
||||||
|
selectWorld.enterName=World Name
|
||||||
|
selectWorld.resultFolder=Will be saved in:
|
||||||
|
selectWorld.enterSeed=Seed for the World Generator
|
||||||
|
selectWorld.seedInfo=Leave blank for a random seed
|
||||||
|
|
||||||
|
multiplayer.title=Play Multiplayer
|
||||||
|
multiplayer.connect=Connect
|
||||||
|
multiplayer.info1=Minecraft Multiplayer is currently not finished, but there
|
||||||
|
multiplayer.info2=is some buggy early testing going on.
|
||||||
|
multiplayer.ipinfo=Enter the IP of a server to connect to it:
|
||||||
|
|
||||||
|
multiplayer.downloadingTerrain=Downloading terrain
|
||||||
|
|
||||||
|
multiplayer.stopSleeping=Leave Bed
|
||||||
|
|
||||||
|
connect.connecting=Connecting to the server...
|
||||||
|
connect.authorizing=Logging in...
|
||||||
|
connect.failed=Failed to connect to the server
|
||||||
|
|
||||||
|
disconnect.genericReason=%s
|
||||||
|
disconnect.disconnected=Disconnected by Server
|
||||||
|
disconnect.lost=Connection Lost
|
||||||
|
disconnect.kicked=Was kicked from the game
|
||||||
|
disconnect.timeout=Timed out
|
||||||
|
disconnect.closed=Connection closed
|
||||||
|
disconnect.loginFailed=Failed to login
|
||||||
|
disconnect.loginFailedInfo=Failed to login: %s
|
||||||
|
disconnect.quitting=Quitting
|
||||||
|
disconnect.endOfStream=End of stream
|
||||||
|
disconnect.overflow=Buffer overflow
|
||||||
|
|
||||||
|
options.off=OFF
|
||||||
|
options.on=ON
|
||||||
|
options.title=Options
|
||||||
|
options.controls=Controls...
|
||||||
|
options.video=Video Settings...
|
||||||
|
options.videoTitle=Video Settings
|
||||||
|
options.music=Music
|
||||||
|
options.sound=Sound
|
||||||
|
options.invertMouse=Invert Mouse
|
||||||
|
options.sensitivity=Sensitivity
|
||||||
|
options.sensitivity.min=*yawn*
|
||||||
|
options.sensitivity.max=HYPERSPEED!!!
|
||||||
|
options.renderDistance=Render Distance
|
||||||
|
options.renderDistance.tiny=Tiny
|
||||||
|
options.renderDistance.short=Short
|
||||||
|
options.renderDistance.normal=Normal
|
||||||
|
options.renderDistance.far=Far
|
||||||
|
options.viewBobbing=View Bobbing
|
||||||
|
options.ao=Smooth Lighting
|
||||||
|
options.anaglyph=3D Anaglyph
|
||||||
|
options.limitFramerate=Limit Framerate
|
||||||
|
options.difficulty=Difficulty
|
||||||
|
options.difficulty.peaceful=Peaceful
|
||||||
|
options.difficulty.easy=Easy
|
||||||
|
options.difficulty.normal=Normal
|
||||||
|
options.difficulty.hard=Hard
|
||||||
|
options.graphics=Graphics
|
||||||
|
options.graphics.fancy=Fancy
|
||||||
|
options.graphics.fast=Fast
|
||||||
|
|
||||||
|
controls.title=Controls
|
||||||
|
|
||||||
|
key.forward=Forward
|
||||||
|
key.left=Left
|
||||||
|
key.back=Back
|
||||||
|
key.right=Right
|
||||||
|
key.jump=Jump
|
||||||
|
key.inventory=Inventory
|
||||||
|
key.drop=Drop
|
||||||
|
key.chat=Chat
|
||||||
|
key.fog=Toggle Fog
|
||||||
|
key.sneak=Sneak
|
||||||
|
key.playerlist=List players
|
||||||
|
|
||||||
|
texturePack.openFolder=Open texture pack folder
|
||||||
|
texturePack.title=Select Texture Pack
|
||||||
|
texturePack.folderInfo=(Place texture pack files here)
|
||||||
|
|
||||||
|
tile.stone.name=Stone
|
||||||
|
tile.stone.desc=
|
||||||
|
tile.grass.name=Grass
|
||||||
|
tile.grass.desc=
|
||||||
|
tile.dirt.name=Dirt
|
||||||
|
tile.dirt.desc=
|
||||||
|
tile.stonebrick.name=Cobblestone
|
||||||
|
tile.stonebrick.desc=
|
||||||
|
tile.wood.name=Wooden Planks
|
||||||
|
tile.wood.desc=
|
||||||
|
tile.sapling.name=Sapling
|
||||||
|
tile.sapling.desc=
|
||||||
|
tile.bedrock.name=Bedrock
|
||||||
|
tile.bedrock.desc=
|
||||||
|
tile.water.name=Water
|
||||||
|
tile.water.desc=
|
||||||
|
tile.lava.name=Lava
|
||||||
|
tile.lava.desc=
|
||||||
|
tile.sand.name=Sand
|
||||||
|
tile.sand.desc=
|
||||||
|
tile.sandStone.name=Sandstone
|
||||||
|
tile.sand.desc=
|
||||||
|
tile.gravel.name=Gravel
|
||||||
|
tile.gravel.desc=
|
||||||
|
tile.oreGold.name=Gold Ore
|
||||||
|
tile.oreGold.desc=
|
||||||
|
tile.oreIron.name=Iron Ore
|
||||||
|
tile.oreIron.desc=
|
||||||
|
tile.oreCoal.name=Coal Ore
|
||||||
|
tile.oreCoal.desc=
|
||||||
|
tile.log.name=Wood
|
||||||
|
tile.log.desc=
|
||||||
|
tile.leaves.name=Leaves
|
||||||
|
tile.leaves.desc=
|
||||||
|
tile.sponge.name=Sponge
|
||||||
|
tile.sponge.desc=
|
||||||
|
tile.glass.name=Glass
|
||||||
|
tile.glass.desc=
|
||||||
|
tile.cloth.name=Wool
|
||||||
|
tile.cloth.desc=
|
||||||
|
tile.flower.name=Flower
|
||||||
|
tile.flower.desc=
|
||||||
|
tile.rose.name=Rose
|
||||||
|
tile.rose.desc=
|
||||||
|
tile.mushroom.name=Mushroom
|
||||||
|
tile.mushroom.desc=
|
||||||
|
tile.blockGold.name=Block of Gold
|
||||||
|
tile.blockGold.desc=
|
||||||
|
tile.blockIron.name=Block of Iron
|
||||||
|
tile.blockIron.desc=
|
||||||
|
tile.stoneSlab.stone.name=Stone Slab
|
||||||
|
tile.stoneSlab.stone.desc=
|
||||||
|
tile.stoneSlab.sand.name=Sandstone Slab
|
||||||
|
tile.stoneSlab.sand.desc=
|
||||||
|
tile.stoneSlab.wood.name=Wooden Slab
|
||||||
|
tile.stoneSlab.wood.desc=
|
||||||
|
tile.stoneSlab.cobble.name=Stone Slab
|
||||||
|
tile.stoneSlab.cobble.desc=
|
||||||
|
tile.brick.name=Bricks
|
||||||
|
tile.brick.desc=
|
||||||
|
tile.tnt.name=TNT
|
||||||
|
tile.tnt.desc=
|
||||||
|
tile.bookshelf.name=Bookshelf
|
||||||
|
tile.bookshelf.desc=
|
||||||
|
tile.stoneMoss.name=Moss Stone
|
||||||
|
tile.stoneMoss.desc=
|
||||||
|
tile.obsidian.name=Obsidian
|
||||||
|
tile.obsidian.desc=
|
||||||
|
tile.torch.name=Torch
|
||||||
|
tile.torch.desc=
|
||||||
|
tile.fire.name=Fire
|
||||||
|
tile.fire.desc=
|
||||||
|
tile.mobSpawner.name=Monster Spawner
|
||||||
|
tile.mobSpawner.desc=
|
||||||
|
tile.stairsWood.name=Wooden Stairs
|
||||||
|
tile.stairsWood.desc=
|
||||||
|
tile.chest.name=Chest
|
||||||
|
tile.chest.desc=
|
||||||
|
tile.redstoneDust.name=Redstone Dust
|
||||||
|
tile.redstoneDust.desc=
|
||||||
|
tile.oreDiamond.name=Diamond Ore
|
||||||
|
tile.oreDiamond.desc=
|
||||||
|
tile.blockDiamond.name=Block of Diamond
|
||||||
|
tile.blockDiamond.desc=
|
||||||
|
tile.workbench.name=Crafting Table
|
||||||
|
tile.workbench.desc=
|
||||||
|
tile.crops.name=Crops
|
||||||
|
tile.crops.desc=
|
||||||
|
tile.farmland.name=Farmland
|
||||||
|
tile.farmland.desc=
|
||||||
|
tile.furnace.name=Furnace
|
||||||
|
tile.furnace.desc=
|
||||||
|
tile.sign.name=Sign
|
||||||
|
tile.sign.desc=
|
||||||
|
tile.doorWood.name=Wooden Door
|
||||||
|
tile.doorWood.desc=
|
||||||
|
tile.ladder.name=Ladder
|
||||||
|
tile.ladder.desc=
|
||||||
|
tile.rail.name=Rail
|
||||||
|
tile.rail.desc=
|
||||||
|
tile.stairsStone.name=Stone Stairs
|
||||||
|
tile.stairsStone.desc=
|
||||||
|
tile.lever.name=Lever
|
||||||
|
tile.lever.desc=
|
||||||
|
tile.pressurePlate.name=Pressure Plate
|
||||||
|
tile.pressurePlate.desc=
|
||||||
|
tile.doorIron.name=Iron Door
|
||||||
|
tile.doorIron.desc=
|
||||||
|
tile.oreRedstone.name=Redstone Ore
|
||||||
|
tile.oreRedstone.desc=
|
||||||
|
tile.notGate.name=Redstone Torch
|
||||||
|
tile.notGate.desc=
|
||||||
|
tile.button.name=Button
|
||||||
|
tile.button.desc=
|
||||||
|
tile.snow.name=Snow
|
||||||
|
tile.snow.desc=
|
||||||
|
tile.ice.name=Ice
|
||||||
|
tile.ice.desc=
|
||||||
|
tile.cactus.name=Cactus
|
||||||
|
tile.cactus.desc=
|
||||||
|
tile.clay.name=Clay
|
||||||
|
tile.clay.desc=
|
||||||
|
tile.reeds.name=Reeds
|
||||||
|
tile.reeds.desc=
|
||||||
|
tile.jukebox.name=Jukebox
|
||||||
|
tile.jukebox.desc=
|
||||||
|
tile.fence.name=Fence
|
||||||
|
tile.fence.desc=
|
||||||
|
tile.pumpkin.name=Pumpkin
|
||||||
|
tile.pumpkin.desc=
|
||||||
|
tile.litpumpkin.name=Jack 'o' Lantern
|
||||||
|
tile.litpumpkin.desc=
|
||||||
|
tile.hellrock.name=Netherrack
|
||||||
|
tile.hellrock.desc=
|
||||||
|
tile.hellsand.name=Soul Sand
|
||||||
|
tile.hellsand.desc=
|
||||||
|
tile.lightgem.name=Glowstone
|
||||||
|
tile.lightgem.desc=
|
||||||
|
tile.portal.name=Portal
|
||||||
|
tile.portal.desc=
|
||||||
|
tile.cloth.black.name=Black Wool
|
||||||
|
tile.cloth.black.desc=
|
||||||
|
tile.cloth.red.name=Red Wool
|
||||||
|
tile.cloth.red.desc=
|
||||||
|
tile.cloth.green.name=Green Wool
|
||||||
|
tile.cloth.green.desc=
|
||||||
|
tile.cloth.brown.name=Brown Wool
|
||||||
|
tile.cloth.brown.desc=
|
||||||
|
tile.cloth.blue.name=Blue Wool
|
||||||
|
tile.cloth.blue.desc=
|
||||||
|
tile.cloth.purple.name=Purple Wool
|
||||||
|
tile.cloth.purple.desc=
|
||||||
|
tile.cloth.cyan.name=Cyan Wool
|
||||||
|
tile.cloth.cyan.desc=
|
||||||
|
tile.cloth.silver.name=Light Gray Wool
|
||||||
|
tile.cloth.silver.desc=
|
||||||
|
tile.cloth.gray.name=Gray Wool
|
||||||
|
tile.cloth.gray.desc=
|
||||||
|
tile.cloth.pink.name=Pink Wool
|
||||||
|
tile.cloth.pink.desc=
|
||||||
|
tile.cloth.lime.name=Lime Wool
|
||||||
|
tile.cloth.lime.desc=
|
||||||
|
tile.cloth.yellow.name=Yellow Wool
|
||||||
|
tile.cloth.yellow.desc=
|
||||||
|
tile.cloth.lightBlue.name=Light Blue Wool
|
||||||
|
tile.cloth.lightBlue.desc=
|
||||||
|
tile.cloth.magenta.name=Magenta Wool
|
||||||
|
tile.cloth.magenta.desc=
|
||||||
|
tile.cloth.orange.name=Orange Wool
|
||||||
|
tile.cloth.orange.desc=
|
||||||
|
tile.cloth.white.name=Wool
|
||||||
|
tile.cloth.white.desc=
|
||||||
|
tile.oreLapis.name=Lapis Lazuli Ore
|
||||||
|
tile.oreLapis.desc=
|
||||||
|
tile.blockLapis.name=Lapis Lazuli Block
|
||||||
|
tile.blockLapis.desc=
|
||||||
|
tile.dispenser.name=Dispenser
|
||||||
|
tile.dispenser.desc=
|
||||||
|
tile.musicBlock.name=Note Block
|
||||||
|
tile.musicBlock.desc=
|
||||||
|
tile.cake.name=Cake
|
||||||
|
tile.cake.desc=
|
||||||
|
tile.bed.name=Bed
|
||||||
|
tile.bed.desc=
|
||||||
|
tile.bed.occupied=This bed is occupied
|
||||||
|
tile.bed.noSleep=You can only sleep at night
|
||||||
|
|
||||||
|
item.shovelIron.name=Iron Shovel
|
||||||
|
item.shovelIron.desc=
|
||||||
|
item.pickaxeIron.name=Iron Pickaxe
|
||||||
|
item.pickaxeIron.desc=
|
||||||
|
item.hatchetIron.name=Iron Axe
|
||||||
|
item.hatchetIron.desc=
|
||||||
|
item.flintAndSteel.name=Flint and Steel
|
||||||
|
item.flintAndSteel.desc=
|
||||||
|
item.apple.name=Apple
|
||||||
|
item.apple.desc=
|
||||||
|
item.bow.name=Bow
|
||||||
|
item.bow.desc=
|
||||||
|
item.arrow.name=Arrow
|
||||||
|
item.arrow.desc=
|
||||||
|
item.coal.name=Coal
|
||||||
|
item.coal.desc=
|
||||||
|
item.charcoal.name=Charcoal
|
||||||
|
item.charcoal.desc=
|
||||||
|
item.emerald.name=Diamond
|
||||||
|
item.emerald.desc=
|
||||||
|
item.ingotIron.name=Iron Ingot
|
||||||
|
item.ingotIron.desc=
|
||||||
|
item.ingotGold.name=Gold Ingot
|
||||||
|
item.ingotGold.desc=
|
||||||
|
item.swordIron.name=Iron Sword
|
||||||
|
item.swordIron.desc=
|
||||||
|
item.swordWood.name=Wooden Sword
|
||||||
|
item.swordWood.desc=
|
||||||
|
item.shovelWood.name=Wooden Shovel
|
||||||
|
item.shovelWood.desc=
|
||||||
|
item.pickaxeWood.name=Wooden Pickaxe
|
||||||
|
item.pickaxeWood.desc=
|
||||||
|
item.hatchetWood.name=Wooden Axe
|
||||||
|
item.hatchetWood.desc=
|
||||||
|
item.swordStone.name=Stone Sword
|
||||||
|
item.swordStone.desc=
|
||||||
|
item.shovelStone.name=Stone Shovel
|
||||||
|
item.shovelStone.desc=
|
||||||
|
item.pickaxeStone.name=Stone Pickaxe
|
||||||
|
item.pickaxeStone.desc=
|
||||||
|
item.hatchetStone.name=Stone Axe
|
||||||
|
item.hatchetStone.desc=
|
||||||
|
item.swordDiamond.name=Diamond Sword
|
||||||
|
item.swordDiamond.desc=
|
||||||
|
item.shovelDiamond.name=Diamond Shovel
|
||||||
|
item.shovelDiamond.desc=
|
||||||
|
item.pickaxeDiamond.name=Diamond Pickaxe
|
||||||
|
item.pickaxeDiamond.desc=
|
||||||
|
item.hatchetDiamond.name=Diamond Axe
|
||||||
|
item.hatchetDiamond.desc=
|
||||||
|
item.stick.name=Stick
|
||||||
|
item.stick.desc=
|
||||||
|
item.bowl.name=Bowl
|
||||||
|
item.bowl.desc=
|
||||||
|
item.mushroomStew.name=Mushroom Stew
|
||||||
|
item.mushroomStew.desc=
|
||||||
|
item.swordGold.name=Golden Sword
|
||||||
|
item.swordGold.desc=
|
||||||
|
item.shovelGold.name=Golden Shovel
|
||||||
|
item.shovelGold.desc=
|
||||||
|
item.pickaxeGold.name=Golden Pickaxe
|
||||||
|
item.pickaxeGold.desc=
|
||||||
|
item.hatchetGold.name=Golden Axe
|
||||||
|
item.hatchetGold.desc=
|
||||||
|
item.string.name=String
|
||||||
|
item.string.desc=
|
||||||
|
item.feather.name=Feather
|
||||||
|
item.feather.desc=
|
||||||
|
item.sulphur.name=Gunpowder
|
||||||
|
item.sulphur.desc=
|
||||||
|
item.hoeWood.name=Wooden Hoe
|
||||||
|
item.hoeWood.desc=
|
||||||
|
item.hoeStone.name=Stone Hoe
|
||||||
|
item.hoeStone.desc=
|
||||||
|
item.hoeIron.name=Iron Hoe
|
||||||
|
item.hoeIron.desc=
|
||||||
|
item.hoeDiamond.name=Diamond Hoe
|
||||||
|
item.hoeDiamond.desc=
|
||||||
|
item.hoeGold.name=Golden Hoe
|
||||||
|
item.hoeGold.desc=
|
||||||
|
item.seeds.name=Seeds
|
||||||
|
item.seeds.desc=
|
||||||
|
item.wheat.name=Wheat
|
||||||
|
item.wheat.desc=
|
||||||
|
item.bread.name=Bread
|
||||||
|
item.bread.desc=
|
||||||
|
item.helmetCloth.name=Leather Cap
|
||||||
|
item.helmetCloth.desc=
|
||||||
|
item.chestplateCloth.name=Leather Tunic
|
||||||
|
item.chestplateCloth.desc=
|
||||||
|
item.leggingsCloth.name=Leather Pants
|
||||||
|
item.leggingsCloth.desc=
|
||||||
|
item.bootsCloth.name=Leather Boots
|
||||||
|
item.bootsCloth.desc=
|
||||||
|
item.helmetChain.name=Chain Helmet
|
||||||
|
item.helmetChain.desc=
|
||||||
|
item.chestplateChain.name=Chain Chestplate
|
||||||
|
item.chestplateChain.desc=
|
||||||
|
item.leggingsChain.name=Chain Leggings
|
||||||
|
item.leggingsChain.desc=
|
||||||
|
item.bootsChain.name=Chain Boots
|
||||||
|
item.bootsChain.desc=
|
||||||
|
item.helmetIron.name=Iron Helmet
|
||||||
|
item.helmetIron.desc=
|
||||||
|
item.chestplateIron.name=Iron Chestplate
|
||||||
|
item.chestplateIron.desc=
|
||||||
|
item.leggingsIron.name=Iron Leggings
|
||||||
|
item.leggingsIron.desc=
|
||||||
|
item.bootsIron.name=Iron Boots
|
||||||
|
item.bootsIron.desc=
|
||||||
|
item.helmetDiamond.name=Diamond Helmet
|
||||||
|
item.helmetDiamond.desc=
|
||||||
|
item.chestplateDiamond.name=Diamond Chestplate
|
||||||
|
item.chestplateDiamond.desc=
|
||||||
|
item.leggingsDiamond.name=Diamond Leggings
|
||||||
|
item.leggingsDiamond.desc=
|
||||||
|
item.bootsDiamond.name=Diamond Boots
|
||||||
|
item.bootsDiamond.desc=
|
||||||
|
item.helmetGold.name=Golden Helmet
|
||||||
|
item.helmetGold.desc=
|
||||||
|
item.chestplateGold.name=Golden Chestplate
|
||||||
|
item.chestplateGold.desc=
|
||||||
|
item.leggingsGold.name=Golden Leggings
|
||||||
|
item.leggingsGold.desc=
|
||||||
|
item.bootsGold.name=Golden boots
|
||||||
|
item.bootsGold.desc=
|
||||||
|
item.flint.name=Flint
|
||||||
|
item.flint.desc=
|
||||||
|
item.porkchopRaw.name=Raw Porkchop
|
||||||
|
item.porkchopRaw.desc=
|
||||||
|
item.porkchopCooked.name=Cooked Porkchop
|
||||||
|
item.porkchopCooked.desc=
|
||||||
|
item.painting.name=Painting
|
||||||
|
item.painting.desc=
|
||||||
|
item.appleGold.name=Golden Apple
|
||||||
|
item.appleGold.desc=
|
||||||
|
item.sign.name=Sign
|
||||||
|
item.sign.desc=
|
||||||
|
item.doorWood.name=Wooden Door
|
||||||
|
item.doorWood.desc=
|
||||||
|
item.bucket.name=Bucket
|
||||||
|
item.bucket.desc=
|
||||||
|
item.bucketWater.name=Water Bucket
|
||||||
|
item.bucketWater.desc=
|
||||||
|
item.bucketLava.name=Lava bucket
|
||||||
|
item.bucketLava.desc=
|
||||||
|
item.minecart.name=Minecart
|
||||||
|
item.minecart.desc=
|
||||||
|
item.saddle.name=Saddle
|
||||||
|
item.saddle.desc=
|
||||||
|
item.doorIron.name=Iron Door
|
||||||
|
item.doorIron.desc=
|
||||||
|
item.redstone.name=Redstone
|
||||||
|
item.redstone.desc=
|
||||||
|
item.snowball.name=Snowball
|
||||||
|
item.snowball.desc=
|
||||||
|
item.boat.name=Boat
|
||||||
|
item.boat.desc=
|
||||||
|
item.leather.name=Leather
|
||||||
|
item.leather.desc=
|
||||||
|
item.milk.name=Milk
|
||||||
|
item.milk.desc=
|
||||||
|
item.brick.name=Brick
|
||||||
|
item.brick.desc=
|
||||||
|
item.clay.name=Clay
|
||||||
|
item.clay.desc=
|
||||||
|
item.reeds.name=Sugar Canes
|
||||||
|
item.reeds.desc=
|
||||||
|
item.paper.name=Paper
|
||||||
|
item.paper.desc=
|
||||||
|
item.book.name=Book
|
||||||
|
item.book.desc=
|
||||||
|
item.slimeball.name=Slimeball
|
||||||
|
item.slimeball.desc=
|
||||||
|
item.minecartChest.name=Minecart with Chest
|
||||||
|
item.minecartChest.desc=
|
||||||
|
item.minecartFurnace.name=Minecart with Furnace
|
||||||
|
item.minecartFurnace.desc=
|
||||||
|
item.egg.name=Egg
|
||||||
|
item.egg.desc=
|
||||||
|
item.compass.name=Compass
|
||||||
|
item.compass.desc=
|
||||||
|
item.fishingRod.name=Fishing Rod
|
||||||
|
item.fishingRod.desc=
|
||||||
|
item.clock.name=Clock
|
||||||
|
item.clock.desc=
|
||||||
|
item.yellowDust.name=Glowstone Dust
|
||||||
|
item.yellowDust.desc=
|
||||||
|
item.fishRaw.name=Raw Fish
|
||||||
|
item.fishRaw.desc=
|
||||||
|
item.fishCooked.name=Cooked Fish
|
||||||
|
item.fishCooked.desc=
|
||||||
|
item.record.name=Music Disc
|
||||||
|
item.record.desc=
|
||||||
|
item.bone.name=Bone
|
||||||
|
item.bone.desc=
|
||||||
|
item.dyePowder.black.name=Ink Sac
|
||||||
|
item.dyePowder.black.desc=
|
||||||
|
item.dyePowder.red.name=Rose Red
|
||||||
|
item.dyePowder.red.desc=
|
||||||
|
item.dyePowder.green.name=Cactus Green
|
||||||
|
item.dyePowder.green.desc=
|
||||||
|
item.dyePowder.brown.name=Cocoa Beans
|
||||||
|
item.dyePowder.brown.desc=
|
||||||
|
item.dyePowder.blue.name=Lapis Lazuli
|
||||||
|
item.dyePowder.blue.desc=
|
||||||
|
item.dyePowder.purple.name=Purple Dye
|
||||||
|
item.dyePowder.purple.desc=
|
||||||
|
item.dyePowder.cyan.name=Cyan Dye
|
||||||
|
item.dyePowder.cyan.desc=
|
||||||
|
item.dyePowder.silver.name=Light Gray Dye
|
||||||
|
item.dyePowder.silver.desc=
|
||||||
|
item.dyePowder.gray.name=Gray Dye
|
||||||
|
item.dyePowder.gray.desc=
|
||||||
|
item.dyePowder.pink.name=Pink Dye
|
||||||
|
item.dyePowder.pink.desc=
|
||||||
|
item.dyePowder.lime.name=Lime Dye
|
||||||
|
item.dyePowder.lime.desc=
|
||||||
|
item.dyePowder.yellow.name=Dandelion Yellow
|
||||||
|
item.dyePowder.yellow.desc=
|
||||||
|
item.dyePowder.lightBlue.name=Light Blue Dye
|
||||||
|
item.dyePowder.lightBlue.desc=
|
||||||
|
item.dyePowder.magenta.name=Magenta Dye
|
||||||
|
item.dyePowder.magenta.desc=
|
||||||
|
item.dyePowder.orange.name=Orange Dye
|
||||||
|
item.dyePowder.orange.desc=
|
||||||
|
item.dyePowder.white.name=Bone Meal
|
||||||
|
item.dyePowder.white.desc=
|
||||||
|
item.sugar.name=Sugar
|
||||||
|
item.sugar.desc=
|
||||||
|
item.cake.name=Cake
|
||||||
|
item.cake.desc=
|
||||||
|
item.bed.name=Bed
|
||||||
|
item.bed.desc=
|
||||||
|
item.diode.name=Redstone Repeater
|
||||||
|
item.diode.desc=
|
BIN
lwjgl-rundir/resources/misc/dial.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
lwjgl-rundir/resources/misc/foliagecolor.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
lwjgl-rundir/resources/misc/grasscolor.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
lwjgl-rundir/resources/misc/pumpkinblur.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
lwjgl-rundir/resources/misc/shadow.png
Normal file
After Width: | Height: | Size: 868 B |
BIN
lwjgl-rundir/resources/misc/vignette.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
lwjgl-rundir/resources/misc/water.png
Normal file
After Width: | Height: | Size: 306 B |
BIN
lwjgl-rundir/resources/mob/char.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
lwjgl-rundir/resources/mob/chicken.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
lwjgl-rundir/resources/mob/cow.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
lwjgl-rundir/resources/mob/creeper.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
lwjgl-rundir/resources/mob/ghast.png
Normal file
After Width: | Height: | Size: 896 B |
BIN
lwjgl-rundir/resources/mob/ghast_fire.png
Normal file
After Width: | Height: | Size: 943 B |
BIN
lwjgl-rundir/resources/mob/pig.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
lwjgl-rundir/resources/mob/pigman.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
lwjgl-rundir/resources/mob/pigzombie.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
lwjgl-rundir/resources/mob/saddle.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
lwjgl-rundir/resources/mob/sheep.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
lwjgl-rundir/resources/mob/sheep_fur.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
lwjgl-rundir/resources/mob/skeleton.png
Normal file
After Width: | Height: | Size: 894 B |
BIN
lwjgl-rundir/resources/mob/slime.png
Normal file
After Width: | Height: | Size: 633 B |
BIN
lwjgl-rundir/resources/mob/spider.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
lwjgl-rundir/resources/mob/spider_eyes.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
lwjgl-rundir/resources/mob/squid.png
Normal file
After Width: | Height: | Size: 918 B |
BIN
lwjgl-rundir/resources/mob/zombie.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
lwjgl-rundir/resources/pack.png
Normal file
After Width: | Height: | Size: 27 KiB |
2
lwjgl-rundir/resources/pack.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
The default look of Minecraft
|
||||||
|
|
BIN
lwjgl-rundir/resources/particles.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
lwjgl-rundir/resources/terrain.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
lwjgl-rundir/resources/terrain/moon.png
Normal file
After Width: | Height: | Size: 910 B |
BIN
lwjgl-rundir/resources/terrain/sun.png
Normal file
After Width: | Height: | Size: 799 B |
BIN
lwjgl-rundir/resources/title/black.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
lwjgl-rundir/resources/title/mojang.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
223
lwjgl-rundir/resources/title/splashes.txt
Normal file
|
@ -0,0 +1,223 @@
|
||||||
|
As seen on TV!
|
||||||
|
Awesome!
|
||||||
|
100% pure!
|
||||||
|
May contain nuts!
|
||||||
|
Better than Prey!
|
||||||
|
More polygons!
|
||||||
|
Sexy!
|
||||||
|
Limited edition!
|
||||||
|
Flashing letters!
|
||||||
|
Made by Notch!
|
||||||
|
Coming soon!
|
||||||
|
Best in class!
|
||||||
|
When it's finished!
|
||||||
|
Absolutely dragon free!
|
||||||
|
Excitement!
|
||||||
|
More than 500 sold!
|
||||||
|
One of a kind!
|
||||||
|
Heaps of hits on YouTube!
|
||||||
|
Indev!
|
||||||
|
Spiders everywhere!
|
||||||
|
Check it out!
|
||||||
|
Holy cow, man!
|
||||||
|
It's a game!
|
||||||
|
Made in Sweden!
|
||||||
|
Uses LWJGL!
|
||||||
|
Reticulating splines!
|
||||||
|
Minecraft!
|
||||||
|
Yaaay!
|
||||||
|
Singleplayer!
|
||||||
|
Keyboard compatible!
|
||||||
|
Undocumented!
|
||||||
|
Ingots!
|
||||||
|
Exploding creepers!
|
||||||
|
That's not a moon!
|
||||||
|
l33t!
|
||||||
|
Create!
|
||||||
|
Survive!
|
||||||
|
Dungeon!
|
||||||
|
Exclusive!
|
||||||
|
The bee's knees!
|
||||||
|
Down with O.P.P.!
|
||||||
|
Closed source!
|
||||||
|
Classy!
|
||||||
|
Wow!
|
||||||
|
Not on steam!
|
||||||
|
Oh man!
|
||||||
|
Check it out!
|
||||||
|
Awesome community!
|
||||||
|
Pixels!
|
||||||
|
Teetsuuuuoooo!
|
||||||
|
Kaaneeeedaaaa!
|
||||||
|
Now with difficulty!
|
||||||
|
Enhanced!
|
||||||
|
90% bug free!
|
||||||
|
Pretty!
|
||||||
|
12 herbs and spices!
|
||||||
|
Fat free!
|
||||||
|
Absolutely no memes!
|
||||||
|
Free dental!
|
||||||
|
Ask your doctor!
|
||||||
|
Minors welcome!
|
||||||
|
Cloud computing!
|
||||||
|
Legal in Finland!
|
||||||
|
Hard to label!
|
||||||
|
Technically good!
|
||||||
|
Bringing home the bacon!
|
||||||
|
Indie!
|
||||||
|
GOTY!
|
||||||
|
Ceci n'est pas une title screen!
|
||||||
|
Euclidian!
|
||||||
|
Now in 3D!
|
||||||
|
Inspirational!
|
||||||
|
Herregud!
|
||||||
|
Complex cellular automata!
|
||||||
|
Yes, sir!
|
||||||
|
Played by cowboys!
|
||||||
|
OpenGL 1.1!
|
||||||
|
Thousands of colors!
|
||||||
|
Try it!
|
||||||
|
Age of Wonders is better!
|
||||||
|
Try the mushroom stew!
|
||||||
|
Sensational!
|
||||||
|
Hot tamale, hot hot tamale!
|
||||||
|
Play him off, keyboard cat!
|
||||||
|
Guaranteed!
|
||||||
|
Macroscopic!
|
||||||
|
Bring it on!
|
||||||
|
Random splash!
|
||||||
|
Call your mother!
|
||||||
|
Monster infighting!
|
||||||
|
Loved by millions!
|
||||||
|
Ultimate edition!
|
||||||
|
Freaky!
|
||||||
|
You've got a brand new key!
|
||||||
|
Water proof!
|
||||||
|
Uninflammable!
|
||||||
|
Whoa, dude!
|
||||||
|
All inclusive!
|
||||||
|
Tell your friends!
|
||||||
|
NP is not in P!
|
||||||
|
Notch <3 ez!
|
||||||
|
Music by C418!
|
||||||
|
Livestreamed!
|
||||||
|
Haunted!
|
||||||
|
Polynomial!
|
||||||
|
Terrestrial!
|
||||||
|
All is full of love!
|
||||||
|
Full of stars!
|
||||||
|
Scientific!
|
||||||
|
Cooler than Spock!
|
||||||
|
Collaborate and listen!
|
||||||
|
Never dig down!
|
||||||
|
Take frequent breaks!
|
||||||
|
Not linear!
|
||||||
|
Han shot first!
|
||||||
|
Nice to meet you!
|
||||||
|
Buckets of lava!
|
||||||
|
Ride the pig!
|
||||||
|
Larger than Earth!
|
||||||
|
sqrt(-1) love you!
|
||||||
|
Phobos anomaly!
|
||||||
|
Punching wood!
|
||||||
|
Falling off cliffs!
|
||||||
|
0% sugar!
|
||||||
|
150% hyperbole!
|
||||||
|
Synecdoche!
|
||||||
|
Let's danec!
|
||||||
|
Seecret Friday update!
|
||||||
|
Reference implementation!
|
||||||
|
Lewd with two dudes with food!
|
||||||
|
Kiss the sky!
|
||||||
|
20 GOTO 10!
|
||||||
|
Verlet intregration!
|
||||||
|
Peter Griffin!
|
||||||
|
Do not distribute!
|
||||||
|
Cogito ergo sum!
|
||||||
|
4815162342 lines of code!
|
||||||
|
A skeleton popped out!
|
||||||
|
The Work of Notch!
|
||||||
|
The sum of its parts!
|
||||||
|
BTAF used to be good!
|
||||||
|
I miss ADOM!
|
||||||
|
umop-apisdn!
|
||||||
|
OICU812!
|
||||||
|
Bring me Ray Cokes!
|
||||||
|
Finger-licking!
|
||||||
|
Thematic!
|
||||||
|
Pneumatic!
|
||||||
|
Sublime!
|
||||||
|
Octagonal!
|
||||||
|
Une baguette!
|
||||||
|
Gargamel plays it!
|
||||||
|
Rita is the new top dog!
|
||||||
|
SWM forever!
|
||||||
|
Representing Edsbyn!
|
||||||
|
Matt Damon!
|
||||||
|
Superfragilisticexpialidocious!
|
||||||
|
Consummate V's!
|
||||||
|
Cow Tools!
|
||||||
|
Double buffered!
|
||||||
|
Fan fiction!
|
||||||
|
Flaxkikare!
|
||||||
|
Jason! Jason! Jason!
|
||||||
|
Hotter than the sun!
|
||||||
|
Internet enabled!
|
||||||
|
Autonomous!
|
||||||
|
Engage!
|
||||||
|
Fantasy!
|
||||||
|
DRR! DRR! DRR!
|
||||||
|
Kick it root down!
|
||||||
|
Regional resources!
|
||||||
|
Woo, facepunch!
|
||||||
|
Woo, somethingawful!
|
||||||
|
Woo, /v/!
|
||||||
|
Woo, tigsource!
|
||||||
|
Woo, minecraftforum!
|
||||||
|
Woo, worldofminecraft!
|
||||||
|
Woo, reddit!
|
||||||
|
Woo, 2pp!
|
||||||
|
Google anlyticsed!
|
||||||
|
Now supports åäö!
|
||||||
|
Give us Gordon!
|
||||||
|
Tip your waiter!
|
||||||
|
Very fun!
|
||||||
|
12345 is a bad password!
|
||||||
|
Vote for net neutrality!
|
||||||
|
Lives in a pineapple under the sea!
|
||||||
|
MAP11 has two names!
|
||||||
|
Omnipotent!
|
||||||
|
Gasp!
|
||||||
|
...!
|
||||||
|
Bees, bees, bees, bees!
|
||||||
|
Jag känner en bot!
|
||||||
|
This text is hard to read if you play the game at the default resolution, but at 1080p it's fine!
|
||||||
|
Haha, LOL!
|
||||||
|
Hampsterdance!
|
||||||
|
Switches and ores!
|
||||||
|
Menger sponge!
|
||||||
|
idspispopd!
|
||||||
|
Eple (original edit)!
|
||||||
|
So fresh, so clean!
|
||||||
|
Slow acting portals!
|
||||||
|
Try the Nether!
|
||||||
|
Don't look directly at the bugs!
|
||||||
|
Oh, ok, Pigmen!
|
||||||
|
Finally with ladders!
|
||||||
|
Scary!
|
||||||
|
Play Minecraft, Watch Topgear, Get Pig!
|
||||||
|
Twittered about!
|
||||||
|
Jump up, jump up, and get down!
|
||||||
|
Joel is neat!
|
||||||
|
A riddle, wrapped in a mystery!
|
||||||
|
Huge tracts of land!
|
||||||
|
Welcome to your Doom!
|
||||||
|
Stay a while, stay forever!
|
||||||
|
Stay a while and listen!
|
||||||
|
Treatment for your rash!
|
||||||
|
"Noun" is an autonym!
|
||||||
|
Information wants to be free!
|
||||||
|
"Almost never" is an interesting concept!
|
||||||
|
Lots of truthiness!
|
||||||
|
The creeper is a spy!
|
||||||
|
Turing complete!
|
BIN
lwjgl-rundir/saves/New World/level.dat
Normal file
BIN
lwjgl-rundir/saves/New World/level.dat_old
Normal file
BIN
lwjgl-rundir/saves/New World/region/r.-1.-1.mcr
Normal file
BIN
lwjgl-rundir/saves/New World/region/r.-1.0.mcr
Normal file
BIN
lwjgl-rundir/saves/New World/region/r.0.-1.mcr
Normal file
BIN
lwjgl-rundir/saves/New World/region/r.0.0.mcr
Normal file
BIN
lwjgl-rundir/saves/New World/session.lock
Normal file
10
settings.gradle
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by the Gradle 'init' task.
|
||||||
|
*
|
||||||
|
* The settings file is used to specify which projects to include in your build.
|
||||||
|
*
|
||||||
|
* Detailed information about configuring a multi-project build in Gradle can be found
|
||||||
|
* in the user manual at https://docs.gradle.org/6.0/userguide/multi_project_builds.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
rootProject.name = 'eaglercraft-beta'
|
118
src/lwjgl/java/com/jcraft/jzlib/Adler32.java
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
/* -*-mode:java; c-basic-offset:2; -*- */
|
||||||
|
/*
|
||||||
|
Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The names of the authors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||||
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||||
|
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||||
|
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* This program is based on zlib-1.1.3, so all credit should go authors
|
||||||
|
* Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
|
||||||
|
* and contributors of zlib.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.jcraft.jzlib;
|
||||||
|
|
||||||
|
final public class Adler32 implements Checksum {
|
||||||
|
|
||||||
|
// largest prime smaller than 65536
|
||||||
|
static final private int BASE=65521;
|
||||||
|
// NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1
|
||||||
|
static final private int NMAX=5552;
|
||||||
|
|
||||||
|
private long s1=1L;
|
||||||
|
private long s2=0L;
|
||||||
|
|
||||||
|
public void reset(long init){
|
||||||
|
s1=init&0xffff;
|
||||||
|
s2=(init>>16)&0xffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset(){
|
||||||
|
s1=1L;
|
||||||
|
s2=0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getValue(){
|
||||||
|
return ((s2<<16)|s1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(byte[] buf, int index, int len){
|
||||||
|
|
||||||
|
if(len==1){
|
||||||
|
s1+=buf[index++]&0xff; s2+=s1;
|
||||||
|
s1%=BASE;
|
||||||
|
s2%=BASE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int len1 = len/NMAX;
|
||||||
|
int len2 = len%NMAX;
|
||||||
|
while(len1-->0) {
|
||||||
|
int k=NMAX;
|
||||||
|
len-=k;
|
||||||
|
while(k-->0){
|
||||||
|
s1+=buf[index++]&0xff; s2+=s1;
|
||||||
|
}
|
||||||
|
s1%=BASE;
|
||||||
|
s2%=BASE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int k=len2;
|
||||||
|
len-=k;
|
||||||
|
while(k-->0){
|
||||||
|
s1+=buf[index++]&0xff; s2+=s1;
|
||||||
|
}
|
||||||
|
s1%=BASE;
|
||||||
|
s2%=BASE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Adler32 copy(){
|
||||||
|
Adler32 foo = new Adler32();
|
||||||
|
foo.s1 = this.s1;
|
||||||
|
foo.s2 = this.s2;
|
||||||
|
return foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The following logic has come from zlib.1.2.
|
||||||
|
static long combine(long adler1, long adler2, long len2){
|
||||||
|
long BASEL = (long)BASE;
|
||||||
|
long sum1;
|
||||||
|
long sum2;
|
||||||
|
long rem; // unsigned int
|
||||||
|
|
||||||
|
rem = len2 % BASEL;
|
||||||
|
sum1 = adler1 & 0xffffL;
|
||||||
|
sum2 = rem * sum1;
|
||||||
|
sum2 %= BASEL; // MOD(sum2);
|
||||||
|
sum1 += (adler2 & 0xffffL) + BASEL - 1;
|
||||||
|
sum2 += ((adler1 >> 16) & 0xffffL) + ((adler2 >> 16) & 0xffffL) + BASEL - rem;
|
||||||
|
if (sum1 >= BASEL) sum1 -= BASEL;
|
||||||
|
if (sum1 >= BASEL) sum1 -= BASEL;
|
||||||
|
if (sum2 >= (BASEL << 1)) sum2 -= (BASEL << 1);
|
||||||
|
if (sum2 >= BASEL) sum2 -= BASEL;
|
||||||
|
return sum1 | (sum2 << 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
157
src/lwjgl/java/com/jcraft/jzlib/CRC32.java
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
/* -*-mode:java; c-basic-offset:2; -*- */
|
||||||
|
/*
|
||||||
|
Copyright (c) 2011 ymnk, JCraft,Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The names of the authors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||||
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||||
|
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||||
|
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* This program is based on zlib-1.1.3, so all credit should go authors
|
||||||
|
* Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
|
||||||
|
* and contributors of zlib.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.jcraft.jzlib;
|
||||||
|
|
||||||
|
final public class CRC32 implements Checksum {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following logic has come from RFC1952.
|
||||||
|
*/
|
||||||
|
private int v = 0;
|
||||||
|
private static int[] crc_table = null;
|
||||||
|
static {
|
||||||
|
crc_table = new int[256];
|
||||||
|
for (int n = 0; n < 256; n++) {
|
||||||
|
int c = n;
|
||||||
|
for (int k = 8; --k >= 0; ) {
|
||||||
|
if ((c & 1) != 0)
|
||||||
|
c = 0xedb88320 ^ (c >>> 1);
|
||||||
|
else
|
||||||
|
c = c >>> 1;
|
||||||
|
}
|
||||||
|
crc_table[n] = c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update (byte[] buf, int index, int len) {
|
||||||
|
int c = ~v;
|
||||||
|
while (--len >= 0)
|
||||||
|
c = crc_table[(c^buf[index++])&0xff]^(c >>> 8);
|
||||||
|
v = ~c;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset(){
|
||||||
|
v = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset(long vv){
|
||||||
|
v = (int)(vv&0xffffffffL);
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getValue(){
|
||||||
|
return (long)(v&0xffffffffL);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The following logic has come from zlib.1.2.
|
||||||
|
private static final int GF2_DIM = 32;
|
||||||
|
static long combine(long crc1, long crc2, long len2){
|
||||||
|
long row;
|
||||||
|
long[] even = new long[GF2_DIM];
|
||||||
|
long[] odd = new long[GF2_DIM];
|
||||||
|
|
||||||
|
// degenerate case (also disallow negative lengths)
|
||||||
|
if (len2 <= 0)
|
||||||
|
return crc1;
|
||||||
|
|
||||||
|
// put operator for one zero bit in odd
|
||||||
|
odd[0] = 0xedb88320L; // CRC-32 polynomial
|
||||||
|
row = 1;
|
||||||
|
for (int n = 1; n < GF2_DIM; n++) {
|
||||||
|
odd[n] = row;
|
||||||
|
row <<= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// put operator for two zero bits in even
|
||||||
|
gf2_matrix_square(even, odd);
|
||||||
|
|
||||||
|
// put operator for four zero bits in odd
|
||||||
|
gf2_matrix_square(odd, even);
|
||||||
|
|
||||||
|
// apply len2 zeros to crc1 (first square will put the operator for one
|
||||||
|
// zero byte, eight zero bits, in even)
|
||||||
|
do {
|
||||||
|
// apply zeros operator for this bit of len2
|
||||||
|
gf2_matrix_square(even, odd);
|
||||||
|
if ((len2 & 1)!=0)
|
||||||
|
crc1 = gf2_matrix_times(even, crc1);
|
||||||
|
len2 >>= 1;
|
||||||
|
|
||||||
|
// if no more bits set, then done
|
||||||
|
if (len2 == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
// another iteration of the loop with odd and even swapped
|
||||||
|
gf2_matrix_square(odd, even);
|
||||||
|
if ((len2 & 1)!=0)
|
||||||
|
crc1 = gf2_matrix_times(odd, crc1);
|
||||||
|
len2 >>= 1;
|
||||||
|
|
||||||
|
// if no more bits set, then done
|
||||||
|
} while (len2 != 0);
|
||||||
|
|
||||||
|
/* return combined crc */
|
||||||
|
crc1 ^= crc2;
|
||||||
|
return crc1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static long gf2_matrix_times(long[] mat, long vec){
|
||||||
|
long sum = 0;
|
||||||
|
int index = 0;
|
||||||
|
while (vec!=0) {
|
||||||
|
if ((vec & 1)!=0)
|
||||||
|
sum ^= mat[index];
|
||||||
|
vec >>= 1;
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
|
static final void gf2_matrix_square(long[] square, long[] mat) {
|
||||||
|
for (int n = 0; n < GF2_DIM; n++)
|
||||||
|
square[n] = gf2_matrix_times(mat, mat[n]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CRC32 copy(){
|
||||||
|
CRC32 foo = new CRC32();
|
||||||
|
foo.v = this.v;
|
||||||
|
return foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int[] getCRC32Table(){
|
||||||
|
int[] tmp = new int[crc_table.length];
|
||||||
|
System.arraycopy(crc_table, 0, tmp, 0, tmp.length);
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
}
|
43
src/lwjgl/java/com/jcraft/jzlib/Checksum.java
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/* -*-mode:java; c-basic-offset:2; -*- */
|
||||||
|
/*
|
||||||
|
Copyright (c) 2011 ymnk, JCraft,Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The names of the authors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||||
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||||
|
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||||
|
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* This program is based on zlib-1.1.3, so all credit should go authors
|
||||||
|
* Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
|
||||||
|
* and contributors of zlib.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.jcraft.jzlib;
|
||||||
|
|
||||||
|
interface Checksum {
|
||||||
|
void update(byte[] buf, int index, int len);
|
||||||
|
void reset();
|
||||||
|
void reset(long init);
|
||||||
|
long getValue();
|
||||||
|
Checksum copy();
|
||||||
|
}
|
1757
src/lwjgl/java/com/jcraft/jzlib/Deflate.java
Normal file
171
src/lwjgl/java/com/jcraft/jzlib/Deflater.java
Normal file
|
@ -0,0 +1,171 @@
|
||||||
|
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
Copyright (c) 2011 ymnk, JCraft,Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The names of the authors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||||
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||||
|
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||||
|
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* This program is based on zlib-1.1.3, so all credit should go authors
|
||||||
|
* Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
|
||||||
|
* and contributors of zlib.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.jcraft.jzlib;
|
||||||
|
|
||||||
|
final public class Deflater extends ZStream{
|
||||||
|
|
||||||
|
static final private int MAX_WBITS=15; // 32K LZ77 window
|
||||||
|
static final private int DEF_WBITS=MAX_WBITS;
|
||||||
|
|
||||||
|
static final private int Z_NO_FLUSH=0;
|
||||||
|
static final private int Z_PARTIAL_FLUSH=1;
|
||||||
|
static final private int Z_SYNC_FLUSH=2;
|
||||||
|
static final private int Z_FULL_FLUSH=3;
|
||||||
|
static final private int Z_FINISH=4;
|
||||||
|
|
||||||
|
static final private int MAX_MEM_LEVEL=9;
|
||||||
|
|
||||||
|
static final private int Z_OK=0;
|
||||||
|
static final private int Z_STREAM_END=1;
|
||||||
|
static final private int Z_NEED_DICT=2;
|
||||||
|
static final private int Z_ERRNO=-1;
|
||||||
|
static final private int Z_STREAM_ERROR=-2;
|
||||||
|
static final private int Z_DATA_ERROR=-3;
|
||||||
|
static final private int Z_MEM_ERROR=-4;
|
||||||
|
static final private int Z_BUF_ERROR=-5;
|
||||||
|
static final private int Z_VERSION_ERROR=-6;
|
||||||
|
|
||||||
|
private boolean finished = false;
|
||||||
|
|
||||||
|
public Deflater(){
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deflater(int level) throws GZIPException {
|
||||||
|
this(level, MAX_WBITS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deflater(int level, boolean nowrap) throws GZIPException {
|
||||||
|
this(level, MAX_WBITS, nowrap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deflater(int level, int bits) throws GZIPException {
|
||||||
|
this(level, bits, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deflater(int level, int bits, boolean nowrap) throws GZIPException {
|
||||||
|
super();
|
||||||
|
int ret = init(level, bits, nowrap);
|
||||||
|
if(ret!=Z_OK)
|
||||||
|
throw new GZIPException(ret+": "+msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deflater(int level, int bits, int memlevel, JZlib.WrapperType wrapperType) throws GZIPException {
|
||||||
|
super();
|
||||||
|
int ret = init(level, bits, memlevel, wrapperType);
|
||||||
|
if(ret!=Z_OK)
|
||||||
|
throw new GZIPException(ret+": "+msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deflater(int level, int bits, int memlevel) throws GZIPException {
|
||||||
|
super();
|
||||||
|
int ret = init(level, bits, memlevel);
|
||||||
|
if(ret!=Z_OK)
|
||||||
|
throw new GZIPException(ret+": "+msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int init(int level){
|
||||||
|
return init(level, MAX_WBITS);
|
||||||
|
}
|
||||||
|
public int init(int level, boolean nowrap){
|
||||||
|
return init(level, MAX_WBITS, nowrap);
|
||||||
|
}
|
||||||
|
public int init(int level, int bits){
|
||||||
|
return init(level, bits, false);
|
||||||
|
}
|
||||||
|
public int init(int level, int bits, int memlevel, JZlib.WrapperType wrapperType){
|
||||||
|
if(bits < 9 || bits > 15){
|
||||||
|
return Z_STREAM_ERROR;
|
||||||
|
}
|
||||||
|
if(wrapperType == JZlib.W_NONE) {
|
||||||
|
bits *= -1;
|
||||||
|
}
|
||||||
|
else if(wrapperType == JZlib.W_GZIP) {
|
||||||
|
bits += 16;
|
||||||
|
}
|
||||||
|
else if(wrapperType == JZlib.W_ANY) {
|
||||||
|
return Z_STREAM_ERROR;
|
||||||
|
}
|
||||||
|
else if(wrapperType == JZlib.W_ZLIB) {
|
||||||
|
}
|
||||||
|
return init(level, bits, memlevel);
|
||||||
|
}
|
||||||
|
public int init(int level, int bits, int memlevel){
|
||||||
|
finished = false;
|
||||||
|
dstate=new Deflate(this);
|
||||||
|
return dstate.deflateInit(level, bits, memlevel);
|
||||||
|
}
|
||||||
|
public int init(int level, int bits, boolean nowrap){
|
||||||
|
finished = false;
|
||||||
|
dstate=new Deflate(this);
|
||||||
|
return dstate.deflateInit(level, nowrap?-bits:bits);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int deflate(int flush){
|
||||||
|
if(dstate==null){
|
||||||
|
return Z_STREAM_ERROR;
|
||||||
|
}
|
||||||
|
int ret = dstate.deflate(flush);
|
||||||
|
if(ret == Z_STREAM_END)
|
||||||
|
finished = true;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
public int end(){
|
||||||
|
finished = true;
|
||||||
|
if(dstate==null) return Z_STREAM_ERROR;
|
||||||
|
int ret=dstate.deflateEnd();
|
||||||
|
dstate=null;
|
||||||
|
free();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
public int params(int level, int strategy){
|
||||||
|
if(dstate==null) return Z_STREAM_ERROR;
|
||||||
|
return dstate.deflateParams(level, strategy);
|
||||||
|
}
|
||||||
|
public int setDictionary (byte[] dictionary, int dictLength){
|
||||||
|
if(dstate == null)
|
||||||
|
return Z_STREAM_ERROR;
|
||||||
|
return dstate.deflateSetDictionary(dictionary, dictLength);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean finished(){
|
||||||
|
return finished;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int copy(Deflater src){
|
||||||
|
this.finished = src.finished;
|
||||||
|
return Deflate.deflateCopy(this, src);
|
||||||
|
}
|
||||||
|
}
|
181
src/lwjgl/java/com/jcraft/jzlib/DeflaterOutputStream.java
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
Copyright (c) 2011 ymnk, JCraft,Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The names of the authors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||||
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||||
|
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||||
|
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.jcraft.jzlib;
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
public class DeflaterOutputStream extends FilterOutputStream {
|
||||||
|
|
||||||
|
protected final Deflater deflater;
|
||||||
|
|
||||||
|
protected byte[] buffer;
|
||||||
|
|
||||||
|
private boolean closed = false;
|
||||||
|
|
||||||
|
private boolean syncFlush = false;
|
||||||
|
|
||||||
|
private final byte[] buf1 = new byte[1];
|
||||||
|
|
||||||
|
protected boolean mydeflater = false;
|
||||||
|
|
||||||
|
private boolean close_out = true;
|
||||||
|
|
||||||
|
protected static final int DEFAULT_BUFSIZE = 512;
|
||||||
|
|
||||||
|
public DeflaterOutputStream(OutputStream out) throws IOException {
|
||||||
|
this(out,
|
||||||
|
new Deflater(JZlib.Z_DEFAULT_COMPRESSION),
|
||||||
|
DEFAULT_BUFSIZE, true);
|
||||||
|
mydeflater = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeflaterOutputStream(OutputStream out, Deflater def) throws IOException {
|
||||||
|
this(out, def, DEFAULT_BUFSIZE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeflaterOutputStream(OutputStream out,
|
||||||
|
Deflater deflater,
|
||||||
|
int size) throws IOException {
|
||||||
|
this(out, deflater, size, true);
|
||||||
|
}
|
||||||
|
public DeflaterOutputStream(OutputStream out,
|
||||||
|
Deflater deflater,
|
||||||
|
int size,
|
||||||
|
boolean close_out) throws IOException {
|
||||||
|
super(out);
|
||||||
|
if (out == null || deflater == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
else if (size <= 0) {
|
||||||
|
throw new IllegalArgumentException("buffer size must be greater than 0");
|
||||||
|
}
|
||||||
|
this.deflater = deflater;
|
||||||
|
buffer = new byte[size];
|
||||||
|
this.close_out = close_out;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void write(int b) throws IOException {
|
||||||
|
buf1[0] = (byte)(b & 0xff);
|
||||||
|
write(buf1, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void write(byte[] b, int off, int len) throws IOException {
|
||||||
|
if (deflater.finished()) {
|
||||||
|
throw new IOException("finished");
|
||||||
|
}
|
||||||
|
else if (off<0 | len<0 | off+len>b.length) {
|
||||||
|
throw new IndexOutOfBoundsException();
|
||||||
|
}
|
||||||
|
else if (len == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int flush = syncFlush ? JZlib.Z_SYNC_FLUSH : JZlib.Z_NO_FLUSH;
|
||||||
|
deflater.setInput(b, off, len, true);
|
||||||
|
while (deflater.avail_in>0) {
|
||||||
|
int err = deflate(flush);
|
||||||
|
if (err == JZlib.Z_STREAM_END)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void finish() throws IOException {
|
||||||
|
while (!deflater.finished()) {
|
||||||
|
deflate(JZlib.Z_FINISH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close() throws IOException {
|
||||||
|
if (!closed) {
|
||||||
|
finish();
|
||||||
|
if (mydeflater){
|
||||||
|
deflater.end();
|
||||||
|
}
|
||||||
|
if(close_out)
|
||||||
|
out.close();
|
||||||
|
closed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int deflate(int flush) throws IOException {
|
||||||
|
deflater.setOutput(buffer, 0, buffer.length);
|
||||||
|
int err = deflater.deflate(flush);
|
||||||
|
switch(err) {
|
||||||
|
case JZlib.Z_OK:
|
||||||
|
case JZlib.Z_STREAM_END:
|
||||||
|
break;
|
||||||
|
case JZlib.Z_BUF_ERROR:
|
||||||
|
if(deflater.avail_in<=0 && flush!=JZlib.Z_FINISH){
|
||||||
|
// flush() without any data
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw new IOException("failed to deflate: error="+err+" avail_out="+deflater.avail_out);
|
||||||
|
}
|
||||||
|
int len = deflater.next_out_index;
|
||||||
|
if (len > 0) {
|
||||||
|
out.write(buffer, 0, len);
|
||||||
|
}
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void flush() throws IOException {
|
||||||
|
if (syncFlush && !deflater.finished()) {
|
||||||
|
while (true) {
|
||||||
|
int err = deflate(JZlib.Z_SYNC_FLUSH);
|
||||||
|
if (deflater.next_out_index < buffer.length)
|
||||||
|
break;
|
||||||
|
if (err == JZlib.Z_STREAM_END)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTotalIn() {
|
||||||
|
return deflater.getTotalIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTotalOut() {
|
||||||
|
return deflater.getTotalOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSyncFlush(boolean syncFlush){
|
||||||
|
this.syncFlush = syncFlush;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getSyncFlush(){
|
||||||
|
return this.syncFlush;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deflater getDeflater(){
|
||||||
|
return deflater;
|
||||||
|
}
|
||||||
|
}
|