FabricMC / kotlin-fabric-discord-bot

The discord bot previously used in the fabric discord server.
MIT License
5 stars 7 forks source link

Link to yarn javadoc #37

Open liach opened 3 years ago

liach commented 3 years ago

https://github.com/FabricMC/fabric-discord-bot/blob/f8ea657b6ffb1e5af268b5a656627fe522dc48c5/src/main/kotlin/net/fabricmc/bot/extensions/MappingsExtension.kt#L286 <- can probably add here

So for a class like net/minecraft/village/ZombieSiegeManager for yarn 21w05a+build.7, the link to that class is https://maven.fabricmc.net/docs/yarn-21w05a+build.7/net/minecraft/village/ZombieSiegeManager.html so the general pattern is like https://maven.fabricmc.net/docs/yarn-${yarnVersion}/${namedClassName}.html Note: you need to replace the $ in class name with ., like https://maven.fabricmc.net/docs/yarn-21w05a+build.7/net/minecraft/village/ZombieSiegeManager.State.html

For fields, it's like https://maven.fabricmc.net/docs/yarn-${yarnVersion}/${namedClassName}.html#${namedFieldName} like https://maven.fabricmc.net/docs/yarn-21w05a+build.7/net/minecraft/village/ZombieSiegeManager.State.html#SIEGE_CAN_ACTIVATE

For methods, it's like https://maven.fabricmc.net/docs/yarn-21w05a+build.7/net/minecraft/village/ZombieSiegeManager.html#spawn(net.minecraft.server.world.ServerWorld,boolean,boolean) for int spawn​(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals) in ZombieSiegeManager. This one requires a bit more complex anchor building.