This implementation offers a clear, low-level look at how state-driven logic can transform static voxels into a dynamic environment. It is a practical demonstration of architectural discipline in game engine development using C++ and Raylib.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Making Minecraft Clone with C++ & Raylib
Added:And hello YouTube. This is my C++ Minecraft clone.
Um, like every stream, we'll start off with a summary of what happened in the previous streams. And at the end of the stream, which will be in about 3 hours, we'll do a summary what happened in this stream.
Uh, you may have missed quite a bit. Uh, so that's why I'll make a summary.
Yo, what's up? What's up?
Uh, let's make a summary uh of what happened in the previous streams. Uh, I added this Nether block.
I am one flex. It will be very difficult for me to remember, but I'll try. What's up? Rename my YouTube account. I am studios def. Uh, we added this nether block um and this nether biome. It's actually a biome. We can later test it out having this in the regular world with the other biomes. Uh, but we added this uh then let's say this is the nether. We added the nether and I made some few changes while in the no talking stream. I made just a few changes that uh are not easy to notice. Uh but uh here this face was culling. Now it's not. Before it was using the transparent property, now it's using the mesh itself. Uh and I think it's culling here and it's culling here. Um I don't know.
It's a bit difficult to explain all the little because these are some little details like that only I care about.
But the main summary is we added this high and you added a nether well kind of we just added these blocks the fog and blocks above us.
Here we have blocks above us.
What's up? What's up?
And for today's stream we have a couple of options.
One option is where is the clone?
One option is lava.
Oh, you one option is to add lava today.
Uh what was the other option? I had another option. The another option is to add the collision boxes because here I I lost them. For blocks that have block state, we lost them.
Um, another option is to fix the snow biome.
Another option is uh to fix the rest on dust because I broke it. Uh, here is difficult to see.
Let's add it and win the snow. So, already have water. No, I don't have water. Okay. Another option is to add water.
Yeah. Uh, look at how it's broken. There is stone dust. Another option is the redstone dust. It has uh the block outline, but this doesn't.
I would say something like collision boxes fix redstone.
Anything but the lava.
Uh another option is to add fire.
That's another option.
Fire.
Blint and steel.
Our option is to add the fire.
Why is it blue here?
Ah, he's talking now. I'm talking every day, bro. I'm talking every day. I just cannot talk 6 hours every day. My limit is the 3 hours, but the question boxes pro should probably should be fixed.
They'll be easy to fix. decision boxes.
They should be easy to fix.
Um, what about the No, I was watching you while I was at work and then it was only audio. Um, because I cannot talk 6 hours every day.
Creation boxes.
Uh, redstone is not priority.
Uhhuh.
Uh, let's see if they have u a JSON file for the fire.
Do they have something here for the fire? Oh, it's searching for file contents. Let's stop that.
Fire. Fire site.
Fire.
Oh, yeah. They have a Oh, we can implement the fire. Oh, that would be cool.
Um, my little bot is starting to spam.
I've set it to be like every 15 or 30 minutes, something like that, not 5 minutes. I'll have to fire the bot.
Uh, let me think about it. What are we going to pick today?
H uh another um that with the redstone looked we yeah the redstone looks weird.
Uh we can and the powering also is not working like it like I completely broke the redstone with the recent updates like this froze the game. Do lava seems cool. Problem with lava is a bit difficult.
a lot difficult, very difficult to get this. This is a custom mesh. It's not a regular block. There isn't um um the collision boxes for sure we will fix. It's a priority. Redest not so much. Uh because the redstone I feel like we can uh it will be easier to solve in the future, not right now. But collision box is a priority. Um, here this is not a regular block. The lava and I don't know if it even has a block state.
The lava is quite difficult the liquids because even Hightail does it differently. Even hightail uh hightail uh water thinks have state code flowing.
Uh hopefully he pours water at some point.
Here in Hightail the water is much simpler.
Uh here this moving around can be done with a shader. It's not that big of a deal, a vertex shader. Uh but hopefully this guy No, he doesn't. Uh but what are um even high tail those fluids differently like this is unique for Minecraft these fluids it will be hard to allow but game make water like block I I because do have block states. Oh perfect.
Yeah.
Um, we could add fire. The problem with fire, it's animated.
I need to go to AM.
In what time zone are you? Like that's why I do the first stream. It's for people in in older time zones. The first stream should be at the proper time for you, but it's a no talking stream. Uh problem with fire. It has an animation and we don't support animations.
And look at it how it has a block outline here at the bottom.
You could add like some template code to add animations. Uh because the fire will help me brainstorm the animations.
And for lava, we could just focus on this simpler lava that's like this.
So to make the simpler lava, you could make the liquid like similar to snow layer. Yeah, we could start it like that. We could start. Okay, let me think about it.
Let's h what if we add we focus on the snow layer. We add the snow uh in the snow biome uh and to do the liquids just like the snow initially initially and then we'll like got to code some websites.
Yeah. Yeah. We could do this. Okay, here's my plan for this stream. We can uh first add the snow.
We can first add the snow.
We'll add the snow.
Uh and the liquids will be just like the snow here with the layers. So, it will be something like this. The liquids something like this.
And uh in this way it will be very simple to have this kind of liquids.
Did you add nether?
I just have uh this I just have this.
I have a ceiling and I have the bottom and I have the [ __ ] Uh but we don't have lava. We don't have lava and we don't have the mops.
Um, and okay, we'll add the snow. This snow we'll add it. Then we'll add lava just and the liquid lava will act just like the snow. It will be just like the snow. And then we'll add fire so that we can focus on animations. And we'll add animations to the lava as well. uh inspired by what we think of for the fire. And and and also while we're at it, we'll also fix the block outline because it's not working for blocks with block state like the like the piston.
It doesn't have an outline. And the torch as well, they don't have an outline and I cannot break them.
Uh, that's my idea for this stream.
That's my idea.
That's my idea.
Let me bring back some of the biomes.
Let me change the planes with the Nether.
Um get terrain here.
This is the biome.
And here instead of always returning the nether, let's change the planes uh to be the nether.
And I think that's it.
Now we we should have the Nether as a biome. Oh, what happened?
Uh, excuse me.
Uh, this should be the snow biome.
Sorry. I'm just in a promo where I Wait, what happened? Okay, this should be the snow biome. Yeah, this should be the snow biome.
I never got trees. This should be the snow biome.
Um, what happened?
Be the snow biome.
Why are they three and Why are you yelling?
Um, let me think about guys. Let me think about it. I'll figure it out. I'll figure it out.
Uh, sand. Okay, we have the desert, the planes, and snow. Oh, I don't have a break. I don't have a break statement.
Yeah. Yeah, that's it.
Three lands.
Uh, yeah. And now we have the snow. And here we are.
I said there cact.
Uh, so this is the Nether.
And this is the snow.
Why do you even want the snow biome in the No, no, don't worry about it. Don't worry about it. Uh, I need to fix up the [ __ ] And I need to fix up the clouds.
to be different dimension. Uh too many question guys. Too many questions. Too many questions.
Uh let me think about it. Uh because the focus is the snow. I brought back the snow. So we can add the so we can add the snow because this is just a regular block.
Now he has wasteland biome.
Yeah. But this pretty cool. Look at it.
This is the Nether. Bro, we'll never make talking stream again.
Uhhuh.
Uh, we need to make changes to the [ __ ] because the [ __ ] is too strong here. I made it strong because of the Nether.
Then you stream again. No, I like streaming.
Uh, this was just so we can focus adding the snow till you have cave generation. An error in Minecraft is cave generation but reversed. Oh.
Oh, that's Oh, I get it.
Cave generation but reversed.
Uh, here it uses 3D noise. Um, let me go back to my to the roots. Let's go back to a previous version.
Come on. Work.
It doesn't start. Why?
Mhm.
Uh, let's make it close faster.
I'm in a hurry. Close. Cancel.
Close. Close.
So, I'm glad you made a Discord. Nice. I already banned somebody in Discord.
Are you going to allow Eternals to host your servers? What do you mean? There are no servers.
Okay. So, does this look like caves?
Ah, this is more like 3D noise. This is more like 3D noise.
Yeah, this is more like 3D noise.
Uh let's not get distracted.
Uh uh let's first fix uh the fog and the clouds.
Let's first fix that because here the fog should be closer like this and here should be further away and uh the clouds at the end. Yeah, the I need to make some changes to the fog.
Slight changes.
Know if it's actually caves or not, but could have changed in the caves and cliffs. Maybe. Maybe.
So, fog range.
Uh, get How do I get the fog collar?
Yeah, here get sky color.
Get sky color. And here I need to make um vector to get fogk range and based on the biome to change the fog range.
So if it's if it's let me think about it here return else return this and what were the ranges in these ones?
How to go back?
Control I. Yeah, control I.
So here we return this range when in the Nether.
And here else we return this range. Look how he's adding the Nether to the Minecraft clone.
And here we are this range fog range. And here um get fog range like this.
And let's do this constantly.
Uh here like this for range.
And this is for the this is for the Yes.
And we need to copy paste it here. This should be for the clouds shader.
This should be for the cloud shader.
And yeah, but here it doesn't use the fog range. Here is where we use the fog range.
Okay. Okay. Now the fog range is much farther.
Now the focus much further and here it gets shorter and changes color.
I will temporarily just so we can play around here. And there we see again the the Nether again here. Nether again. Uh but now we should focus on the snow.
We should focus on the snow. So we will remove this.
Um oh we we need to add block state to the regular grass block.
Uh but let's command this.
Let's commit this and update shader range based on which biome should we make folks for each biome?
Snow is withered. The desert has more.
Uh I have different ones. Well, I just change the color for every biome. I just change the color. Like the easiest way to see it is when we go between the Nether and the uh snow. Like like this is a massive difference in the fog. Like this is a massive difference.
And it's the same with the desert, but uh the desert is far away from here. And right now we are focusing on the snow.
Uh so let's make a change to the grass block. Haven't heard that word in a while. Where is the grass block? Here.
So, h we need to give it a block state.
Let me bring back the the other Minecraft clone. Uh the other Minecraft, not the clone. uh where we need to uh check what's the the state for the grass block because there's no block. It's just a difference in the state.
Yeah, here.
Oh, come on.
Where do I have creative? Oh, it's again survival.
Creative locate biomes. No.
And let's look at the block state.
Uh snowy and it's true or false. So, let's add another property property and let's just copy this.
How did make Minecraft?
Oh, come on, man. It's not fast.
Snowy.
Um, snowy.
snowy.
And that's it. That's it. And uh let's add this property to the grass block here.
So it will have a state and here snowy by default is false.
By default is false. Skip one strip. And now sorry man I'm prioritizing uh progression. I'm prioritizing progression.
Uh let me think about it. And now h and now for the snow biome. Let's spawn the grass block with a different state.
So, let's go get terrain.
Believe if I skip one more, we'll have fully working in dimension. Don't give me any ideas.
Okay, here in the snow, we need to spawn uh grass block.
Yes.
Yes. Okay. And this should have um Okay.
And let's make a drastic change. Let's have um the block state for every block to see the block state with the F3. We can automate it now. Skip one more. Be like speed in my Minecraft clone.
Uh let's have the and it will be very easy because the properties are in an order of map.
It will be extremely easy.
We'll make where is two string two string perfect virtual. Uh, it shouldn't be virtual.
Uh, string view maybe.
Yeah.
Well, in the no talking streams when I don't focus on chats, we do we speedrun.
I have number two position in chat.
Good for you.
Uh let me think about it. Yeah, we need to Okay. Um we need to return.
We need to return.
Something like this.
Uh, it was something like this.
What was it?
Internet.
I just added it at the end. Most of the stream was other stuff. I added quickly the end at the end of the stream.
So, was it don't have the XP thing?
How was it? Like this. This.
Oh, yes. Yes. Yes. Perfect. Perfect.
Perfect. Uh, so we delete this. And here we need um h here we need a text format I think. How did I do it before?
Uh how did I do it before? History.
Uh some previous state view on GitHub.
Let me view it on GitHub. Browse files.
Browse and source block. CPP. Let me look. Two string.
Two string. Yeah, I'm using a text format. Okay, perfect. Text format. Yes.
Yes. Yes.
So here we want the tuck.
Here we want the tuck.
We want the tuck. And let's just uh but we need the properties as well.
We need a string builder.
std SS stream.
Uh, how did we make a string string builder in uh in in block like generate a structure in the structures? I think we did it.
Or was it? Yeah, in the safe. Where is the safe? Safe.
Yeah, this this string stream.
So here properties.
Uh, wait a minute. Wait, wait, wait, wait minute.
Um, I'm just thinking out loud. It's not me talking to myself.
Don't make it weird.
actively participate in streams.
Guys, why do you care about the XP in YouTube live chats? Like, doesn't that sure doesn't that like reset every stream the rankings?
Like, doesn't it reset H.
Oh, you keep the XP. Isn't talking to yourself something? No, I constantly talk to myself. That's how I problem solve. Like uh if somebody like hears me, they'll think I'm a crazy person. Like I all the time talk to myself. Like I solve a lot of problems like that.
That's why there's the deaf duck to talk to it. Deaf duck.
Yeah. This um like programmers talk to this duck and explain their problem.
How many years of experience? 45 years of experience.
Okay. Less than that. honestly talk with them because I have no friends.
I always just write in a notepad for me. Writing is uh too slow.
One thing I really like is how many developers there are in the discord like in the discord that I made. Like there are a lot of developers, man. Like I really like that we have a community of developers like here. Show your projects. Like look how many cool projects everybody is working on.
And surprisingly they are Minecraft clones.
Like I'm really excited to have like uh because uh where else can you find other developers?
Oh wait, somebody messaged.
Uh I really like that. Okay, let's make the properties into a string.
Uh, how should we approach this? Uh, let's go over all the properties property. Um, string builder.
Why are you even called CSS? What does it mean? It's computer science.
It's very simple. It's like with C do VA and for him VA is voice actor but he removed it and now he's just C do.
So we are going over all the properties and properties string builder. Let's give it the what's this first?
And let's give it some space. And let's give it the second two string.
Two string. Perfect.
And we need to give it a new line, I think.
A new line.
And would like to talk about economics.
And here we do. Um, and here we give it the tag.
What's the leaderboard?
And we give it the property string builder like this.
And let's see if it works. Now we should have a debug menu on the top left.
Uh here this should be to string.
Uh how do we convert it to string?
Uh, STR STR like this.
And here was what's was the issue here. Oh, because it's now string view. Because it's now string view.
Okay, moment of truth. Can we see the block state?
We cannot see anything. That's a bummer.
So, two string is not giving anything.
I'm confused. Okay, let's change it from string view back to string.
Let's do that.
Let's change it back.
It's still the same. Damn it.
Uh uh let's uh simplify it. Let's just return return hello world and see if that works.
We should be getting debug information of on F3.
You want to change. Oh, that's for something else. I'm not getting the hello world. So something is a mess.
Two string block two string.
What if I make it back to virtual?
It's still the same.
print and according to how many of these what's the issue?
Do we have another two string? No.
And where is it used? It it should be used in the main.
Uh this is not of help.
I think in main when we draw at the end here hover block.
Okay, here let's um test here. Let's simplify it.
Yes, me or do you sometimes make mini libraries for your project to avoid repeating single piece of code?
No, we don't even get the test. We don't even get this test. Okay, that's that's good. So, this is not working. Hover block state. Get block state. It's not finding a block state. Ah.
Oh, I get it.
So, let's test it on other blocks.
Let's test it on um Oh, but there will be no block hover.
Wait, grass block should have the block state.
Grass block should have it. Let's go to grass block.
Uh, else no, it should be here. If if this is no pointer.
If this is no pointer then then here we need to do hovered block state equals block factory get block and here hovered uh block hover get block type like this.
High wind survival. We'll figure it out.
Okay, now it's working. So, let's change it back.
Yeah. Okay. Look at it. It's showing this is grass block and this is spruce leaves.
And this is Nether, right? Yeah, the Nether book.
Uh, but here when we are not covering anything, I want this removed. And the text should be different with outlines white. Maybe I make game but I use relip.
Uh for me relip is good for you. You need to experiment.
Okay. White is uh it's easier to see but it should have an outline but it's fine.
Um grass texture is not gray. I changed it in the atlas.
Okay, now it's much easier to see uh if we're not looking at the sky.
Draw text with outline.
Really text with outline.
We may need to draw the text again with outline color. Yeah, like this guy does it.
You just render two versions of the text. Oh, I can um we can Yeah. Yeah. Yeah. Two pixels to the right and left. Yeah. Yeah. With a bit of offset. Yeah. Just like Minecraft does it. Yeah. Thank you. Thank good suggestion.
Yeah, you're a genius.
We have a lot of smart people here. Like guys, you should know you guys are smart because uh who else will be watching this stream? Who else will be watching coding stream? Like you guys are smart.
Some of you are way way too smart. Like some of you give really good suggestions and just like you handle your window scaling. I don't care about window scaling. I just muted the stream.
Uh let me see now.
So we should just copy the text.
Okay, let's do uh debug text. Yeah, let's do it like that. std string um debug text equals text format like this. And so here we'll do this is the direction and let's actually do it like this.
And like this. And here the direction bro is using air for May I fix the issue now I'm following threeour tutorial I hate watching tutorials I wouldn't be able to go through a three-hour tutorial.
Okay, this is the direction and then we need then we need um dollar information.
So here we get this and here we and the other string is uh what's the other string man?
It should be Let's bring it up a bit here.
The other string is this.
This is the other string.
And why is this complaining? This is the hover block.
text format.
Oh, we uh we need to be like this. Yeah.
Yeah.
And here, remove this.
And here we draw the actual text.
Debug text. And oh this is the text format like this. And we draw it again.
We draw the text again. Uh but this time black and a little bit down. So here two pixels down.
I think this should be the opposite side.
Uh or like 12. Uh let's see what happens.
It should have an outline now.
Yo, what's up, United States?
Oh, what? Oh, it needs to be first the the other way around. Needs to be the other way around.
A bit more down and to the right. So, four pixels.
Four pixels difference.
something like this. Yo, it's cool.
Uh, so this is the grass block.
Uh, and now we are not looking at any block. We should remove it.
Now we are not looking at any block.
uh std string cover block um info and if searching for book hovered block info equals over block date to string like this. And here we do hover block info like this. Perfect. Now it should work. We're going to make the end update before Mojang.
Everybody wants the end update so bad.
Okay. Now only when we look at the block we get information about it and for now it's just the t.
But the grass block should have a block state for sure and it's not having it.
Why? Oh I Yeah. Yeah. I get why. I get it. Uh I'm not handling it. I'm not handling it. When adding a new property I need to handle it here. Add property snowy.
Snowy like this. Perfect.
And now it should have a block state.
Yes, it has a block state. And it says it's false. Perfect.
Snowy equals false.
And uh let's uh change it just a bit.
Uh two string here. Let's add here these columns like these two dots. It looks better like that.
Why does it need to detect air? I've purposefully on purpose made it to not detect air.
Okay, now it shows the block state.
This doesn't have block state. This has block state. Perfect.
And this has a block state, but uh it's it doesn't have the block outline.
How close are you to the result? What result? We're pretty far off.
Now, let's add the snow.
Ah, attack for biomes.
Uh, that would be helpful, but I'll it will be too much information.
It will be too much information. Uh now let's add the snow and make and change the block state here to be snowy equals true.
Let's do that. Uh but here we need to and and the cool part is guys uh these properties that we're getting it's automatically handled. I didn't code for the grass block how to show the properties like every block has different properties and my code manages to figure them out and shows just the block properties like this is very difficult to implement and we have it like this is very cool man this excites me a lot because when I saw Minecraft had it you could see automatically every block state and I was like they for sure do not code it by hand. And in my game, it's not by hand as well. It's automatic.
Like that's very cool, man.
Uh let's commit this.
Show block state on block hover for every block like that.
Push.
Perfect. And so now what?
Uh now let's uh complete the snow. Let's complete the snow. Snow.
Yeah, it has layers.
It has layers. And we should draw it depending on the layers.
Um, sewing block. Where is the snow block?
Where is the snow? Don't they have it?
Let's go to factory.
Yeah, we need to add it.
So for the snow and we need to implement it.
That's the annoying part. The blocks with block state need to have uh custom class.
They need to have a custom class.
That's a bummer.
But it's uh better than before. is better than before.
Here was the issue. Oh, it's fine.
Should use triangular and generates mesh.
Let's copy this. Um, actually let's copy this and go here like this.
Here we need the layers property. We need the layers.
We need the layers.
And here. Hm.
How is it in Minecraft?
Layers 1 2 3 4 5 up to eight. Up to eight.
Uhhuh. So here it will be text format.
Um, what are the models? Hello. What are you doing? We're implementing the snow. Yes, yet I remember you from previous streams.
I remember you.
Here, let's do snow height.
And here, let's do uh decimal. And here, let's do the layers, but multiplied by two. And here is dojson rotation. No rotation.
Perfect.
And let's see. Do we have the snow?
Get property.
What's this? Oh, here. Snow. No. Uh, layers. Layers. We need the layers.
Okay. We have snow here. Yeah, perfect.
We have snow. And when there is snow, uh, it should change here snowy to true.
It should change snowy to true.
And we need to add that like here everywhere.
We need to add it everywhere.
Something like this.
Uh, and this needs to happen through code.
You could make JSON file that has block properties.
Yeah, everything that needs functionality uses a class. That's what we're doing.
Like we already have this. Every block is a JSON file. Like keep up, man. We We have them or I'm not understanding it correctly.
Something wrong with shadows. Are those trees with pre-made models? Yeah, these are structures.
Like here we have the blocks. Every block is a JSON file. This is the dead bush. It has the collision box in the JSON file. Like we have measuration in class.
Uh what do you mean? I'm confused. Like is this these are the blocks?
And here I have classes for those with the block state like the redstone torch and some of them have the generate mesh because it depends on the state the which mesh they use. It depends on the state. This needs to happen through code like I don't see an alternative like this is the best I can think of.
This is the best I can think of.
like we're even initializing the state through the JSON files.
Uh here where is the grass book? Yeah, here we initialize the state by default to be false. We even do this uh that has properties has block state file properties model.
We don't need to do it exactly like Minecraft does it. We're fine, man. If we have a problem, we'll brainstorm. But as of now, it's fine. Uh as of now what we need to do this is the snow biome.
This we need an algorithm that starts from the sky and goes down and add snow and add snow.
Uh let me think about it.
I'm not sure guys. I'm not sure how when this algorithm should run is no and if check.
No, it's the snow even lands on the trees. It even lands on the trees.
And if it lands on the tree, it will not be on the grass.
And I'm not sure when this algorithm should run.
I'm not exactly sure.
Uh because the world is infinite.
When snow is falling.
Yeah. But um here. When did snow fall here? When did it fall? I don't know.
When did it fall?
If we didn't see it, did it happen?
Hello. What's up?
And we need to enter it. Oh, we don't for now.
We need bunnies.
Look at them.
We need bunnies for sure.
It's even looking at me.
That's a weird animation.
Uh uh does here the block outline change for the snow when it increases? this.
Yeah, it changes. It changes.
What do you want, man? What should What should we name him? The Bunny. What should be his name?
I need a height map.
Why would I need a height map?
Carrot. Okay, this is carrot. We've decided. Alex has decided the bunny is carrot.
It's just like in one piece. Like what was the I think it's from One Piece.
Goofus. No, it's carrot. Grab the model of the bunny and important is a block.
It was a block.
One piece mentioned question mark.
question mark.
No. Oh, we could implement the the thousands of bunnies from ReZero that eat you alive.
That would be funny.
That would be hilarious. like to have a biome with flesh eating bunnies that come at night.
Mascali would be proud we were uh thinking something new.
What about the Okay, let's focus. Uh we we need to figure out how to generate the snow.
We need to figure out how to generate the snow.
So, the algorithm is extremely easy. It starts from the top and it goes down until it finds a block that is not uh air and it changes the block to uh snow and it turns the on placement code. So the on placement code will change this block state snowy to be true and it will change this model to be the snow grass block.
But I need to figure out how to do it.
When should the code run?
Yeah, but when does chunk get generated?
No, it's not slow.
Uh, we could do it uh in the cons in the generate block function here. Generate blocks after blocks are generated.
Here we get the biome. Uh, no. Actually, we have the block spawner because if we do it here, this will ignore the trees. It shouldn't be here.
This ignores the trees.
No, it can. We cannot do when chunk is generated. It still doesn't have the trees. The trees get spawned afterwards.
Uh because here we have a block spawner where we cue blocks for later.
We cue blocks for later.
And we don't know when exactly do they spawn, when exactly they are ready. We don't know that.
Okay. When do trees get generated? When when does that happen? I I have no idea.
I have no idea. They randomly get spawned.
H man, this is a tough one.
Yeah, but when do trees gets placed?
When does it? Because it happens in multiple frames.
What the hell, Minecraft?
What point does the tree spawn? I'll show you. I'll show you.
I'll show you, man. Actually, the trees get spawned here.
Uh, where do they get spawned?
Oh, what's up, Ms. Kelly? You're right on time.
You're right on time.
I hope you get well soon. I'm not ill.
Don't overwork yourself.
Uh, block spawn spawn blocks. I think this is where I spawn them.
Yeah, I think this is where I spawn them.
Hey, that's the Hey, you're a smart person, Bacon. Mr. Bacon, you're quite smart.
Yeah, that's that's very smart of you.
You sound super tired.
Don't worry about it.
I'm just saving my voice because uh talking every day 3 hours like uh makes a toll on the voice because usually I don't talk at all.
That's the only negative. But the positives outweigh the negatives.
The positives heavily outweigh them.
Yeah, we'll do what Bacon is suggesting suggesting. I like what Bacon is thinking. I like what Bacon is thinking.
Uh we will here uh have the snow directly spawned even here. And when we spawn the tree, it will replace the snow with air.
Usually I ignore the air, but this time I will not ignore the air. And here with the uh but I need to change the structure. I need to change the structure.
We'll need to change the ah but we can easily do it. But we need to bring back the outlines because my structure editing block I cannot click it because I don't doesn't have an outline. It lost it. Oh, we can easily bring it back. Actually, let's go to its properties. Structure block. Here we'll add the the outline.
Yeah, collision boxes. Let's add collision boxes. Structure block here.
Let's add them. And now it should work.
What's up? What's up?
And now it should work. Yeah, now we have them. So, like this.
And let's load spruce 3 one.
Spruce 31 load. And this is it. And so we'll need to change it a bit.
We'll need to change it like this. And we'll save it again. Man, the loading feature is so worth it.
The loading feature is so worth it.
Done. And we'll save it like this.
We'll save it like this. Uh but here this block will get ignored.
We need to increase the height a bit.
Uh 13. Like this.
Yeah, like this. And is the snow always uh this height? Is the snow always one?
Um it like on the trees on the trees is it always one? Because if if sometimes it's two it will get a problem. What's happening? Why is there a fire in the snow biome?
Yeah. Look at how every tree has the snow with layer one. Yeah, that's Oh, here we don't have it. Here we don't have it. Why? And here we don't have it.
No. Oh, but it's fine. It's fine. We can just add it there. Oh, wait a minute.
Maybe these three like this is like Let's look at the chunks. Yeah. This is chunk cut off. It's is the chunk stuff.
Yeah. Yeah. Yeah. Yeah. Yeah. Yeah.
Yeah. The Okay, so they're saving the structure without the snow.
And here the snow has spawned properly.
And here look at how the snow has missed the tree. It has missed it. And after the snow has fallen, that's when this part was rendered or generated.
Yeah, that's interesting.
Yeah.
So they do not save it. But we can save it. Oh, look at it here. If we have saved it, it will look very weird.
Imagine this. We have these two three.
No, no, no. We cannot do what Bacon suggest suggested because if we use the air, the air will also cut off this and it will look very weird.
Imagine if here we have like this is cut off and here we have snow like this would be very weird like if this is cut off what's your suggestion what if you generate snow at end but there is no end mascal the trees you cannot predict when the trees are done even m even Minecraft even more junk cannot predict when they're done they miss them here and spawn them when they're not lady.
So, I should not uh play around with the structure. I should leave it.
I should leave it.
I'll not bother with this.
Uh, so we should start doing it at some point.
Yeah, add snow at the end. But when is the end?
One possible end is when we generate the blocks. This is one possibility. When we generate the blocks and if we are in the snow biome to do it. But here we do not have the trees. The trees get added later. They get added later so the trees will not have snow at the top.
We're not looking at Terraria H.
Castle miner. Hello.
does a really good job at blending the world combounds, but I highly suggest looking because blends the grass desert area. Uh I mainly focus on uh Minecraft all the generating stages.
Okay, so we could have stages.
Hm.
How Oh, Wix, what's up? How many hours you have in Minecraft? What do you mean in Minecraft?
Like like actually playing the game? I I have no idea. Like I started way way way back in the day. Like more than 10 years ago was when I first played Minecraft.
H ancient player.
Um, yeah, we have an issue. We don't have stages. We don't have stages. I have a block spawner that can spawn blocks at any point. I don't have stages.
I don't have stages.
That's a bit of a bummer.
H I don't have stages.
H.
Okay. When do the chunks load?
Like where do we create the subchunk?
Um, let's find subchunk in the current pro in the current document.
Where do we generate a subchunk like generate blocks? Where do we call that blocks?
In two places we generate blocks here.
Oh, this is in the very beginning. This is in the very beginning.
What if we ignore this?
What if we ignore this?
It will be easier if it's in one place.
Let's see if this crashes it.
H. We don't get anything. Okay, now we got it. Now we got it.
So, what are you doing? We're trying to generate snow here. To generate snow, we need to start from the top and go down until we reach a block.
Uh h um let's do a boolean initial generation equals false um equals through and generate blocks.
Here here this is new sub chunks different or if we have initial generation here this equals false.
So we will get an initial generation.
Okay perfect.
You write binary for the structures. Our structures are text file. The text file.
Okay. This is where we generate the chunks. Exactly. Here. Here we generate the chunks. And here we This was my stage for spawning blocks.
And we could remove this one where it happens at all times.
Uh, we could keep this at that spawns blocks at all times. We can keep this for other things.
H. Okay. Okay. Perfect. Perfect.
Perfect. Perfect. Perfect. Perfect.
Perfect. Perfect. Okay. Uh here is where we can do it. I like we solved it, man.
We solved it. We spawn blocks here. Here we have trees for sure. Here I'm not completely sure. How do we handle structures? How do we handle structures?
Uh come on structures. Uh, desert planes. Planes.
Where do we have structures?
Q structure. Do we use uh block spawn for this?
Q block. Yes. Perfect. Okay. Yes. Yes.
Yes. Yes. Yes. Yes.
Um, yeah. Here we have the trees for sure.
Yeah, chat. We We figured it out. This is teamwork.
We did this.
Uh here we have the tree. So here if look at darn Terraria world generation bar. Uh Maskell I know the Terraria generation but Maskelli.
Um hi what are you currently working on?
adding snow. We are patriotic to uh Maske.
Uh there's a big difference between Terraria and Minecraft. Minecraft is endless. Terraria is not endless. And so Terraria can easily like handle the stages, but in Minecraft, uh this is the snow biome. It could be generated up to here. And then the player just moves a little bit. And now this part gets generated like it's endless.
Do you get it, Moss? Do you get me? And there's a big difference.
Something up. Uh because it's the Nether. Uh it's because of the Nether.
That's why it's like this. It's because of the Nether.
It's because of the Nether.
Um, don't worry MK I I have an idea what to do. Um, then features but three is also features so there must be some order. Going to steal a stream idea where I just call but I don't talk.
Wait, what the work?
Uh, Mr. Remember, just so you know, like uh you have to have a goal for the non-talking streams. My goal, like a reason, my reason for the non-talking streams is to like uh they help me be productive. Like that is enough for me.
Like that's my reason for doing them. So if you decide to do them, like just so you know, like you need to know what my reason is.
If you have the same reason, then you'll have no issues.
Why are clouds so funky? It's because of the Nether. Like this. The Nether. It's because of the Nether.
You don't need a reason Claus. No, the Wix. The reason is extremely important because if your reason is something different, you'll get disappointed. Like, do you get me?
I'm just telling it so that uh he doesn't get disappointed. I want to do it because I have horrible accent and that will make your ears bleed.
Some people have cool accent.
Wait a minute. Why do I have a hot bar inside of my hot bar? Like, let's restart it.
Yeah, now it's fixed. I don't know why I had a hot bar in the hot bar. Okay, now let's spawn the snow. We know when we should do it. Let's do it.
You can betray is better than having a weak.
No, no, it's fine. It's fine. It's fine.
Okay.
Uh h I have an accent mixed with f dude. Uh some people have really cool accent bro. Is that Moic employer building Minecraft worlds for some people have cool accent like you like uh you yourself are not a good judge for your own accent. You need to see what other people think because I know a lot of other content creators that think they are accent is bad but the actual people watching them are really hyped about their accent. I know French people they have like some French people have really strong accent but like to me it sounds cool and uh Russian people really cool accent like and even English speaking people with accent like I I love accents like it's very interesting to hear accents uh the moment it's bad is when you cannot understand them that's the like so like work on pronunciation have an accent with my heart. I also have an aarter.
I also have a heart.
H.
So, in the sub chunks, let's have uh generate snow.
generate snow.
Let's have generate snow.
Uh, but we need to start from the top to the bottom.
What is the thumbnail? Is the Nether?
No, we shouldn't have this here. How should we generate the snow?
How should we generate the snow?
Huh?
How should we generate it? Yo, hello Pet. What's up? What's up?
How How are you doing?
Since when do you have your own Discord?
uh recently yesterday was funny. Why? What do you mean, man? What do you mean with the errors with the more than 100 errors?
That was really painful. Like one accent from then I barely do any streams. Bro, just do your streams. The more you talk, the better you'll get.
He's on every stream. So, so recent doesn't even have a logo. I don't care about the logo.
In Minecraft uses height map during quarrel generation for surface features like snow.
It's fine. It's fine. Everyone join the uh let me think about it.
I could have a like I have an idea to have a when we are generating blocks I'll just like I in the block spawner I could do it.
Yeah. Yeah. Yeah. in the box spawner.
Uh, I'll have um another structure spawner node and it will take There was a specious blue spot. Don't worry about it. Why is there block without texture on ground? Like I already closed the game like I cannot go back. Uh here a vector 2 position and here adjust this. Look at back on stream. Okay, let's look at back at stream YouTube.
Just because Mali said it.
Just because Mali said it. just because uh what should we look?
Oh, what did I miss?
Okay, this is from the start. It was one of those missing faces on the mesh.
I saw what, guys? What did you saw? What did you saw? Where?
What did you see?
What did you see? 20 seconds before I send that.
I don't see anything.
Where is it?
Absolutely nothing.
Nothing is fine.
It's fine.
Okay. 20 seconds before closing the game. Okay. Let's see it. Uh, no, it's not roll because it's Mascali. Mascali will not throw. Let's Okay, here. Okay.
When I close Okay, here I close the game. 20 seconds back. Uh 5 10 15 20 20 seconds back.
Where is it?
And what are we looking for, Mascalio?
What are we looking for?
What are we looking for?
One single blue square on the Oh, come on. Was that it? like uh a mesh that's not uh fine like that's not a problem.
Oh yeah, there. Okay, I saw it. It's It's not big of issue. It's not big of an issue. Uh I know about this problem.
It's a missing uh mesh.
It's a missing uh it's it's not the chunk is not redrawn.
Yeah, here the chunk is not like how do you have such good eyes Mali noticing something such a small detail.
Uh don't worry about it.
I know about that issue. Uh here we'll do static void spawn snow and here vector vector to position like this and here let's implement this here we'll have another queue Moon snow spawner note.
And here um block spawner data.
Uh snow spawner data. Snow queue.
Uh add place push push uh position push position push position and in here we'll have spawn snow.
Wait a minute. Q snow. It should be uh Q snow.
And here spawn snow.
Spawn snow.
Here h snow. And here we need to iterate over them.
This was this where will is where will have the snow spawning.
I also wear glasses. Moske, we're twins.
Uh, this is the snow spawner note.
And here, snow Q.
No Q. And here.
Uh, Maskellis Flaming Claymore. He lost his account.
Who is Mkelli?
Take your rice once a year. Ah, they're fine.
Block spawner data. No.
And uh here we need to here we need to start from the top most sub chunk and go down.
We need to start from the top and go down.
We need to start from the top.
Let me think about it. So, we need Bro, they won't cut.
Uh, let me think about it. We need to do a while.
Uh, how should we do it? We need to start from the top and go down.
How should we do it?
Until we need to do a while loop until until the block is different than air. Yeah.
Yeah. So here let's do let's do here um position details current block and it will be a vector tree of the note position X and then here the Y and note position Z.
Uh, it's the Y actually. And here the Y must be the the top block. And what's the top block?
It's the It's the uh Where is it? It's in main, I think.
Where is main? Here. and world height this thing.
So this needs to be somewhere else defined like can I do define world height 15?
Can I do like this?
It should work.
Uh let's comment this out.
I watch another video about why people wear glasses.
Okay, it works. Perfect. And let's move this to the globals.
Let's move it to the global header file world height and and so let me think about it.
Yeah, block spawner spawns. No, here.
Here we need this Y position. The Y position is the world height times subchunk size.
So, it's like 15 * 16. That's the upmost block. And we need to go from there down.
So here we do while uh and we need id um current block type equals current um okay we can do it here while current block get type is if while the type equals air while the type equals air will go down go down go down and once it's different from air once it is different from air current block we will go up we'll go up and change the block and so here we need to do current block we need to we need to place block current block place. We need to place snow.
We need to place snow. That's it. That's perfect. And hopefully now we have snow.
Hopefully, finger. Oh, no. No. No. Not yet. Not yet. We're close, but not yet.
Um, when we generate blocks, we need to actually do it here and in the snow biome.
This will be very easy here. Um h snow biome here grass block here. We need block. Um we can do it here. Block spawner spawn snow. And it needs to happen at it needs to happen at global x.
So x + sub chunk origin x and z + subchunk origin z like this.
And uh this should be vector 2 of no this is q snow.
This is q snow.
And we need to spawn it after spawning the trees.
So we need to go to the main and spawn tree spawn blocks. Here we need to do block spawner spawn snow. Perfect. Perfect. Okay, let's test it. Let's test it. I'm excited.
I'm excited.
Let's test it. Hopefully, it works first time.
Hopefully, it works. Yo, snow. We have snow. We have snow. We have snow. We have snow. We have snow. We have snow.
We have snow.
Yo, we have snow.
First time we have snow.
And look at how below here we don't have.
Below we don't have snow. Yo, this is so cool, man.
Yo.
And we can check the block state. Uh no, we cannot uh it doesn't have the block outline. We cannot target it. And here we need to check change this from uh snowy to be true.
Man, this is awesome, man.
It's so awesome.
Yeah, the debug menu is so cool.
Um, man, it's so cool.
We have actual snow.
Yo, we have snow. Let's commit this. Let's commit this.
Um where is my committer spawn? No.
So what next? Uh the it needs to change the block states. It should be getting on placement.
Uh let me see now.
H let me see uh snow. Yeah, we need on placement.
We need on placement where it will change the block below to be snowy if it's the grass block.
So we need position details block below be position details get down and we need and we need the grass we need the grass block.
I don't have a grass block class.
Oh, yeah. I need one. Uh, let's go to the block factory.
I need one.
What do you mean you're still here?
Uh, grass block.
Grass block and here generate mesh.
Generate mesh. It's depends on the snowy part.
Generate mesh here. Snowy.
Snowy.
And snowy.
And JSON model.
If snowy else.
So here here um if okay let's do it like this. Here it should be grass block JSON and if it's snowy then it's then it's the where is it?
And if it's snowy it should be uh snowgrass block.
snow grass block and yeah block below. And now let's get the uh Is it running? Actually, let's test it if it's Oh, yeah. We need the block factory. We need the block factory.
Let's close this.
We need the block factory.
And here grass block because now it has block state.
I don't know what tenter is.
I don't know what that is.
And I'm not interested to know like I know of um I know of uh where is it? This prism launcher which needs your actual Minecraft account. So I think this is legit. And here you can have uh mods. You can have mods. You can have whatever you want.
Add instance. You can pick whatever Minecraft version you want. You can add mods, any mod you want, mod packs, even uh resources, like I don't have a sponsor. Like, who would sponsor a channel with 1,000 subscribers?
Who would sponsor a channel with 1,000 subscribers?
Okay, grass block still works. Let's make it snowy.
Let's make it snowy. So, here snow on placement here.
Uh we need grass block reference.
Um and this is dynamic cast.
This is dynamic cast to grass block reference from uh block below.
We need to get the block state in the shared pointer. Hey bro, you're really cool and I like watching you code. Thank you.
Thank you. block block state equals world world get block date. I'm back. What did I miss? We have snow live streams are cool. I'm happy that they're cool.
um block below and here we do block state and we dreference it.
No, we need to get the pointer. Yes. And if if we got a grass block, if we got it, then we uh then what do Wait a minute.
Um we only we don't need to do this actually.
We just need the block state. And and if If block if we got a block state if we got a block state and and uh if it's ID grass block how to check that and and if block state id ID equals grass block I want block date get property.
I want to get the snowy property snowy and value to set it to true. That's it.
And let's see what happens. Let's see what happens.
Let's see what do we get. Okay.
Snow is false. Oh, come on.
Uh, let's try to place it here.
Let's try to place it here. Yes, snowy is still false.
Why?
Why did we do we get here? Do we actually get here on snow on placement?
Let's go in debug, which is a bit slower.
We have snow blocks.
It's not getting the on placement. What about when I place it myself?
There is no biome grass default cast into snowing grass. How do you have vim in visual story? It's an extension. It's an extension. This method is not getting called. This method is not being called.
That's the issue.
Let's see if we have it in the block factory.
Snow. Yeah, snow.
So, it's perfect.
H position details.
Place block in here. We should be doing uh on placement. Yeah, we should be doing this.
Yeah, we need to do a debug again.
I don't know what solar pip is. Yo, Nico, what's up, man?
What's up? The Nether. Yo, yeah, the Nether.
Let's wait for the world to load in debug mode.
Yeah, the snow has a texture.
Just wait the water to load. Man, debug is so slow.
Okay. On placement. On placement and block snow on placement here. Do we get it here? Yes, we get here. Perfect.
And Ah, it skips this. Why? Why? Why? Why?
Why? Why? Block state empty. Excuse me.
Block below.
Current block.
Current block is Y5. And this is this is Y4. Perfect. And block state is empty. How do we get it?
The grass should have a block state.
Block state is empty.
Huh.
Very weird.
You should add grass. No, that's fine.
Uh, I'm confused.
Get block state. Okay. Um, oh, let's go back to when we generate them.
When we generate blocks. Yeah, but then how does debug find the state?
Oh, wait a minute. Uh, let's go back.
to here and here. Let's comment this out.
Let's comment this out.
Let's see if there's actually a box date of but we're in debug.
And here we need uh where is the here and if this is not no pointer and this is not no pointer.
Yeah, this doesn't have a block state.
Okay, we need to solve that. It doesn't have the There's no block state here.
Uh, yeah, the Nether is in the overworld. It's just a biome.
It's just a biome.
temporarily. It's not a different dimension.
It's just a biome.
I like how you say, "Oh, okay." Like it's something normal.
Let me think about it.
I need to think about Um the the grass block doesn't have a block state. That's the issue.
It's not saving the block state for some reason.
Um, I should look at the subchunks. Why are they not creating block states?
Where is the subchunk?
Generate blocks here.
Oh. Oh, we just directly do the Oh my we just directly set the ID. We need we need what do we need?
We need to set the block state as well.
We need here we need the shared pointer block.
Here we need ID.
Block ID equals like this.
If block ID is not air which is most of the cases and here block ID and here block um block equals block factory get block ID and then here if block has has state if it has state then it's just like when we placed block here if it has block state here.
And we need the index as well.
Equals index.
We need the index. Yeah. Is this okay?
Now we are saving the block state.
Why is bro streaming here too? What do you mean?
Okay, now the block should have block state.
Yes. Yes. Yes. And it's it's snowy. It's snowy. It's snowy. It's working. It's working. The grass block is snowy. It's working. It's working. It's actually snowy.
Yo.
Yeah, it worked.
It worked.
Why is the snow layer so uh I don't know why it's so bright.
I got it too.
Uh yes, first time chatter. What's up to our craft? How are you checking K? It's a snow grass. What do you mean? Just waste a whole day on block state. What do you mean? I don't get it. And why are you posting on both places? Can you break the snow? Uh, I I need to add a block outline for it. I need to add a block outline.
Boom.
Uh, let me see now this and here. Uh, let me see here.
Let's throw if hovered.
If hover block state has block state throw notes faster.
Yo, press on. Uh, press one. Press one.
Preston.
Ah, it's a few seconds. A few seconds.
Uh, not handling states properly.
Not handling states properly.
And let me think about it. Okay.
Uh okay. We the debug is working perfectly.
Here the grass block is not snowy. Here grass block is snowy.
And here we have the just the tack. This doesn't have a block state.
How do you even add an outline? Just watch one of my videos. I have a video on adding the outline.
Do you make power light box remove the snow around? No. I I think no.
Uh let's save this to the committer.
thinking like a game day from '90s.
Uh, what should be this called?
Spawning snow and grass block changes state if snow above.
Perfect.
And then now let's add let's add the outlines because we had them before and now they're gone. either draw lines or make a quad.
Yeah, let's add the outline for the blocks with um gel line width 10 is too big. Like this width for the block outline is 2.5 and some people in the comments said this is too big as well.
I'll actually make it even now just to gel line.
Where did I set it? Line. Yeah, here.
Let's set it to just to the whole grass turning into snowy. Uh, mascal is fine. Don't worry about it.
Does your snow have ambient occlusion?
Um, maybe even two is too much. Let's do 1.5 for the block outline.
Mascal, the game is still running. It's fine.
Ah, did it actually change? It feels like it's the same. Feels like it's the same.
2.5.
2.5.
No.
Use 20 like a good boy. Preston. You know, you know I have more abilities.
Don't taste me.
Like I'm very generous with uh not bunning and timing out like extremely generous only like somebody like test my limits like and I usually don't like play around. I just instantly just bum like I don't have no temper for uh like I like I I'm on both ends. There's no middle point with me. I just like bun.
Like somebody in Discord sent a suspicious meme and like he got banned.
Like he's gone.
Uhhm.
Yeah. Let's um let's have an outline for the snow.
Mascali by optimization. You mean for the snow? Like it's fine. Don't worry about it.
Yeah. Let's add the outline for the snow because it doesn't have an outline. And we need an outline for the piston as well. We need an outline for the piston as well.
And for the lever, every block that has block state um doesn't have an outline.
Oh, when removing the snow, it needs to change back the grass block when removing the snow. Let's add that as well. Block on remove.
On remove on removal as normal blocks. So whole transformation snowing grass take system resource for no reason. What do you mean?
Like the mesh is still not generated when I'm spawning the snow. It's fine, man. Like you're overly complicating it, Mali. Like mesh has not yet generated when I spawn the snow. Like I first generate the blocks, then I generate the trees, and then I generate the snow, and then I generate the mesh. Like, it's completely fine. It's completely fine.
And here snowy falls like this.
And now if we remove the snow, it should uh update the grasses below here.
Um, it didn't do it. I didn't know you are Bulgarian. Now you know. Um, oh, maybe we're not calling on removal position details on um place block in here.
We directly change it. We need to before this.
We need to before this call on removal if it has a block state.
Um, let me think about it.
like this. Here we erase it.
And here before we erase it, uh sup we need to call on remove uh at ether.
You're not tired. What do you mean?
Uh here this is at index um on removal and here the position. And what's the position here? This.
And let's run it. Now we should have phone removal.
Now we should have phone removal.
Uh, this needs to update. Wait it. Wait.
Come on.
Oh, I'm not placing. Oh, yes. Yes. Look at it. It's changing the block state when the snow is removed.
It's changing the block state.
Yeah, he's changing the block state.
Should optimize once you have the thing called code it. Um guys, you have to know optimization is a big waste of time for my personal case. If I optimize, I'll be like, think it like this. Optimization is like cleaning your room.
You clean your room and then the next day you get a package with 50 new clothes and you need to find a place for the 50 new clothes and now you need to change the whole organization system because you have 50 new clothes. Like do you get me? Like we are not at the stage for optimization. We are constantly making changes to everything. The code if it's organized, it's hard to make changes because it gets overly complicated and abstracted. Like in this current case, optimization is bad.
Pet is pissed. I'm not.
You're pissed.
Uh let's add an outline for the blocks for the Yeah. For every block with outline, uh for every block with block state, we need to add an outline.
I need to figure out the outlines. I need to figure out the outlines.
Uh, how should I handle the outlines?
How should I handle the outlines?
What's the requirement for that? What do you mean?
How do you know to return?
Now, the reason only blocks with block state don't have an outline is because uh the outline depends on the block state. It depends on the block state.
I need to change that outline and maybe to give it a default one as well.
I'm not sure besides streaming friend like guys stop asking me for the job. Like I don't want to constantly saying I don't have a job.
Like how many times I need to say that.
Like it's annoying to have to say it out loud for me, like to constantly repeat it to myself.
What? This push the snow.
Get a job.
This push the snow.
H you don't have a guys stop with the job the job is for so doing two jobs for the for the survive six hours streaming in a job is really hard work yeah let's do the outline how is the snow pushed don't worry about it when snow placed also check if there This block inside.
Come work for me. No man. This is my work.
This is my work.
I am starting to think that your favorite line is don't worry about it.
feel embarrassed.
How should I handle block outlines for static blocks? It's extremely easy.
We already are doing it. The problem is dynamic blocks that change because here this grass like it's fine guys stop with the job. Stop.
It's fine guys. Like it's fine. Don't worry about it. I do job in a coffee shop as a manager and also doing my childhood graphic skills.
Um, static blocks they are fine. Can you look up how to draw outline?
What do you mean? Like it's uh I I can easily draw the outline. The problem is what outline exactly? Because here it needs to Would you like to see some of my work? No. I attack so it can detect if it's a cube block. Take it some shaders. Don't worry about it. Here the outline should be a regular block. And now the outline should be different.
Now the outline needs to be different.
Don't worry about it. Pits.
Ah, now you're using uh same thing I say to me. Don't worry about H. Oh, wait a minute. For the torches, easy. The torch is always the same outline.
Not exactly. Sometimes the torch is on the wall. Sometimes the torch is on the wall.
have infinite. Maybe we could add JSON thing for outline.
The outline depends on the block state.
Is there element on piston push? No, you can grab the mesh.
No, the the outline doesn't follow the mesh always. Just look at the fence for the fence. It doesn't follow the mesh.
You make it like Minecraft.
Ah, it's fine. You Oh, come on, man.
We don't use the J Sler.
This is probably starting to stream streaming. Streaming is not my job. Streaming doesn't make anything.
Not enough.
Streaming would be considered my job if it makes minimum wage. It doesn't make minimum minimum wage. So, it's doesn't consider it.
starting the ann Why why does my cursor have this little block? Do you notice it? It has this little block.
The J word got upset cuz he got h I still trying I'm still trying to figure out how am I going to do the block block outline piece of some walking debug stuff you forgot to delete front the curs an error.
Uh let me think about it. When would we need to follow it? Like one place we could do it.
One place we could uh ch update the block outline is when we get the block outline and we get the block outline in a function call.
Uh where is it?
Where is the function call?
Get collision boxes count. Here we could update the block outline. For the static ones, we just directly return it. But for the blocks with um block state, we need to update them.
No, I'm not sending it to the cho.
I'm not sending it to the cho. I already sent him one project and he reviewed it.
Okay, let's do a function called update collision boxes. We already have it here.
And let's call it here.
If has block state, if it has block state to update collision boxes or like to directly do it and we need to push it a bit up.
What's the issue here?
Oh, it's not const. Oh, no.
That automatically draws the shape of block, even custom ones.
Uh, I'm not sending to lowlevel gamedev because he has um lots of things to figure out.
H now let's implement update collision boxes to the snow. Let's implement it for the snow.
Uh void update collision box overrite update. Yeah, here this override.
When are you adding the marketplace?
We're not adding marketplace here. Let's get the layers. Let's get the layers. Uh and u yeah the layers.
So let's clear the collision collision boxes.
Clear.
Collision.
I had a function for clearing the collision boxes. A reset. Oh my. Reset.
Who calls it reset?
Pay 10 to break us.
Uh, reset collision boxes and from to wait a minute.
Uh, add collision box and here it takes vectors. So vector 3 uh from will be from will be and let's do two and here from and two and uh how much is from from is from 0 0 and two is uh 16 0 16 and here it will be two times layers like this. Perfect. Okay, let's see if the snow has uh outline.
Let's see if snow has outline.
Yes, snow has outline.
And we can remove it. We can remove it.
Perfect.
Yes. Perfect. Perfect. Perfect.
Uh, and we need to do the same for the other box.
And we just need to implement a single function.
Just a single function. So, which block?
Which block?
Uh, piston maybe.
Um, but I need the old values for reference.
I need the old values for reference.
I think making dynamic will be better for you.
Uh, let's do the lever. Let's do the lever. Let's do the lever.
Yeah, let's do the lever.
Avoid update collision box overrite.
Collision.
Ah, boxes. Update collision boxes. And here we need if it's powered or not. And here reset collision boxes. And here vector.
Oh, no. It's always the same actually for the um it depends. It depends.
Uh let's uh get the reference history.
We want when did I remove them? The custom outlines.
Uh let's go back to here.
Let's go back to here. Browse files. I need I need include block and here lever.
Okay, I just have a simple one.
I just have a simple one.
Simple collision box.
So, we need um one for piston head.
We need one for piston head.
We need uh we need one for repeater uh for all of these blocks actually. for all of these books.
Uh, redstone torch, redstone dust.
Now, it already has the rail, a power trail, uh, piston template.
Yeah, piston template.
Uh, piston head, lever, repeater, redstone block. Um, we can just give it a simple one.
Button, nether portal, structure block. H, it's always the same. We can give it simple one. Grass block always the same. And snow we already have it. Uh so for which ones was it grass block structure block we already have given that oak button redstone block. Yeah let's give it to redstone block.
Oh it has already. Okay fine. It has already um power trail this redstone torch. Okay, redstone torch. Let's do it.
Reset collision boxes and stone torch.
Redstone torch.
Okay. Done.
Redstone dust rail.
The rail.
The rail is it's this update block state.
And we need it here as well.
Oh, here we need to reset collision boxes and give it here as well.
Now the piston.
Here we need the extended part.
the extended and facing and other stuff. But extended piston template here if it's extended or not.
So here if extended else um piston yeah if it's not extended it's very simple of and it needs to it depends on where it's facing.
It depends on where it's facing.
Um here let's just do it to be like uh uh how much how much? Like uh 14 maybe. Oh no, here it's 16 to the Z 14. Let's see.
And then piston head.
Piston head.
Piston head.
Uh, also a simple one.
Also a simple one. But because the rotation, we need to figure out the rotation. Until we figure out rotation, it will just be a full block for the piston head. Like we need to figure out rotations. How to rotate the block outline lever. It's fine. Repeater.
Repeater.
Reset collision boxes.
Uh, next button.
How's the button?
Button.
And then the Nether portal.
Here we need the axis.
Here we need the access portal.
Um, we'll keep it to be full block.
We'll keep it as a full block for now.
I don't want to bother now. Structure block. Snow. Okay. Now everything should have uh we're already almost 3 hours in.
What do you mean?
Oh, what do you mean almost? It's like more than 20 minutes. Almost? What do you mean almost?
uh here the piston and it decided to be shorter outline here to the right. We need rotations. I'll keep it as a full block.
I'll keep it as a full block.
Uh but we have the outlines and they and they can react properly.
Uh, let's let me change the piston.
Piston template here.
I'll just have it be full block for now.
But I brought back the outlines.
Um blocks with block states have outlines again.
Why are you hard coding it? Uh why not?
Like can you think of another way?
Can you think of another way?
Not every outline follows the mesh.
If we look at um the fence, if we look at the fence, look at the fence. Like, what do you mean? Why am I doing it manually? How else would you do the outline for the fence? How else?
How else? Like, how else for You're right. You're right.
for a piston. It's exactly like the mesh. I could extract it from the mesh.
Sure, I get you. I understand.
Torch. Uh the piston, it follows it follows the mesh perfectly. I don't need to hard code it. But here it needs to be um it needs to be hardcoded for the fence.
This is This is This doesn't follow the mesh, but this follows the mesh like the anvil. It follows the mesh perfectly.
the anvil. Let's ignore this. Uh where's the anvil? This here. The anvil. Look at the anvil. The block outline follows the mesh perfectly.
Like, do you see it follows it perfectly?
Ignore the hot bars and stuff. Ignore them. Ignore them. Uh, let me lower the line thickness even more.
Let me lower the line thickness.
Okay, now look at how smaller it is. I think this is better.
No, it's fine now. It's fine. Sometimes it gets problems.
Yeah. Now the outline I think is better.
Yeah, it's much better now. Much better.
Yo, much better.
We have snow. We have nether. Uh, now we cannot fire.
I think it's perfect time to add fire rotations. You could make one collision box then generate the rotations from that.
I didn't get it.
What you can do? No log blocks like bedrock.
Uh, no animations for textures. We'll have to figure it out.
Add water in Nether.
New GTA 6 trailer dropped. I don't care about GTA 6.
I'm not the target audience for GTA 6.
I'm the target audience for GTA San Andreas and maybe for Vice City, but not for GTA 6. That's for the new generation.
It's not for me.
Yeah, there isn't uh dirt under this.
It's just this.
Wait, why doesn't this have a block outline?
I cannot target this. That's weird.
We made another like the far lands.
Is there far lands? Uh, this is just a biome. This is just a biome.
I have a little bit of luck spikes.
Sadly, we have a few L spikes.
How are she going to make dimension system? We'll figure it out.
Now, can we add fire? I want to see the farlands later on.
We in a few streams back, we managed to see something like that. It was not far land. It was something different.
The terrain was a bit weird.
H.
What happens? Teleport 60 million co.
Let's not think about it.
No entities, but I have them in the Java clone.
But slowly and surely this uh Wait a minute. Is there a snow above here?
No, there isn't snow there.
Yeah, this is like Terraria where uh this is like Terraria where you have the corrupted biome where you have corruption. This is corrupted world.
This is like the corruption biome.
Why doesn't this have snow? Oh, this is just like in Minecraft where some trees get missed.
Missing the holes in ether of worlds.
Let's attempt to add the fire.
I think it's time. Let's attempt to add the fire.
And the trees get cut when going on the next biome. Don't worry about it.
We need to make it into a t-shirt.
Yeah. Animated fire.
What's with I don't have particles.
I don't have particles.
Minecraft uses for animation.
Well, I'm not Minecraft. How are you going to make animated textures? We'll just change the texture atlas.
You mean the language or clone of No, I just have a Java Minecraft clone before fire.
Let's do the fire.
It's time we do the fire.
This fire.
Will we add flint and steel? H just fire. Just fire.
73. Don't worry about it.
Um, uh, do we have anything to commit?
Um, lower block outline works better.
Uh, let me think about it. Yeah, fire.
Um, let's see it in Blockbench as browser. Fire.
Fire.
So, what's this? Fire coral.
Fire floor zero.
What's this?
And then fire floor one.
And then Fireside zero.
Oh, I get it. They use multiple meshes.
T one and these are the different versions.
Ah fire out sight alt alternative then fire up.
What's fire up?
Oh, this is on the but why is it more efficient to just change the Atlas?
Uh, campfire dead fire template campfire. Okay. Okay. Okay. So, we need just these ones.
We just need fire floor, fire, fire floor, fire sight, and fire sight. Alt will do all of these. Yeah.
Yeah. Let's see. Oh, let's do it. Let's do it, guys. Let's do it. Does it have a block state? The fire.
Does it have a block state?
It has. It has. It has It has It has H.
It has an H and east.
What's uh Okay, let's do the debug stick.
I'm changing the H. Oh, when it disappears.
When it disappears is the age. Uh, what about the other things? The west.
West is true. Also, only the west is showing.
Um, only the west is showing.
Hey, come on, man.
uh north and now only the north is showing when it comes to making the most confusing game series.
Do you know about the debug world type?
Yes, I know it. Oh, let's go there.
Let's go there. Let's go there. Yeah, you're smart, man. You're a smart person. Why do I have so many smart viewers?
Yeah, you're right. Let's see the fire.
Oh, this is all the possibilities of the fire. Yeah, you're smart, man.
So, the fire, man, it has so many states. So, it's actually a block.
Oh, yeah. The animation happens when we change the atlas. It's not just two frames.
Yeah, we need to animate the Atlas.
We need to animate the atlas. And this is all the states in having the middle and the sides. Are the sides the same?
Yeah, this is interesting.
Okay, let's implement the fire. Yeah, let's implement the fire. I have an idea.
What are we trying to do? Is it the obvious? We're trying to add the fire.
Uh, so what was the box state?
What was the box state? So, H East, East, north, south, up, and west.
And they are booleans. And we have an issue. The redstone has the same names, but for it, it's up upside and none. And here, east is true or false.
cloud. If we manage to implement fire, we'll have animations. And if we have animations, we'll have fluids. Like, think, Mark. Think.
Let's implement the edge.
Are you primarily a Java programmer?
I'm not primarily anything.
Uh, let's add fire. What's the type of fire? It's just fire. So, let's add a fire. Jason H.
Copy paste rename fire and here it will just have h age h and default will be zero and let's add this new property.
Yeah, here. H. Let's add H.
H like this. And inside of world um inside uh h where did we do it?
Here uh h let's add h.
H. And we need to create a new class.
Uh let's remove placement. And here a uh no here fire and generate mesh.
Um, generate mesh and H.
And here reset collision boxes and add collision box from and two from 0 0 to 16 uh here just two blocks height two pixels. You suck at coding.
I cannot do anything about it. I if I suck at coding, I cannot unsuck at coding instantly.
I can You're not helping me become better.
Instead of telling me I suck at coding, tell me how I can improve so that you can help me improve.
Like, help me out. Don't just say I suck. Help me become better.
Um fire.
How should uh we need to add the JSON models here by getting a real job.
You're actually right. Like uh if I like work in a company with a team, I'll improve for sure. Like if I write bad code, the other developers that have more experience will be like, "Bro, this code is bad. Here is how you can improve it."
Like you guys are right. Like that's true, but I don't want that route.
I'm just uh stubborn.
Uh fire.
Uh fire.
Fire fire sight and floor. And that's it.
You're doing great. Don't worry. You're learning.
Uh we have the fire meshes.
Fire template. Fire floor template. Fire template. Oh, this is in the wrong place.
Template fire.
Template. Fire.
Okay. All of these templates.
You're good at code, dude. I don't even know how to code.
Okay, I added the templates.
Where are they template?
Oh, they're fine here. They need to be Jason here.
Um JSON here JSON how do you code JSONs in C++ like for C how do you make parser uh I just use JSON library like there are smart people that have made a library for parsing JSON and I just use it it's not that difficult uh generate mesh Here we need what is get copy for uh when I need to copy the properties which ones using can say JSON uh yeah here let's use the fire floor zero higher floor zero JSON like this and we need to give it the we need to get the texture mo you taking the job um if Mojang hired me they would want me to re relocate because there's no mojang in Bulgaria and I'll have to I I'll have to think about that I'm not sure but it would be cool to work for Mojunk, but they will probably put me in a not interesting position because uh the sad part is if I become a developer in Mojunk, I'll work in something very specific and that will be boring. I want to work on the whole thing. Like they will tell me you will focus just on the dolphins for the next week. like it would be super boring.
But here I can focus on whatever I want.
Like I want to make YouTube work.
Not the doll.
Um yeah, let's add the fire texture.
Working for sounds fun, but it means having to code in Java. Ah, they have the bedrock edition.
JSON is in code.
Uh, let's get the fire texture.
Let's get the fire texture.
Texture.
Fire.
And it's probably anim. Yeah, it's an animation. Sadly, it's an animation.
Yeah, sadly it's an animation.
I'll just put it here.
Okay. And this is 3280.
This is 3280.
3280.
Um here 328 like this.
So let's see the fire.
Mhm.
Uh, we need to add the ID. We need a bit more work.
Uh, fire fire and inside of world in it.
Fire.
Fire and block factory.
Fire like this. Now we should have fire.
Now we should have fire.
Where is the fire?
Where is the fire?
Um, it's not rendering. Oh, we didn't extract the atlas.
We didn't extract the Atlas.
Dumb ass.
Now we should have fire kind of.
Come on, man. What's up?
Where is the fireman?
Fire floor zero.
Fire floor.
Wait a minute. Fire floor. Oh, wrong Jason. Wrong JSON.
Wrong JSON.
Yes. Uh but let's wait it to generate.
Uh I need also the sides. I need the sides as well.
I need the sides.
Uh here site. I need the site fire light zero.
Now the site.
Let's wait it. Uh yeah. And now we got this side which is the the north side.
We got the north and let's copy paste it with rotations. Are we going to do frames? I don't know.
So that only load one texture into GPU memory.
Uh let's copy this over.
We can do a for loop equals zero I less than U 4 I ++ and here did not what do you mean in here int rotation I have register for blocks. I have that.
I have all the blocks registered.
I have all the blocks, but I need the ids because they are just integers.
I would have to use tax.
uh rotation equals I * 90 and here cube mesh pull rotate set wire rotation rotation.
Why not throw an error when JSON is missing? We can do that.
model name here.
If uh model name if it doesn't contain it, throw wrong JSON model name.
Done. We're done.
Can you add Easter egg?
And now fire.
That doesn't animate. You didn't save.
It's saved. What do you mean?
Yeah, this is the fire but without animations.
without animations.
And and and um and wait a minute.
Up up up and bum.
It doesn't work.
Bum bum bum boom bum bum.
Oh, it happened automatically. What a surprise.
Okay, guys. Let's do a summary and end it because we're over 3 hours. Let's summarize what happened today.
Um, let's summarize what happened today.
And before I summarize, here's a Discord link in there. You get the pink the next time I'm live. Be sure to join if you like the stream. Um, make fire generation there.
Um I saw you telling that uh okay let's summarize.
Uh so we separated we set the nether to be just a biome temporarily so that we could work on the snow biome and we added the snow. Now the snow gets generated and also um here this is actually the grass block with the block state snowy equals true. If we remove this snowy equals false and also we have the debug menu showing for every block on the top left. Uh I don't know it's why it's not showing for this why it's struggling.
We have I'm testing it just now.
Okay. Doesn't doesn't matter. It's working for the grass block. We'll figure out why it's doing this for here.
Um, what else did we do? Um, we added this snow and it lands on the trees on after we generate the trees, we generate the snow and then we added the fire. We added the fire.
We added the fire, but it doesn't animate. to animate it in the atlas. In the atlas, we need this part of the atlas. This atlas, we need to change it every few frames. We need to change it from uh here. From here, we need to change it. And it will automatically update here. And we'll have the animation. If if we manage to animate this, we'll have the lava with animations.
And we also decided next time to add fluids just like the snow. So when the snow increases its size um that's to be the fluids to act uh the fluids to act just like the snow.
I'll show you guys what the idea is to simplify temporarily the liquids.
to simplify the liquids temporarily. So it will be like this. Here this will be the full block. Something like that. And here will be the next block. The next block like it will be simplified. This will be the liquids. Very simplified.
So that we can uh finish the nether and add the lava. We don't have the lava.
So we can add the lava.
Uh and when we add the lava, this will be a different dimension. And we'll be able like to use this portal. So, we'll spawn the fire and it will create the portal. We'll go inside the portal and teleport in the new dimension where we have lava. That's the idea for the next few streams. That's the idea for the next few streams. And did we do something else? Anything else? I think this was Oh, we added the block outlines. Uh, they were gone, but we added them. Now they're back. We have the block outlines.
Uh, and that was basically it for this stream. I think that's basically it.
I'll give you guys invite to Discord one more time. Uh, so you can get a pink the next time I'm live. And yes, structure blocks work. I'll show you just for you, man. Just for you. I'll show you structure block because I'm I like them.
Uh here we'll do SPR spruce three uh zero. I think that's what it's called.
Load. Okay, that structure doesn't exist. So I typed the name wrong.
I typed the name wrong.
Let's try it again.
Uh, spruce 30 and let's load it. Load. Okay, that structure doesn't exist then. What did I call it?
Structures.
Oh, I don't have a zero. I have a one.
Yes, sorry guys.
My bad.
That should be combo box.
So you don't have to manually type it.
Yeah, but in Minecraft you manually type it, I think.
Okay, now it should work.
Uh, spruce 31.
Okay. And let's hit load.
And there is it. The spruce tree.
And we have other structures as well.
Um, we have other structures as well. But once again, guys, let's end it now. Join the Discord to get a pink next time I'm live. But let's end it because we're way over 3 hours and 3 hours is the limit. Colliding with snow. Yeah. Yeah. It doesn't matter.
Well, don't worry about it. Yeah. Let's Let's end it here. Bye, guys. Thank you for watching.
Bye. Yeah. Bye, guys.
Related Videos
LBF101 Creating an XML Changelog
liquibase7511
3K views•2026-06-15
Alta Labs Cloud Dashboard Real time Network & Xnet Insights!
ShinyTechThings
158 views•2026-06-17
Wait... Group Policy Not Applying? Check This First!
keeplearning_iT
144 views•2026-06-15
Leetcode Weekly Contest 506 | Life's boring these days
Pudeesht
2K views•2026-06-14
microJAM: MAKING A MICRO GAME FOR A GAME JAM IN CLOJURESCRIPT AND TOTALLY NOT C
janetacarr
156 views•2026-06-18
Partitioning vs Bucketing vs Clustering: How to Make Queries 100x Faster
thedataandaiguy
194 views•2026-06-16
Design Claude Code Like a Senior Engineer
hayk.simonyan
344 views•2026-06-19
Linus Torvalds: AI Won’t Replace Understanding Code
SavvyNik
140 views•2026-06-19











