From c140a169d75b43f981fd62bc75b58288d8d76b02 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 30 Apr 2021 23:42:15 -0400 Subject: [PATCH] move everything mapping related to a seperate folder --- .gitignore | 6 +- .gitmodules | 4 +- PATCHES.md | 64 +++++++++--------- buildSrc/src/main/kotlin/task/ApplyPatches.kt | 6 +- .../src/main/kotlin/task/RebuildPatches.kt | 5 +- map.srg => mappings/map.srg | 0 {mapper => mappings/mapper}/.gitattributes | 0 {mapper => mappings/mapper}/.gitignore | 0 {mapper => mappings/mapper}/build.gradle | 0 .../mapper}/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 {mapper => mappings/mapper}/gradlew | 0 {mapper => mappings/mapper}/gradlew.bat | 0 {mapper => mappings/mapper}/settings.gradle | 0 .../mapper}/src/main/java/mapper/Main.java | 0 {scripts => mappings/scripts}/apply.sh | 4 +- {scripts => mappings/scripts}/init.sh | 26 +++---- {scripts => mappings/scripts}/install.sh | 16 ++--- .../scripts}/rebuildPatches.sh | 2 +- {scripts => mappings/scripts}/source.sh | 0 unmap.srg => mappings/unmap.srg | 0 21 files changed, 68 insertions(+), 65 deletions(-) rename map.srg => mappings/map.srg (100%) rename {mapper => mappings/mapper}/.gitattributes (100%) rename {mapper => mappings/mapper}/.gitignore (100%) rename {mapper => mappings/mapper}/build.gradle (100%) rename {mapper => mappings/mapper}/gradle/wrapper/gradle-wrapper.jar (100%) rename {mapper => mappings/mapper}/gradle/wrapper/gradle-wrapper.properties (100%) rename {mapper => mappings/mapper}/gradlew (100%) rename {mapper => mappings/mapper}/gradlew.bat (100%) rename {mapper => mappings/mapper}/settings.gradle (100%) rename {mapper => mappings/mapper}/src/main/java/mapper/Main.java (100%) rename {scripts => mappings/scripts}/apply.sh (91%) rename {scripts => mappings/scripts}/init.sh (54%) rename {scripts => mappings/scripts}/install.sh (58%) rename {scripts => mappings/scripts}/rebuildPatches.sh (97%) rename {scripts => mappings/scripts}/source.sh (100%) rename unmap.srg => mappings/unmap.srg (100%) diff --git a/.gitignore b/.gitignore index c3a47791..f82d16d3 100644 --- a/.gitignore +++ b/.gitignore @@ -62,7 +62,7 @@ last-paper !upstreamCommits/* testserver/ -/Base -/Yatopia-Server_remapped +/mappings/work/Base +/mappings/work/Yatopia-Server_remapped /Yatopia-Server_yarn -/Yatopia-Server_yarn_unpatched \ No newline at end of file +/mappings/work/Yatopia-Server_yarn_unpatched \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 534b2db9..fb33f44c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -42,7 +42,7 @@ path = Yatopia-Server_yarn [submodule "Yatopia-Server_remapped"] - path = Yatopia-Server_remapped + path = mappings/work/Yatopia-Server_remapped [submodule "Yatopia-Server_yarn_unpatched"] - path = Yatopia-Server_yarn_unpatched \ No newline at end of file + path = mappings/work/Yatopia-Server_yarn_unpatched \ No newline at end of file diff --git a/PATCHES.md b/PATCHES.md index a12dd721..9a9cdae9 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -8,22 +8,22 @@ # Patches | Side | Patch | Author | CoAuthors | | ----- | ------------- |:-------------:| -----:| -| server | AFK API | William Blake Galbreath | | | api | AFK API | William Blake Galbreath | | +| server | AFK API | William Blake Galbreath | | | server | Ability to re-add farmland mechanics from Alpha | Yive | | | server | Actually unload POI data | Spottedleaf | | | server | Add /ping command | William Blake Galbreath | | | server | Add 5 second tps average in /tps | William Blake Galbreath | | | api | Add ChatColor.getById | Aikar | | -| server | Add EntityTeleportHinderedEvent | Mariell Hoversholm | | | api | Add EntityTeleportHinderedEvent | Mariell Hoversholm | | -| server | Add GameProfileLookupEvent | tr7zw | | +| server | Add EntityTeleportHinderedEvent | Mariell Hoversholm | | | api | Add GameProfileLookupEvent | tr7zw | | +| server | Add GameProfileLookupEvent | tr7zw | | | server | Add IntelliJ IDEA runnable | Zoe | | -| server | Add NBT API as a first-class lib | tr7zw | | | api | Add NBT API as a first-class lib | tr7zw | | -| server | Add StructureGenerateEvent | Nahuel | Mariell Hoversholm | +| server | Add NBT API as a first-class lib | tr7zw | | | api | Add StructureGenerateEvent | Nahuel | Mariell Hoversholm | +| server | Add StructureGenerateEvent | Nahuel | Mariell Hoversholm | | server | Add Velocity natives for encryption and compression | Andrew Steinborn | | | server | Add adjustable breeding cooldown to config | montlikadani | | | server | Add allow water in end world option | William Blake Galbreath | | @@ -33,14 +33,14 @@ # Patches | server | Add config for snow on blue ice | BillyGalbreath | | | server | Add config for villager trading | Ben Kerllenevich | | | server | Add configurable snowball damage | BillyGalbreath | | -| server | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | | | api | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | | +| server | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | | | server | Add demo command | BillyGalbreath | | | api | Add enchantment target for bows and crossbows | BillyGalbreath | | | server | Add enderman and creeper griefing controls | William Blake Galbreath | | | server | Add ghast allow-griefing option | BillyGalbreath | | -| server | Add last tick time API | Ivan Pekov | tr7zw | | api | Add last tick time API | Ivan Pekov | tr7zw | +| server | Add last tick time API | Ivan Pekov | tr7zw | | server | Add mobGriefing bypass to everything affected | Encode42 | | | server | Add no-random-tick block list | William Blake Galbreath | | | server | Add nspt command | Ivan Pekov | | @@ -50,27 +50,27 @@ # Patches | server | Add option to disable dolphin treasure searching | William Blake Galbreath | | | server | Add option to disable mushroom and note block updates | William Blake Galbreath | | | server | Add option to disable observer clocks | Phoenix616 | | -| server | Add option to disable zombie aggressiveness towards villagers | nitricspace | | | api | Add option to disable zombie aggressiveness towards villagers | nitricspace | | +| server | Add option to disable zombie aggressiveness towards villagers | nitricspace | | | server | Add option to set armorstand step height | William Blake Galbreath | | | server | Add option to teleport to spawn if outside world border | William Blake Galbreath | | | server | Add packet limiter config | Spottedleaf | | | server | Add permission for F3+N debug | William Blake Galbreath | | | server | Add phantom spawning options | William Blake Galbreath | | | server | Add player death exp control options | William Blake Galbreath | | -| server | Add predicate to recipe's ExactChoice ingredient | William Blake Galbreath | | | api | Add predicate to recipe's ExactChoice ingredient | William Blake Galbreath | | +| server | Add predicate to recipe's ExactChoice ingredient | William Blake Galbreath | | | server | Add soft async catcher | Spottedleaf | | | server | Add tablist suffix option for afk | montlikadani | | | server | Add timings for Behavior | Phoenix616 | | | server | Add timings for Pathfinder | MrIvanPlays | | | server | Add twisting and weeping vines growth rates | BillyGalbreath | | -| server | Add unsafe Entity serialization API | Mariell Hoversholm | | | api | Add unsafe Entity serialization API | Mariell Hoversholm | | +| server | Add unsafe Entity serialization API | Mariell Hoversholm | | | server | Add vindicator johnny spawn chance | William Blake Galbreath | | | server | Add wither skeleton takes wither damage option | William Blake Galbreath | | -| server | Advancement API | William Blake Galbreath | | | api | Advancement API | William Blake Galbreath | | +| server | Advancement API | William Blake Galbreath | | | server | Airplane Branding Changes | Paul Sauve | | | server | Airplane Configuration | Paul Sauve | | | server | Airplane MC Dev Fixes | Paul Sauve | | @@ -88,8 +88,8 @@ # Patches | server | Allow toggling special MobSpawners per world | jmp | | | api | Alphabetize in-game /plugins list | BillyGalbreath | | | server | Alternative Keepalive Handling | William Blake Galbreath | | -| server | Anvil API | William Blake Galbreath | | | api | Anvil API | William Blake Galbreath | | +| server | Anvil API | William Blake Galbreath | | | server | Apply display names from item forms of entities to entities | jmp | | | server | Arrows should not reset despawn counter | William Blake Galbreath | | | server | Attempt to recalculate regionfile header if it is corrupt | Spottedleaf | | @@ -100,8 +100,8 @@ # Patches | server | Brandings | YatopiaMC | | | server | Break individual slabs when sneaking | BillyGalbreath | | | server | Breedable Polar Bears | William Blake Galbreath | | -| server | Bring back server name | William Blake Galbreath | | | api | Bring back server name | William Blake Galbreath | | +| server | Bring back server name | William Blake Galbreath | | | server | Cache climbing check for activation | Paul Sauve | | | server | Cache coordinate key for micro opt | Paul Sauve | | | server | Cache entityhuman display name | Paul Sauve | | @@ -192,8 +192,8 @@ # Patches | server | Drowning Settings | Ben Kerllenevich | | | server | Dynamic activation range | Paul Sauve | | | server | EMC - Configurable disable give dropping | Aikar | | -| server | EMC - MonsterEggSpawnEvent | Aikar | | | api | EMC - MonsterEggSpawnEvent | Aikar | | +| server | EMC - MonsterEggSpawnEvent | Aikar | | | server | Early return optimization for target finding | Paul Sauve | | | server | End crystal explosion options | Ben Kerllenevich | | | server | End gateway should check if entity can use portal | William Blake Galbreath | | @@ -223,8 +223,8 @@ # Patches | server | Fix the dead lagging the server | William Blake Galbreath | | | server | Fix vanilla command permission handler | William Blake Galbreath | | | server | Flying squids! Oh my! | William Blake Galbreath | | -| server | Full netherite armor grants fire resistance | BillyGalbreath | | | api | Full netherite armor grants fire resistance | BillyGalbreath | | +| server | Full netherite armor grants fire resistance | BillyGalbreath | | | server | Giants AI settings | William Blake Galbreath | | | server | Global Eula file | tr7zw | | | server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn | @@ -246,25 +246,25 @@ # Patches | server | Improved oversized chunk data packet handling | Spottedleaf | | | server | Infinite fuel furnace | William Blake Galbreath | | | server | Infinity bow settings | William Blake Galbreath | | -| server | Item entity immunities | William Blake Galbreath | | | api | Item entity immunities | William Blake Galbreath | | +| server | Item entity immunities | William Blake Galbreath | | | server | Item stuck sleep config | tr7zw | | -| server | ItemFactory#getMonsterEgg | William Blake Galbreath | | | api | ItemFactory#getMonsterEgg | William Blake Galbreath | | +| server | ItemFactory#getMonsterEgg | William Blake Galbreath | | | api | ItemStack convenience methods | William Blake Galbreath | | | server | Kelp weeping and twisting vines configurable max growth age | BillyGalbreath | | | server | Lag compensate block breaking | Spottedleaf | | -| server | Lagging threshold | William Blake Galbreath | | | api | Lagging threshold | William Blake Galbreath | | -| server | Left handed API | BillyGalbreath | | +| server | Lagging threshold | William Blake Galbreath | | | api | Left handed API | BillyGalbreath | | +| server | Left handed API | BillyGalbreath | | | server | Lithium: CompactSineLUT | JellySquid | | -| server | LivingEntity safeFallDistance | William Blake Galbreath | | | api | LivingEntity safeFallDistance | William Blake Galbreath | | -| server | LivingEntity#broadcastItemBreak | William Blake Galbreath | | +| server | LivingEntity safeFallDistance | William Blake Galbreath | | | api | LivingEntity#broadcastItemBreak | William Blake Galbreath | | -| server | Llama API | William Blake Galbreath | | +| server | LivingEntity#broadcastItemBreak | William Blake Galbreath | | | api | Llama API | William Blake Galbreath | | +| server | Llama API | William Blake Galbreath | | | server | Lobotomize stuck villagers | BillyGalbreath | | | server | Logger settings (suppressing pointless logs) | William Blake Galbreath | | | server | MC-147659 - Fix non black cats spawning in swamp huts | William Blake Galbreath | | @@ -279,8 +279,8 @@ # Patches | server | Manually inline methods in BlockPosition | Spottedleaf | | | server | Mending mends most damages equipment first | William Blake Galbreath | | | server | Minecart settings and WASD controls | William Blake Galbreath | | -| server | Modify POM | YatopiaMC | | | api | Modify POM | YatopiaMC | | +| server | Modify POM | YatopiaMC | | | server | Modify default configs | tr7zw | | | server | More debug for plugins not shutting down tasks | Paul Sauve | | | server | Movement options for armor stands | Mariell Hoversholm | | @@ -325,19 +325,19 @@ # Patches | api | Per player viewdistances | Spottedleaf | | | server | Persistent TileEntity Lore and DisplayName | jmp | | | server | Phantom flames on swoop | BillyGalbreath | | -| server | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | | | api | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | | +| server | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | | | server | Phantoms burn in light | draycia | | | server | Piglin portal spawn modifier | BillyGalbreath | | | server | Pigs give saddle back | William Blake Galbreath | | -| server | Player invulnerabilities | William Blake Galbreath | | | api | Player invulnerabilities | William Blake Galbreath | | -| server | PlayerAttackEntityEvent | Ivan Pekov | | +| server | Player invulnerabilities | William Blake Galbreath | | | api | PlayerAttackEntityEvent | Ivan Pekov | | -| server | PlayerBookTooLargeEvent | BillyGalbreath | | +| server | PlayerAttackEntityEvent | Ivan Pekov | | | api | PlayerBookTooLargeEvent | BillyGalbreath | | -| server | PlayerSetSpawnerTypeWithEggEvent | William Blake Galbreath | | +| server | PlayerBookTooLargeEvent | BillyGalbreath | | | api | PlayerSetSpawnerTypeWithEggEvent | William Blake Galbreath | | +| server | PlayerSetSpawnerTypeWithEggEvent | William Blake Galbreath | | | server | Players should not cram to death | William Blake Galbreath | | | server | Populator seed controls | Spottedleaf | | | server | Port Cadmium | Lucy-t | | @@ -347,8 +347,8 @@ # Patches | server | Prevent unload() calls removing tickets for sync loads | Spottedleaf | | | server | Projectile offset config | YouHaveTrouble | | | server | Properly handle cancellation of projectile hit event | Spottedleaf | | -| server | Purpur config files | William Blake Galbreath | | | api | Purpur config files | William Blake Galbreath | | +| server | Purpur config files | William Blake Galbreath | | | server | Rabbit naturally spawn toast and killer | William Blake Galbreath | | | api | Rabid Wolf API | Encode42 | | | server | Raid cooldown setting | jmp | | @@ -374,8 +374,8 @@ # Patches | server | Revert getChunkAt(Async) retaining chunks for long periods of | Spottedleaf | | | server | Rework PlayerChunk main thread checks | Spottedleaf | | | server | Rewrite the light engine | Spottedleaf | | -| server | Ridables | William Blake Galbreath | | | api | Ridables | William Blake Galbreath | | +| server | Ridables | William Blake Galbreath | | | server | Send full pos packets for hard colliding entities | Spottedleaf | | | server | Separate lookup locking from state access in UserCache | Spottedleaf | | | server | Set name visible when using a Name Tag on an Armor Stand | jmp | | @@ -403,8 +403,8 @@ # Patches | server | Stop wasting resources on JsonList#get | Ivan Pekov | | | server | Striders give saddle back | Ben Kerllenevich | | | server | Strip raytracing for EntityLiving#hasLineOfSight | Paul Sauve | | -| server | Suspected plugins report | ishland | | | api | Suspected plugins report | ishland | | +| server | Suspected plugins report | ishland | | | server | Swap priority of checks in chunk ticking | Paul Sauve | | | server | Swaps the predicate order of collision | ㄗㄠˋ ㄑㄧˊ | | | server | Tick fluids config | BillyGalbreath | | @@ -413,8 +413,8 @@ # Patches | server | Toggle for Zombified Piglin death always counting as player | jmp | | | server | Toggle for water sensitive mob damage | YouHaveTrouble | | | server | Totems work in inventory | draycia | | -| server | Tuinity POM Changes | Spottedleaf | | | api | Tuinity POM Changes | Spottedleaf | | +| server | Tuinity POM Changes | Spottedleaf | | | server | Tuinity Server Config | Spottedleaf | | | api | Tuinity config | Spottedleaf | | | server | Tulips change fox type | William Blake Galbreath | | diff --git a/buildSrc/src/main/kotlin/task/ApplyPatches.kt b/buildSrc/src/main/kotlin/task/ApplyPatches.kt index 4fe9b5cb..53fd3381 100644 --- a/buildSrc/src/main/kotlin/task/ApplyPatches.kt +++ b/buildSrc/src/main/kotlin/task/ApplyPatches.kt @@ -99,7 +99,9 @@ internal fun Project.createApplyPatchesTask( if (wasGitSigningEnabled) reEnableGitSigning(projectDir) logger.lifecycle(">>> Done applying patches to $name") } - bashCmd("sh scripts/init.sh", printOut = true) - bashCmd("sh scripts/apply.sh", printOut = true) + bashCmd("rm -fr patches/server/*-Mapped-Patches.patch") + + bashCmd("sh mappings/scripts/init.sh", printOut = true) + bashCmd("sh mappings/scripts/apply.sh", printOut = true) } } diff --git a/buildSrc/src/main/kotlin/task/RebuildPatches.kt b/buildSrc/src/main/kotlin/task/RebuildPatches.kt index b8952958..00faa701 100644 --- a/buildSrc/src/main/kotlin/task/RebuildPatches.kt +++ b/buildSrc/src/main/kotlin/task/RebuildPatches.kt @@ -43,9 +43,10 @@ internal fun Project.createRebuildPatchesTask( logger.lifecycle(">>> Done rebuilding patches for $name") } + bashCmd("rm -fr patches/server/*-Mapped-Patches.patch") - bashCmd("sh scripts/rebuildPatches.sh", printOut = true) - bashCmd("sh scripts/install.sh", printOut = true) + bashCmd("sh mappings/scripts/rebuildPatches.sh", printOut = true) + bashCmd("sh mappings/scripts/install.sh", printOut = true) } } diff --git a/map.srg b/mappings/map.srg similarity index 100% rename from map.srg rename to mappings/map.srg diff --git a/mapper/.gitattributes b/mappings/mapper/.gitattributes similarity index 100% rename from mapper/.gitattributes rename to mappings/mapper/.gitattributes diff --git a/mapper/.gitignore b/mappings/mapper/.gitignore similarity index 100% rename from mapper/.gitignore rename to mappings/mapper/.gitignore diff --git a/mapper/build.gradle b/mappings/mapper/build.gradle similarity index 100% rename from mapper/build.gradle rename to mappings/mapper/build.gradle diff --git a/mapper/gradle/wrapper/gradle-wrapper.jar b/mappings/mapper/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from mapper/gradle/wrapper/gradle-wrapper.jar rename to mappings/mapper/gradle/wrapper/gradle-wrapper.jar diff --git a/mapper/gradle/wrapper/gradle-wrapper.properties b/mappings/mapper/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from mapper/gradle/wrapper/gradle-wrapper.properties rename to mappings/mapper/gradle/wrapper/gradle-wrapper.properties diff --git a/mapper/gradlew b/mappings/mapper/gradlew similarity index 100% rename from mapper/gradlew rename to mappings/mapper/gradlew diff --git a/mapper/gradlew.bat b/mappings/mapper/gradlew.bat similarity index 100% rename from mapper/gradlew.bat rename to mappings/mapper/gradlew.bat diff --git a/mapper/settings.gradle b/mappings/mapper/settings.gradle similarity index 100% rename from mapper/settings.gradle rename to mappings/mapper/settings.gradle diff --git a/mapper/src/main/java/mapper/Main.java b/mappings/mapper/src/main/java/mapper/Main.java similarity index 100% rename from mapper/src/main/java/mapper/Main.java rename to mappings/mapper/src/main/java/mapper/Main.java diff --git a/scripts/apply.sh b/mappings/scripts/apply.sh similarity index 91% rename from scripts/apply.sh rename to mappings/scripts/apply.sh index 406a34f9..52e6f1f4 100644 --- a/scripts/apply.sh +++ b/mappings/scripts/apply.sh @@ -2,7 +2,7 @@ # set -e cd "$(dirname "$0")" cd .. -basedir="$(pwd -P)" +basedir="$(cd .. && pwd -P)" gitcmd="git -c commit.gpgsign=false" @@ -44,4 +44,4 @@ applyPatch(){ fi } -(applyPatch Yatopia-Server_yarn_unpatched Yatopia-Server_yarn HEAD mappedPatches) +(applyPatch mappings/work/Yatopia-Server_yarn_unpatched Yatopia-Server_yarn HEAD mappedPatches) diff --git a/scripts/init.sh b/mappings/scripts/init.sh similarity index 54% rename from scripts/init.sh rename to mappings/scripts/init.sh index d4b6e396..ea26d99c 100644 --- a/scripts/init.sh +++ b/mappings/scripts/init.sh @@ -2,42 +2,42 @@ set -e cd "$(dirname "$0")" cd .. -basedir="$(pwd -P)" +basedir="$(cd .. && pwd -P)" -source $basedir/scripts/source.sh +source $basedir/mappings/scripts/source.sh do_fixes(){ find -name '*.java' | xargs --max-procs=4 --no-run-if-empty sed -i '/^import [a-zA-Z0-9]*;$/d' } -cd mapper +cd ${basedir}/mappings/mapper ./gradlew installDist cd "$basedir" echo "Copying files for the 'Base' Folder" -rm -fr $basedir/Base -mkdir -p $basedir/Base/src/main/java/com/mojang -bash -c "cp -r ${basedir}/${inputdirprefix}Server/src/main/java/* ${basedir}/Base/src/main/java/" +rm -fr $basedir/mappings/work/Base +mkdir -p $basedir/mappings/work/Base/src/main/java/com/mojang +bash -c "cp -r ${basedir}/${inputdirprefix}Server/src/main/java/* ${basedir}/mappings/work/Base/src/main/java/" # bash -c "cp -r ${basedir}/${inputdirprefix}API/src/main/java/* Base/src/main/java/" mcver=$(cat "$paperdir/work/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) -cp -r ${basedir}/${paperdir}/work/Minecraft/"${mcver}"/libraries/com.mojang/*/* ${basedir}/Base/src/main/java/ +cp -r ${basedir}/${paperdir}/work/Minecraft/"${mcver}"/libraries/com.mojang/*/* ${basedir}/mappings/work/Base/src/main/java/ echo "Setting up 'Mapped' Folder" -rm -fr $basedir/Yatopia-Server_yarn_unpatched -mkdir -p $basedir/Yatopia-Server_yarn_unpatched/src/main/java +rm -fr $basedir/mappings/work/Yatopia-Server_yarn_unpatched +mkdir -p $basedir/mappings/work/Yatopia-Server_yarn_unpatched/src/main/java echo "Remapping...." -cp "${basedir}/${inputdirprefix}Server/.gitignore" "${basedir}/${inputdirprefix}Server/pom.xml" "${basedir}/${inputdirprefix}Server/checkstyle.xml" "${basedir}/${inputdirprefix}Server/CONTRIBUTING.md" "${basedir}/${inputdirprefix}Server/LGPL.txt" "${basedir}/${inputdirprefix}Server/LICENCE.txt" "${basedir}/${inputdirprefix}Server/README.md" Yatopia-Server_yarn_unpatched/ +cp "${basedir}/${inputdirprefix}Server/.gitignore" "${basedir}/${inputdirprefix}Server/pom.xml" "${basedir}/${inputdirprefix}Server/checkstyle.xml" "${basedir}/${inputdirprefix}Server/CONTRIBUTING.md" "${basedir}/${inputdirprefix}Server/LGPL.txt" "${basedir}/${inputdirprefix}Server/LICENCE.txt" "${basedir}/${inputdirprefix}Server/README.md" mappings/work/Yatopia-Server_yarn_unpatched/ -JAVA_OPTS="-Xms1G -Xmx2G" ${basedir}/mapper/build/install/mapper/bin/mapper ${basedir}/map.srg ${basedir}/Base/src/main/java ${basedir}/Yatopia-Server_yarn_unpatched/src/main/java +JAVA_OPTS="-Xms1G -Xmx2G" ${basedir}/mappings/mapper/build/install/mapper/bin/mapper ${basedir}/mappings/map.srg ${basedir}/mappings/work/Base/src/main/java ${basedir}/mappings/work/Yatopia-Server_yarn_unpatched/src/main/java echo "Applying fixes..." -cd "$basedir"/Yatopia-Server_yarn_unpatched/src/main/java +cd "$basedir"/mappings/work/Yatopia-Server_yarn_unpatched/src/main/java do_fixes -cd "$basedir"/Yatopia-Server_yarn_unpatched +cd "$basedir"/mappings/work/Yatopia-Server_yarn_unpatched git init git add . git commit --quiet --message=init diff --git a/scripts/install.sh b/mappings/scripts/install.sh similarity index 58% rename from scripts/install.sh rename to mappings/scripts/install.sh index 02de1e34..ec452d41 100644 --- a/scripts/install.sh +++ b/mappings/scripts/install.sh @@ -2,9 +2,9 @@ set -e cd "$(dirname "$0")" cd .. -basedir="$(pwd -P)" +basedir="$(cd .. && pwd -P)" -source $basedir/scripts/source.sh +source $basedir/mappings/scripts/source.sh do_fixes(){ find -name '*.java' | xargs --max-procs=4 --no-run-if-empty sed -i '/^import [a-zA-Z0-9]*;$/d' @@ -12,7 +12,7 @@ do_fixes(){ git config init.defaultBranch master -cd $basedir +cd $basedir/mappings/work rm -fr Yatopia-Server_remapped mkdir -p Yatopia-Server_remapped/src/main cp -r Base/src/main/java Yatopia-Server_remapped/src/main/ @@ -22,21 +22,21 @@ git add . git commit --quiet --message=Base rm -fr src/main/java/* cd .. -JAVA_OPTS="-Xms1G -Xmx2G" "${basedir}/mapper/build/install/mapper/bin/mapper" "${basedir}/unmap.srg" "${basedir}/Yatopia-Server_yarn/src/main/java" "${basedir}/Yatopia-Server_remapped/src/main/java" +JAVA_OPTS="-Xms1G -Xmx2G" "${basedir}/mappings/mapper/build/install/mapper/bin/mapper" "${basedir}/mappings/unmap.srg" "${basedir}/Yatopia-Server_yarn/src/main/java" "${basedir}/mappings/work/Yatopia-Server_remapped/src/main/java" -cd "$basedir" -cd Yatopia-Server_remapped/src/main/java +cd ${basedir}/mappings/work/Yatopia-Server_remapped/src/main/java do_fixes + cd "$basedir" changed="$(cat mappedPatches/*.patch | grep "+++ b/" | sort | uniq | sed 's/\+\+\+ b\///g')" -cd Yatopia-Server_remapped +cd ${basedir}/mappings/work/Yatopia-Server_remapped # git add . git add $changed #only commit the files that were modified git diff --cached > a.patch cd "${basedir}/${inputdirprefix}Server" -patch -p1 < "$basedir/Yatopia-Server_remapped/a.patch" +patch -p1 < "$basedir/mappings/work/Yatopia-Server_remapped/a.patch" git add . git commit -m "" diff --git a/scripts/rebuildPatches.sh b/mappings/scripts/rebuildPatches.sh similarity index 97% rename from scripts/rebuildPatches.sh rename to mappings/scripts/rebuildPatches.sh index f1f66ee1..ef582c5e 100644 --- a/scripts/rebuildPatches.sh +++ b/mappings/scripts/rebuildPatches.sh @@ -1,7 +1,7 @@ #!/bin/bash cd "$(dirname "$0")" cd .. -basedir="$(pwd -P)" +basedir="$(cd .. && pwd -P)" echo "Rebuilding patch files from current fork state..." savePatches(){ diff --git a/scripts/source.sh b/mappings/scripts/source.sh similarity index 100% rename from scripts/source.sh rename to mappings/scripts/source.sh diff --git a/unmap.srg b/mappings/unmap.srg similarity index 100% rename from unmap.srg rename to mappings/unmap.srg