hacked build changes, api applies cleanly
This commit is contained in:
parent
e04368045e
commit
65dcb5348e
205 changed files with 5721 additions and 547 deletions
|
@ -11,7 +11,7 @@ minecrafthash=$(cat "${workdir}/BuildData/info.json" | grep minecraftHash | cut
|
|||
accesstransforms="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep accessTransforms | cut -d '"' -f 4)
|
||||
classmappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep classMappings | cut -d '"' -f 4)
|
||||
membermappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep memberMappings | cut -d '"' -f 4)
|
||||
packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4)
|
||||
#packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4)
|
||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
||||
jarpath="$decompiledir/$minecraftversion"
|
||||
mkdir -p "$decompiledir"
|
||||
|
@ -26,22 +26,22 @@ if [ ! -f "$jarpath.jar" ]; then
|
|||
fi
|
||||
|
||||
# OS X & FreeBSD don't have md5sum, just md5 -r
|
||||
command -v md5sum >/dev/null 2>&1 || {
|
||||
command -v md5 >/dev/null 2>&1 && {
|
||||
shopt -s expand_aliases
|
||||
alias md5sum='md5 -r'
|
||||
echo "md5sum command not found, using an alias instead"
|
||||
} || {
|
||||
echo >&2 "No md5sum or md5 command found"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
checksum=$(md5sum "$jarpath.jar" | cut -d ' ' -f 1)
|
||||
if [ "$checksum" != "$minecrafthash" ]; then
|
||||
echo "The MD5 checksum of the downloaded server jar does not match the BuildData hash."
|
||||
exit 1
|
||||
fi
|
||||
#command -v md5sum >/dev/null 2>&1 || {
|
||||
# command -v md5 >/dev/null 2>&1 && {
|
||||
# shopt -s expand_aliases
|
||||
# alias md5sum='md5 -r'
|
||||
# echo "md5sum command not found, using an alias instead"
|
||||
# } || {
|
||||
# echo >&2 "No md5sum or md5 command found"
|
||||
# exit 1
|
||||
# }
|
||||
#}
|
||||
#
|
||||
#checksum=$(md5sum "$jarpath.jar" | cut -d ' ' -f 1)
|
||||
#if [ "$checksum" != "$minecrafthash" ]; then
|
||||
# echo "The MD5 checksum of the downloaded server jar does not match the BuildData hash."
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
# These specialsource commands are from https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/browse/info.json
|
||||
echo "Applying class mappings..."
|
||||
|
@ -55,7 +55,7 @@ fi
|
|||
|
||||
echo "Applying member mappings..."
|
||||
if [ ! -f "$jarpath-m.jar" ]; then
|
||||
java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --only com/mojang/math --auto-member LOGGER --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null
|
||||
java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only com/mojang/math --only net/minecraft --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to apply member mappings."
|
||||
exit 1
|
||||
|
@ -64,7 +64,7 @@ fi
|
|||
|
||||
echo "Creating remapped jar..."
|
||||
if [ ! -f "$jarpath-mapped.jar" ]; then
|
||||
java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only net/minecraft --only com/mojang/math -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "$packagemappings" -o "$jarpath-mapped.jar" 1>/dev/null
|
||||
java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only com/mojang/math --only net/minecraft -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "/home/martin/Projects/Paper/bukkit-e3c5450d-fields.csrg" -o "$jarpath-mapped.jar" 1>/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to create remapped jar."
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue