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
7 votes
1 answer
915 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 vote
1 answer
1k views

What is the function to add a lore to a custom items in a custom loot table

I have created a custom fish that comes out of a custom loot table, and it took a while to get it to have a name. It turned out that there is a function called set_name and I could name the item. Now ...
3 votes
2 answers
227 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 ...
2 votes
1 answer
28 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....
0 votes
2 answers
438 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\...
0 votes
1 answer
131 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
1 answer
50 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 ...
2 votes
2 answers
649 views

What would be the easiest way to detect if a player breaks a block in Minecraft 1.16?

I want to add block breaking detection and right click detect to a datapack I’m working on. I want this to be multiplayer friendly and I need to know who broke the block. To add right click detection ...
0 votes
0 answers
20 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
62 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
1 answer
162 views

How can I create different portals to different sky block islands for multiplayer?

I downloaded a sky block datapack and I want to create different portals to different sky block island for multiplayer. How can I achieve this?
1 vote
2 answers
259 views

(Java Minecraft 1.14) Loot table reward won't stack with /given item, even though they have the same nbt?

I have an item in a datapack which has a supplemental function to give it straight to the player (for testing), and an entry in a loot table (which is how survival players get it). I recently noticed ...
1 vote
1 answer
420 views

How do I check if a certain item has been taken out of a chest?

I am trying to make a custom crafting data pack 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. ...
0 votes
0 answers
157 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 ...
6 votes
1 answer
174 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 ...
0 votes
0 answers
22 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 ...
0 votes
2 answers
38 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 ...
3 votes
1 answer
116 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 vote
1 answer
49 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
70 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 ...
2 votes
1 answer
148 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
35 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 ...
3 votes
1 answer
295 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. ...
0 votes
1 answer
125 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
146 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 vote
1 answer
53 views

"vanilla:entities" not working in Minecraft loot table

I have this loot table in my datapack: { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ ...
7 votes
1 answer
246 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 ...
1 vote
0 answers
219 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 ...
1 vote
0 answers
126 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 ...
2 votes
0 answers
164 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 ...
2 votes
1 answer
92 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 ...
4 votes
1 answer
2k views

Why does /trigger have no objectives/commands after installing a datapack that has /trigger commands?

Disclaimer: I know this is similar to a previous question I asked that is related to this issue, but it was a bit too specific, and I've decided to ask a more general/focused question this time in the ...
0 votes
1 answer
216 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 ...
0 votes
2 answers
106 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 ...
2 votes
1 answer
85 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 vote
2 answers
103 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 vote
1 answer
42 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 ...
0 votes
1 answer
71 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=...
4 votes
1 answer
157 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 ...
2 votes
2 answers
132 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 ...
0 votes
0 answers
32 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
132 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 ...
0 votes
0 answers
60 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) ...
0 votes
1 answer
55 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
1 answer
49 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....
2 votes
1 answer
75 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 /...
2 votes
0 answers
160 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, &...
1 vote
1 answer
628 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 vote
1 answer
324 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 ...
1 vote
1 answer
213 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 ...