3D PRINTER IN MINECRAFT
ฝัง
- เผยแพร่เมื่อ 21 ส.ค. 2024
- !! IMPORTANT UPDATE !!
Check the comment section for my top comment! The printer now works with stair shapes and such but THE VIDEO DOES NOT REFLECT THIS CHANGE. If you actually use the datapack in the description, it will print your blocks properly.
Hey everyone, it is been a little while since my last upload. Thanks for your patience!
Today I made a working 3D printer using the block display entities so you can shrink your builds into a single block! As always, this is 100% vanilla Minecraft, no mods or even resource packs this time. Feel free to post anything you make with this printer, but please tag me! I would love to see what y'all come up with.
Datapack download (make sure you unzip it and grab the folder from inside to put in your world!):
www.mediafire....
Instagram: roakomc
Music:
Spelunky HD OST
Spelunky 2 OST
Battleblock Theater OST
Hollow Knight OST
UPDATE: I saw that a lot of were telling me to use macros to make the printer more dynamic, which I really appreciate! I can't believe I didn't try that before, I didn't even know what macros were. Anyways I did it for some blocks like stairs, doors, slabs, and logs. However, I once again became lazy and didn't bother doing it for every block property (who is really going to notice that a beehive doesn't have the proper level of honey spilling out of it). But I updated the datapack link in the description to have the new version that can print different block shapes. Give it a try! www.mediafire.com/file/j1hfjwft80d4oox/shrink.zip/file
You man is future me... I think! cuz I love making command block projects but I've never been that good to make datapacks that look like this keypads pianos you are like I love your projects dude keep up! and I think I have an idea since you made keybads and and the whole band thing were you helped someone in a drum thing and the piano and a WORKING CLOCK TOWER you are so good thank you for entertaining us!
Edit: also I have a little thing you can try
/data
for blocks and you may make it WAY EASIER instead of just copying and pasting the block entity data like the way the stairs are facing for example and it also works for all the blocks like the customizable blocks only like slabs stairs banners crops dispensers chests and more actually you can just copy the data with 1 or a few commands instead of checking if a block has the data whatever
Honestly that isn't that small, its pretty average.
actually that quite big since it's around 25cm considering a block = 1m
That's what she said
Wait, you're the guy from 3:02
If you want an easy way to print all block states, you could create a new world in Debug mode worldtype, where every block state is placed next to each other. Then you could write some code, who scans through every single block in the Debug world and puts all the block states in a list.
That's a thing????
@@Roako Yeah, simply hold the Alt key while clicking the "World Type" button in the world creation menu.
@@teamafus6034you just opened pandoras box for me, my mind is blown rn thank you
@@Roakopart 2? 👀
I don't know if you know but with the new macros this would actually be a single command for actually replacing the block
something along the lines of :
$execute as @e[type=armor_stand,tag=] run setblock ~ ~-1 ~ minecraft $block
Although this limit the printer to work only in versions after mojang added that soo
Also notepad++ has recordings, incase that's not too late
That's what I've been thinking, right. Big problem is though that as of now, there is no command for testing what kind of block this block is. You can only ask "if block sand, if block dirt, if block stone" and so on, but you can't do something like "data get block" to get the block id. That command only works for chests and such, storage blocks.
There are two methods though that do work.
Method A is shooting an arrow at that block and extracting its nbt that says which block it's stuck in
Method B is using the loot command and thus spawning the item you get from destroying that block, and then extracting the id of the item to know what block it was.
Not the best methods for doing that stuff. I really really hope that minecraft implements a better way to check block ids. But this is all we got as of now, as much as I know.
@@blarak1688 I love the idea of the printer shooting arrows at every single block before copying it over. Perfectly chaotic.
I didn’t know arrows did that! I’m not sure if you can trick an arrow into getting stuck in a non-solid block or find the solid part of weirdly-shaped blocks, but otherwise it sounds perfect
I was telling him the same thing!
I was literally waiting for AGES to make something like this where it maps a block id to a block display
You can spawn an arrow at the target block and copy the "inBlockState" NBT tag to the block display entity.
My make-a-wish request was finally granted. Thank Roako for the video 😍
This is so cool! I love it
Regarding the pain that is that massive hard-coded if chain, I think one could theoretically save the name string by using something along the lines of /loot give mine netherite_pickaxe[Enchantments:[{"id":"silk_touch","lvl":1}]] to give the block at X Y Z to something (Such as the armour stand you already have). This has the downside that anything that just is never dropped (For instance, bedrock would be one such block) would simply end up being ignored. Despite this, it would mean that once the item has been retrieved, I think you can just merge the item name from the armour stand's item data into the block_display's data, and then empty the armour stand's inventory for the next block.
I haven't tested this though, so I have no clue if it would actually work, just offering some ideas!
this doesn’t work for blocks that don’t work with silk touch, another way (albeit even more jank) is to copy that block to some pos, shoot an arrow at arrow at it, and copy the NBT data from that arrow
@@uninable I mentioned that in my comment, but yes, that is correct. Though I did not know about the arrow thing, but it does sound janky, like you said
@@GlitchlessCode These are the only ones I know of, too. Man, Minecraft has been improving a lot on command implementations these last updates, so because of that I fall asleep every night praying and begging the coders to bless us with a command that relieves us of these janky ass methods 🙏🙏
@@blarak1688 obviously mojang intended us to use negative explosion range creepers and advancements to run commands at a certain part of the tick to create player motion 🙄🙄🤦♂️
I also made block display 3d printer myself once and also got the same problem you got. It cannot read the block state and it takes too long to run. But I found (partial) solutions to all two of them.
I found the solution to block state problem in the comments of *this* video(thanks @blarak1688 and @uninable). An arrow stuck in a block actually stores that block's id and block states in its NBT data. Although it has a downside of only working with block that has collisions, it still enables the printer to print much more things(such as stairs, fences and glass panes) properly.
While the printer can be optimized by making it skip air blocks, it will make huge lag spikes whenever it skips too many of them. When I was making the printer I solved it by limiting the amounts of air blocks to skip, but I found a much better way to solve this problem in a command forum a few months ago. Basically, the world border grows or shrinks based on real time, and utilizing that, you can make some code loop only up to 50 milliseconds per tick. So, you can make the printer skip air blocks as quickly as possible without producing any lag.
Monumental creation, really cool
as a redstoner I smiled at the notification but then I realised who it was uploaded by...
jk good vid :)
NGL you are super underrated
I know I just commented, but in terms of lag optimization, the issue isn't just the large amount of entities, but rather the ridiculous number of faces to render. With physical blocks Minecraft doesn't render the faces of blocks that are inside of other blocks (think about what happens if you go inside a block in spectator mode), but with block displays, it renders every face of every block display, whether it needs to render those faces or not.
I could be wrong about this, it could be that I'm spouting misinformation, but this is what I think is going on.
My gosh that is so cool like holy crap
If there was more than one like button, then only 50k+ likes kar deta. Brother, your channel is really underrated. Love From India❤
all we need now is a few people to brut force adding the block variations, and maybe eventually all the possible water variations.... O.O
NOT OUR PALACE!!!
MENTAL!!!
03:33
- in VSCode you can use middle mouse to create multiple cursors (hold and drag downwards to select the same character in every line)
- RegEx: just replace "^m" with "execute if block ~ ~ ~ m"
Love this terraria video!
One way to brute force more efficiently which is probably easier to implement than macros is a thingy called tag files (yes *tags* very original, mojang).
To use tags you replace the block you test for with the tag name and a # identifier. Ex.: instead of "execute if block ~ ~ ~ minecraft:stone" you put "execute if block ~ ~ ~ #minecraft:base_stone_overworld" which will run for these blocks: stone, granite, diorite, andesite, tuff, deepslate (pulled straight from the wiki).
The cool part is that you can create custom tag files in your own datapack's namespace.
So, for one, you can segment the tests to massively reduce the average amount of tests per block.
Now if you create tags that bundle all blocks which share the same block states such as: all stairs, all trapdoors, all glass panes & fences & redstone dust, all directional blocks such as logs & dispensers & observers, etc...
You don't need 1600+ commands just for stairs. Instead you just do "execute if block ~ ~ ~ #Roako:stairs run function Roako:stair_check"
The "stair_check" function now needs only a little macro/return value magic to do two things.
One, check which stair type it is using the method you've been using but isolate only stairs.
Two, get the block states which you can hard code with the block state values that stairs get.
Once you have these things you got your block display.
It's probably still going to take a while to group all blocks correctly but it's a good thing many building blocks don't get any variable states.
If you really care about speed, however, you can still subdivide all state-less-blocks to get quicker queries.
Unrelated but I also wanted to mention that if you set your default program for .mcfunction files to visual studio you can use alt+select to select in columns and type or paste in every line at the same spot just like what you used excel for but quicker.
This is the most in-depth explanation I've seen so far, which I really appreciate. I have been working the past few days on getting something like this working, but like you said, grouping all the blocks and checking each of those groups is still a huge hassle. Especially when blocks like chiseled bookshelves exist (slot_0_occupied, slot_1_occupied, etc...)
I think what I'll end up doing is just replacing the datapack in the description with a version where the stairs, slabs, doors, trapdoors, and logs have dynamic placements. But other than that, it just has not been worth the time to make sure that properties like "honey_level" for beehives are maintained in the print.
@@Roako that's fair enough, look forward to seeing the improved version
@@mynameisfoxxy6110 I just finished updating the datapack, thanks for the suggestion! You can print with the correct block properties for stairs, slabs, doors, trapdoors, walls, fences, fence gates, logs, wood, chests, beds, and some other miscellaneous blocks that I thought might be nice to have. I'll probably just post a short on it next week.
@@Roako Amazing job bro 👍
this guy is crazy :D
Everybody gangsta until you find a miniature copy of your house in your world that you haven't made.
Yes finally found your channel again
Nice work! :D
something similar was done by another command block youtuber where he made a 3d printer which could enlarge small minecraft builds
You know mojang also had to code all the variations of stairs,fenses, walls...etc but luckily for them it is easy for them to code the base object for all of it ,but in the game we have to access each of the state of the block
omg wholesome!
We miss you
If I were you, I'd make a console app, that would take the name of a staircase as input, and would output 80 lines of if commands, for every variation of that stair. Wouldn't even be that difficult imo.
Insaneee bro
Quality 🎉🎉
Great watch! Throughly enjoyed this video.
Well done, Mate!
Don't worry, I am already subscribd
you know, you could just paste 80 lines of it into another file then, press ctrl f to open search popup, press search and replace, type the block name and replace it with another..... but ngl 1600+ lines just for wooden stairs is crazy
10/10
W
noice
subscrib'd
I made some simple coding and get all the block states, about 25,000 lines of code.
Wow that is cool, cant you make it run faster by making the tick speed higher or did you already try that? At least good luck to you.
Now, take a look of viniccius13 vanilla survival 3d printer, in the video "Casa Automatica - 348"
th-cam.com/video/Mm28ID-WUVY/w-d-xo.html It's cool seeing this concept 7 years later but now in vanilla
add code that adds code, then you can fix the block data bug easily.
Can't you use something like macros? They were recently added to Minecraft, and they allow you to input strings into commands. I'm just not sure how to make a command input some other string... I do think they're worth looking into though.
80 x 49 = 3920 good luck :}
Can’t you use loot command to pick make armor stand pick up the block and transfer not from item? I saw a faking block generator doing this.
cant you make it instanly print by just by running the function again in the function if its not done?
also you could use the loot command with silk touch pickaxe and silk touch shears to get the block and use macros to place the display entities i think
Theoretically you could instantly print smaller builds in 16 resolution, but when I was running the palace print it had massive lag spikes to skip all the air blocks. So to have it instantly skip over the whole build would probably just crash or never finish. Plus I think it just looks cooler to slowly build up over time :)
Does this use PLA?
Make it a mod for bedrock and Java edition
i dont know anything about command XD
why is every block like ochre_froglight
and not with his texture is this a bug
I just chose that block as the placeholder because I like the way it look as if the blocks are just "glowing" into the print
it's not with the blocks that have a big bug model or it's from the version@@Roako
Too bad it doesn't use actual filament 💀
version?
Macros! Use macros!
Probably use macro ?
whne segs mod????111???????????
a friend held me a gunpoint one day and I had to make a femboy sex datapack
why don't you just give up
In the new 1.20.5 release you can shrinch useing /atirubute @p Minecraft:generic.scale set 0.0