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