Questions tagged [minecraft-data-packs]

Used for questions about server-side packs that add or change recipes, advancements, structures and more in Minecraft Java edition. Always use with the [minecraft-java-edition] tag.

Filter by
Sorted by
Tagged with
2 votes
0 answers
78 views

Proper path to modify villager anger?

I would like to make villagers angry on command. I assume I need to use /data modify, but I do not know the proper <targetPath>. I have the following so far: execute as @e[type=villager] run ...
user avatar
  • 805
1 vote
0 answers
40 views

Giving an advancement on crafting a recipe

I have a datapack and in the datapack is a custom crafting recipe. In the advancements folder, I have created an advancement which should trigger when I craft the recipe. However if I craft the item I ...
user avatar
1 vote
0 answers
41 views

Issues with overwriting crafting recipe in Minecraft Data Pack

I'm new to making resource packs for Minecraft Java and have decided to try to create some custom crafting. I've tried to change the recipe for black dye, requiring you to craft it with a diamond. I ...
user avatar
2 votes
0 answers
38 views

Testing for if an item entity has an ID matching a list of item names

I am making a datapack that uses copper as a fuel, however part of that means that I need to be able to test an item when it is on the ground to see if it is one of the 37 copper items. I have already ...
user avatar
  • 101
0 votes
1 answer
50 views

Command is running weirdly from load.json (datapack)

Could someone help me? I am thoroughly confused. I have a command in my datapack that is executed from load.json function: execute unless entity @e [type=armor_stand,name=team_lives,scores={...
user avatar
4 votes
1 answer
70 views

What structures can be placed with a structure block?

I would like to edit/replace the swamp hut and mineshafts, but I am not sure what the namespace/path is. So does anyone know of a list of the structures that can be placed with the structure block and ...
user avatar
  • 805
0 votes
2 answers
63 views

Storing a player's location and teleporting the player back to it later in Java Minecraft

I'm looking for a way to store a player's current location (probably in the scoreboard as separate X, Y and Z) and teleport the player to that location later. I'm not completely familiar with the ...
user avatar
  • 193
0 votes
1 answer
51 views

Why is my datapack so laggy?

https://www.planetminecraft.com/data-pack/aceplante-s-rl-megapack-for-1-17/ For every single function I have added so far, I have been careful to add tag checks. For example, if I want to replace the ...
user avatar
  • 805
2 votes
1 answer
64 views

Execute as mobs wearing any type of armor?

I am making a datapack that adds weight (slight movement speed penalty) to armor using attributes. I got it working for players using the command: execute as @e[type=player,nbt={Inventory:[{Slot:100b}]...
user avatar
  • 805
1 vote
1 answer
31 views

Tall flower loot table issue

Since tall flowers are considered two blocks, both halves trigger a loot table when broken. In vanilla, the game gets around this by having the loot tables check (and only drop the flower) if it is a ...
user avatar
  • 805
0 votes
1 answer
44 views

Teleporting to the Nether with entities

I'm making a datapack and I want to make it so that when people spawn on a certain block you teleport to the same block in the Nether. However, nothing happens. This is my code: execute as @e[tag=...
user avatar
  • 11
3 votes
1 answer
56 views

How to use predicates inside of advancements?

I'm trying to use predicates inside of advancement triggers. According to the wiki I should be abled to use the player tag, but I couldn't figure out, how the syntax works exactly. player: The ...
user avatar
0 votes
1 answer
49 views

How to detect if someone is hit by something with a custom model data?

I'm trying to make a data pack with custom items in it but I can't figure out how to detect if someone is hit by an item with a Custom Model Data. I have tried using an advancement, but it seems to ...
user avatar
1 vote
2 answers
54 views

"match_tool" enchant check for entity loot table?

I would like to have shulkers be able to drop a second shell IF and ONLY IF they are killed with looting 4. I cannot seem to figure out how to do that. The only thing I can think of is having a "...
user avatar
  • 805
2 votes
2 answers
75 views

Loot table based on NBT data

So I would like to have phantoms drop extra membranes the larger they are, except it seems like the min/max is ignored? When I kill regular phantoms with looting 3 for example I usually get 4 ...
user avatar
  • 805
0 votes
0 answers
29 views

How can I track that the player has placed a block and cancel the damage while on it?

I have this code in datapack: execute as @a at @s if block ~ ~-0.05 ~ minecraft:grass_block run effect give @s minecraft:instant_damage 1 1 true execute as @a at @s if block ~ ~-0.05 ~ minecraft:dirt ...
user avatar
0 votes
1 answer
57 views

How can i find anvil GUI nbt?

So i'm trying to to make a datapack, where you can enchant blocks with enchantments on an anvil in survival. I've tried getting player's data, block's data, but i can't find where the anvil GUI nbt is ...
user avatar
  • 147
0 votes
0 answers
51 views

How to move the contents of a chest to a Bundle using commands?

I'm currently trying to move the contents of a chest into a bundle (being held by a placeholder armor stand) but the most it would do is copy the last item in the chest (that is not minecraft:air) ...
user avatar
  • 1
0 votes
1 answer
37 views

How to Group undead mobs in a datapack?

I have this in my datapack, in a JSON file: { "values": [ "minecraft:drowned", "minecraft:husk", "minecraft:phantom", "minecraft:skeleton&...
user avatar
2 votes
0 answers
89 views

Can a custom dimension overwrite the overworld?

I am trying to learn how to use datapacks to affect world generation. I currently have a datapack with the following files: \pack.mcmeta: { "pack": { "pack_format": 8, &...
user avatar
2 votes
1 answer
55 views

Help with loading far away random chunks using commands

I'm making a working Tardis in Minecraft using datapack dimensions. Part of that is the ability to send the Tardis exterior anywhere in the world (And eventually in the Nether and End too). The /...
user avatar
  • 101
2 votes
1 answer
41 views

Error: Objectives cannot be longer than 16 characters

I make use of scoreboards to keep track of variables. However, this error popped up on the console when I tried reloading my datapack: Failed to load function terraria:wands/rod_of_discord/use java....
user avatar
1 vote
1 answer
141 views

Teleport to Scaled Coordinates?

I am working on a datapack and would like the give the end dimension a coordinate scale like the nether (so it can be used for fast travel). So I set the coordinate scale to 16 in the json file and it ...
user avatar
  • 805
0 votes
1 answer
32 views

How to make bats giving poison effect to nearby players?

Bats don't do anything, and I'm thinking of making a datapack, so that when a bat gets close to a player, it will "bite" them, giving them a poison effect. How would I do this?
user avatar
1 vote
1 answer
409 views

Add armor attributes with /item modify- 1.17 datapack issue

I am trying to modify the armor a certain entity is wearing (based on material) by adding a very slight movement speed decrease, which I should be able to do with attributes. I have the entity tagged ...
user avatar
  • 805
1 vote
1 answer
146 views

Minecraft: Using block states within datapack tags

I have a datapack which uses a stonecutter to automatically break whatever block is above it, however currently it is always on, meaning the only way to stop it is to break the actual block. Having ...
user avatar
  • 101
0 votes
1 answer
34 views

Why are my commands applying to everyone instead of just the person with the tag?

The commands are applying to everyone in the server (every entity on the first one) and not just the person with the tag, these are the commands in the tick.mcfunction file: execute as @e at @e if ...
user avatar
2 votes
1 answer
73 views

Minecraft Data pack bug, mobs are just floating items

I play on a Mac, I'm not sure if that matters since it worked every time up to this point. This is what's wrong, for example. I have installed a random datapack, a snow golem with a melon head instead ...
user avatar
0 votes
1 answer
67 views

Simulate TNT and fireballs

For a bedwars Minigame in vanilla I need TNT and fireballs, but they should only break certain blocks and deal damage. For the TNT I have this: execute as @e[type=tnt,nbt={Fuse:1s}] at @a run function ...
user avatar
5 votes
0 answers
99 views

Can I create a custom biome with no floor for my datapack?

I've been looking into custom world generation recently and I found out that you can create custom biomes and have them generate in the world. I was wondering if it was at all possible to use this to ...
user avatar
  • 460
1 vote
0 answers
97 views

Custom recipes with item with custom NBT as output [duplicate]

I'm trying to make custom recipes for a datapack and have found out how, but not how to change the output to anything but a basic item. I want to output a carrot_on_a_stick with the custom NBT data of ...
user avatar
3 votes
0 answers
52 views

How would I test if my custom dimension exists?

I'm making a datapack that relies on a custom dimension. If the dimension hasn't loaded in, it will break things. When you add the datapack to a pre-existing world, then the dimension won't load until ...
user avatar
1 vote
1 answer
241 views

How do I make it that /trigger will only execute a command once?

So I am making a datapack for custom enchantments. I want to make it where every time I use /trigger , then the command will be executed once. However, at the same time the objective value used in /...
user avatar
7 votes
1 answer
181 views

Check players permission-level

I am currently working on a minecraft map for realms, and was wondering if there is any way to check a players op/permission level. In a minigame, no one has operator permissions except the owner who ...
user avatar
  • 71
1 vote
1 answer
43 views

"vanilla:entities" not working in Minecraft loot table

I have this loot table in my datapack: { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ ...
user avatar
0 votes
2 answers
338 views

Minecraft 1.17 how to create custom coloured potion texture pack

I would like to design a texture pack with custom more distinguishable potion colours for each potion type. How do I go about doing this? I've been able to unpack the .jar file, find the \assets\...
user avatar
1 vote
1 answer
148 views

Why is my loot table not showing up in the /loot command?

I've created a loot table[1] and I'm having issues using it with the loot command: loot insert ~ ~ ~ loot minecraft:op Executing the command above drops zero items. The JSON for the loot table is: { ...
user avatar
0 votes
1 answer
264 views

Minecraft Datapack tags not working (Traveler's Backpack mod, adding items to the accepted_tools tag)

Note: Some users suggest that this falls under the prohibited question category of moddded Minecraft tech support, but this isn't technical support, it deals with making data packs which are on-topic. ...
user avatar
1 vote
0 answers
60 views

How do you delete items in "invisible" slots of shulkers with commands?

When you generate a shulker with stacked items that are supposed to be unstackable inside, then break it, the items separate, and while 27 of them remain visible, the other 37 items (provided that you ...
user avatar
3 votes
1 answer
279 views

How do I put an experience orb into a scoreboard?

I'm currently working on a data pack the reworks the leveling system in Minecraft. One of the things that I'm currently struggling with is putting the XP orb into a scoreboard instead of your XP bar. ...
user avatar
1 vote
0 answers
36 views

Teleporting a bat with a hopper using a data pack

I am trying to tp the bat when summoned to an item in radius 32 around you then to tp it again 1 down for the hopper to pick it up, then bring it back to me and to kill the 2 entities to get the items....
user avatar
  • 11
2 votes
0 answers
170 views

How can I make a smithing table recipe that yields a named item?

I am trying to make a datapack where you can combine a turtle shell and a netherite ingot in a smithing table to get a turtle shell with knockback resistance and armor toughness. I have figured out ...
user avatar
0 votes
2 answers
181 views

How to replace every specific item anywhere in my inventory with a specific item?

I am trying to make a datapack for weighted armors by replacing all normal armors with ones with specific attributes. I understand how attributes work, but I can't seem to find a way to replace normal ...
user avatar
2 votes
1 answer
2k views

List of all Minecraft crafting recipes for crafting web

I am attempting to build some sort of crafting web to find the most efficient crafting trees and which items need to be farmed to craft every other remaining item in the game. An old example is shown ...
user avatar
  • 677
1 vote
0 answers
23 views

How to store execution result on entity arbitrarily without effecting gameplay?

I need to store the amount of one item a player has in their inventory to their own entity, but I need to store it in an arbitrary way that doesn't effect the gameplay. If this makes it any clearer, I ...
user avatar
1 vote
1 answer
260 views

how do i check if a certain item has been taken out of a chest

I am trying to make a custom crafting datapack for Minecraft. I have found some tutorials that show me how, but all of them use droppers that craft the item instantly after putting the items in. ...
user avatar
  • 11
1 vote
0 answers
16 views

Minecraft -- Advancement criteria that targets specific villager professions

I am trying to create an advancement criteria for 1.16+ where the advancement is granted after a player interacts with a specific villager. So far I have this: "criteria": { "test1&...
user avatar
1 vote
0 answers
96 views

World border set commands in datapack not working

In the datapack (in load.mcfunction) my execute at @s run worldborder center ~ ~ command will work but not my execute as @a at @s run worldborder set 1 10 for some reason. It even works when I enter ...
user avatar
  • 11
0 votes
0 answers
84 views

Test if an nbt string contains another nbt string

Story So I’m trying to make a searching system in Minecraft 1.16, and need to be able to get search results. To get search results, I can test if the search query is contained in any of the ...
user avatar
1 vote
1 answer
882 views

How to check for something every tick, but only run a command one time when the condition is met?

I'm making a Minecraft 1.16 datapack and I need to check if a player is in a certain location. I want to check for that condition every tick and then run a function when it is met. I'm currently using ...
user avatar