View Help Posts from our Discord server:

Join our Discord server to view them: Datapack Hub Discord

Search
Way to directly get the player's inputs NBT/Components, Other ^ <=1.21.4How to lower the durability of the armour I’m wearing Commands ARemoving the Attack Damage and Speed from an item I'm a beginner Whats the best way to remove that so it just shows the item name and the lore? I dont want all the "when in main hand stuff"RC and LC detection General, Advancements, NBT/Components, Updating Starting with RC, I want to check when someone is holding down right click, and perform an action every tick while he is holding, while still allowing the player to interact with other stuff as normal (which removes the use of interactions and carrots on sticks). I tried modifying items with the consumable component and the using item advancement, but the advancement only trigger once every 3 ticks because that's how fast the mouse automatically clicks when you hold right click. Is there a way to make it run every tick while you are pressing the right click button, while being able to interact with the environment and hold any item? I thought of adding the blocking component (not sure what it was called, but it brought back 1.8 blocking with sword). Would this work perhaps?predicate for held item and sneaking not working? Predicates It works fine when i only do it for the sneaking, but it isnt working after i added the custom data checkMY zombified piglins are not attacking I'm a beginner i made various variants of the zombified piglins, and i made them to attack the player even if the player didn't attack the piglin, but it only works when i summon the piglin with commands, or with an egg, this is the command that i used in the piglin's file: execute if entity @s[distance=..25] as @e[type=minecraft:zombified_piglin,distance=..25] run data modify entity @s AngryAt set from entity @p[distance=..25] UUIDCustom Enchants Not Working I'm a beginner, Commands, Enchantments IDK why its not working can someone help meMaking mobs angry at everyone I'm a beginner So my goal is to summon iron golems with a certain tag, and these golems will be angry at everymob. What have right know is : I summon the iron golems execute at @p[tag=pending_action] run summon iron_golem ^2 ^ ^ {Tags:["summoned"]} then, in tick : execute as @e[tag=summoned] at @s run data modify entity @s AngryAt set from entity @n[type=!player, tag=!summoned, distance=..30] UUID But for some reasons I don't really understand, after killing a mob, they kinda stay stuck and don't do anythingAlternatives to scoreboards? I'm a beginner, Commands, Predicates Hello fellow datapackers, I was wondering if there are any alternatives to selecting a specific player to run a function on and the only way I know right now is scoreboards. I have realised many issues because i want to select the player that pressed a button to activate the command block that activates the function but when i add the score to the player who presses the button i use @p but if there is someone closer to the command block it will select them and i do not want that. Another problem I have is writing execute as @a if score… because my entire function just wants to run on that player once and only that player who has the score but i find it very annoying to having to paste in the first half of the command every time i want to run a command on that player. I am looking for a potentially better/less laggy solution to this and I was wondering if i could use predicates or execute store but i have absolutely no experience in these 2 things and i need help please. I apologise if my post is hard to read because i am not great at english and i am sleepy right now.enchantment to stop items from being enchanted I'm a beginner, Enchantments is it possible to make an enchantment that when applied to an item it stops any further enchantment from being applied to it ??I have made a recipe and I have a /give command from mcstacker how can I set the recipe I'm a beginner, Commands, Recipes um how to turn this command /give @p evoker_spawn_egg[entity_data={id:"minecraft:armor_stand",NoGravity:1b,Silent:1b,Invulnerable:1b,ShowArms:1b,Invisible:1b,PersistenceRequired:1b,Tags:["main_craft","need_block"],equipment:{head:{id:"minecraft:paper",count:1,components:{"minecraft:item_model":"template:main_craft"}}}},item_model="template:main_craft",item_name="Nexus Altar",rarity="epic"] 1 to a reward in a recipeany way to detect opening a book? General, Advancements, Predicates i tried using the use item advancement but it doesnt triggerZone Effect Armor Commands I would like to know how i could adapt this command block chain into a datapack for 1.21.4 : repeating:scoreboard players set @a ZoneEffect 0 ; chain conditional:execute as @a store success score @s ZoneEffect if items entity @s armor.chest minecraft:diamond_chestplate[trim={pattern:eye,material:redstone,show_in_tooltip:false},custom_name='["",{"text":"Deadeye","italic":false,"color":"dark_blue"}]',lore=['["",{"text":"The Dream of the grand:","italic":false},{"text":"aaaaaaaa","italic":false,"obfuscated":true}]'],enchantment_glint_override=true,unbreakable={show_in_tooltip:false}] ; chain conditional:execute as @a[scores={ZoneEffect=1..}] at @s run effect give @e[distance=..10,type=!player] minecraft:wither 2 0 true ; chain conditional:execute as @a[scores={ZoneEffect=1..}] at @s run particle minecraft:soul ~ ~1 ~ 0.3 0.3 0.3 0.01 10 forceRemoving custom data component from an item while respecting the stack count Commands, NBT/Components I was trying to make it so that players with a specific tag can eat golden apples faster. I was doing so by running an item modifier like so: execute if items entity @s weapon.mainhand minecraft:golden_apple run item modify entity @s weapon.mainhand ssiege:make_fast which works great, and respects item count. However, I'm not sure how to turn these back into regular golden apples. I was using execute if items entity @s weapon.mainhand minecraft:golden_apple run item modify entity @s weapon.mainhand {function:"minecraft:set_components",components:{"minecraft:consumable":{},"minecraft:custom_data":{}}} , but this creates golden apples with an empty custom data component, which are no longer stackable with normal gapples. I alternatively tried item replace instead of item modify but that didn't seem to respect the stack count (set to 1 golden apple)Help me I'm a beginner, Commands, Advancements, NBT/Components Hello, I'm trying to upgrade the datapack from version 1.20.1 to version 1.21.1 but something is not working for me.Paletted Permutations of Equipment Textures General, Other Is there a reason this won't work? If so how could I fix it/what could I do? { "sources": [ { "type": "paletted_permutations", "textures": [ "minecraft:entity/equipment/llama_body/striped_carpet" ], "palette_key": "minecraft:entity/equipment/llama_body/color/palette", "permutations": { "blue": "minecraft:entity/equipment/llama_body/color/blue", "green": "minecraft:entity/equipment/llama_body/color/green" } } ] }better bundle General, Other hey guys, so i do not develop data packs but i have a question about existing one im using a mod/datapack called "better bundle" by nico4play, and in description it says that this mod will increase bundle size to 27 stacks of items, instead of only one, but it doesnt seem to work, i can still only put 1 stack of items in there also it says if i hold a bundle in my off hand and main hand is empty, when clicked on a chest it will insert contents of a bundle into that chest, but it also doesnt work tried to do /reload but still the same im playing on a fabric server (im an admin) on version 1.21.5Island structures help I'm a beginner, Worldgen how do i properly make island structuresBeginner here: Apply Attribute Modifier to all specified Items? I'm a beginner, NBT/Components I'm making a mod, and I want specific "modules" to be disableable with removing certain datapacks. One of these modules will make it so all Golden Armor pieces have an Attribute Modifier. Any help is appreciated :Dis it possible to achieve something similar to macros in 1.19? General, Commands, Other Basically I was asked by a friend to make a datapack for 1.19.4 that adds a "tp wand" thet let's you set tp coordinates and then tp to them... And I just realized that macro wasn't a thing in 1.19I created a custom_model_data for the bedrock, it works but my original texture of the original bedr General, Commands I created a custom_model_data for the bedrock, it works but my original texture of the original bedrock is buggedIm trying to make a command that saves the users last death cordinates but I'm a beginner, General, Commands, NBT/Components the scoreboard just saves the number 3 command: execute as @a at @s if entity @s[nbt={Health:0f}] store result score @s deathPos run data get entity @s PosDistance raycast innacurate General, Commands, Advancements, Updating If I teleport myself exactly 3.29999 blocks away from another player, and I hit them while standing still, the raycast gives 3 blocks away, which is perfectly accurate (since a player's hitbox is .3 blocks wide). However, if I do this while in motion, e.g. moving right/left or a jump while hitting, it gives abnormal results like 3.7 (impossible since the player's entity interaction range attribute is 3.0). I used execute if entity @a[distance=3.1..] run say distance incorrect and it said. This is in a single player world using a mod that allows you to spawn fake players, so there are no other players in the world. The function is activated by an advancement. I'm assuming the bug is caused because the player moves 1 tick extra before the advancement triggers. Any ideas on how the bug is caused and how to fix it would be appreciated!advancement wont run function I'm a beginner, Advancements i made an advancement that detectes whenever the player has crafted the custom recipe which is as follows { "parent": "minecraft:recipes/root", "criteria": { "has_the_recipe": { "conditions": { "recipe_id": "crafting:draft" }, "trigger": "minecraft:recipe_crafted" }, "has_ingredients": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ "minecraft:amethyst_block", "minecraft:amethyst_block", "minecraft:blaze_rod", "minecraft:netherite_ingot", "gold_block", "minecraft:wither_skeleton_skull" ] } ] } } }, "requirements": [ [ "has_the_recipe", "has_ingredients" ] ], "rewards": { "function": "crow:staff/ss", "recipes": [] } } but, no matter how much i craft it, the function at the end doesnt run. the function works with the command /function but otherwise, theres no way to run itHoming projectiles I'm a beginner, Commands, NBT/Components Mc version 1.20.1 and onwards Basically making it so projectiles turn and move towards targets But when experimenting I discovered projectiles seem to be really weirdly implemented, where the direction they face dosent matter at all, and their movmenet is decided purely by their motion nbt data Is there any work around?Crafting Custom Potions plus Combining Smite and Bane of Arthropods I'm a beginner, Recipes, Enchantments Im making 1 datapack which allows you to make custom potions through crafting recipes.Are predicates more optimized to compare scores over operators? General I can either use a = operator to compare scores or I can use a predicate. I've heard predicates are generally more optimized. I have many places in my datapack where I compare the same scores too.Stronger Potions? I'm a beginner, Recipes Hey everyone, I started work on a custom brewing recipe datapack which, if you put amethyst shards in a brewing stand which contains speed 2 potions, it will make speed 3 potions. However, the issue is that it doesnt work. I'm using chatgpt for the code as i've never created a datapack from scratch, or at all before. Any help is appreciated. I tried changing from amethyst shards to glowstone but it still didnt work detect-brew-speed-three.mcfunction (changing underscores to dashes due to discord chat formatting) execute as @a[nbt={SelectedItem:{id:"minecraft:glowstone_dust"}}] at @s if block ~ ~-1 ~ minecraft:brewing_stand run function mypack:do_brew_speed_three do-brew-speed-three.mcfunction # data/mypack/functions/do_brew_speed_three.mcfunction # 1. Remove one Amethyst Shard from the player execute as @s run clear @s minecraft:glowstone_dust 1 # 2. For each bottle‐slot index… # If it contains a Speed II, remove the old bottle and insert Speed III # -- slot 0 -- execute at @s if data block ~ ~-1 ~ {Items:[{Slot:0b,id:"minecraft:potion",tag:{Potion:"minecraft:strong_swiftness"}}]} run function mypack:_brew_speed3_slot_0 # -- slot 1 -- execute at @s if data block ~ ~-1 ~ {Items:[{Slot:1b,id:"minecraft:potion",tag:{Potion:"minecraft:strong_swiftness"}}]} run function mypack:_brew_speed3_slot_1 # -- slot 2 -- execute at @s if data block ~ ~-1 ~ {Items:[{Slot:2b,id:"minecraft:potion",tag:{Potion:"minecraft:strong_swiftness"}}]} run function mypack:_brew_speed3_slot_2 # 3. Feedback particle at the stand particle minecraft:happy_villager ~ ~-1 ~ 0.5 0.5 0.5 0.01 10 There are more but this is it so farMAKE DIAMOND ORE RARER (NOT SOLVED) πŸ™πŸ™πŸ˜­πŸ˜­ I'm a beginner, Worldgen i've been trying for hours and I cant seem to figure this out 😭 this is my first time creating a datapack and I'd like to replace all diamond ore generation and make it rarer, could someone help me with this? sorry if this is the wrong place to askQuestion: Can you disable chicken jockeys with a datapack? I'm a beginner Background: I have an issue in my modded server where we have chickens overspawning. I theorize that the problem is being caused by using Bad Mobs to disable zombies, but it still attempts to spawn them - and by doing so, it also spawns a chicken at the same time when trying to spawn a zombie as a chicken jockey. We've had to disable chickens temporarily so we don't have hundreds at a time in caves under our bases. I've been trying to find a way to allow chickens but still block zombies in the overworld, but aside from using InControl (which is breaking my brain trying to understand), I haven't found anything. Can a datapack be made to prevent chickens from spawning when a zombie attempts to spawn?Player Selection Menu Using Dialog Other Would it be possible for me to create a menu that shows all players and allows you to select one and it applies a tag to the player you choseMy jigsaw structure is generating inconsistently when I want all the same. Is this fixable? Worldgen Hello! I am attempting to generate a very large structure using structure blocks and jigsaw blocks. I have finally been able to generate the entire structure at least once, but not all generations yield the same results. It is not meant to be random. They should all look the same. For a bit more context, this is a silly datapack meant to generate an incredibly large statue of T-posing Waluigi. The entire statue is broken up into many structure block sections, totaling around 15. The hands, arms, and shoulder regions are all separated from each other. Sometimes instead of a hand at the end of the arm, a shoulder generates. I do not know why. The names in the jigsaw blocks tell of exclusivity amongst connections (the parent-child combos of the jigsaw blocks aren't used anywhere else on the build). All of the template pools contain only one possible structure to generate, the structure in question being the most logical next part of the statue. The jigsaw blocks have priority spreading outward in what I thought was a logical way, although I could see that being the issue. I'll attach photos of the segmented troubling section and the problem in action as well as anything else useful. I'd like to know what's going on so I can properly and consistently generate this. Thank you so much to whomever takes the time to aid me! I'm gonna keep troubleshooting for a bit as I await help, so maybe I'll have a solution by then!Is there a way ? Commands So I’m looking to make an item that called the mace defuser which for 2 min all mace get cleared then after the 2 min it give back the mace with the exact data in the right players inventory. I basically need someone that can just briefly explain a logic that can maybe work in 1.21.4 πŸ˜€Is a 1x1x1 Biome Size Instead of the Default 4x4x4 Possible? I'm a beginner, General Hello, I've been planning this datapack that uses custom blocks where the texture of vanilla blocks changes based on the biome they are in. However I can't find anything on whether it is possible through datapacks to change the default 4x4x4 cube biome placement size to a 1x1x1 cube instead or whether its hardcoded into the game. It would also be amazing if I was able to keep normal vanilla biome generation to that 4x4x4 default, while I use custom biomes with a 1x1x1 placement for the custome blocks. This would make it a lot easier for Java compatibility so that these custom blocks can sit beside each other even despite being from different biomes.what do the subcommands do after /execute run function ... I'm a beginner, Commands I was wondering how or even if, you can give an extra input when you run a command and i saw that there were multiple subcommands. What do they do?Can you reduce world height? I'm a beginner, Worldgen You can change dimension_type/overworld to increase and decrease world height, but I want to also shrink all of the material layers (so there would be a very thin stone and deepslate layer before bedrock). So the bottom of the world would be at around Y=30 with thin stone layers on top of it. I know you can change some of this in noise_settings but my datapack fails to validatate when I try. Is it not possible or what am I missing?I'm curious if it is possible to make the structure a single command block that /place the structure General ^summoning an enchanted arrow General, Commands can i summon an arrow that would behave as if it had been shot from an enchanted bow? i have a bow with a custom enchantment that runs whenever an arrow shot with it his something and i was wondering if that could be replicated by just summoning an arrow without the need of using a bowPermissions in clickable tellraw text I'm a beginner, Commands, Other I'm currently making my first datapack, a minigame to play with my friends, and one of the features is a swap ability where the player can choose 2 players to swap. I handled this by creating a menu in chat using tellraw commands and when the executing player clicks on one name, a modified tellraw opens where he clicks on the second name. These names are then stored to execute the swap function itself (with macros). I tested it and everything worked fine with me, but when my friend tried to do the same thing, it said he doesn't have the permission to use this command (the one that gets executed when he clicks on one of the player names to select). Then i remembered that every player needs permission to use commands from tellraw clickable text or books (at least thats what i think). Is there any way to solve this without giving every player operator/permission to use specific commands? (I know the dialouge feature exists now, but i don't know if its any different there and i started this in 1.21.5 and would like to finish it in this version, maybe updating it to 1.21.6 later)1.21.3 how to detect when snowballs land? Commands i want to execute a command when this happensMinecraft 1.21.6 – Datapack functions not loading even with load.json I'm a beginner Hi everyone! I'm working on a custom datapack in Minecraft Java Edition 1.21.6, and while the datapack shows up as active with /datapack list, none of the functions are recognized or executed, including the one I added to load.json. I’ve triple-checked the file names and structure, and I can’t figure out what’s wrong. When I reload the world, I expect my function jump:main to run, which simply places a diamond block below the player and sends a message. Here’s the full structure of the datapack (installed in saves/New World/datapacks/dimensionJump-main): dimensionJump-main/ β”œβ”€β”€ pack.mcmeta β”œβ”€β”€ pack.png β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ jump/ β”‚ β”‚ β”œβ”€β”€ dimension/jump/ β”‚ β”‚ β”œβ”€β”€ functions/ β”‚ β”‚ β”‚ └── main.mcfunction β”‚ β”‚ β”œβ”€β”€ tags/functions/load.json <–– is this the issue? β”‚ β”œβ”€β”€ minecraft/ β”‚ β”‚ └── tags/functions/ β”‚ β”‚ └── (also tried putting load.json here) β”œβ”€β”€ assets/ (unused) pack.mcmeta { "pack": { "pack_format": 48, "description": "Test datapack for 1.21.6" } } main.mcfunction say jump:main executed! setblock ~ ~-1 ~ minecraft:diamond_block load.json Located in data/jump/tags/functions/load.json, with this content: { "values": ["jump:main"] } I also tried placing load.json in data/minecraft/tags/functions/load.json just in case β€” no success. Any idea what im missing? Im sure the datapack get loaded correctly cause all the custom dimensions are actually seen, but not the functions. thaaanks!Test I'm a beginner testI cant find my generated structures in my structure datapack I'm a beginner, General I created a structure data pack that is suppose to generate specific structures in specific biomes, but I cant seam to locate them. The code seams to be working fine since the drop down for /locate is working and I can do /place with the structures. The problem might be the size since I used the max amount the mod super structures that allowed me to make large nbt files, and the structures are around 250 by 250 blocks. How do I edit the world generation to generate these structures.detecting player moving item from their inventory into a chest I'm a beginner, Commands, Advancements So I currently have a function that prevents someone from dropping an item. But what I was wondering if there's a way to detect when someone moves an item out of their inventory into another inventory like a chest, container, etc.How do you make caves generate smaller? (1.21.5) I'm a beginner, Worldgen I want to make caves generate extremely small and make the big open areas in cave generate very small. What world gen setting do I adjust for this in my datapack?my datapack exists and doesn't at the same time I'm a beginner, Other i am developing a datapack and i put it in a mc world. when i do /datapacks list it doesn't show up but when i do /reload some of it work like i have no idea what's going onMaking items immune to explosions I'm a beginner, General Is it possible to make dropped items immune to explosions like nether stars, to my knowledge it’s hard coded so I’m wondering if it needs to be done with a mod. In this case it’s simply swords unique weapons as they are dropped from withers.(1.21.5) how to make armor pieces invisible? I'm a beginner, General, Commands, Predicates for context, making a helmet that makes you invisible when sneaking simply using predicates unfortunately it leaves the helmet visible and it kind of ruins the whole point of invisibility so I'd like to know if there's a way to make it invisible and then make it visible againAdvancement on consume item if other item is in inventory or slots I'm a beginner, Advancements, Enchantments So basically I'm trying to make an advancement that triggers if a player has a certain item with an enchantment in their inventory, and they try and consume an item that doesn't have that same enchantment on it. Currently this is the code that I have, but it doesn't seem to be working. Any help is apprecaited, thanks!remove Too expensive on anvil if trying to enchant a stack of items I'm a beginner, Enchantments Hi, I was wondering if it was possible to remove the "Too Expensive" icon for when you try and enchant more than 1 thing at a time in the anvil in a datapack If you are in creative mode it only lists the enchantment cost as 40. So I'm wondering if it was possible to do in survivalHeyo! can someone Check this for me pleaaaasae General, NBT/Components ive got a shop im building for my server and instead of 3 command blocks per vending machine i think a data pack would be the easiest?
Id just like someone to check it and make sure it will actually work LOL Heres like a barebones explanation βœ… Features: All trade conversions based on list. Fully working cooldown system (1-second/20-tick delay shared across trades). 🎡 Sounds: Success = levelup Fail = note_block.bass πŸ“Š "Not enough coins" messages show current vs required count. βš™οΈ Easy-to-use commands like: /function vtc:gold_great_ball /function vtc:iron_poke_ball
[1.21.5] Detect custom item I'm a beginner, General, Commands, NBT/Components I Have 3 custom functions - Invoker, Item checker, and effect giver. Invoker Function is as follows: execute as @e[tag=racer] at @s run function horse_run:acc execute as @e[tag=racer] at @s run function horse_run:boostpad execute as @e[tag=racer] at @s run function horse_run:offroad execute as @e[tag=racer] at @s run function horse_run:jumppad execute as @a run function horse_run:itemcheck execute as @e[tag=racer] at @s run function horse_run:applepower Item checker function is as follows: execute as @a[scores={usedItem=1..}] if data entity @s SelectedItem.tag.custom_data.apple run scoreboard players set @s usedApplePower 1 # execute as @a[scores={usedItem=1..}] run clear @p carrot_on_a_stick 1 execute as @a[scores={usedItem=1..}] run scoreboard players set @s usedItem 0 PowerUp function is as follows execute if entity @p[scores={usedApplePower=1..}] run scoreboard players set @s applePowerStatus 82 execute if entity @p[scores={usedApplePower=1..}] run scoreboard players set @p usedApplePower 0 execute if entity @s[scores={applePowerStatus=1..}] run scoreboard players remove @s applePowerStatus 1 # Effects execute if score @s applePowerStatus matches 1.. run effect give @s minecraft:speed 1 4 true execute if score @s applePowerStatus matches 80 run playsound minecraft:entity.firework_rocket.launch master @a ~ ~ ~ 1 1.25 1 execute if score @s applePowerStatus matches 1.. run particle minecraft:soul ~ ~ ~ 0 0 0 0.2 2 force execute if score @s applePowerStatus matches 1.. run particle minecraft:soul_fire_flame ~ ~ ~ 0 0 0 0.1 5 force execute if score @s applePowerStatus matches 60 run playsound minecraft:entity.firework_rocket.launch master @a ~ ~ ~ 1 1.25 1 execute if score @s applePowerStatus matches 40 run playsound minecraft:entity.firework_rocket.launch master @a ~ ~ ~ 1 1.25 1 execute if score @s applePowerStatus matches 20 run playsound minecraft:entity.firework_rocket.launch master @a ~ ~ ~ 1 1.25 1 Location data using `@p` seems to be lost... General, Optimisation get.id FN: json execute as @a run tellraw @p ["",{"score":{"name":"@s","objective":"playerid"},"color":"yellow"},{"text":" "},{"selector":"@s","color":"green"}] This simply displays the name and id of all players online. Example: 6846 Steve Players get this by running a trigger command... TICK FN: json #! Detects when '/trigger get.id' is run scoreboard players enable @a get.id execute as @a if score @s get.id matches 1.. run function name:get.id When running the get.id function, it works as intended. The @p makes sure the tellraw displays at the player who ran the function because execute as isn't location specific. But when running the trigger command, /trigger get.id it does not display anything. The location of the player who ran the command seems to be lost somewhere. Whats going wrong here? INFO: [1.20.6]How can I make a custom potion effect? General, NBT/Components Is this possible to do? I was looking at potion components and saw that you can add custom effects. How can I add my own?compare the value of a list NBT/Components i need to check if the value of certain position of a list is a specific one. i have a function with macros that are: n (the position in the list im looking), target (the exact value i want to detect) so in this function how could i detect if in the list position n the value is target?? its prob very easy but i dont rememebrstorage data boolean NBT/Components using a macro to run the function in the image (function xx {availible:true}) converts the availible:true to availible:1, why is this?remove/select an item in a list NBT/Components is there an efficient way to remove a value from a data storage list? lets say for example my list has [1,2,3,4,5] and i want to remove 3 from the list, how could i do this. the method ive been using is with macros check every position in the list with a function and if the current position has the value im looking for then remove itCreating Recipes that have nonstandard input ratios I'm a beginner, Recipes So basically, what I want to do is create recipes where Item 1 is in quantity X, Item 2 is in quantity Y (which may or may not be different from X) and then output Z number of items afterwards. I understand how to change the quantity Z. The problem I'm running into is it seems that recipe generators, and the wiki page on Recipes do not seem to give an option to change the count of items required in the input section and they always default to 1:1. I was wondering if this was possible to do, or if there are any potential workarounds. Thanks!Structure generating full of blocks? Worldgen I am trying to place an underground structure but it keeps generating with blocks in place of the air blocks, as if I had used structure voids. I'm not sure what I am doing wrong?healing I'm a beginner, Commands I want to heal 1 heart, but the only way I can think of is storing the current health in a scoreboard, add 2, then use something like data modify. But I don't want to use another scoreboard just for that, so I wanted to know whether there is an easier way to do itWhat's the easiest way to run as attacked entity? General, Commands, Predicates Hello! I was wondering what the easiest way was to get something like execute on attacker but inverse. So the context changes to the entity that was attacked by whatever was in the context before. Thanks!detecting if a player has an empty slot General how do i detect if a player has at least one empty slot in their inventoryhow do i detect right clicks on a block while holding an item? I'm a beginner, General I know it's possible from what i've seen with a few datapacks but I wanna do it myself for an item that basically just reverses stripped logs lolwhy does the group loot table thing work like that? Loot Tables like i want a couple pre-set groups of items and you roll one of them, for example like theres 4 groups, like one with 5 splash potions, one with like 7 axes, one with like 1 sword and 3 snowball stacks and one with like 3 stacks of acacia logs or something, and then you get like one of the groups, like without them mixing, like you get either the one with the 5 splash potions or the one with 7 axes and so on idk i might be dumb but it just doesnt work like that for some reasonFallback for translation in custom potion General, Commands, Other I tried making the [{translate:"item.bonuscraft.glowing_potion",fallback:"Glowing Potion"}] in the potion name, and item name but it doesn't work, and when i insert string in potion name this (i think) translation is put as name. Is there a way to add fallback to it?Alternatives/Different ways to write this logic... General, Optimisation I need to write a function, that when inputed with an ID, will output the player associated with that ID. (ID's are stored in a scoreboard.) For example: Scoreboard called playerid that contains the following: Steve: 8665, Alex: 2485, Equinox: 8776 If I were to run the command /function namespace:id_to_player {id:8665} It should output Alex This is the code I've come up with: (Reason for tag is to make the output only display for the player that ran the cmd) json $scoreboard players set $payee payee $(id) tag @s add .this execute as @a if score @s playerid = $payee payee run tellraw @a[tag=.this] {"selector":"@s","color":"aqua"} tag @s remove .this Although it works as intended, it seems a little repetitive and un-optimized. Is there a better way to do this? Sometimes seeing other people's perspectives can help. [Info: 1.20.6]Custom Enchantment Effect Components and Predicates I'm a beginner, Predicates, NBT/Components, Enchantments I was wondering, is it possible to make an effect component for an enchantment, similar to "post_attack" but that triggers the effect so long as conditions are met once the player "uses an item" by right clicking. Also, would it be possible to make a custom requirement condition that checks if a sound has played within a certain proximity? Thanks!Custom structure generating exclusively on nether roof I'm a beginner, Worldgen Hello! I'm somewhat new to datapacks, though I have a lot of programming experience and am good at using commands. I'm trying to create a custom structure - it's a TNT trap that's meant to sit flush with the ground. While making the nether variants, I'm finding that every single time it generates, it goes on the nether roof. I saw a previous post about this problem but their solution was to switch to rigid projection, which I'm already using. Any help is appreciated, as well as any explanation of why this is happening! :DWe want to make player-controlled NPCs that don't appear on Tab or P I'm a beginner, General I'm wondering if there is a datapack that allows for Players to vanish, but have their player model be visible. Their name on the tab menu and on the player menu (when a player presses P) won't be seen. Just wondering if that exists, I've seen conversations swirl around the plugin "SuperVanish" but I haven't seen anything in the config that eludes to that[1.21.5] My Datapack is not multiplayer friendly, i need help. I'm a beginner, NBT/Components Im Making a Horse Racing world with customly made datapack, it's my first time making a datapack, and ive made this: ' # position calculating execute as @e[tag=racer,limit=1] store result score @s ponsX run data get entity @s Pos[0] 1000000 # accel amount execute as @e[tag=racer,limit=1] unless score @s posX = @s posXPrev run scoreboard players add @s accel 3 # accel limit execute as @e[tag=racer,scores={accel=54..},limit=1] run scoreboard players set @s accel 50 # position reset execute as @e[tag=racer,limit=1] run scoreboard players operation @s posXPrev = @s posX # accel remove execute as @e[limit=1,tag=racer,scores={accel=1..}] if score @s posX = @s posXPrev run scoreboard players remove @s accel 1 # # Effects! # execute as @e[limit=1,tag=racer,scores={accel=10..30}] run effect give @s speed 1 0 true execute as @e[limit=1,tag=racer,scores={accel=31..49}] run effect give @s speed 1 1 true execute as @e[limit=1,tag=racer,scores={accel=50..}] run effect give @s speed 1 2 true execute as @e[limit=1,tag=racer,scores={accel=50..}] at @s run particle minecraft:white_smoke ~ ~ ~ 0 0 0 0.1 1 force ' As i've said, its my first time, i need it multiplayer friendly. The mobs tagged with racer, are horse like mobs (Horse, zombie horse, skeleton horse, mule, and donkey) The system works only for one player at a time I made it execute in tick.jsonadd two strings together in data storage General I wanna slap a string onto the beginning of an existing string data, not quite sure how I'd do that though :/Custom Data 1.20.6 I don't know how to execute ? custom:1b is not working Loot Tables, NBT/Components Hey so I'm trying to update 1.20.4 items to 1.20.6 and I usually gave each item a custom tag to run commands off of, however I can't use my former tags as well 1.20.5 removed NBT, how can I fix and rewrite a storable data executable? Basically like lets say I hold a ruby battleaxe how can I detect that besides the model data, I wanna use a custom tagBypassing structure block limit in 1.21.5 Commands, Worldgen, NBT/Components, Optimisation Hello! I recently built a structure i want to save and use in my datapack, but i realized it was too big to fit in the limit. I did some research and all i can see is stuff relating to jigsaw blocks, which i am not ready for. Is there a way to bypass the maximum structure block limit so i can get the entire structure in one block? For Java 1.21.5, any help would be appreciated!i need a guide teach make abilities weapon datapack I'm a beginner, Commands pls if you have guide share meTicksFrozen check with predicates Predicates Is there a way to check if the entity is currently under the effects of powdered snow?Is there a way to force a spawned loot table to always dropatleast 1 item? Loot Tables Hi i am creating a small datapack inspired by lucky block, and i am using spawned loot tables to determine the outcome of the lucky block, i have got it to drop random stuff but not consistenitly dropping something.How to replace a regular minecraft enchantment with a custom one I'm a beginner, Enchantments I'd like to replace a minecraft enchantment with something custom that I've written. How do I indicate for the game to use my version of the enchantment instead of the default?multiple armour trims Commands, Other Is there a way to either put multiple armour trims on a single item, or somehow simulate doing so? I intend to apply it with commands so you won't have to worry about players doing it in survival or anything.Scoreboard to give player item I'm a beginner, Commands, Enchantments Hello, I'm trying to create an enchantment that gives players a certain item depending on a randomly generated number. I have some scoreboards setup, However currently it does not do anything. Attached are the pictures of the functions I currently have, and the section of json file for the enchantment that relates to activating the functions.How to iterate through list in storage? General, Commands, NBT/Components, Optimisation I need to determine if a player id is in a storage list. Storage name:playerid {id: [8775, 6445, 8991, ...]} When a new player id is created, I need to know if it already exists so it can be re-generated. (Player id's are made up of 4 non-negative numbers, and are generated randomly) The player id's are normally stored in a scoreboard [playerid]. But are also added to the storage above.How to remove custom enchants from creative inventory? Enchantments In creative menu, the custom enchants I have added that are there as temporary functionality or stuff people shouldnt touch directly are present. Is there a way to get them not listed there?Datapack won't start due to Registry Loading error I'm a beginner, Enchantments, Other I have a datapack, I'm working on, and there's no errors in Visual Studio, but on startup the datapack won't load into the world. I've quadruple checked everything and can't seem to figure out what exactly is causing the issue, so I was wondering if I can have someone else take a look at it too just to see if I missed something. I'll post the logs and the code in the comments!how do i get the length of an array NBT/Components like in storagesDialog Username to PlayerHead help I'm a beginner I'm trying to make a datapack that gives the player a PlayerHead of whoever they type but it isn't working (im extremely new to making datapacks so any help at all is appreciated!) Code: { "type": "minecraft:multi_action", "title": "Player Head Giver", "body": [ { "type": "plain_message", "contents": "Enter the player name to get their head." } ], "inputs": [ { "type": "minecraft:text", "key": "username", "label": "Player Name:" } ], "actions": [ { "type": "run_command", "label": { "text": "Spawn Head" }, "command": "give @s player_head{profile = ['$(username)']}" }, { "type": "close", "label": { "text": "Cancel" } } ] } Modify Available Enchantments I'm a beginner i Have a custom item that can be obtained, its a wooden pickaxe with a item model. But i want to know if its posible to make the looting and fire aspect enchantment compatible, because it is only compatible with pickaxe enchantments ( with an anvil )Do the new dialogs store text inputs? Commands, NBT/Components im extremely new to the dialogs introduced in 1.21.6 and im creating a few that use text inputs where the player inputs values into the text boxes. The thing is I'm trying to find where these values are so I can store that in a scoreboard. How does one achieve this?How to Despawn a block after using "replace_block" in an enchantment post attack effect I'm a beginner, Enchantments So I have this effect that spawns powdered snow under the entity in order to give them the freezing effect after you swing your sword. It works fairly well, however multiple swings can fill up the surrounding space fairly quickly. I was wondering if it was possible to make it so that this block despawns after a certain amount of time, and if so, how I would go about doing that. Thanks!whats the command to place a entire treasure bastion if there is one? (the one with the spawner) Commands im only getting non treasure bastions when i use /place structure minecraft:bastion_remnantAny way to make an Ocean world generation but with one and only one island at spawn? I'm a beginner Hi guys, I'm pretty new here. But I've been trying to make my own datapack lately (with no succsess) and I would ask for some help. Other than helping websites and already existing codes, I'm not really good with datapacks. I recently found a few solutions to make an ocean only world with every structures included. But I wonder if it was possible to make the same world generation, but with an actuall overworld generated island in the middle of the world, with every possible biome, to make it into a fun surival experience. I know that it is possible to generation islands spread widely in the world, but would it be possible for only one to generate?Is there any other way to put items from a container into a player's inventory? Other like i know the minecart way, but the problem with it is just the fact that you can steal the items if you joined the server before the player who is actually supposed to have the items if ur close enough, and like im recreating the like legacy battle minigame using a datapack right so that's why i need it because in that mode when you pressed a keybind when you had the chest open you like got all the items in it if you had the space, basically I need another way to get items from a chest into a specific player's inventory and I can't think of any others than this oneCan I pass arguments into a function? I'm a beginner Is there a way to pass arguments into a function? Here is the command I want to run. /function superpowers:hello_world skuffy808 And here is the mcfunctionfile. title ~ $(target) ~ title "Hello World!"NeoForge Biome Modifiers I'm a beginner, Other I'm trying to make it so Phantoms spawn in the end dimension, and I saw an example from the mod Forbidden and Arcanus which makes use of this by (forbidden_arcanus/neoforge/biome_modifier /add_lost_soul_overworld.json) { "type": "neoforge:add_spawns", "biomes": "#minecraft:is_overworld", "spawners": { "type": "forbidden_arcanus:lost_soul", "maxCount": 3, "minCount": 1, "weight": 35 } } Researching on Neoforge's docs, and it mentioned the datapack would need to go here: data//neoforge/biome_modifier/.json My question is how do load this for vanilla mobs, since there isn't a mod id, and what would I name the file? And also would this be correct datapack format to spawn them in the end? { "type": "neoforge:add_spawns", "biomes": "#c:is_end", "spawners": { "type": "minecraft:phantom", "maxCount": 3, "minCount": 1, "weight": 100 } } If it matters on I'm 1.21.1 NeoForge, and I was going to use KubeJS to load this datapackText display offset when scaled up General, Commands, Other When text displays are scaled up, they are always offset to the right a bit.mined_block Trigger I'm a beginner I have a datapack on my server with an enchant which currently can bypass claims as it breaks block when the enchanted item hits a block, so I am tyring to change it to triggering when a block is specifically broken. I tried changing "effects": { "minecraft:block_hit": [ to "effects": { "minecraft:mined_block": [ however this doesnt work and the datapack fails to validate. what am I doing wrong here is this not a valid trigger?Is it better to use advancements or predicates? Advancements, Predicates Generally for performance, which is better?Predicate Based on Damage type for custom enchantments I'm a beginner, Predicates, Enchantments I'm trying to create a custom enchantment datapack that protects against a specific damage type such as magic, or indirect magic, etc. However when looking through the documentation of predicates, the closest thing that I was able to see that I could call is a "damage_source_properties" condition which only lets you make a predicate with "Damage type tags" which group several damage types together (I think). My question is, is it possible to call a specific damage type or types individually instead of using the tag groups? And how would I go about doing that? I also might fundamentally misunderstand how this is working since I'm very new at this. Any help is appreciated, thanks!Way to disable block update for specific block NBT/Components I want to stop sniffer eggs from hatching.Instrument item modifier with custom goat horn sounds General, Other { "function":"minecraft:set_instrument", "options": "#screaming_goat_horns" } in modifier to change item's 'instrument' component it's required to use tag, which in this case looks like this (screaming_goat_horns.json) { "values": [ "minecraft:admire_goat_horn", "minecraft:call_goat_horn", "minecraft:yearn_goat_horn", "minecraft:dream_goat_horn" ] } I don't see what's in it... It's not the sounds' names, items or anything like that. Ik how to make the custom tag but Idk what to put in it to make it work, and I'd rly appreciate any help. It's 11pm for me, so I prob won't respond for the next few hours/give @s minecraft:poisonous_potato[item_model="diamond",minecraft:consumable=0] Commands trying to make it so u cant eat it why is this invalid? theres nothing online about the consumable tag but it gives me the option to when i press tab?Datapack Trouble - works only in newly created worlds (1.21.1 Java) I'm a beginner, Optimisation, Updating I have a problem with a datapack I updated to 1.21.1 to use it on my server. In a newly created singleplayer world everything works just fine. When I load it onto my modded server, reload, disable and enable it, it does not work. I can use /function to trigger the function and it works as intended, but it wont work automatically which is bad for a auto pickup datapack. After trying a few things I found out that the datapack only works on newly created worlds, not on existing. Do you have any idea? Log: https://mclo.gs/H4cAQB4

Loading more...