move everything mapping related to a seperate folder

This commit is contained in:
Simon Gardling 2021-04-30 23:42:15 -04:00
parent c43b088c81
commit c140a169d7
21 changed files with 68 additions and 65 deletions

6
.gitignore vendored
View File

@ -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
/mappings/work/Yatopia-Server_yarn_unpatched

4
.gitmodules vendored
View File

@ -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
path = mappings/work/Yatopia-Server_yarn_unpatched

View File

@ -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 | |

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)

View File

@ -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

View File

@ -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 "<Mapped Patches>"

View File

@ -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(){