2016-03-30 20:50:23 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-04-03 02:23:19 -05:00
|
|
|
(
|
|
|
|
set -e
|
2016-03-30 20:50:23 -04:00
|
|
|
nms="net/minecraft/server"
|
|
|
|
export MODLOG=""
|
|
|
|
PS1="$"
|
2016-04-03 03:35:51 -05:00
|
|
|
basedir="$(cd "$1" && pwd -P)"
|
2016-03-30 20:50:23 -04:00
|
|
|
|
2016-04-01 22:55:54 -05:00
|
|
|
workdir="$basedir/work"
|
|
|
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
|
|
|
decompiledir="$workdir/$minecraftversion"
|
2016-03-30 20:50:23 -04:00
|
|
|
|
|
|
|
export importedmcdev=""
|
|
|
|
function import {
|
|
|
|
export importedmcdev="$importedmcdev $1"
|
|
|
|
file="${1}.java"
|
2016-04-01 22:55:54 -05:00
|
|
|
target="$workdir/Spigot/Spigot-Server/src/main/java/$nms/$file"
|
2016-03-30 20:50:23 -04: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"
|
2016-05-11 22:07:46 -04:00
|
|
|
else
|
|
|
|
echo "UN-NEEDED IMPORT: $file"
|
2016-03-30 20:50:23 -04:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
(
|
2016-04-01 22:55:54 -05:00
|
|
|
cd "$workdir/Spigot/Spigot-Server/"
|
2016-03-30 20:50:23 -04: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-24 19:56:04 -05:00
|
|
|
import BlockFurnace
|
2016-04-21 23:54:34 -07:00
|
|
|
import BlockIceFrost
|
2016-03-30 20:50:23 -04:00
|
|
|
import BlockPosition
|
2016-05-04 19:53:33 -04:00
|
|
|
import ChunkCache
|
2016-03-30 20:50:23 -04:00
|
|
|
import ChunkProviderFlat
|
|
|
|
import ChunkProviderGenerate
|
|
|
|
import ChunkProviderHell
|
|
|
|
import CommandAbstract
|
|
|
|
import CommandScoreboard
|
|
|
|
import CommandWhitelist
|
2016-04-05 21:55:07 -04:00
|
|
|
import DataBits
|
2016-03-30 20:50:23 -04:00
|
|
|
import DataConverterMaterialId
|
2016-06-22 22:56:57 -04:00
|
|
|
import DefinedStructure
|
2016-03-30 20:50:23 -04:00
|
|
|
import EULA
|
|
|
|
import EntitySquid
|
2016-04-14 17:49:11 -05:00
|
|
|
import EntityWaterAnimal
|
2016-03-30 20:50:23 -04:00
|
|
|
import FileIOThread
|
2016-06-18 01:03:40 -05:00
|
|
|
import IHopper
|
2016-03-30 20:50:23 -04:00
|
|
|
import ItemBlock
|
2016-05-11 22:07:46 -04:00
|
|
|
import NavigationAbstract
|
2016-05-01 23:54:08 -04:00
|
|
|
import NBTTagCompound
|
|
|
|
import NBTTagList
|
2016-05-07 23:39:22 -04:00
|
|
|
import PersistentScoreboard
|
2016-04-02 18:10:38 -07:00
|
|
|
import PacketPlayInUseEntity
|
2016-03-30 20:50:23 -04:00
|
|
|
import PacketPlayOutPlayerListHeaderFooter
|
2016-04-13 02:11:40 -04:00
|
|
|
import PacketPlayOutScoreboardTeam
|
2016-03-30 20:50:23 -04:00
|
|
|
import PacketPlayOutTitle
|
|
|
|
import PacketPlayOutUpdateTime
|
2016-03-31 19:08:27 -04:00
|
|
|
import PathfinderAbstract
|
2016-03-30 20:50:23 -04:00
|
|
|
import PathfinderGoalFloat
|
2016-04-09 13:48:06 -05:00
|
|
|
import PathfinderWater
|
2016-03-30 20:50:23 -04:00
|
|
|
import PersistentVillage
|
2016-04-16 00:46:01 -04:00
|
|
|
import RemoteControlListener
|
2016-03-30 20:50:23 -04:00
|
|
|
import TileEntityEnderChest
|
2016-05-01 23:54:08 -04:00
|
|
|
import TileEntityLootable
|
2016-04-05 19:53:30 -04:00
|
|
|
import WorldProvider
|
2016-03-30 20:50:23 -04:00
|
|
|
|
2016-04-03 02:23:19 -05:00
|
|
|
cd "$workdir/Spigot/Spigot-Server/"
|
2016-05-12 22:11:11 -04:00
|
|
|
rm -rf nms-patches applyPatches.sh makePatches.sh >/dev/null 2>&1
|
|
|
|
git add . -A >/dev/null 2>&1
|
|
|
|
echo -e "mc-dev Imports\n\n$MODLOG" | git commit . -F -
|
2016-03-30 20:50:23 -04:00
|
|
|
)
|