From b81488cf5738fd395b44f76e9cdec26d6b01b009 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 8 Mar 2016 22:08:16 -0500 Subject: [PATCH] Add makemcdevsrc.sh This script will build a folder in work/ that includes only non imported NMS files. This folder can then be added to IDE as a source to see unimported files without any duplicate class errors --- makemcdevsrc.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 makemcdevsrc.sh diff --git a/makemcdevsrc.sh b/makemcdevsrc.sh new file mode 100755 index 000000000..375127b05 --- /dev/null +++ b/makemcdevsrc.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +PS1="$" + +workdir=work +minecraftversion=$(cat BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) +decompiledir=$workdir/$minecraftversion +nms=$decompiledir/net/minecraft/server +cb=src/main/java/net/minecraft/server +papernms=Paper-Server/src/main/java/net/minecraft/server +mcdevsrc=${decompiledir}/src/net/minecraft/server +rm -rf "${mcdevsrc}" +mkdir -p "${mcdevsrc}" +cp ${nms}/*.java "${mcdevsrc}/" + +for file in "${nms}/"* +do + file=${file##*/} + # test if in Paper folder - already imported + if [ -f "${papernms}/${file}" ]; then + # remove from mcdevsrc folder + rm -f "${mcdevsrc}/${file}" + fi +done +echo "Built $decompiledir/src to be included in your project for src access";