A place for all things about commands, command blocks and data-packs in vanilla Minecraft; to share, to question, to discuss, and more!
🌉 bridged from !minecraftcommands@lemmy.world by Tidepool
A place for all things about commands, command blocks and data-packs in vanilla Minecraft; to share, to question, to discuss, and more!
🌉 bridged from !minecraftcommands@lemmy.world by Tidepool
Change the color of some blocks
I have built a white concrete wall and I'm trying to make it so a design made of blue concrete is revealed with a command block.
I've tried a few different ways, but so far it hasn't worked:
• give the blocks a custom tag and use a command to only fill the tagged blocks with blue ones (I haven't found the right syntax for this) • change the color of my blue blocks so they all look white and then restore their color (I saw a post about it but very few examples) • use /setblock for each block of my design, but it seems I can only do one block at a time and I feel there must be a better way
Finding information is difficult, especially because a lot of the code I find is either outdated or for bedrock.
But it seems like it should be possible, right?
Survival Trials — 12 cooperative goals for small Java worlds (free, CC0)
Self-promo, shared here because this community explicitly welcomes data-packs. I made Survival Trials, a tiny no-mod datapack for Minecraft Java 1.21.11 that gives small survival groups twelve optional cooperative session goals. It does not change recipes, loot, terrain, or progression. It is free under CC0, stores no personal data, makes no network requests, and can be removed without changing the world. I built it while testing cooperative play in Neviroth's private alpha; the download page is transparent about that connection. I would especially value feedback on two things: are the goals clear enough without a guide, and do they feel useful for groups of roughly 2–5 players rather than like chores? Details and direct download: https://neviroth.net/downloads/minecraft?src=lemmy_resource&campaign=alpha-download&ref=9eec689fdd2a&content=survival-trials-datapack
Who needs a "real" Game Engine when you have Minecraft?
Thanks to display entities and the latest seamless input detection we can make some really fun stuff. Full remakes of other 2D games incoming?
#saveMCClemmy!!
image Some people would have this lemmy world removed from the Minecraft Commands Discord Server #welcome page. This is a thriving community with plenty of activity! SAVE THE LEMMY!!!
Need help referencing string stored in minecraft:storage in a command?
So here's the problem. The new 1.21.4 custom model format supports names, instead of numerical ID's. This is objectively better. MukiTanuki's custom roleplay data cannot support this, as they use the scoreboard to temporarily store the custom model id, and that has to be an integer. Also, in my testing, it fails unless you format your resource pack a specific way as it is pulling in a float, not an int.
I think the better solution now would be to be able to rename an item with the model name, THEN trigger a function to replace the model with the name. So where can we store a string? The actual data storage, which is server-wide, however can hold strings. The problem? The documentation for pulling things out of storage is like non-coming up from my googling.
When you name an item, it is named '"Whatever"' but the double-quotes count. For that reason, the following function (which starts at character 1 instead of 0, and ends 1 from the end due to the -1) stores the item name in a storage namespace:
data modify storage custom_roleplay_data:data model_name set string entity @s SelectedItem.components."minecraft:custom_name" 1 -1
The following actually gets the name out that was stored:
/data get storage custom_roleplay_data:data model_name
The issue is, I can't get the string out. Here's some things I've tried, and all result in basically "not a string":
/item modify entity @s weapon.mainhand {"function":"minecraft:set_custom_model_data","strings":{"values":[{"type":"minecraft:storage","target":"custom_roleplay_data:data","path":"model_name"}], "mode": "replace_all"}}
/item modify entity @s weapon.mainhand {"function":"minecraft:set_custom_model_data","strings":{"values":[{"type":"minecraft:storage","target":{"target":"custom_roleplay_data:data","path":"model_name"}}], "mode": "replace_all"}}
/item modify entity @s weapon.mainhand {"function":"minecraft:set_custom_model_data","strings":{"values":[{"type":"minecraft:storage","target":{"target":"custom_roleplay_data:data"},"path":"model_name"}], "mode": "replace_all"}}
/item modify entity @s weapon.mainhand {"function":"minecraft:set_custom_model_data","strings":{"values":[{"type":"minecraft:storage","target":{"custom_roleplay_data:data":"model_name"}}], "mode": "replace_all"}}I'm stuck, and would appreciate any ideas.
I created simple elevator blocks for 1.21.4. They come with settings and can be disguised as any block.
Yes, this is survival friendly and available as a download: https://modrinth.com/datapack/vanilla-elevators Edit: finally managed to add the video. Didn't understand the error message "too many frames". Luckily my phone gave me a more readable error ("max 1 minute video) so I knew I had to speed up the video a bit.
My take on custom crafting - allows for NBT input AND output. Just sadly requires a lot of NBT checks.
It works through the interaction and display entities.
You can download the pack I used to showcase this here: https://www.mediafire.com/file/cfu2snkf4rkn1vo/custom_crafting.zip/file
To place down a modified crafting bench, run /function plag_cc:place and try it out yourself. You need to face the correct direction.
Feel free to go from there and build from this prototype. You have my permission to put it into your map, your datapack or whatever else you want to do with it, as long as you give me appropriate credit somewhere.
Statistics in Books for 1.20.2
Ever wanted to have an easy way to compare statistics with your friends? Always thought the sidebar or list are a bad option? Fret not, here comes the user friendly book statistics. Download and extended info: https://github.com/Plagiatus/Statistic-Books-MC It works with any and all scoreboards (including vanillatweaks' statistics).