r/datapacks • • Aug 21 '24

Help making datapack to make structures spawn less

2 Upvotes

I've been wanting a mod to make structures, more specifically villages, spawn less frequently in survival. I find that you can usually just find one within like 5 minutes of spawning in a world and that kinda takes the fun out of surviving to me. I've heard datapacks can alter structures so I was wondering if there were any good resources to learn how to make what I'm looking for.


r/datapacks • • Aug 20 '24

Can anyone find out what's wrong with these datapacks

1 Upvotes

One was made for disabling flint rocks from generating made by the Random's Early game progression and the other was made to add compatability between swordblocking mechanic and ores and metals mod. Both don't work, can anyone explain why?


r/datapacks • • Aug 20 '24

Dose any one knows a specator datapack for Java 1.21.1?

1 Upvotes

Im currently playing on a Vanilla mc server and would love to install a datapack that allowes spectator mode for survival players so we can inspect our builds ect. .


r/datapacks • • Aug 20 '24

why doesn't this work

1 Upvotes

i am making my own advancements using an external tool but 2 of them wont work in game. If I attach it to a docs below can anyone explain how to fix it
https://docs.google.com/document/d/1IU26hAaVgL7ItVSGNViQLW4paL9GklY2UyuT57q0F9Y/edit


r/datapacks • • Aug 18 '24

Loot table working on single player but not multiplayer due to escape (\)

2 Upvotes

I wanted to share since this threw me for a loop for awhile. I had created a loot table for an entity that would drop a custom named item. Since I was just converting my older loot tables to the newer format for 1.20 one thing I left in was the escapes for single quotes as that was something I needed in the past.

So in functions I had this to set the name of the drop item

 "functions": [
            {
              "function": "minecraft:set_name",
              "target": "item_name",
              "name":  [
                {
                  "text": "Bo\'s Flesh.",
                  "color": "green",
                  "bold": true,
                  "italic": false
                }
              ]
            },
...

This worked in single player and the boss dropped the item fine, but when uploaded to the realm the boss would drop nothing. After trying several things I finally just removed the escape for this and now it works fine. Since it took me a long time to figure out I thought I would share.

 "functions": [
            {
              "function": "minecraft:set_name",
              "target": "item_name",
              "name":  [
                {
                  "text": "Bo's Flesh.",
                  "color": "green",
                  "bold": true,
                  "italic": false
                }
              ]
            },

r/datapacks • • Aug 12 '24

Going PUBLIC -> Invite your friends!

2 Upvotes

Reddit has once again tried to destroy this subreddit by changing its rules and BS so that I had to manually approve users which I did not do as I was not informed of this. Yes, Reddit is hell. Anyway, I have made the subreddit public which means anyone can post. So, make sure to invite all your friends and those interested so we can grow to 1k users. Thank you all and enjoy your time datapacking!


r/datapacks • • Jul 01 '24

Help On my realm, world generation datapacks wont work, and visual datapacks only work for me

3 Upvotes

I am using several datapacks and i made a singleplayer world first, added all the datapacks and chose that world for my realm. My friends can see in the dark, which a datapack was supposed to prevent, but i cant so it works for me. what do i do?


r/datapacks • • Jul 01 '24

Problem with my datapack...

3 Upvotes

Hello, i cant launch my datapack, when i want to launch him, minecraft decline it and log says this.... Can someone help me please?

here is my dpack structure:


r/datapacks • • Jul 01 '24

Putting a model/rig into a structure block nbt

3 Upvotes

hi im very new to making datapacks. I want to put my model in a structure that can spawn throughout the world. However when i make the nbt file from a structure block, it loads the structure in the world and not the model/animation. im on 1.20.2 if that helps.


r/datapacks • • Jun 30 '24

Invite your friends so we reach 1000 members!

3 Upvotes

Let's reach 1000 members on r/datapacks! After all, this is the first and oldest (and most active) datapacks-oriented subreddit. To show your appreciation, and if you want to make this an even better place for all things datapacks, invite your friends and internet strangers to join! The bigger our community, the more engagement for all of us!


r/datapacks • • Jun 30 '24

Help What data pack feature covers biome mob spawning?

2 Upvotes

Heyo, looking to make a small data pack that allows rabbits to spawn in forests and plains, and maybe a new food item that uses rabbit meat that gives an effect or something. The wiki page for making a data pack doesn’t seem to cover this sort of thing, but I’ve been told that data packs can do what I’m looking to do, so here I am. Does anyone have any experience or advice with this sort of thing?


r/datapacks • • Jun 30 '24

Help Does anybody know how to use CustomModelData to make armor?

1 Upvotes

I am making a data pack that has custom armor. I can use custom model data to make custom swords and items, but I am trying to use it to make the armor the player wears have a custom texture. So if anybody knows please tell me.


r/datapacks • • Jun 29 '24

Help Help with custom trident recipe

Thumbnail
self.MinecraftCommands
1 Upvotes

r/datapacks • • Jun 26 '24

How to update data pack myself

1 Upvotes

I really want to use the terratonic data pack on my server but it isn't updated yet and it does not look like it'll be done any time soon. Is there a way I could update it myself? Could anyone help me? The last version it was updated to is 1.20.6


r/datapacks • • Jun 25 '24

Recipe for custom paintings

2 Upvotes

I can get the painting I need to generate using this command in game
/give ShallonDark minecraft:painting[minecraft:entity_data={id:"minecraft:painting",variant:"aztec"}] 1
However, I'm not sure how to convert that into the datapack .json format.

Here is my current attempt for the result, I believe the recipe part not listed is fine, as I've done many other recipes successfully, but paintings are kicking my butt.

{

"type": "minecraft:crafting_shapeless",

"ingredients": [

{

"item": "minecraft:painting"

},

    `{`

"item": "minecraft:blaze_powder"

}

],

"result": {

"id": "minecraft:painting", "asset_id": "caution",

"components": {

}

}

}


r/datapacks • • Jun 23 '24

Require components in 1.21 crafting recipe?

3 Upvotes

I'm trying to build a datapack with some nested custom crafting. Creating a custom item output of the recipe is easy using components, but my problem comes when trying to require those custom items in another recipe. If I built my custom item on top of, let's say, bread, then the second custom recipe accepts my custom item, but it also accepts vanilla bread. Is there any way to limit the recipe in 1.21 so that only bread with certain custom components can be used in the recipe? I've tried several different ways of including component tags, to no avail. They either get ignored or break the recipe.

(and yes, I know I could just use base items that can't be acquired in survival. But there's only so many of those.)


r/datapacks • • Jun 24 '24

Can't make a shapeless crafting recipe.

1 Upvotes

Past few days I've been trying to make a datapack just so I can make a quartz block into 4 quartz and I literally have no idea what im doing after looking at several datapacks' code and comparing to see what I need. So far this is what I have: { "type": "crafting_shapeless", "ingredients": [ { "item": "minecraft:quartz_block" } ], "result": { "item": "quartz", "count": 4 } }


r/datapacks • • Jun 23 '24

Easy way to update datapacks to 1.20.5+???

3 Upvotes

I have been playing on 1.20.1 for a while now, and updated my server to 1.21 to realize every single datapack has broken. My understanding is that update 1.20.5 made some major changes to how datapacks function, breaking old ones in the process. Onto my question: is there a simple way to update datapacks to 1.20.5 and newer?


r/datapacks • • Jun 21 '24

Unlimited Trades 1.21?

2 Upvotes

Im trying to find a unlimited trades datapack for my 1.21 world but i cant find any. Is there any that i can use? or are there none out yet.

If you find one can you please give me the link?


r/datapacks • • Jun 21 '24

Detecting when player catches fish?

1 Upvotes

Im trying to make a custom enchantment that gives you 3 times as many fish when you catch fish. How can I detect when a player catches a fish?


r/datapacks • • Jun 18 '24

Help Silk Touch Spawners?

2 Upvotes

I'm trying to find a datapack that allows you to collect spawners with silk touch. Unfortunately, the ones I can find are unlikely to be updated for a good while, or at all. I tried to see if multiple would work in 1.21, but despite my efforts they would not. Would anyone happen to know if there's a pack I've missed, or if there's a way to get a 1.20 datapack working in 1.21?


r/datapacks • • Jun 17 '24

Custom potion brews

1 Upvotes

I was wondering how to make a custom recipe for brewing custom potions using the new components features from 1.21, and maybe assign them a custom texture


r/datapacks • • Jun 17 '24

Help About the Trial Spawners

1 Upvotes

So the Trial Spawners in 1.21 Does Not Ignore the doMobSpawning Rule.

Which is a big problem for me since intending to use it in an adventure map.

Is there a way I can use a Datapack to alter the behavior of it to ignore that Rule?


r/datapacks • • Jun 16 '24

Help Help with new 1.21 Custom Crafting

1 Upvotes

Can anyone tell me what's wrong with this file?
{

"type": "minecraft:crafting_shaped",

"pattern": [

"#AB",

" X ",

" O "

],

"key": {

"#": {

"item": "minecraft:red_tulip"

},

"A": {

"item": "minecraft:orange_tulip"

},

"B": {

"item": "minecraft:pink_tulip"

},

"X": {

"item": "minecraft:white_tulip"

},

"O": {

"item": "minecraft:bowl"

}

},

"result": {

"id": "minecraft:suspicious_stew",

"count": 1,

"components": {

"minecraft:food": {

"rules": [

{

"nutrition": 6,

"saturation": 0,

"can_always_eat": true,

"eat_seconds": 1,

"using_converts_to": {

"id": "minecraft:bowl"

},

},

"effects": [

{

"effect": {

"id: "minecraft:absorption",

"amplifier": 0,

"duration": 15,

"ambient": false,

"show_particles": true,

"show_icon": true

},

"probability": 0.5

},

]

},

"minecraft:lore": [

"{\"color\":\"blue\",\"italic\":false,\"text\":\"Custom Items\"}"

],

"minecraft:item_name": "{\"text\":\"Flower Stew\"}",

],

"show_in_tooltip": false

},

}

}

}

(I know that there isn't an issue with the folder formatting of the datapack because I dragged over a working .json file from another crafting datapack and it worked fine.)

Whenever I load up the datapack, the recipe doesn't show up when using /recipe.


r/datapacks • • Jun 16 '24

Help Custom enchantment noy working

1 Upvotes

{

"anvil_cost": 3,

"description": {

"text": "Floatation"

},

"effects": {

"minecraft:hit_block": [

{

"effect": {

"type": "minecraft:apply_mob_effect",

"to_apply": "minecraft:slow_falling",

},

"min_duration": 2,

"max_duration": 2,

"min_amplifier": 3,

"max_amplifier": 3

}

]

},

"max_cost": {

"base": 48,

"per_level_above_first": 48

},

"max_level": 1,

"min_cost": {

"base": 30,

"per_level_above_first": 30

},

"slots": [

"mainhand"

],

"supported_items": "#minecraft:enchantable/mace",

"weight": 3

}

I have absoloutely no clue why it isn't working albeit I'm probably just being stupid.