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
0 votes
1 answer
24 views

How to add a player to the killer's team

I'm making a datapack where if you kill somebody they join your team, I already know how to track deaths and kills and I thought of making two scores, one is death count and the other is kills. If a ...
1 vote
1 answer
57 views

How to unban a certain player without the use of an admin

So I have a problem. I'm making a datapack in minecraft 1.19 and I want a way to unban players from the server using it. It's supposed to be done by throwing or using a nether star (unban the player ...
1 vote
0 answers
18 views

How do I run a function based on user input in Minecraft data pack?

I am new to making data packs and I wanted to know if a player pressed Q or something it would run a function.
3 votes
3 answers
58 views

Can I run several commands after /execute, instead of just one?

I want to create a Minecraft datapack in which I can shoot an arrow and, when it reaches its target, summons a lightning bolt. Currently, I have this: execute at @e[type=Arrow] unless block ~ ~-1 ~ ...
  • 33
1 vote
0 answers
22 views

Editing "special recipes" Minecraft

Despite the grindstone being added as the new way to combine items, mojang has marked that bug where players can still combine tools in the crafting grid as "wont fix". So, obviously I have ...
  • 1,230
-1 votes
1 answer
37 views

How do I limit my raycast range?

I have these raycast commands and I want to put a range of 6 blocks on it. How can I do it? execute as @e[dx=0, distance=0.1..] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run effect give @s ...
  • 89
1 vote
1 answer
61 views

Not broken by player loot table?

I have a loot table that makes it so logs only drop when mined with an axe; That part was easy. But I noticed it did not drop to creeper explosions/tnt due to failing the match tool check, which ...
  • 1,230
1 vote
1 answer
48 views

How do I exclude only myself in an execute command?

I have followed a raycasting tutorial: . I stopped at 7: 17 because I don't need headshot detection. It says to exclude players to avoid putting the effect on yourself. ...
  • 89
2 votes
1 answer
37 views

Can mobs be equipped with armour based on drops from a loot table?

I am making a RPG/Dungeon Crawler datapack and I want to procedurally make dungeons throughout the world. I have somewhat figured out how to make the dungeons, but I want the monsters to be random (e....
7 votes
1 answer
939 views

What loot tables have mending?

I am looking for a list of chests that are able to have mending (either on an enchanted book or a "treasure" item). I remember seeing a list on the wiki a long time ago but it does not seem ...
  • 1,230
0 votes
0 answers
21 views

Detect when a player has 'none' score [duplicate]

When a scoreboard is set, initially all players do not have a value set for that score, similar to null in programming. How would I detect it in execute if score? I can't just use matches 0 because ...
1 vote
1 answer
55 views

Adding custom structure to replace ancient_city_center

I would like to have a custom structure I made replace the city_center structure of an ancient city, except when I do that, cities do not generate at all. To make sure it was working, I replaced the ...
  • 1,230
1 vote
1 answer
134 views

Is it possible to add components/bars to the HUD Minecraft Java 1.19.x

I am trying to make a survival datapack that would require you to drink water. Is it possible to add an element to the HUD to indicate how much water you need based on a scoreboard value? I did some ...
0 votes
0 answers
369 views

Minecraft Error Exit Code 6 Problematic Error [duplicate]

I recently made a post and I was told that it was a Problematic error, but still don't get it. I run a MacBook Pro Moneterey and the Chip is an Apple M1. (don't know if needed) And I have tried all ...
0 votes
0 answers
23 views

How do I summon a fireball that is immediately moving in the direction I'm looking? [duplicate]

I'm trying to make a mage staff and I have right-click detection all figured out but I need to summon something that moves in the direction I'm facing. I was originally using a fireball because the ...
1 vote
2 answers
51 views

How to detect if an item is dropped near an armor stand?

I'm trying to make a sort of shrine system where a player can drop a set number of items, say five gold ingots near a shrine, which is a block with an armor stand inside of it, and be given a ...
  • 111
1 vote
1 answer
59 views

How to print the name of the block under me in Minecraft?

If wanted to make a data pack that takes the block under me and then says: "The block under me is [block]". How would I do that? If this was like a mix between Java and Minecraft then it ...
1 vote
0 answers
86 views

Summon/data merge villager with Explorer Map trade

As the title states, I would like to add an explorer map to a summon villager command but nothing seems to be working. More specifically, I would like to append that trade to an existing villager. Is ...
  • 1,230
2 votes
1 answer
207 views

Is it possible to create a custom ore and add it to world generation with a Datapack?

As the title suggests, I am wanting to add custom ores to the game (I.E. new gemstones like ruby, sapphire, topaz, etc), but I have no clue how to control world generation to add such a thing. I tried ...
0 votes
1 answer
40 views

Incrementing attributes in Minecraft

I want to figure out how to increment a player's health without writing 225 lines of Datapack code. I cannot find any way to do this. I've tried : execute at @a run execute unless score @p custHealth ...
  • 89
1 vote
1 answer
280 views

Editing ore/structure generation with NBTExplorer

I was wondering if there was a way to increase the spawn rate of ores and structures using NBTEditor. I've been able to change player data, spawn "illegal" enchanted items, and other fun ...
3 votes
2 answers
282 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 ...
  • 1,230
1 vote
0 answers
167 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 ...
1 vote
0 answers
304 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 ...
2 votes
0 answers
224 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 ...
  • 101
3 votes
1 answer
144 views

Tag for items not burnable in lava (like netherite)

Nice and simple. What is the tag for items to be not burnable in lava, like netherite ingots? Or how would I make other items like obsidian not burn?
  • 1,230
0 votes
1 answer
167 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={...
4 votes
1 answer
189 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 ...
  • 1,230
0 votes
2 answers
145 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 ...
  • 193
0 votes
1 answer
321 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 ...
  • 1,230
2 votes
1 answer
99 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}]...
  • 1,230
1 vote
1 answer
46 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 ...
  • 1,230
0 votes
1 answer
89 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=...
  • 89
4 votes
1 answer
203 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 ...
0 votes
1 answer
176 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 ...
1 vote
2 answers
135 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 "...
  • 1,230
2 votes
2 answers
178 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 ...
  • 1,230
0 votes
0 answers
34 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 ...
0 votes
1 answer
158 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 ...
  • 155
0 votes
0 answers
73 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) ...
  • 1
0 votes
1 answer
62 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&...
2 votes
0 answers
187 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, &...
2 votes
1 answer
100 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 /...
  • 101
2 votes
1 answer
51 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....
1 vote
1 answer
242 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 ...
  • 1,230
0 votes
1 answer
46 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?
1 vote
1 answer
703 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 ...
  • 1,230
1 vote
1 answer
392 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 ...
  • 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 ...
2 votes
1 answer
103 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 ...