Hi, so tried to follow a guide to create a loottable datapack to remove pretty much all vanilla food items from Dungeon/village chests, as it ruins my whole "food not abundan" playstyle, but it's not working, and I have no idea why :/
If some1 could take a look that knows a little and tell me what's wrong or guide me, I would appriciate it a ton! 😮
#Loottable Datapack not working, some1 help?
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
Someone will come and help soon!
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
What exactly isn't working?
And also can you just paste the contents of that JSON in here rather than the file? You can start and end it with ``` to display it as a code block
Well, it's not working in terms of, when I/we open chests, they are still filled with ton of the vanilla foods, so I dont think it's doing anything really :/
DOnt know how to paste it in as you mention, when I tried to copy the text, it auto dumps in the file like before.
Ya nahh, text is too long for that format to work I think
:information_source: Default Launcher Logs
The logs are where Minecraft displays errors when something goes wrong and can thus help you gain information about why something isn't working for you!
To open the logs:
- Enable logs in the Minecraft Launcher
- Start your game (or restart it if you already have an open instance)
- Enjoy spotting errors getting much easier!
Copy paste the relevant text. Should be red or orange
If you absolutely must an image is fine
Where is the file located and how is it called?
To replace a vanilla loot table, you need to call the file 1:1 the same and it has to be in the same location (but within your data pack)
So it the vanilla loot table is minecraft:chests/end_city then, in your data pack, it needs to be at data/minecraft/loot_tables/chests/end_city.json
ohh emhh, I'm playing on my hosted Forge server and I might be wrong, but I dont think that location is there on the server, I saw that on clients, that you could open up the Java file and then locate the loottable, but I cant locate that on my dedicated server
And the datapack file itself is just called "nofood-2.0.0"
How the data pack itself is called doesn’t matter, only from /data/ and lower
This is my path for datapacks to the server
But i dont have a chance to know what the name has to be, as I dont got a data/loottable location to see those names 😮
It would be a data/<namespace>/loot_tables/ location
There won’t be a loot table namespace
If you are replacing vanilla village loot tables it’s easy to find
For modded stuff that’s a lot harder
But also possible
I mean even the Vanilla is hard I feel like xD
when I youtube it, it's just people opening up a java file and locating the loottables, I dont got that
Might be that one small detail I'm not getting and it's really simple
Yes you do, otherwise you wouldn’t be able to play the game, you need that file for Minecraft to load it in the first place
Hmm, that file is not located in my whole server folder
I mean I got it for my client, but that doesnt take effect on the server
This (https://github.com/misode/mcmeta/tree/data-json/data/minecraft/loot_tables/chests/village) is all vanilla data pack files like you'd find in your jar, you can use these to browse the paths and original contents
- you also got those in your server, that loads the loot tables
- you only copy from there, you can only modify them using a data pack, don’t do that in the jar directly
So If you were me, and couldn't locate that file to copy from and so on, what would u type/search for?
Even tried searching for "minecraft" to find the main folder, and it doesnt exist
.
.. and file contents, yes
Nothing comes up
And the whole path to them
I don’t know why you try to find them in your world file
If anything they'd be in the server jar
That was my thought at first
But you don’t need to find them there, if it’s the vanilla village just look into your local vanilla jar / the website I sent
I must be insanely stupid or something, nothing I search for exists in that server folder 🥲
Okay will try and search inside the only Jar i got
.
.
ohh Local As in appdata?
Your pc, your Minecraft installation
Not the server
Or just the website
I provided 2 ways to get it, why are you looking for your 3rd approach you are having trouble with?
If it turns out not to be those, you can still try and find it else where
Yeah that is me being stupid, I kept being stuck on "jar" must be in the server and ignored "on local installation"
You could try replacing the loot tables with a simple one that only places a single stone or something to be sure that the paths match, since that’s the only important part
Okay So I made this which should be 1 stone
Is it the name of the File it self that would need to change to for example "ancient_city.json"
For it to take effect on chests that are in ancient_city?
Or the name of the File inside
Okay I've done what I thought made most sense and done all the vanilla village files
That didnt do the trick xD
What’s the path to your loot tables, starting from /data/
You mean on my local Installation or on the server, where I tried to place them? 🙂
In your data pack
C:\Users\tugan\curseforge\minecraft\Instances\All the Mods 9 - ATM9\saves\New World\datapacks\nofood-2.0.0.zip\data\nofood\loot_tables\blocks\
This I think
- this is in the nofood namespace, look again at the website or your local jar for the correct namespace
- this is in the blocks subfolder, look again at the website or your local jar for the correct path
Or in other words:
- why do you try editing your own loot table when you want to overwrite another one
- why would you think that the end city chest/village chest loot table is a block loot table
How would minecraft know what to overwrite if the paths don’t match?
D:\CurseForge\Instances\ATM9 Server\Hugabuga\datapacks\nofood-2.0.0.zip\data\minecraft\loot_tables\chests\village\
Btw really sorry for having to deal with my mush brain in terms of understanding 😅
I really appriciate the effort
So I think I got the pathing right now, but was me naming it "noFood" alright, or does that cause trouble for the pathing also?
the pack itself can be called how you want to
Did you try that out? that looks like it could be correct :D
Didnt work 😅
I am playing modded, but I located a plains biome village, and tried to open chests and they all had food in them
Could also be because the Loot table itself is faulty, will have to check via jar file to put them up against eachother
Okay I see now the one in jar file is put up like
],
"name": "minecraft:porkchop",
"weight": 6
},
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 3.0,
"min": 1.0
},
"function": "minecraft:set_count"
}
],
I suggest just using this generator:
You can see if your data pack had an error while loading when looking at the logs or server console in this case when starting the server or running /reload
Arh okay, I was using an application called MCreator to make the datapack
But I see it looks different from what is in my jar file
So could I do this, and bread would not be able to spawn?
No, that would make the loot table empty instead
For testing purposes, I suggest making a loot table that always drops 1 stone or something
So you can confirm the path
Since that’s what’s not 100% confirmed yet
Arhh gotcha, will try that
Okay will have to give it a go later today, either pathing is wrong, or the village is modded from Bioms O plenty, but picked a Plains biome village, so wouldnt think it should have changed