Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/scripts/importmcdev.sh

67 Zeilen
1.5 KiB
Bash

2016-03-31 02:50:23 +02:00
#!/usr/bin/env bash
nms="net/minecraft/server"
export MODLOG=""
PS1="$"
2016-04-02 05:55:54 +02:00
basedir="$1"
2016-03-31 02:50:23 +02:00
2016-04-02 05:55:54 +02:00
workdir="$basedir/work"
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
decompiledir="$workdir/$minecraftversion"
2016-03-31 02:50:23 +02:00
export importedmcdev=""
function import {
export importedmcdev="$importedmcdev $1"
file="${1}.java"
2016-04-02 05:55:54 +02:00
target="$workdir/Spigot/Spigot-Server/src/main/java/$nms/$file"
2016-03-31 02:50:23 +02:00
base="$decompiledir/$nms/$file"
if [[ ! -f "$target" ]]; then
export MODLOG="$MODLOG Imported $file from mc-dev\n";
echo "Copying $base to $target"
cp "$base" "$target"
fi
}
(
2016-04-02 05:55:54 +02:00
cd "$workdir/Spigot/Spigot-Server/"
2016-03-31 02:50:23 +02:00
lastlog=$(git log -1 --oneline)
if [[ "$lastlog" = *"mc-dev Imports"* ]]; then
git reset --hard HEAD^
fi
)
import BaseBlockPosition
import BiomeBase
import BiomeMesa
import BlockChest
import BlockFalling
import BlockFluids
import BlockPosition
import BlockStateList
import ChunkProviderFlat
import ChunkProviderGenerate
import ChunkProviderHell
import CommandAbstract
import CommandScoreboard
import CommandWhitelist
import DataConverterMaterialId
import EULA
import EntitySquid
import FileIOThread
import ItemBlock
import PacketPlayInResourcePackStatus
import PacketPlayOutPlayerListHeaderFooter
import PacketPlayOutTitle
import PacketPlayOutUpdateTime
import PathfinderAbstract
2016-03-31 02:50:23 +02:00
import PathfinderGoalFloat
import PersistentVillage
import TileEntityEnderChest
(
2016-04-02 05:55:54 +02:00
cd "$workdir/Spigot/Spigot-Server/"
2016-03-31 02:50:23 +02:00
git add src -A
echo -e "mc-dev Imports\n\n$MODLOG" | git commit src -F -
)