And when I last heard you were here and walk back for another minecraft mining throw for version 1.15 in this world I am going to be covering fluids and how you can get a fluid such as water or lava in the game so the first thing After going to want to do is go ahead and create our fluid in it so let’s just go inside in its package and create a new class and just call this fluid in it I am once again going to be using deferred registries pull fluids and if you wanna use object holders obviously You can do that if you really wish and so we just create a public static final deferred register of fluid and I’m just going to pull this fluids and it’s going to be a new deferred register of forge registries blewett’s and our mod ID which is just tutorial Mod dot my ID and just import everything right there okay now we can go ahead and create the registry object so for a fluid we have to create a flowing and a steel fluid and we also have to create a block for that fluid so there’s a few few fields That we need to create here so first we need to go ahead and create the resource locations for the textures so for that we can create and to public static final resource location fields so public setting final resource location and I’m just going to call this first one the Steel so the fluid I’m going to be creating is just going to be milk so I’m going to call this milk underscore steel underscore and RL so that we know it’s a resource location and that’s just going to be equal to a new resource location First is the mod ID so tutorial mod mod ID and then it is the path which is just blocks slash and then it will be milk and score still and then we can just copy this and paste it for the flowing so instead of still flowing and instead Of still here it is flowing just like that then we have to go ahead and create the actual registry objects so first we will create the steel one so public the static final registry object and we will call there well this will be of a flowing fluid and we can just call this Milk underscore fluid so milking school fluid will be distill one and then milk and the score flowing will be the flowing one and this is going to be you two fluids register first is the name so that’s all so you just going to be milk underscore fluid And for the supplier it is a new Forge Forge flowing fluid and this one is dot sauce and this takes in some properties which I’m going to create in a second so for now I’m just going to reference fluid in it dot milk underscore properties okay and just Import and I’m just going to copy this line paste it in and instead of milk underscore fluid we have milk owns love flowing and then this is going to be milk underscore flowing and instead of sauce here is going to be flowing okay and there is those and then we just need To create these properties so let’s just come down and do a public static final Forge flowing fluid dots properties and we’ll just call this milk underscore properties and that’s going to be equal to a new Forge flowing fluid dots properties first this takes in and what It wants a supplier so that will be steel one so milk underscore fluid okay and then the flowing which is the same thing and that was milk underscore flowing and then attributes is a fluid attributes dart builder and here it just wants the steel texture which is milk steel RL and then It is the flowing texture which is milk flowing RL and just put a colon on the end now I assume it once yes it wants the actual fluid so we just put dot get on the end of these there we go okay and now we can do some extra properties so After the builder we can set a few things so we can set the color of the fluid we can set the density we can make it gaseous I don’t know what that means we can set the luminosity we can set the overlay texture the rarity of the fluid The sound which is the general sound and then it’s the field sound and the empty sound the temperature we can set we can tell it to have a special translation key so what we can tell it to be in Lang and we can tell it to have a different This viscosity I think I said that word right yeah and that’s that’s basically all you can do obviously you can actually create your own class for the fluid by just extending and the flowing or the source class and obviously that will allow you to have your own classes For these fluids and that allows you to for example and a potion effect when you’re in the fluid or whatever you want to do which makes your fluid extra special so I’m going to do a few things with this fluid I’m first to set the density so density and I’m Going to set up to five and what else should I do I’m going to set the luminosity to ten I’m going to set the rarity to rarity dot we’ll just do prayer nothing extra special we can do the sounds so sound event and then we can choose a sound so it doesn’t really Matter so I’m just going to click when I click we’ll see what it is they go item honey bottle drink okay honestly you can set the other properties if you wish and there is one thing that we might want to do and they set the overlay texture so That will just be a text path for our overlay you can just copy these top ones for that and here we can change this to overlay and change this to milk and for overlay and then just set the texture to milk overlay RL and what you also need To do on here at the very end is do dot block and that’s how we set the block so it knows what block it corresponds to so we actually need to register the block for this but I’m just going to show you what we’re going to do first so it’s Going to be a supplier and that is going to lead to fluid in it and that will be milk underscore block don’t get and then you can obviously set a bucket after this as well so because that’s got an error it’s not gonna let me so we actually need to Register the block don’t me so let’s go ahead and do that so I’m going to do this in my fluid in it to keep it the same however I am going to use the field from our block in it so I’m going to do a public static final registry object And this is going to be of block okay actually I will do forge fluid block no flowing fluid block flow flowing fluid block and I’m just going to pull this milk and for block that’s going to be equal to block in it blocks doc bread Gesture and first is the name of it so I’m just going to call that milk and then this supplier is going to be a new flowing fluid block here it just takes in the fluid which is fluid in it and this is the steel one so milk underscore Fluid don’t get and then it takes in the properties after that so that will be block dot properties dot create material dot water is the one that you normally want to do but you can also do lava I believe if you want but I think water Makes more sense okay and I’m going to do does not block movement and this means for example it can’t be pushed by pistons and a few other things as well and then you can set hardnesses and resistances however I don’t think it’s necessary but normally for a fluid you set it to 100 So I’m just going to set it to 100 F and obviously you want no drops for a fluid because fluid doesn’t have drops but obviously I suppose if you want your fluid to be special and have drops which doesn’t make sense then you can do that What’s the issue here okay there we go I just had a misplaced bracket okay now misplaced semicolon I mean at the very end it was in the wrong place and but that’s pretty much it obviously if you want to create this fluid block in your block in it that’s fine in fact you Don’t even need a new class for this if you don’t wish to you can just have it all in your block in it and but I just think it makes more sense to keep it in a different class it just helps keep it organized because there’s quite a lot of Stuff here as you can see obviously you don’t need to create fields for these I just think it’s a bit easier to see what’s happening rather than things being super long as you can see for example the milk properties is really long and so yeah that’s it for the code Apart from that we do need to go ahead and register it of course so let’s just go into our main class and we actually want to register fluids before we register blocks so where’s our blocking it varies so it will be item in it then Fluid in it so fluid in it doctor fluids dot register mod eventbus just like that obviously if you want to create a bucket for your fluid that’s pretty easy to do you just basically extend the bucket class and and it will ask for like the fluid as a supplier so that’ll just be Your your still fluid and obviously that just allows for a bucket pretty simple stuff I’m not going to be explaining that but you can check my github if you do want an example of the bucket because I will have it in there okay so now we need to go ahead and do To Jason’s and this is actually for the block however I think they actually used to us it just helps get get rid of some errors in the log Oh actually no that’s not it one thing I missed is we want to make sure it’s not registering a block Item so here where I have this filter I’m also going to add another thing so not that and not block yet look it’s what’s happening just not doing what I want it to do there we go locket is instance of what would it be flowing fluid block There we go that’s to do that so if block is not an instance of a flowing fluid block or it’s not and it’s not crop then it will not register it because obviously we don’t want a block item for a fluid unless you make that the bucket of course which you which you Can do but it just makes more sense to have your own field for the bucket it’s that’s how it’s meant to go okay so now we can do the block state which it’s just going to be pretty simple so this is just going to be called milk so this Is for our block so it will just be milk Jason and in here it is just a normal block state pretty much because it’s just a normal block you’re never actually going to see this block st. so it’s not that big of a deal really that Easily Jason for that then we just need to go into the models block I’m just going to copy def block because it’s literally the exact same so once Eclipse decides to copy it and paste it we should have that file and there we go that is the block model I am Just referencing milk which I’m not going to actually have as a texture and but I’m just once again doing this so get rid of the error and also we’re going to want the item model just to hear that error so actually now we don’t want an item model because we’re not Registering an item for it Holli so that’s useless and then we can do the Lang in fact we don’t need to do the Lang Evo do because there’s no item involved so now we can go ahead and do the textures I suppose so what you’re Going to want to go home ahead and do is basically just create a texture like the water and lava so it’s basically a lot of frames and I’m just going to copy this from my 1.12 mod where I made the water textures because I don’t really Have the effort to go ahead and create new ones okay so there you go as you can see all the textures are in obviously you need the overlay texture as well which I don’t actually have let me see if I can find it real quick choose blocks and water should be able To get this which is the water overlay except we named it what do we name our overlay no so but that was just milk and it’s got overlay I think okay so now we can go ahead and run the game with all these textures in and we should be able To see our fluid in the game okay there you go I am now in the game as you can see I just ran set block and milk and it made the still mud there’s still one which is the top one right here and then the rest are flowing However you see I go into it and quite frankly nothing happens at all so we can obviously change that and and the way we change that is by adding it to the water tag now I know that sounds a bit weird because it’s milk it’s not water or it’s Whatever your fluid is oil or Marmite or whatever but yeah we need to add it to the water tag alternatively you can add it to the larva tag but I’m going to be adding it to the water tag now in my github I may have an example of a list Of some strange things when it goes in but yeah in my github I may have an example of making your own tag for I’m not sure at this current moment I don’t know how to do that and but by the time this video is released I may have that In my github so if you just look at my tags video you can see how to add it to the water tag okay so as you can see I’m now in the game and and as you can see set the density quite high it is struggling to do its thing I am moving There should be an overlay texture I’m not sure where that went it was there before but it seems to have disappeared now I finally broke something possibly but oh yeah that’s fluids as I say it might github and there will be a bucket in there which You can copy if you need to and so yeah I will see you guys in the next tutorial good bye Video Information
This video, titled ‘Minecraft Modding Tutorial 1.15 | Episode 39 – Fluids’, was uploaded by TurtyWurty on 2020-06-02 19:45:11. It has garnered 2277 views and 87 likes. The duration of the video is 00:20:40 or 1240 seconds.
Hey guys, TurtyWurty here, in this video I show how to make fluids. Also, I hope you guys are all doing well during these times, and staying positive. But with all the free time, you can now learn Java!!!! Hope you guys enjoy, all links are below VVVV!
My Discord Server: https://discord.gg/d5cGhKQ Episode 38: https://youtu.be/xrWYaF_ikD4 My GitHub: https://github.com/DaRealTurtyWurty/1.15-Tut-Mod Tutorials I will be doing: https://trello.com/b/LNQlC0l1 A Free Java Course that I would really recommend: https://www.udemy.com/course/java-tutorial/
I would just like to apologize for the lack of videos recently, it is just that editing them has honestly got really painful and boring to the point where I am never in the mood to do it xdd.
Minecraft Forge 1.15.2: https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.15.2.html