2016-03-31 08:50:23 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-04-03 15:23:19 +08:00
|
|
|
(
|
|
|
|
set -e
|
2016-03-31 08:50:23 +08:00
|
|
|
nms="net/minecraft/server"
|
|
|
|
export MODLOG=""
|
|
|
|
PS1="$"
|
2016-04-03 16:35:51 +08:00
|
|
|
basedir="$(cd "$1" && pwd -P)"
|
2018-05-25 02:41:50 +08:00
|
|
|
gitcmd="git -c commit.gpgsign=false"
|
2016-03-31 08:50:23 +08:00
|
|
|
|
2016-04-02 11:55:54 +08:00
|
|
|
workdir="$basedir/work"
|
|
|
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
2017-08-13 07:56:59 +08:00
|
|
|
decompiledir="$workdir/Minecraft/$minecraftversion"
|
2016-03-31 08:50:23 +08:00
|
|
|
|
|
|
|
export importedmcdev=""
|
|
|
|
function import {
|
2018-05-25 02:41:50 +08:00
|
|
|
export importedmcdev="$importedmcdev $1"
|
|
|
|
file="${1}.java"
|
|
|
|
target="$workdir/Spigot/Spigot-Server/src/main/java/$nms/$file"
|
|
|
|
base="$decompiledir/$nms/$file"
|
2016-03-31 08:50:23 +08:00
|
|
|
|
2018-05-25 02:41:50 +08:00
|
|
|
if [[ ! -f "$target" ]]; then
|
|
|
|
export MODLOG="$MODLOG Imported $file from mc-dev\n";
|
|
|
|
echo "Copying $base to $target"
|
|
|
|
cp "$base" "$target"
|
|
|
|
else
|
|
|
|
echo "UN-NEEDED IMPORT: $file"
|
|
|
|
fi
|
2016-03-31 08:50:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
(
|
2018-05-25 02:41:50 +08:00
|
|
|
cd "$workdir/Spigot/Spigot-Server/"
|
|
|
|
lastlog=$($gitcmd log -1 --oneline)
|
|
|
|
if [[ "$lastlog" = *"mc-dev Imports"* ]]; then
|
|
|
|
$gitcmd reset --hard HEAD^
|
|
|
|
fi
|
2016-03-31 08:50:23 +08:00
|
|
|
)
|
|
|
|
|
2016-07-23 07:54:48 +08:00
|
|
|
import AxisAlignedBB
|
2016-03-31 08:50:23 +08:00
|
|
|
import BaseBlockPosition
|
|
|
|
import BiomeBase
|
2018-07-05 03:23:15 +08:00
|
|
|
import BlockBed
|
2018-02-13 08:44:50 +08:00
|
|
|
import BiomeBigHills
|
2017-01-24 05:11:07 +08:00
|
|
|
import BiomeJungle
|
2016-03-31 08:50:23 +08:00
|
|
|
import BiomeMesa
|
2017-02-06 08:19:35 +08:00
|
|
|
import BlockBeacon
|
2016-03-31 08:50:23 +08:00
|
|
|
import BlockChest
|
|
|
|
import BlockFalling
|
2016-04-25 08:56:04 +08:00
|
|
|
import BlockFurnace
|
2016-04-22 14:54:34 +08:00
|
|
|
import BlockIceFrost
|
2016-03-31 08:50:23 +08:00
|
|
|
import BlockPosition
|
2016-08-31 06:54:03 +08:00
|
|
|
import BlockSnowBlock
|
2016-08-19 08:53:36 +08:00
|
|
|
import BlockStateEnum
|
2016-05-05 07:53:33 +08:00
|
|
|
import ChunkCache
|
2017-08-10 07:11:57 +08:00
|
|
|
import ChunkCoordIntPair
|
2016-03-31 08:50:23 +08:00
|
|
|
import ChunkProviderFlat
|
|
|
|
import ChunkProviderGenerate
|
|
|
|
import ChunkProviderHell
|
|
|
|
import CommandAbstract
|
|
|
|
import CommandScoreboard
|
|
|
|
import CommandWhitelist
|
2016-12-21 11:57:07 +08:00
|
|
|
import ControllerJump
|
2016-04-06 09:55:07 +08:00
|
|
|
import DataBits
|
2016-03-31 08:50:23 +08:00
|
|
|
import DataConverterMaterialId
|
2016-12-02 13:02:18 +08:00
|
|
|
import DataInspectorBlockEntity
|
2017-10-05 21:38:21 +08:00
|
|
|
import DataPalette
|
2016-06-23 10:56:57 +08:00
|
|
|
import DefinedStructure
|
2018-03-22 08:51:12 +08:00
|
|
|
import DragonControllerLandedFlame
|
2017-12-21 06:50:26 +08:00
|
|
|
import EnchantmentManager
|
|
|
|
import Enchantments
|
2018-06-22 23:49:10 +08:00
|
|
|
import EnderDragonBattle
|
2018-06-19 10:19:59 +08:00
|
|
|
import EntityIllagerIllusioner
|
2017-05-15 02:05:01 +08:00
|
|
|
import EntityLlama
|
2016-03-31 08:50:23 +08:00
|
|
|
import EntitySquid
|
2017-10-16 05:43:16 +08:00
|
|
|
import EntityTypes
|
2016-04-15 06:49:11 +08:00
|
|
|
import EntityWaterAnimal
|
2018-05-17 08:35:33 +08:00
|
|
|
import EntityWitch
|
2017-11-11 13:07:45 +08:00
|
|
|
import EnumItemSlot
|
|
|
|
import EULA
|
2016-03-31 08:50:23 +08:00
|
|
|
import FileIOThread
|
2016-06-18 14:03:40 +08:00
|
|
|
import IHopper
|
2016-03-31 08:50:23 +08:00
|
|
|
import ItemBlock
|
2016-12-28 15:25:35 +08:00
|
|
|
import ItemFireworks
|
2016-11-13 13:29:32 +08:00
|
|
|
import ItemMonsterEgg
|
2018-06-27 10:08:01 +08:00
|
|
|
import IRangedEntity
|
2018-03-31 01:00:01 +08:00
|
|
|
import LegacyPingHandler
|
2018-06-15 12:32:35 +08:00
|
|
|
import LotoSelectorEntry
|
2016-05-12 10:07:46 +08:00
|
|
|
import NavigationAbstract
|
2016-05-02 11:54:08 +08:00
|
|
|
import NBTTagCompound
|
|
|
|
import NBTTagList
|
2016-04-03 09:10:38 +08:00
|
|
|
import PacketPlayInUseEntity
|
2017-10-05 21:38:21 +08:00
|
|
|
import PacketPlayOutMapChunk
|
2016-03-31 08:50:23 +08:00
|
|
|
import PacketPlayOutPlayerListHeaderFooter
|
2016-04-13 14:11:40 +08:00
|
|
|
import PacketPlayOutScoreboardTeam
|
2016-03-31 08:50:23 +08:00
|
|
|
import PacketPlayOutTitle
|
|
|
|
import PacketPlayOutUpdateTime
|
2016-04-01 07:08:27 +08:00
|
|
|
import PathfinderAbstract
|
2016-12-28 13:19:58 +08:00
|
|
|
import PathfinderGoal
|
2016-03-31 08:50:23 +08:00
|
|
|
import PathfinderGoalFloat
|
2016-12-28 13:19:58 +08:00
|
|
|
import PathfinderGoalGotoTarget
|
2016-04-10 02:48:06 +08:00
|
|
|
import PathfinderWater
|
2017-11-11 13:07:45 +08:00
|
|
|
import PersistentScoreboard
|
2016-03-31 08:50:23 +08:00
|
|
|
import PersistentVillage
|
2017-02-05 13:13:16 +08:00
|
|
|
import PlayerConnectionUtils
|
2017-05-15 02:05:01 +08:00
|
|
|
import RegionFile
|
2017-10-05 21:38:21 +08:00
|
|
|
import RegistryBlockID
|
2016-04-16 12:46:01 +08:00
|
|
|
import RemoteControlListener
|
2018-06-17 04:30:29 +08:00
|
|
|
import RecipeBookServer
|
2018-03-23 11:19:59 +08:00
|
|
|
import ServerPing
|
2017-11-12 07:47:30 +08:00
|
|
|
import StructureBoundingBox
|
|
|
|
import StructurePiece
|
|
|
|
import StructureStart
|
2016-03-31 08:50:23 +08:00
|
|
|
import TileEntityEnderChest
|
2016-05-02 11:54:08 +08:00
|
|
|
import TileEntityLootable
|
2017-01-14 15:24:11 +08:00
|
|
|
import WorldGenStronghold
|
2016-04-06 07:53:30 +08:00
|
|
|
import WorldProvider
|
2016-03-31 08:50:23 +08:00
|
|
|
|
2016-04-03 15:23:19 +08:00
|
|
|
cd "$workdir/Spigot/Spigot-Server/"
|
2016-05-13 10:11:11 +08:00
|
|
|
rm -rf nms-patches applyPatches.sh makePatches.sh >/dev/null 2>&1
|
2018-05-25 02:41:50 +08:00
|
|
|
$gitcmd add . -A >/dev/null 2>&1
|
|
|
|
echo -e "mc-dev Imports\n\n$MODLOG" | $gitcmd commit . -F -
|
2016-03-31 08:50:23 +08:00
|
|
|
)
|