Hello and welcome back to another tutorial today we’re going to be covering dependencies so in the last episode in our build.gradle file we created all of this which is going to help export our mod however in order to add dependencies we first need to reference a maven so in Order to do that above our dependencies let’s reference our maven libraries in order to do that we just type repositories and then we can open some brackets and then here is where we’re going to put the maven so today i’m going to be covering two types of dependencies curse maven dependencies and Dependencies from individual mods let’s start with curse maven so as you can see the url for this is cursemaven.com so in our repositories we can create a new maven with the url of https colon slash ww www.hurst maven.com and now we’ve added our curse maven url And now in order to add a cursive even dependency we can put that in the dependencies here so what curse maven allows us to do is to reference basically any mod from curseforge and import it as a dependency so if we go into minecraft mods on curseforge and sort by java 1.16.4 We can select a mod to add as a dependency let’s say i wanted to add mouse tweaks as a dependency so when we add a dependency through curse maven we’re just adding the mod into our runtime we won’t actually be able to access the code so we can write runtime only And then we can add the dependency with f g dot d ob which stands for d observation and then we can pass in a string value and this is going to be curse dot maven and then a colon and then we need to add the descriptor of our mod this doesn’t actually matter As long as it doesn’t contain numbers or spaces so i’m just going to write mouse tweaks then we put a dash and then we put in the project id so over here we can see the project id on the right is 60089 so let’s just copy that And paste it into here then we can add another colon and then we need the file id so on mouse tweaks if we go to files and we find the correct version of mouse tweaks we can see that the file id of this is actually up here in the url so let’s Say i want this i can copy that and paste it into here and let’s just add a comment saying this is mouse tweaks and now if we right click on our project and then go to gradle refresh gradle project and wait for this to complete we can see that the configure is successful And if we start the game we can see that mouse tweaks is installed so next we’re going to install an api dependency and the one i’m going to be installing in this tutorial is for jei so if we go to the jei wiki we can see getting started 1.13 and up And this actually gives us the url of the maven repositories so i’m just going to copy this first one go down here add a new maven with that url and another new maven with the other url in here so next over here we can go to the maven listing And we’re going to want 1.16.4 and here we can see all the different versions for 1.16.4 so back in eclipse let’s open the gradle.property and create another new property called jei underscore version and we’re going to set this equal to the version of ji that we want I’m going to go for the latest one which is 7.6.1.74 and ji also wants us to set the minecraft version so let’s set mc version to 1.16.4 then in our build.gradle we can actually add this as a dependency over here let’s create a new thing called ji dependencies and then we want Two different things one for the api and one for runtime for the api we wanted to compile only and then we can do fg.diob of mez.ji colon jei dash and then we put the minecraft version which we’ve already set so we can do a dollar sign and then mc version And then we can put a colon and another dollar sign with the jei version and that’s going to use the stuff that’s in our grade dot properties and because we’re compiling in here we’re going to point to the api now let’s copy all of this and make sure this says compile And then let’s set this one to a runtime only and this time we just don’t want the api now that we’ve done all of this let’s refresh so let’s go to gradle refresh gradle project so you can see in our main class now if we look for something like ipod Plugin which is a jei class we can see it over here and if we load the game we can see that we also have jei installed with the correct version that’s going to do it for this episode in the next episode we’ll create a ji plugin if you need any help Join the discord and i’ll see you later You Video Information
This video, titled ‘Minecraft Modding Tutorial 1.16 | 17.0 – Dependencies’, was uploaded by Cy4’s Modding on 2021-05-03 11:52:07. It has garnered 6671 views and 131 likes. The duration of the video is 00:05:16 or 316 seconds.
JEI Plugins next (or◔‿◔)or ♥ ~ expand me C://Sources/ https://www.cursemaven.com/ https://www.curseforge.com/minecraft/mc-mods/mouse-tweaks https://github.com/mezz/JustEnoughItems/wiki/Getting-Started-%5B1.13-and-Up%5D
C://Follow_Me/ Subscribe: https://www.youtube.com/channel/UCJIDXtGpf4wv1ybDzdTA_vQ/ Website: https://mcmodding.club/tutorials/
C://Help/ https://discord.gg/x9Mj63m4QG Or comment on this video!
C://Source_Code/ This Episode: https://github.com/Cy4Shot/ModdingTutorial1.16/tree/main/17.0-Dependancies All Episodes: https://github.com/Cy4Shot/ModdingTutorial1.16/