2016-03-31 02:50:23 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-04-03 09:23:19 +02:00
|
|
|
(
|
|
|
|
set -e
|
2016-03-31 02:50:23 +02:00
|
|
|
nms="net/minecraft/server"
|
|
|
|
export MODLOG=""
|
|
|
|
PS1="$"
|
2016-04-03 10:35:51 +02:00
|
|
|
basedir="$(cd "$1" && pwd -P)"
|
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
|
2016-04-25 02:56:04 +02:00
|
|
|
import BlockFurnace
|
2016-04-22 08:54:34 +02:00
|
|
|
import BlockIceFrost
|
2016-03-31 02:50:23 +02:00
|
|
|
import BlockPosition
|
|
|
|
import BlockStateList
|
2016-05-05 01:53:33 +02:00
|
|
|
import ChunkCache
|
2016-03-31 02:50:23 +02:00
|
|
|
import ChunkProviderFlat
|
|
|
|
import ChunkProviderGenerate
|
|
|
|
import ChunkProviderHell
|
|
|
|
import CommandAbstract
|
|
|
|
import CommandScoreboard
|
|
|
|
import CommandWhitelist
|
2016-04-06 03:55:07 +02:00
|
|
|
import DataBits
|
2016-03-31 02:50:23 +02:00
|
|
|
import DataConverterMaterialId
|
|
|
|
import EULA
|
|
|
|
import EntitySquid
|
2016-04-15 00:49:11 +02:00
|
|
|
import EntityWaterAnimal
|
2016-03-31 02:50:23 +02:00
|
|
|
import FileIOThread
|
|
|
|
import ItemBlock
|
2016-05-02 05:54:08 +02:00
|
|
|
import NBTTagCompound
|
|
|
|
import NBTTagList
|
2016-03-31 02:50:23 +02:00
|
|
|
import PacketPlayInResourcePackStatus
|
2016-04-03 03:10:38 +02:00
|
|
|
import PacketPlayInUseEntity
|
2016-03-31 02:50:23 +02:00
|
|
|
import PacketPlayOutPlayerListHeaderFooter
|
2016-04-13 08:11:40 +02:00
|
|
|
import PacketPlayOutScoreboardTeam
|
2016-03-31 02:50:23 +02:00
|
|
|
import PacketPlayOutTitle
|
|
|
|
import PacketPlayOutUpdateTime
|
2016-04-01 01:08:27 +02:00
|
|
|
import PathfinderAbstract
|
2016-03-31 02:50:23 +02:00
|
|
|
import PathfinderGoalFloat
|
2016-04-09 20:48:06 +02:00
|
|
|
import PathfinderWater
|
2016-03-31 02:50:23 +02:00
|
|
|
import PersistentVillage
|
2016-04-16 06:46:01 +02:00
|
|
|
import RemoteControlListener
|
2016-03-31 02:50:23 +02:00
|
|
|
import TileEntityEnderChest
|
2016-05-02 05:54:08 +02:00
|
|
|
import TileEntityLootable
|
2016-04-06 01:53:30 +02:00
|
|
|
import WorldProvider
|
2016-03-31 02:50:23 +02:00
|
|
|
|
2016-04-03 09:23:19 +02:00
|
|
|
cd "$workdir/Spigot/Spigot-Server/"
|
|
|
|
git add src -A
|
|
|
|
echo -e "mc-dev Imports\n\n$MODLOG" | git commit src -F -
|
2016-03-31 02:50:23 +02:00
|
|
|
)
|