Hello and welcome back to another tutorial today we’re going to be covering access transformers and what access transformers allow us to do is to access variables that are either private or final or even both so in our act item class we can see that we have our block stripping map which is Both protected or private and final and what we want to do is to just make this public so that we can access it from anywhere and this block stripping map is just responsible for telling the axe which box can be stroked to other blocks so the oak wood can be stripped to a Stripped oak wood and we’re going to need this when creating a custom log but this axis transformer will work for any variable that’s in minecraft so the first thing we need to do is to go to our build.gradle and under the mappings channel we need to define our axis Transformer so we’ll set the axis transformer variable to a file and then we need to pass in the path of the file and the access transformer is located in source main resources slash meta dash inf slash access transformer dot cfg now in our meta in folder let’s create our access Transformer so let’s create a new file called accesstransformer.cfg and in here we can write our access transformer so all we need to do is to tell the game where this variable is located and you can either write this out manually or use the bot in our Discord so in my discord i’m going to go to bot commands and type in mcp because i’m using mcb mappings if you’re using mojang mappings then you would write mm so i’m just going to write mcp and then the name of the variable that i Want in this case it’s going to be block stripping map and then the bot is going to give me some information about this variable and over here where it says 80 you can see it’s giving us the location of the variable and when we paste that Into our access transformer we can see a couple of things so we have the public which means that we want to make this from a protected variable to a public variable and then the location of the variables so this is in net.minecraft.item.axeitem and we can see that this is in package Net.minecraft.item and that the class name is axed item then we have the name of the variable and you might be wondering why this is different over here but this is actually the same variable just not mapped and then we have a hashtag with our name which just Tells us the user which field this is referring to however we also need to make sure to get rid of the final part since we don’t want this axe item block stripping map to be final and all we need to do to make sure that this Isn’t final is to after the public add minus or dash f and now this is going to make sure that this block stripping map isn’t final and all we need to do to apply the access transformer is to right click on tutorial mod and go to gradle refresh Gradle project and while we wait for that to complete this video is sponsored by mtxserv mtxserv provides premium game servers for titles such as minecraft rust and valheim click the link in the description and use code cy4 to get five percent off your server today and once that’s finished loading we can See that this block stripping map is now public and static instead of protected static and final so our access transformer has worked and to add more you can just literally add more lines here with the axis transformers that you need but that’s going to do it for this Episode in the next episode we’ll be actually using this block stripping map to create a custom log and then eventually generate a custom tree if you need any help join the discord also in the discord is a link to a free minecraft server that any of you can Play on but that’s going to do it for this episode and i’ll see you next time You Video Information
This video, titled ‘Minecraft Modding Tutorial 1.16 | 27.0 – Access Transformers’, was uploaded by Cy4’s Modding on 2021-08-21 13:01:57. It has garnered views and [vid_likes] likes. The duration of the video is or seconds.
Finally we can make trees! (JOIN THE DISCORD) (ɔ◔‿◔)ɔ ♥ ~ expand me C://mTxServ/ Check out mTxServ for premium + …