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)
|
2017-08-13 01:56:59 +02:00
|
|
|
decompiledir="$workdir/Minecraft/$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"
|
2016-05-12 04:07:46 +02:00
|
|
|
else
|
|
|
|
echo "UN-NEEDED IMPORT: $file"
|
2016-03-31 02:50:23 +02:00
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2016-07-23 01:54:48 +02:00
|
|
|
import AxisAlignedBB
|
2016-03-31 02:50:23 +02:00
|
|
|
import BaseBlockPosition
|
|
|
|
import BiomeBase
|
2018-02-13 01:44:50 +01:00
|
|
|
import BiomeBigHills
|
2017-01-23 22:11:07 +01:00
|
|
|
import BiomeJungle
|
2016-03-31 02:50:23 +02:00
|
|
|
import BiomeMesa
|
2017-02-06 01:19:35 +01:00
|
|
|
import BlockBeacon
|
2016-03-31 02:50:23 +02:00
|
|
|
import BlockChest
|
|
|
|
import BlockFalling
|
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
|
2016-08-31 00:54:03 +02:00
|
|
|
import BlockSnowBlock
|
2016-08-19 02:53:36 +02:00
|
|
|
import BlockStateEnum
|
2016-05-05 01:53:33 +02:00
|
|
|
import ChunkCache
|
2017-08-10 01:11:57 +02:00
|
|
|
import ChunkCoordIntPair
|
2016-03-31 02:50:23 +02:00
|
|
|
import ChunkProviderFlat
|
|
|
|
import ChunkProviderGenerate
|
|
|
|
import ChunkProviderHell
|
|
|
|
import CommandAbstract
|
|
|
|
import CommandScoreboard
|
|
|
|
import CommandWhitelist
|
2016-12-21 04:57:07 +01:00
|
|
|
import ControllerJump
|
2016-04-06 03:55:07 +02:00
|
|
|
import DataBits
|
2016-03-31 02:50:23 +02:00
|
|
|
import DataConverterMaterialId
|
2016-12-02 06:02:18 +01:00
|
|
|
import DataInspectorBlockEntity
|
2017-10-05 15:38:21 +02:00
|
|
|
import DataPalette
|
2016-06-23 04:56:57 +02:00
|
|
|
import DefinedStructure
|
2018-03-22 01:51:12 +01:00
|
|
|
import DragonControllerLandedFlame
|
2017-12-20 23:50:26 +01:00
|
|
|
import EnchantmentManager
|
|
|
|
import Enchantments
|
2017-05-14 20:05:01 +02:00
|
|
|
import EntityLlama
|
2016-03-31 02:50:23 +02:00
|
|
|
import EntitySquid
|
2017-10-15 23:43:16 +02:00
|
|
|
import EntityTypes
|
2016-04-15 00:49:11 +02:00
|
|
|
import EntityWaterAnimal
|
2017-11-11 06:07:45 +01:00
|
|
|
import EnumItemSlot
|
|
|
|
import EULA
|
2016-03-31 02:50:23 +02:00
|
|
|
import FileIOThread
|
2016-06-18 08:03:40 +02:00
|
|
|
import IHopper
|
2016-03-31 02:50:23 +02:00
|
|
|
import ItemBlock
|
2016-12-28 08:25:35 +01:00
|
|
|
import ItemFireworks
|
2016-11-13 06:29:32 +01:00
|
|
|
import ItemMonsterEgg
|
2018-03-30 19:00:01 +02:00
|
|
|
import LegacyPingHandler
|
2016-05-12 04:07:46 +02:00
|
|
|
import NavigationAbstract
|
2016-05-02 05:54:08 +02:00
|
|
|
import NBTTagCompound
|
|
|
|
import NBTTagList
|
2016-04-03 03:10:38 +02:00
|
|
|
import PacketPlayInUseEntity
|
2017-10-05 15:38:21 +02:00
|
|
|
import PacketPlayOutMapChunk
|
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-12-28 06:19:58 +01:00
|
|
|
import PathfinderGoal
|
2016-03-31 02:50:23 +02:00
|
|
|
import PathfinderGoalFloat
|
2016-12-28 06:19:58 +01:00
|
|
|
import PathfinderGoalGotoTarget
|
2016-04-09 20:48:06 +02:00
|
|
|
import PathfinderWater
|
2017-11-11 06:07:45 +01:00
|
|
|
import PersistentScoreboard
|
2016-03-31 02:50:23 +02:00
|
|
|
import PersistentVillage
|
2017-02-05 06:13:16 +01:00
|
|
|
import PlayerConnectionUtils
|
2017-05-14 20:05:01 +02:00
|
|
|
import RegionFile
|
2017-10-05 15:38:21 +02:00
|
|
|
import RegistryBlockID
|
2016-04-16 06:46:01 +02:00
|
|
|
import RemoteControlListener
|
2018-03-23 04:19:59 +01:00
|
|
|
import ServerPing
|
2017-11-12 00:47:30 +01:00
|
|
|
import StructureBoundingBox
|
|
|
|
import StructurePiece
|
|
|
|
import StructureStart
|
2016-03-31 02:50:23 +02:00
|
|
|
import TileEntityEnderChest
|
2016-05-02 05:54:08 +02:00
|
|
|
import TileEntityLootable
|
2017-01-14 08:24:11 +01:00
|
|
|
import WorldGenStronghold
|
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/"
|
2016-05-13 04:11:11 +02: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-31 02:50:23 +02:00
|
|
|
)
|