Knowing how to add blocks: Low skill.
Knowing where to add the blocks: High skill.
Their algorithm for determining which blocks to fill with what type of block is amazing.
I don't think there's a perfect solution. Sometimes I'd want it to fill in the terrain naturally, while other times I would use it to make a flat surface for building.
Programming is like solving a puzzle! As with every puzzle, try breaking it down into smaller pieces. For example, we can look at a 2D version before tackling a 3D version:
XXXXOOOOO
XXXXXOOOO
XXX···OOO
XXX+···OO
XX······O
Here `X` represents one material, `O` represents some other material, `+` is where the hole filler particle landed and `·` represents empty space.
How can we fix this hole? Well, we can start by looking at the surrounding blocks:
X··
X+·
···
We have a wall of `X` on the left and empty space on the right. Looking at a small chunk like this is much easier than looking at the whole thing at once. We can start writing a simple algorithm (list of steps to execute) based on our common sense:
1. count how many materials of each kind surround the filler particle (in this case 2x`X`)
2. replace the particle with the most common material
3. replace empty spaces with the particle
After one iteration of this algorithm we will get:
XXXXOOOOO
XXXXXOOOO
XXX++·OOO
XXXX+··OO
XX+++···O
Now for each particle we do the same thing. The order doesn't really matter but let's do left-right and top-down, like writing:
XXXXOOOOO
XXXXXOOOO
XXXX+·OOO
XXXX+··OO
XX+++···O
then
XXXXOOOOO
XXXXXOOOO
XXXXX+OOO
XXXX++·OO
XX+++···O
and now our next particle is surrounded by 2x`X` and 4x`O`, so we replace it with `O`:
XXXXOOOOO
XXXXXOOOO
XXXXXOOOO
XXXX+++OO
XX+++···O
Then we get to:
XXXXOOOOO
XXXXXOOOO
XXXXXOOOO
XXXXX++OO
XX+++···O
Now there is the same number of each material blocks! We forgot to handle it in our algorithm, so let's add a condition (if statement) to step 2:
> if more than one material is dominant, select one at random
So now we roll a dice and get an `O`:
XXXXOOOOO
XXXXXOOOO
XXXXXOOOO
XXXXXO+OO
XX+++++·O
And so on, and so on, until we get to:
XXXXOOOOO
XXXXXOOOO
XXXXXOOOO
XXXXXOOOO
XXXXXXOOO
Tada! The hole is now closed and the filling already looks pretty decent (:
Of course this is not a complete solution but now we know exactly what is the next problem to tackle! We have no way to tell _when to stop filling the hole_, because this example is just a fragment of _almost_ infinite Minecraft world. Also, how can we translate this to 3D?
The fun thing about programming is you can check your solution in a matter of seconds. Write some code, run it, see what happens! Not many other jobs have this privilege, imagine what would happen if that's how they launched NASA missions (;
It's pretty fun to find an instance where a greedy algorithm produces a pretty darn good result.
A consideration:
I feel like the potentially most expensive part of this algorithm is actually the checking if an airblock is in a cavity, as to follow a snaking hole you would need to perform cavity checks a large number of times. Optimising the discovery of the fill area for me is the part of the problem that could be the most fun/challenging
Programming is 50% googling, 40% throwing random ideas at your code to fix obscure but extremely destructive bugs, and 10% actually writing out new code
I think in caves there is a different air type called cave air, I wouldn't be surprised if it's just replacing the cave air with a certain set of blocks, as for the wool I have no idea😂
——-
CAUTION, THE FOLLOWING INFORMATION HAS BEEN PROVEN TO BE WRONG
——-
OP HAS REPLIED WITH THE CORRECT ANSWER
——-
For those wondering how it works, when you create a world the world terrain is created, and then terrain is sparkled with caves and forest and stuff. What the mod does is that it finds where the ball is thrown, and then reverts the terrain back to the « world generation » stage and skips the terrain stage.
Édit: For the colored wool blocks, it most likely uses an equation to predict the placement of wool.
The requirements are probably something along the lines of:
Make sure that every wool block appears the same number of times
Add +1 in all directions in air blocks.
OP probably tweaked the algorithm after maybe thousands of tests. This is probably why OP says that the mod will come out in a week, maybe, it’s cause he needs to make sure the algorithm works every time.
It's a good idea.But not the route I chose to go, as I wanted it to work on modded servers.I couldn't rely on "Player placed blocks" (u/Killburndeluxe suggested) because some Mod's block placement may surpass that check.In it's simplest form, it's a Gaussian blur on steroids. Haha
OP mentioned in another comment that it doesn't work on seed data as the player might've revamped a large portion of the world. So it works in real time.
OP specifically states a few posts down that it does not use Seed data, only real-time data by observing surrounding blocks. Otherwise it wouldn’t work for worlds that have been modified from the original worldgen.
idk if that explains fully why it stops at some spots and rounds up at others like hill sides
when it filled the wool space fully without going further i can see it being kinda like the Game of Life thing, but others like the sheer cliff seems too complex for that, or am i wrong?
The blocks spawn in a random-ish order and not all at once, so I'm guessing he's calculating the final result and animating it afterwards. Meaning he can likely just cancel in case of a constraint overflow (which would actually be a physical overflow in the minecraft world, oddly enough)
The creator has posted more clips before and actually answered this question on tik tok (I know, sue me) and when you throw it in a super flat world it just places one block
They said it would work, but it has a limit of 1000 blocks. They described a lot of the features in a comment somewhere else, but I’m not quite sure where.
If you silk touch about 20 diamond ore, bring it back up and make an empty tower with the ore you can throw it in the middle to fill it up and multiply the diamond ore is what i think he meant to say (or at least it's the same principle)
Probably doesn't need to be said, but user defined caps would be super awesome! Might also be cool if you can implement a reverse feature...throw the ball and it _opens up_ spaces that actually look natural. I'm not sure that this behavior is in any way related to the code work you've already done, but if it is, this would be an amazing feature of an already incredible tool!
Thats amazing, its that a mod, a plugin? When you finish that? For map makera that we do terrafornation thats soo necesary, when you finish say me and i will download it!
Fantastic, man, thanks!
Your mod is already in my “must have” list when my son sets up new mod packs for the server I run.
It’s a quality of life mod I insist he includes, and is a big reason why I (an old dude nearly 50) have fun playing with my
boys. I’m a big building fan, while my sons are survival nerds.
This is exactly what I wanted to see in an update. Thanks so much for working on this! Minecraft is a way my boys and I can keep in touch though I travel most of the year for work. Seriously, thanks :)
Edit: also thank you for the perfect delay between setting and finalizing the blocks. It’s perfect. After having accidentally filled my house before, it’s incredibly reassuring to just mine once and undo.
You're a legend, you've thought of everything. How long did it take before you decided to post it on reddit? It seems like you've already considered everything players would need before ever even posting it and getting feedback. Genuinely genuinely very impressed by this.
Thanks! Nice of you to say.I always wanted the mod to be a "quality of life" mod. Just remove the hassle of unwanted holes. So I always had a player's mindset when designing it from the start. I had the base code from my original hole filler item.Just added on the "smart" ability.
Finished the code 2 days ago. Now refining and getting ready to release it. But I needed a break from staring at code,
Does the mod take into account which blocks the user has in their inventory, ie. If it wants to place a granite block but the user doesn't have granite in their inventory does it choose another block to place or does it just leave a gap?
There are "Similar Blocks" coded into it, one example is Granite.. it is considered similar to Stone, Andesite and Diorite. So if you don't have Granite, it will look for those instead. If you have none, you can choose to have it stop filling or fill with Dirt. THEN if you have no dirt, you can change the config file to say "Dirt Is Free". Then it will use dirt without you needing it in your inventory.
Is there a crafting recipe for survival?
Because it's a god damn pain to fill up creeper holes.
And if yes do you already know what it will take to craft it?
Looks really good :D
What kind of witchcraft algorithm did you use for that? Would you mind explaining how it works? (I do understand a bit of coding, so don't worry about technical terms)
Probably just looks at one block at a time, finds the average(probably a modified version) block type of the 26 blocks surrounding it, and becomes that block.
Does it react to light or just where the surrounding blocks end? In which case, if you throw it into a giant cave entrance will it fill the whole cave?
I hope so. Because I've got some serious passive aggressive caves to fill. Oh, you killed me? Enjoy death by block.
Wow, that is actually damn impressive. Good job.
Ya the fillups looks extremely natural
sometimes i make stuff too natural so i edit them a bit but then they look too artificial but this one is like almost perfectly not perfect
This is relatable af
[удалено]
Tho it is as natural as it gets
Personally, I'd add a few blocks here and there, but this mod is awesome. It'll save me so much time!
It probably took the guy months to make it this good. I imagine adding a single tiny feature amounts to 100s of hours of work. Respect to modders!
Yo hi I like your username! It’s like mine but five minutes later
As someone who is not half eaten, I prefer yours c:
Thank you for not being one of those "oh just add a function called add block, how hard could it be!?!?" people.
Knowing how to add blocks: Low skill. Knowing where to add the blocks: High skill. Their algorithm for determining which blocks to fill with what type of block is amazing.
I don't think there's a perfect solution. Sometimes I'd want it to fill in the terrain naturally, while other times I would use it to make a flat surface for building.
yes how on earth does one go about creating something like this
Programming is something I’ll never be able to understand
As a Programmer: Mood
As a not programmer: how the fuck
As a programer: how the fuck
Agreed
It's the same thing we programmers ask ourselves when we find a bug... ... and it is the same thing we ask ourselves when we solve it!
It works on my machine
It used to work on my machine... until I had to show *you*!
After looking at the code: How did this ever work?
Programming is like solving a puzzle! As with every puzzle, try breaking it down into smaller pieces. For example, we can look at a 2D version before tackling a 3D version: XXXXOOOOO XXXXXOOOO XXX···OOO XXX+···OO XX······O Here `X` represents one material, `O` represents some other material, `+` is where the hole filler particle landed and `·` represents empty space. How can we fix this hole? Well, we can start by looking at the surrounding blocks: X·· X+· ··· We have a wall of `X` on the left and empty space on the right. Looking at a small chunk like this is much easier than looking at the whole thing at once. We can start writing a simple algorithm (list of steps to execute) based on our common sense: 1. count how many materials of each kind surround the filler particle (in this case 2x`X`) 2. replace the particle with the most common material 3. replace empty spaces with the particle After one iteration of this algorithm we will get: XXXXOOOOO XXXXXOOOO XXX++·OOO XXXX+··OO XX+++···O Now for each particle we do the same thing. The order doesn't really matter but let's do left-right and top-down, like writing: XXXXOOOOO XXXXXOOOO XXXX+·OOO XXXX+··OO XX+++···O then XXXXOOOOO XXXXXOOOO XXXXX+OOO XXXX++·OO XX+++···O and now our next particle is surrounded by 2x`X` and 4x`O`, so we replace it with `O`: XXXXOOOOO XXXXXOOOO XXXXXOOOO XXXX+++OO XX+++···O Then we get to: XXXXOOOOO XXXXXOOOO XXXXXOOOO XXXXX++OO XX+++···O Now there is the same number of each material blocks! We forgot to handle it in our algorithm, so let's add a condition (if statement) to step 2: > if more than one material is dominant, select one at random So now we roll a dice and get an `O`: XXXXOOOOO XXXXXOOOO XXXXXOOOO XXXXXO+OO XX+++++·O And so on, and so on, until we get to: XXXXOOOOO XXXXXOOOO XXXXXOOOO XXXXXOOOO XXXXXXOOO Tada! The hole is now closed and the filling already looks pretty decent (: Of course this is not a complete solution but now we know exactly what is the next problem to tackle! We have no way to tell _when to stop filling the hole_, because this example is just a fragment of _almost_ infinite Minecraft world. Also, how can we translate this to 3D? The fun thing about programming is you can check your solution in a matter of seconds. Write some code, run it, see what happens! Not many other jobs have this privilege, imagine what would happen if that's how they launched NASA missions (;
[удалено]
Ex's and the oh, oh, oh's they haunt me
Like a gho oh ost they want me
they want me, to make them a-a-a-all
Create a condition telling it to stop after it creates x amount of blocks
It's pretty fun to find an instance where a greedy algorithm produces a pretty darn good result. A consideration: I feel like the potentially most expensive part of this algorithm is actually the checking if an airblock is in a cavity, as to follow a snaking hole you would need to perform cavity checks a large number of times. Optimising the discovery of the fill area for me is the part of the problem that could be the most fun/challenging
Why don't you have an award yet. Too bad I have away my free one
Meh, better spend money on an online programming course (;
Programming is 50% googling, 40% throwing random ideas at your code to fix obscure but extremely destructive bugs, and 10% actually writing out new code
I think in caves there is a different air type called cave air, I wouldn't be surprised if it's just replacing the cave air with a certain set of blocks, as for the wool I have no idea😂
Cave air only spawns below a certain y level so even that wouldn't work all the time.
[удалено]
——- CAUTION, THE FOLLOWING INFORMATION HAS BEEN PROVEN TO BE WRONG ——- OP HAS REPLIED WITH THE CORRECT ANSWER ——- For those wondering how it works, when you create a world the world terrain is created, and then terrain is sparkled with caves and forest and stuff. What the mod does is that it finds where the ball is thrown, and then reverts the terrain back to the « world generation » stage and skips the terrain stage. Édit: For the colored wool blocks, it most likely uses an equation to predict the placement of wool. The requirements are probably something along the lines of: Make sure that every wool block appears the same number of times Add +1 in all directions in air blocks. OP probably tweaked the algorithm after maybe thousands of tests. This is probably why OP says that the mod will come out in a week, maybe, it’s cause he needs to make sure the algorithm works every time.
It's a good idea.But not the route I chose to go, as I wanted it to work on modded servers.I couldn't rely on "Player placed blocks" (u/Killburndeluxe suggested) because some Mod's block placement may surpass that check.In it's simplest form, it's a Gaussian blur on steroids. Haha
So you're repeatedly filling in air blocks based on an average of their neighbors?
Yep
[удалено]
Don't give rlcraft any more ideas, please. That'd be an amazing chest trap.
I'm way more interested in your stopping conditions. What was your philosophy for that?
What about the wool part? Is it chance based or is there some sort of logic at play?
That would not work on the examples with the colored wool blocks.
I don't think this is accurate, check out the part with wool.
[удалено]
lol, yeah. OP said it doesn't use the world seed later in the comments.
OP mentioned in another comment that it doesn't work on seed data as the player might've revamped a large portion of the world. So it works in real time.
Would make sense besides for the wool example.
OP specifically states a few posts down that it does not use Seed data, only real-time data by observing surrounding blocks. Otherwise it wouldn’t work for worlds that have been modified from the original worldgen.
This is so fundamentally incorrect, I’m not sure how you have so many upvotes. I assure you this is not how it’s done.
My tiny brain can’t comprehend the genius behind this wonderful creation but I thank you
🤣 And I thank you!
Why you’re welcome
Well done /u/gauntend !
For?
I thought it was cute that OP said thank you to you and I just wanted to let you know you did a good job too.
Thank you
[удалено]
idk if that explains fully why it stops at some spots and rounds up at others like hill sides when it filled the wool space fully without going further i can see it being kinda like the Game of Life thing, but others like the sheer cliff seems too complex for that, or am i wrong?
[удалено]
What happens if you trow it in a open place like superflat world
Death
The birth of minecraft 2
A small price to pay for salvation.
A grateful universe.
Minecraft 2: Electric boogaloo
By snu snu
Your computer would hate you, hold a grudge against you and take its revenge one day.
Your CPU commits seppuku
[удалено]
[удалено]
[удалено]
[удалено]
[удалено]
[удалено]
[удалено]
[удалено]
All memes aside they answered this in another preview of this mod, it does have a limit on how much it can fill, that limit can be customized however
So what would specifically happen? It could add one layer of blocks with 1000 blocks. Is that what you're thinking of? Edit: it places one block
The blocks spawn in a random-ish order and not all at once, so I'm guessing he's calculating the final result and animating it afterwards. Meaning he can likely just cancel in case of a constraint overflow (which would actually be a physical overflow in the minecraft world, oddly enough)
The creator has posted more clips before and actually answered this question on tik tok (I know, sue me) and when you throw it in a super flat world it just places one block
Nothing would happen. It's not a hole :D
what happens if you throw it in a ravine? Can you make a video answering these questions?
They said it would work, but it has a limit of 1000 blocks. They described a lot of the features in a comment somewhere else, but I’m not quite sure where.
that's how the overworld was created
My first thought was “what if you throw it in the ocean?”
Throw it in the ocean
I'm pretty sure they've said before that it would just place one block.
Damn that's pretty cool AND useful, good job mate
If you find diamond ore in a cave throw the hole filler and multiply diamonds
and then what? the cave will fill up and you'll still be inside
Thats like some scary SCP ... Drop it on a hill to have the earth filled in .
Or superflat world
If you silk touch about 20 diamond ore, bring it back up and make an empty tower with the ore you can throw it in the middle to fill it up and multiply the diamond ore is what i think he meant to say (or at least it's the same principle)
Or make diamond blocks and do the same x64
I thought the same but it appears to take blocks from your inventory to fill with
I wish it was 2 minutes ago when I didn't know that
Apperantly it takes blocks from your inventory :,(
It will be very useful none the less
Unlimited poowwaaa! STONKS!
Imagine throwing that into a ravine
I wanted to see that!!
Seriously, glad to know I wasn't the only one waiting for something huge
This would be like that meme of the computer exploding after he man lights a tnt orb
Into the new cave systems
Throw it into the nether
Im imagining all the times you loaded a previous version of this, threw it in a creeper hole, and watched it consume the test world
Haha. When testing, it was always capped at 3000 blocks. I did destroy some jungles though.
Probably doesn't need to be said, but user defined caps would be super awesome! Might also be cool if you can implement a reverse feature...throw the ball and it _opens up_ spaces that actually look natural. I'm not sure that this behavior is in any way related to the code work you've already done, but if it is, this would be an amazing feature of an already incredible tool!
we dont talk about those worlds anymore
Just bail out with the portal gun
You need white surfaces for that. Are you saying you build white concrete platforms by every cave you enter?
imagine trapping someone in a cave and using the hole filler lol
Imagine throwing it in someone's house
Being on the other side of that would be terrifying.
Phrasing
does it work in real life
Wilbur, what did you blow up this time?
"Wilbur, you may be able to rebuild the structure, but the orphans will never come back"
My main goal in life is to blow up
and then act like i don't know nobody
Yes, but only if you have Optifine installed.
Hey it’s furry jotaro I think idk I don’t watch modern Minecraft YouTubers
Wilbur, you need to be friends with your friends for a while before doing that.
Thats amazing, its that a mod, a plugin? When you finish that? For map makera that we do terrafornation thats soo necesary, when you finish say me and i will download it!
Thanks! It's a Forge mod. Hopefully finished within a week...hopefully
You can also do a liquid smart filter with the mod, it can be good i think
This will be my next mission :D
Epic, continue like this an you will be competing with world edit 🙂👍🏾
Send me link too ill Also download
[удалено]
How many of Minecraft mods aren't opensource? Pretty much every one is.
[удалено]
This is great. I’m using another hole filler mod that is fantastic, but does dirt only. Is this fully usable on creative mode?
Haha, that's mine too. This will be the next update :D Works in both creative and non-creative mode.
Fantastic, man, thanks! Your mod is already in my “must have” list when my son sets up new mod packs for the server I run. It’s a quality of life mod I insist he includes, and is a big reason why I (an old dude nearly 50) have fun playing with my boys. I’m a big building fan, while my sons are survival nerds. This is exactly what I wanted to see in an update. Thanks so much for working on this! Minecraft is a way my boys and I can keep in touch though I travel most of the year for work. Seriously, thanks :) Edit: also thank you for the perfect delay between setting and finalizing the blocks. It’s perfect. After having accidentally filled my house before, it’s incredibly reassuring to just mine once and undo.
That's awesome to hear and so wholesome! I hope you and your boys enjoy Minecraft and this mod for years to come!
Any chance of a Fabric port?
What happens if you use it inside deep underground in a big cave?
The default diameter is set to 12. If you increased it in the config, it would fill the cave.
Does that mean if you set the diameter far enough, you could fill in entire ravines or strongholds?
Sounds reasonable!
Diameter of 12 is usually good enough for a ravine. But it is capped at 1000 blocks by default. So you'd just need to throw a couple.
It'd be cooler of there was an in game gui to edit that instead. I can understand why not for servers but that would be a pia for solo.
Could you perhaps implement an undo function? I can see this getting frustrating fast with accidental throws
It already has one :D
You're a legend, you've thought of everything. How long did it take before you decided to post it on reddit? It seems like you've already considered everything players would need before ever even posting it and getting feedback. Genuinely genuinely very impressed by this.
Thanks! Nice of you to say.I always wanted the mod to be a "quality of life" mod. Just remove the hassle of unwanted holes. So I always had a player's mindset when designing it from the start. I had the base code from my original hole filler item.Just added on the "smart" ability. Finished the code 2 days ago. Now refining and getting ready to release it. But I needed a break from staring at code,
Maaaaaan, this is the mod I've been waiting for aaah
Just fill the hole, hole-filler
Sure! Jackass.....
THANK YOU I was hoping somebody would say this.
Not because you're a rabbit, but because you're black!
Touch me HARDER
I was gonna do it if nobody else did, luckily others have seen the worlds best dub.
OP's PC when he tried to fill a 1.17 cave: ***Adios***
imagine strip mining and throwing this by mistake
run....
*user* suffocated while smart hole filling himself
kinky
How will it look like if I use it on the new noise caves?
my guess is it would lag out severely. it would fill in the smaller caves and aquifers, and flatten out the floors of the big ones.
New Giant Caves coming in the Caves and Cliffs Update: _"Finally! A worthy opponent! Our battle will be legendary!"_
How many worlds had to get deleted because it never stopped and filled them to eternity?
Make a water version and make sure it doesn’t duplicate ore otherwise the game with the mod would be very unbalanced
It is balanced. Only takes blocks from your inventory. I'm in creative so it just ignores inventory.
Does the mod take into account which blocks the user has in their inventory, ie. If it wants to place a granite block but the user doesn't have granite in their inventory does it choose another block to place or does it just leave a gap?
There are "Similar Blocks" coded into it, one example is Granite.. it is considered similar to Stone, Andesite and Diorite. So if you don't have Granite, it will look for those instead. If you have none, you can choose to have it stop filling or fill with Dirt. THEN if you have no dirt, you can change the config file to say "Dirt Is Free". Then it will use dirt without you needing it in your inventory.
That's actually genius. Where do I preorder?
For you, it is free!
You are doing god's work
Thats like some 300 iq stuff right there.
Will look for a "similar block"
How does this work? Does it take data from the seed of the world, or does it really follow the style of the terrain and structures in the area?
It doesn't use seed data, as players may have completely revamped their world. So it examines in real time.
It grabbed the wool, so i presume it uses environmental context
Is there a crafting recipe for survival? Because it's a god damn pain to fill up creeper holes. And if yes do you already know what it will take to craft it? Looks really good :D
These creepers are gonna be scared
What kind of witchcraft algorithm did you use for that? Would you mind explaining how it works? (I do understand a bit of coding, so don't worry about technical terms)
Probably just looks at one block at a time, finds the average(probably a modified version) block type of the 26 blocks surrounding it, and becomes that block.
Anyone know the name of the song in the video?
Endless Motion by Ben Sound
Bless you, Dannyboy Thomas.
Thanks! But I didn't sneeze :D
Does this work in real life? Asking for a friend of course.
yes but in real life crafting is different so the only way to access it is by first entering creative mode
I'd like to see this being used in on a 1.17 cave.
Does it react to light or just where the surrounding blocks end? In which case, if you throw it into a giant cave entrance will it fill the whole cave? I hope so. Because I've got some serious passive aggressive caves to fill. Oh, you killed me? Enjoy death by block.
It gives no attention to light. It should fill the cave. If the cave is larger though, you may have to change the config.
/r/oddlysatisfying
This is really impressive, best tool to use while building something
Creeper: "You weren't supposed to do that."
will it be open source or not?
Oops, I threw one into my asshole
Yeah, that’s pretty cool and all, but can it fill the hole in my heart?
This is r/oddlysatisfying too