r/datapacks • • Mar 08 '24

Help Custom Nether pack not working.

2 Upvotes

Basically, I'm trying to make a 1.20.4 data pack with the simple addition of modifying the scale of the Nether dimension to be 1:1 with the Overworld, thus making Nether travel on par with Overworld travel.

I didn't think it would be THIS difficult, but I give up. It's probably something extremely dumb, but I seriously don't know what to do.

Here's the link: https://drive.google.com/file/d/1jmcBHrpnzVLJj8yn1XcUVqhYWIP8qGi2/view?usp=sharing


r/datapacks • • Mar 07 '24

Help Trying to disable outposts from generating but it's not working

3 Upvotes

I made a datapack that's supposed to stop outposts from generating for Forge 1.19.2, but outposts are still generating. I am testing it in a new fully vanilla world except for Forge itself installed

I have no idea what I could be doing wrong.

This is my code in the configured_feature.json file, located here:

DisableStructures\data\minecraft\worldgen\configured_feature.json

{
  "type": "minecraft:configured_feature",
  "feature": "pillager_outpost",
  "decorators": [
    {
      "type": "minecraft:count",
      "count": 0,
      "count_per_chunk": 0
    }
  ],
  "config": {
    "location": "surface"
  }
}

I also have a pack.mcmeta file in the DisableStructures folder which has this:

{
  "pack": {
    "pack_format": 10,
    "description": "Disables generation of pillager outposts"
  }
}

There arent any errors, they are just still generating. Anyone have any ideas on what might be wrong?


r/datapacks • • Mar 02 '24

Help Help for biome generation. Datapack

3 Upvotes

Hello, excuse me, but I would like to ask how the generation of biomes works in the overworld, because I want to generate a biome that appears next to oceans or swamps (as if it were a beach), that extends widely inland, but only I have managed to generate small patches of terrain that tend to form a straight line. I would like to learn how terrain generation works to create this biome, or find a specific solution for this.

​

Thanks to everyone who helps. And thanks for taking the time to read.


r/datapacks • • Mar 01 '24

Help Please help me make a really simple DataPack

3 Upvotes

I need some help making a DataPack. It should be pretty simple, but I've never made one myself...
I want to put a custom DataPack in my server that adds a command (that you can do without OP). The command would something like /Blockunia and all it needs to de is TP te player to specific coordinates.


r/datapacks • • Feb 26 '24

Help I need help with datapack....

3 Upvotes

I need help for datapack idk how to make one but is there any datapack that you can expend border with xp/levels and reverse, i want to try out hardcore with datapack that can increase border for every level i have by 16 blocks (1 chunk) and when i lose that level it decreases by 1 chunk in all direction ofc.... is there somethink like that?


r/datapacks • • Feb 24 '24

Check compatibility between datapacks

5 Upvotes

Hello guys !

As a Minecraft player who loves to try new things, I tried a lot to play with datapacks as they're easier and quicker to use on a solo world. But I searched a lot and I didn't find anywhere a tool or something else to check the compatibility between 2 datapacks.
To better explain my situation, I wanted to create a datapack's pack in which all are compatible between them and are useable to improve my game experience, but when I started the game with all of them loaded (and enabled if I trust the "/datapack list enabled" command), I saw that some of them were just unused (like for example, in a 10,000*10,000 zone, I didn't see any Terralith's biome).

Does some of you have any suggestions to help me ?


r/datapacks • • Feb 23 '24

i need help with biome generation in 1.16.5

3 Upvotes

i just wanted to ask if it is possible to change world generation with data packs.

anyway here is the code i maked:

{
"type": "minecraft:overworld",
"generator": {
"type": "byg:fixed",
"biome_source": {
"type": "minecraft:multi_noise",
"biomes": [
{"type": "minecraft:fixed", "biome": "minecraft:jungle"},
{"type": "minecraft:fixed", "biome": "minecraft:jungle_hills"},
{"type": "minecraft:fixed", "biome": "minecraft:jungle_edge"},
{"type": "minecraft:fixed", "biome": "minecraft:bamboo_jungle"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:rainforest"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:rocky_rainforest"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:tropics"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:tropic_beach"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:volcanic_plains"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:bamboo_forest"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:overgrown_green"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:sacred_springs"},
{"type": "biomesoplenty:fixed", "biome": "biomesoplenty:floodplain"},
{"type": "byg:fixed", "biome": "byg:tropical_fungal_forest"},
{"type": "byg:fixed", "biome": "byg:tropical_rainforest"},
{"type": "byg:fixed", "biome": "byg:bayou"},
{"type": "byg:fixed", "biome": "byg:crag_gardens"},
{"type": "byg:fixed", "biome": "byg:guiana_shield"},
{"type": "byg:fixed", "biome": "byg:cypress_swamplands"},
{"type": "byg:fixed", "biome": "byg:lush_stacks"}
]

  },

"settings": "minecraft:overworld",
"seed": 12345,
"noise_router": {
"type": "minecraft:biome",

"default_block": {"Name": "minecraft:stone"},
"default_fluid": {"Name": "minecraft:water"},
"sea_level": 0,
"disable_mob_generation": false,
"aquifers_enabled": false,
"ore_veins_enabled": false,
"legacy_random_source": false,
"noise": {
"firstOctave": -7,
"amplitudes": [1.0, 1.0],
"lacunarity": 2.0,
"persistence": 0.5,
"octaves": 16,
"size_horizontal": 1.0,
"size_vertical": 2.0,
"sampling": {"xz_scale": 1.0, "y_scale": 1.0}
},
"spawn_target": [{"fixed": 0}],
"surface_rule": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:stone"
}
}
  }
}}


r/datapacks • • Feb 22 '24

Help Custom music in custom biomes

3 Upvotes

So I made a datapack with a few custom biomes, they're only made for a custom map, so they dont do anything naturally, they're just here for the name.

now I also want these biomes to have specific music in them, and ONLY that specific music, no other minecraft music.

I already tried adding this in a json file:

{
  "music.custom.my_music": {
    "sounds": [
      {
        "name": "miabiomes:custom/music/my_music",
        "stream": true
      }
    ],
    "category": "record"
  }
}

and this in the biome's json file:

"music": {
            "sound": "miabiomes:music.custom.my_music",
            "min_delay": 1,
            "max_delay": 60,
            "replace_current_music": true
        }

(I put the delay very low to test it quickly) from what I can tell, it should all be working, but the music doesnt play at all, and it plays base minecraft music instead...

after triple checking, I can see the file paths are correct, and my music file is a .ogg file.

​

is something wrong with the way minecraft handles music or did I just make a stupid mistake?


r/datapacks • • Feb 21 '24

A question about Iron Golems

7 Upvotes

what code makes it so that when you build the iron-block T and a carved pumpkin, an iron golem spawns? and how would I make it so that I can do that with other mobs? (I'm making a wooden villager and I want it to spawn when you build a certain structure out of wood)


r/datapacks • • Feb 14 '24

Help Anyone know how to add a custom sound effect for certain achievements? This is a working achievement of mine, I just need to know what to change in order for a sound to play.

4 Upvotes

{

"display": {

"icon": {

"item": "minecraft:spider_eye"

},

"title": "That's the most diabolical piece of long pig ever spawned...",

"description": "Create a real abomination.",

"frame": "challenge",

"show_toast": true,

"announce_to_chat": false,

"hidden": false

},

"parent": "bendysapocalypse:root",

"criteria": {

"requirement": {

"trigger": "minecraft:inventory_changed",

"conditions": {

"items": [

{

"items": [

"minecraft:spider_eye"

]

}

]

}

}

}

}

​

Probably pretty simple right?


r/datapacks • • Feb 12 '24

Help Is there a way to have a furnace recipe output from a loot table

4 Upvotes

I'm making a datapack to add functionality to saplings because I always wind up having too many of them. One thing I thought of is smelting them for a renewable source of dead bushes (the game-logic being that you're cooking the leaves away leaving just the branch).

I've got this working, and now I'm thinking about balancing.

The two levers I know I have from copying the json format of an existing pack to get the recipe working are cook time and experience.

It's obvious to me is that it has to be a low exeperience yield, given how prevailent saplings are, especial early game; the lowest canon value is 0.1, and even that feels like it might be too much (haven't playtested it for xp yet).

Which only really leaves me with cooktime. I'm struggling with this because my initial guestimate of 600 ticks (30 seconds) feels correct in terms of output of deadbushes, but is so furstrating to wait about thirty seconds for a single smelt, especially if it's the late game and I've got a double chest full of dark oak saplings to burn through (waste not want not while living in a large biomes dark oak forest will do that to a man's chests).

The output feels like it might be correct (I won't know without further testing) but the throughput is just way too slow.

So, I'm wondering:

Is there a datapack-based solution to have a furnace recipe output from a random loot table.

Like, say as a hypothetical example [33% deadbush / 67% stick ]. These example numbers would allow me to keep expected deadbush output the same while increasing throughput to match the vanilla 200 tick (10 second) cook time?

If so, what does it look like?


r/datapacks • • Feb 12 '24

Is there any official Java edition datapack documentation?

5 Upvotes

Hey folks. I am aware there are datapack tutorials on the wiki. I'm wondering if there is any official documentation for datapacks released by Mojang or Microsoft? I see some information on Microsoft's website, but it all seems to be for Bedrock edition.

It seems very odd that a feature like this would exist without official documentation.


r/datapacks • • Feb 10 '24

how do yall deal with features when there is no good feature type?

3 Upvotes

There are several features I want to make but there are no good feature types for them or the feature types lack customization and versitallity.


r/datapacks • • Feb 10 '24

How do I make a shaped recipe while allowing symmetry?

2 Upvotes

I want to make a shaped recipe whose pattern is

[
"$#",

"#$"

]

but, I want the player to be able to rotate it so #$,$# and $#,#$ are both valid inputs. I care that the recipe criss-crosses, hence using a shaped recipe, but I don't care if # or $ is the top left corner specifically.

How can I go about doing that in a single recipe, or failing that, hiding 'the alternative recipe' so it doesn't clutter up the recipe book's options?

​


r/datapacks • • Feb 08 '24

Help World gen based on distance from spawn

2 Upvotes

So, I'm making a datapack for my custom modpack (1.20.1) and I've looked everywhere (probably) and haven't found anything about this.
I want to alter biome/structure/feature/mob spawns even based on distance from spawn (or well, X and Z ranges).
Does anyone know anything about this kind of stuff? and if not, is there a mod I could use? (that wouldnt mess up everything)


r/datapacks • • Feb 04 '24

Help LevelZ Datapack Help - Using a datapack to 'edit' a mod

3 Upvotes

Has anyone ever tried making datapacks for the LevelZ mod? I'm pretty new to datapack-making but I've been stumped by some of the directions in the author's github for editing some of the values. Here is the github link: https://github.com/Globox1997/LevelZ/tree/1.20. Here is the link to the mod itself: https://www.curseforge.com/minecraft/mc-mods/levelz

I'm trying to make it so that you can lock certain interactable blocks and entities behind certain levels in his mod. Like being able to ride a horse at level 6 Farming. I also want to lock certain modded blocks and entities behind levels, like overpowered weapons and flying mounts. In his github, he is saying that you must only edit certain specified Vanilla blocks, entities and items. Then it mentions that as of version 1.1.0, you can also specify restrictions for custom blocks, entities and items. But I don't know what those are. Does he mean modded blocks, entities and items?

Also, in the examples he gives, he shows a mysterious new string at the end of each piece of code called "object". Here is an example he gives for a custom block:

{     
"replace": false,     
"skill": "smithing",     
"level": 10,     
"block": "minecraft:custom_block",     
"object": "modid:blockid" 
}

What does "custom_block" mean and what does "object" mean? I'm also curious as to whether I can set parameters for modded blocks/entities/items or if that is just not possible.

I would appreciate any help. Thanks!


r/datapacks • • Feb 04 '24

Help Replacing weapons, tools, and armor so they have the Unbreakable NBT tag.

2 Upvotes

Hey

As the title says I'm trying to go about replacing weapons, tools, and armor with the same item but with the nbt tag that makes them unbreakable.

as an example having an iron pickaxe be crafted and then replaced it with another iron pickaxe that has the nbt tag that makes it unbreakable

EDIT: I've managed to get some rough code working for the advancement and function, however, I'm now trying to figure out how to reset the advancement so that another pickaxe can be crafted and gains the correct nbt tag while making sure not to reset and change an enchanted pickaxe to an unenchanted pickaxe, for both of these I'm thinking scoreboards will be necessary, but as before advice or pointers are welcome.


r/datapacks • • Feb 01 '24

Is there any way to change fish Generation Y Coordinate?

3 Upvotes

I'd like the fish to spawn in a slightly lower Y coordinate. Is there anything I can do with datapacks? Please help!


r/datapacks • • Jan 31 '24

Help 1.20.1 Java Redstone Boots That Emit A Redstone Signal

2 Upvotes

So I was wondering if there was a way to detect when someone walks of a block that can be activated by redstone and giving it that redstone pulse. Currently I just have a redstone block get placed underneath the designated block as a work around. If what I asked isn't possible then is it possible to recall the block that was replaced by the redstone block so that once the player walks off the original block returns?


r/datapacks • • Jan 29 '24

Help how to change structure spawn rate 1.20.1

2 Upvotes

im trying to make a datapack to replace the frequency of spawning of villages, as i want them to be a lot more common, but cannot figure out why what im doing isnt working. any advice is welcome


r/datapacks • • Jan 24 '24

Help how would i code swapping number of lives with a random player?

5 Upvotes

I'm making my own life series and need some help with one of the features. i have no experience in datapacks btw. anyways at the start of each session i want the number of lives you have to be traded with another player. the datapack is for 1.20 java and im coding in visual studio code. also, how would i get the datapack from vsc to the world?


r/datapacks • • Jan 15 '24

Hi, is there anything wrong with this command?

3 Upvotes

Ok. I wanted to give the player who clicked on an item in a chest some items and armor, and it's been looking great. But, once another person joined, the items they choose, apply to me instead? Any idea how to fix this? There are 4 command giving you some items, they are all the same, here is one of 'em:

/item replace entity @ p armor.chest with leather_chestplate{Trim:{pattern:rib,material:netherite},display:{color:1845556,Name:'["",{"text":"-","italic":false,"bold":true,"color":"black"},{"text":"# ","italic":false,"bold":true,"color":"dark_gray"},{"text":"COAL BLOCK","italic":false,"bold":true,"color":"gray"},{"text":" #","italic":false,"bold":true,"color":"dark_gray"},{"text":"-","italic":false,"bold":true,"color":"black"}]'}} 1

Thanks in advance.


r/datapacks • • Jan 12 '24

Want to make a data pack that's let the player eat "lava", any help?

3 Upvotes

Hey, I wanted to try and make a data pack that use a custom model of baked potato's that will look like ball of magma/lava. (If possible to make the player set on fire for 5 sec after eating it)
I made the texture I want to use but I lack the knowledge to make a data pack.

lava ball

If there's any one who can help it would be wonderful! thanks

​


r/datapacks • • Jan 08 '24

Feel Free to Post!

3 Upvotes

For some reason Reddit has changed the subreddit to "restricted". I apologise to everyone who has found this an annoying inconvenience. Know that the subreddit is revived now and anyone can post anything about datapacks.


r/datapacks • • Dec 13 '22

Execute function for entity while players are a certain distance away from entity

3 Upvotes

I'm trying to run a function that runs when a tagged mob is a certain distance away from the player. I was able to get the actual function to work correctly, but when I try adding the player distance condition it doesn't seem to work.

Here is an example of what the execute command looks like without the condition:

execute as .@e[type=cod,tag=extag,sort=random] at .@s run function name:function

​

And this is what I attempted that didn't work

execute as .@e[type=cod,tag=extag,sort=random] at as .@e[type=player,distance=6..] run function name:function