Hi and very welcome to a video series on how to work with block states in java minecraft resource packs this is episode one and what we’re going to talk about in this video is how as you can see here in the background on the stones on the wall How you can add block variation to your blocks in your resource pack using block states here we have a regular stone block what we’re going to do next is to make a few textures for this stone block so i’m going to jump into photoshop and make three different versions then we’re Gonna make a resource pack and then apply the block states to the regular stone block so i’ve gone ahead and made the texture for my stone block in photoshop then i’ve duplicated that into two more layers so we have one layer with a bit of an Orange stone and then one layer with two slightly darker red brown stones they are of course as you can see all the very same design but the color change may be what we need in order to be able to tell them apart when they’re in the game Now let’s put them in a resource pack and load that resource pack up in minecraft okay let’s get cracking if you want to learn how to put together a resource pack i have an entire video of that here on the channel you can follow the link in the description or here on the Screen i have also got you covered with a bit of a guide that you can use yourself to put it together and to the use that you want to but for this video let’s jump into the resource pack folder in your file browser then create a new folder called block States we’re going to make a file called pac.mcimata just copy the information i have down in the description below and put that into this and that’s going to work all fine for you create a folder called assets create a folder called minecraft create three folders block states models And textures in textures and models make a folder called block in textures block here i put together my textures for this stone we have stone stone 1 and stone 2. i’m now going to apply this into the minecraft world so we can see them in game well straight from the get-go you’re Going to see that we have indeed our custom texture on this stone block but this is just because we put the stone block in a resource pack folder if i were to play some more of this it ain’t going to do much but you can see something that’s quite interesting And that is that the block has been rotated around a bit see here it is flipped back and forth and this is actually already coded into the block state of stone within minecraft itself but this is not what we want to have here i want to have my custom models to This and also maybe i want to use this rotation thingy well let’s take a look at what exactly we can do in block states all right so within our folder block states we’re going to create a new file that we call stone.json this is just a text file and In the background here i’ve opened it up for you to look at what we have is essentially a search path through minecraft slash models and in this case block slash stone if there is a stone model in stone that’s now going to be the model that’s going to be presented into the Game world if we make this anything else it’s going to use whatever else we define it to be by default this is going to show minecraft’s regular stone model unless you’ve made one yourself so if you just make a stone texture minecraft is going to divert to using Its regular stone and that one has a path to the stone texture it’s a bit of some extra information for you to put in there but this is where we’re going to add a lot of extra edits now doing this is going to overwrite the custom rotation that we saw in game And what i mean by that is if i open them up minecraft we go back into it and i update the resource pack as we currently implemented it you’re going to see that all of that custom rotation is now completely gone now we only have a texture scaling perfectly Next to itself let’s add our other textures to this and see what that looks like all right it’s time to work some magic in the models folder we’re gonna open that up remember we made a folder called block in block i have now created three other text files we have stone Stove one and stone two since i have three different stone textures i want to have three different models now there aren’t really models because these ones are utilizing something that’s already built into minecraft so if we take a look at that we have the parent right here this parent is a pre-made Block that is provided within minecraft itself cube all is essentially all of the blocks in the worlds that looks the same on all sides so if we make a block the parent like this that’s the model that’s going to be used in the world then all we got to do is to just Implement a texture path for that in stone 2 my texture path is block stone 2. in stone 1 my texture path is stone 1 and stone just has to regular stone as a texture path now with all of these three models we can start defining them in our stone.json Block state we see here that our first model was minecraft block stone aha sweet so essentially all we should have to do is to add a comma here and then paste a new one and add a comma and paste a new one and then rename this one Stone one rename this one stone two now this is not going to work and let me show you what happens we jump into the game we update our resource this is going to give us purple and black blocks what but we we just caused it to call for those Models why is it not working well let’s jump back into here for a brief second if you take a look at what we have here we haven’t said that this is supposed to be an array we’re trying to place all of them at the same time on top of another so we’re Gonna have to do is to add hard brackets into this file one there and one at the end here i believe yep now if we save with the hard brackets in it’s now gonna know that all it has to do is to pull one of these for every block that it’s been placed And it’s going to randomize it because they are all currently just added like they are so we jump back into minecraft with that saved we update the resource pack once more with f3 plus t on our keyboard and now you’re going to see that we have a random assortment With the actual custom colors that i’ve made in photoshop as well they’re randomly sprinkling about there isn’t a set pattern to them you can see how these two are down here but there’s a spread up here so now we created a dynamic block that’s simple we have variation in our block structure Now maybe we want to add some more variation to it what we have done so far is to add three different block designs to one particular block when it’s presented in the world so we have three models that at random are picked well they’re not really picked super random because They are at least divided into an equally big portion of chance to be presented at a certain block location so currently all blocks have a third of a chance to be presented at a particular block location now we can change that with a weight value within our file within the block states File that is and we can also rotate these blocks around this is what it is without rotation applied now i’ve gone into the block states and i’ve actually added a copy of every of these blocks and that is rotated 180 degrees around the y-axis the y-axis makes so that what is Currently lying flat on the ground is going to face in the polar opposite direction on the ground so if i update here you’re going to see that there’s been a change to what we see on the board of stone that we had in front of us now there may not be A lot that you’ll tell but you can see already that there’s some diversion that’s been going on from what we had pre-order so if you go back and forth between this scene and the previous in the video you’ll actually gonna see that there’s a lot that has been changing One of the ways we can actually tell it is by the fact that the light source that i initially applied is actually scattered around a bit it is not consistent across all of the blocks anymore it’s actually you know visibly spread around it comes from different angles and rotations Now let’s also add a weight value to this to really change up how likely it is to certain blocks with certain rotations are going to apply on our model we’re going to jump back into the block states right here and i’m going to add a weight value so we do The quotation marks wait like that and then a column and then we add our weight value now the weight values works like this if i make a thousand here it’s going to be very likely for this one to appear but likewise if i don’t add anything to the others they’re also Going to be a thousand by default so whatever weight value you have we need to apply similar weight values across the board and these are going to be all added up and then the size of the weight value is going to be what’s distributing the blocks within the scene So that’s a bit of math but let me explain it in detail i’m gonna add weights to all of these blocks by doing this copy that copy here paste here paste here and paste here if i make a hundred here and i make a hundred here the total value of weight Currently is 200 which means that these ones have a 50 percent each to be presented if i make 100 here we now have a third if 100 here we now have 25 each between those ones 100 here okay 20 each and a hundred here so now it’s the sixth Of a chance because the weight is equally distributed so all of the have the same chance to appear across the board what if i make this one 600 this one 1000 actually this one 2000 it’s going to be most likely that this particular block design appears it’s going to be slightly less likely That this rotated version of that block design appears and this can also be fairly likely that this particular block design appears but not so likely that any one of these appears because they have so much lower values in comparison to their counterparts i’m going to make this one 600 as well We’re going to save that and jump back into minecraft and update and you’re going to see what i mean the one block we’re going to see the most now was the original stone design because that one has the highest value and as you can see the main prominent Block is our original stone design we can even tell because it’s actually a bit like it was initially flat here along the entire edge more or likely the same block all the way over so that means that the portion of the block that had the most percentage Through the total add up and some of it all is the one that gets presented the most in our world this is a bit of how you can really customize the world with block states but you can also rotate your blocks across x and the z axis the same way we did With y all you need to do is to change this right here to z sorry said or x because those are the three axes we’re working with in game now i ain’t gonna do much of a difference right here cause it’s still the same block so yeah but you could add rotations in Several directions on one block if you felt like it by adding once more but not necessarily across the y-axis twice that’s gonna override itself and become nothing but things like that you can do if you found this video helpful well do leave a like and let me know down in the comments below Are you looking for custom models every month well in that case check out patreon i’ll just start up a patreon page and i have a bunch of cool stuff that’s going to be added in the future as well and when it comes to these blog state videos if there’s anything else you’re Wondering about or if you want me to go into more detail or something well just head over to the community discord and give some suggestions or wishes at once likewise there are more videos coming on the subject matter and i believe we can make an awful lot of cool stuff happen with Block states so without further to do subscribe today if you aren’t already subscribed of the channel and i’ll see you around in the next video see ya Video Information
This video, titled ‘Block Variation & Random Textures in Minecraft – Blockstate Tutorial #1 – How to code .json files’, was uploaded by ArtsByKev on 2021-02-22 21:38:00. It has garnered 36570 views and 1557 likes. The duration of the video is 00:11:24 or 684 seconds.
In this video you will learn how to make random textures appear when you place a block in Minecraft. The custom textures are going to change how Minecraft looks and feel, in a unique and playful way. In less than 10 minutes you will be able to make block variation in your texture pack, and when you are done there is even more cool stuff you can learn in the next video of this series. Alternate blocks in the resource pack with just a few lines of code. To see your updates while playing Minecraft, all you have to do is to press F3 + T and your game will reload the texturepack instantly.
Are you looking for custom models and animated mobs for your Minecraft servers? I create a lot of stuff in Blockbench, and every month there are new and cool 3d models and items available for higher tier patreons. Join us and check it out today https://www.patreon.com/artsbykev
Reach out on twitter via https://www.twitter.com/artsbykev if you have cool things to share and retweet. Amazing contacts get awsome support, and you can be one of them. I’d love to see what cool things you create!
Do you want to learn more and faster, or get to know more creative people? You can join the ArtsByKev discord where we’ll be able to socialize even more and continue to grow this creative community we got going: https://discord.com/invite/MFFw6b3QWr The discord is a place where we can share creations, discuss more about resourcepacks, play games, and more!
Do you want to know how to add custom 3d leaves to Minecraft? Blockstates allow us to make a texturepack diverse and colorful, even if we use a very limited palette of blocks. Make random block textures appear when you place a block on the ground, and you can even create fun interactions if you replace fence gates and buttons with custom models.
Here is the code you need to add to your pack.mcmeta file in order for the texture pack to work with Minecraft 1.16
{“pack”: {“pack_format”: 6, “description”: ” “}}
Here you can find the full resourepack guide that tells you all you need to know in order to make your very own texturepack for Minecraft java edition https://youtu.be/875EckP0_tY With the video you also get this tutorial document download that I’ve made just for you! FOLLOW THIS LINK to download YOUR VERY OWN COPY of the RESOURE PACK & JSON GUIDE, for FREE. Yes, it’s free because I am here to educate my audience, and that includes high quality effort wherenI can give you something for being such awsome subscribers: https://forms.gle/5Hza6DVWLjbmrfmc9
As this video touches on textures but also skips out on the details, you maybe wonder how to make a texture for a minecraft mob? I’ve made sure that there is help waiting right here on the channel. Do you want to make your own Minecraft 3D textures? Or do you wonder – How to make a skin for your favorite creatures? Then look at my other videos, I explain a lot of it in deep detail so that you can learn how to enhance your Minecraft experience like a professional. You can also learn more about how the Steve skin is layed out and works via this tweet I made the other day: https://twitter.com/ArtsByKev/status/1315279267601805312
Do you know about Blockbench? Blockbench is a software made to texture and sculpt your very own Minecraft entities and mobs. Via my tutorial playlists you will get a deeper understanding for how to build and make a great skin texture, and in less than 2 hours you are able to produce your own high quality models in no time. Beginners have found great use in the earlier episodes, and that’s a good tip if you want to become professional today with your Blockbench models: https://www.youtube.com/watch?v=U9FLteWmFzg&list=PLvULVkjBtg2SezfUA8kHcPUGpxIS26uJR
Are you new to Blockbench? Tell med down in the comments and let me know what you would like to see me create. As a marketplace developer I do have a lot of projects going on, but getting inspired by this wonderful community is hands down the best thing I know when creating new video content! Blockbench is a free to use software. If you have not already installed Blockbench on your computer to create Minecraft Bedrock Models or custom Minecraft mobs, then download it via this link: https://blockbench.net/ Meanwhile you’re at it, give the developer a solid follow on twitter, they well deserve it! https://twitter.com/JannisX11
Looking for more tutorials? Here is one I’ve handpicked for you! In this video you will learn how to animate a realistic walk cycle for a spider. We will also look at how to model and rigg the spider in Blockbench. Textures are done using the drawing feature inside of Blockbench, and the base is made in Photoshop CC. The tutorial will give you a deeper understanding for how a spider is built up, how they move, and how the legs are built up https://youtu.be/sc-dsCZ-2Ck