i saw ur low views on this vid and decided to watch cuz i want to give support to another small creator, then again im only at 8 subs so what can i say. plus im trying to make a datapack so thx for the vid
@@infamousjam4335 thx, i was wondering if they changed something in 1.21 that has to do with the file structure at large, srry if u mentiontioned that in ur vid cuz i got cut off watching it, but i have a .datapack folder that auto genned when i made my datapack, not only this but my load function wont work even though mc has loaded my dp. i cant look at my files to rn to double check stuff tho.
@@jackibear17 yea, i didn't touch on it, but they did change some file names that break data packs if left unchanged, they changed root folder paths that were plural to be singular. example: before advancements now its advancement. just double check plurality
this is actually genuinely thorough and clear and is a thirty minute tutorial worth watching and learning from. even though you were the one making the tutorial, you made mistakes, shrugged it off, and actually showed us how to fix stuff like that if it happens to us. it's unedited and nothing was left out, so we don't have to go searching through the video to see if we missed anything. 😇
yea a big part of programming is learning how to fix mistakes, so I thought it was very needed to keep my mistakes in the video and show the thought process in how to fix them.
How do I detect if a player eats a certain food item? I want to make it so eating a glow berry gives the glowing effect for around 2 seconds. Also, I want players to be able to eat a glow berry even if they missing any hunger
you can either give give the player special berries /give @p glow_berries[food={nutrition:2,saturation:4,can_always_eat:true,eat_seconds:0.6,effects:[{effect:{id:"minecraft:glowing",amplifier:0,duration:40},probability:1}]}] 1 or watching my right click detection video on how to set up the advancements and functions and change the criteria to be: "criteria": { "glowberry": { "trigger": "minecraft:consume_item", "conditions": { "item": { "item": "minecraft:glow_berries" } } } }, and have your function file revoke the advancement and give the player glowing
@@infamousjam4335 Thank you so much!!! I just got it working! So is there no simple way to make it so you cant eat glow berries when you have a full hunger bar? Is it only possible by creating special glow berries?
@@thomtom3070 Or... I just thought of this, you can change the item that drops from the block to be the special glow berry. Unfortunately, I couldn't find the glow berry loot table anywhere in the files, I did come up with an alternative way to find them. You just change the glow lichen loot table to be: { "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:glow_lichen", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "components": { "minecraft:enchantments": { "minecraft:silk_touch": 1 } } } } ] }, { "type": "minecraft:item", "name": "minecraft:glow_berries", "functions": [ { "function": "minecraft:set_components", "components": { "minecraft:food": { "nutrition": 2, "saturation": 2, "can_always_eat": true, "effects": [ { "effect": { "id": "minecraft:glowing", "amplifier": 0, "duration": 60 } } ] } } } ] } ] } ] }
@@infamousjam4335 I actually came up with another solution. Regular glow berries still give you glowing. However, crafting together 1 glow berry and 1 rotten flesh makes 1 “Berries O’ Hunger.” This item still gives the glowing effect but it gives 0 nutrition and saturation and can always be eaten. Has the upside of giving rotten flesh a use lol
I cant seem to make any function work, i've tried renaming everything, i tried different sample packs but i cant get it to work, i literally copied your datapack WORD for WORD and still nothing
i was able to get all of them but the last one. when i reload it doesnt work but if i do it in chat it works Edit: i added a space accidently on the last line. It works now
what extensions are you using on vsc? cause the ones i've been told to use are marking errors left and right and my code for the functions will not work despite being exactly the same as a result.
This was _VERY HELPFUL_ thx so much now im *addicted* to making datapacks!!!
i saw ur low views on this vid and decided to watch cuz i want to give support to another small creator, then again im only at 8 subs so what can i say. plus im trying to make a datapack so thx for the vid
yea ofc, if you need help with data packs, lmk and i can make a video on the topic, i'll be doing a series covering different aspects of data packs
@@infamousjam4335 thx, i was wondering if they changed something in 1.21 that has to do with the file structure at large, srry if u mentiontioned that in ur vid cuz i got cut off watching it, but i have a .datapack folder that auto genned when i made my datapack, not only this but my load function wont work even though mc has loaded my dp. i cant look at my files to rn to double check stuff tho.
@@jackibear17 yea, i didn't touch on it, but they did change some file names that break data packs if left unchanged, they changed root folder paths that were plural to be singular. example: before advancements now its advancement. just double check plurality
@@infamousjam4335 ik abt that but there was something called .datapack which ive never scene
@@jackibear17 where in the folders is that found?
this is actually genuinely thorough and clear and is a thirty minute tutorial worth watching and learning from. even though you were the one making the tutorial, you made mistakes, shrugged it off, and actually showed us how to fix stuff like that if it happens to us. it's unedited and nothing was left out, so we don't have to go searching through the video to see if we missed anything. 😇
yea a big part of programming is learning how to fix mistakes, so I thought it was very needed to keep my mistakes in the video and show the thought process in how to fix them.
How do I detect if a player eats a certain food item? I want to make it so eating a glow berry gives the glowing effect for around 2 seconds. Also, I want players to be able to eat a glow berry even if they missing any hunger
you can either give give the player special berries /give @p glow_berries[food={nutrition:2,saturation:4,can_always_eat:true,eat_seconds:0.6,effects:[{effect:{id:"minecraft:glowing",amplifier:0,duration:40},probability:1}]}] 1
or watching my right click detection video on how to set up the advancements and functions and change the criteria to be: "criteria": {
"glowberry": {
"trigger": "minecraft:consume_item",
"conditions": {
"item": {
"item": "minecraft:glow_berries"
}
}
}
},
and have your function file revoke the advancement and give the player glowing
@@infamousjam4335 Thank you so much!!! I just got it working! So is there no simple way to make it so you cant eat glow berries when you have a full hunger bar? Is it only possible by creating special glow berries?
@@thomtom3070 Or... I just thought of this, you can change the item that drops from the block to be the special glow berry. Unfortunately, I couldn't find the glow berry loot table anywhere in the files, I did come up with an alternative way to find them. You just change the glow lichen loot table to be:
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:glow_lichen",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"components": {
"minecraft:enchantments": {
"minecraft:silk_touch": 1
}
}
}
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:glow_berries",
"functions": [
{
"function": "minecraft:set_components",
"components": {
"minecraft:food": {
"nutrition": 2,
"saturation": 2,
"can_always_eat": true,
"effects": [
{
"effect": {
"id": "minecraft:glowing",
"amplifier": 0,
"duration": 60
}
}
]
}
}
}
]
}
]
}
]
}
@@infamousjam4335 I actually came up with another solution. Regular glow berries still give you glowing. However, crafting together 1 glow berry and 1 rotten flesh makes 1 “Berries O’ Hunger.” This item still gives the glowing effect but it gives 0 nutrition and saturation and can always be eaten.
Has the upside of giving rotten flesh a use lol
I cant seem to make any function work, i've tried renaming everything, i tried different sample packs but i cant get it to work, i literally copied your datapack WORD for WORD and still nothing
OH MY GOD IT FINALLY WORKED, i was playing on 1.20.1 with the right pack format but out of frustration i went into 1.21 and it worked ????
@@Drukiii yea cuz they changed the file structure names between 1.20.1 to 1.21 so it wouldn't work in the older version
@@infamousjam4335 ye, actually i've figured out a way to make a datapack a 1.19 so it all works out in the end i guess lol
remember me when you are famous!!!!!!!!!!!!
9
Tee hee flame bows start fires now
add a timestamp,
ww
i was able to get all of them but the last one. when i reload it doesnt work but if i do it in chat it works
Edit: i added a space accidently on the last line. It works now
ok sweet, those little typos can be hard to find
what extensions are you using on vsc? cause the ones i've been told to use are marking errors left and right and my code for the functions will not work despite being exactly the same as a result.
i have mc data pack and language-mcfunction extensions
for 1.21 its function instead of functions for the folders
ty man
I cant get it working idk why
Nothing happends when i do /reload
@@CrayCrayyyy like none of the examples are working?
@@infamousjam4335 I did the excact steps you showed but it doesent run command when i /reload
@@infamousjam4335 My datapack was working perfectly, but it all of a sudden just stopped with the same problem as the commenter
if you´re using 1.21 make sure to not use plural folder names "functions" for example does not work anymore u have to use singular ► "function"
Love u jam