#Loottable Datapack not working, some1 help?

1 messages · Page 1 of 1 (latest)

knotty condor
#

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! 😮

modern stagBOT
#

<@&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

quiet field
#

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

knotty condor
#

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

quiet field
#

Ah I see

#

What do logs say?

slow daggerBOT
#
: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:

  1. Enable logs in the Minecraft Launcher
  2. Start your game (or restart it if you already have an open instance)
  3. Enjoy spotting errors getting much easier!
knotty condor
#

cant drag or copy it in

quiet field
#

Copy paste the relevant text. Should be red or orange

#

If you absolutely must an image is fine

robust pine
#

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

knotty condor
# robust pine Where is the file located and how is it called?

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"

robust pine
#

How the data pack itself is called doesn’t matter, only from /data/ and lower

knotty condor
#

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 😮

robust pine
#

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

knotty condor
#

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

robust pine
#

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

knotty condor
#

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

robust pine
robust pine
knotty condor
#

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

knotty condor
#

You mean these names?

robust pine
#

.. and file contents, yes

knotty condor
#

Nothing comes up

robust pine
#

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

knotty condor
#

That was my thought at first

robust pine
#

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

knotty condor
#

I must be insanely stupid or something, nothing I search for exists in that server folder 🥲

robust pine
#

It’s not in the folder

#

It’s inside of the jar

knotty condor
#

Okay will try and search inside the only Jar i got

knotty condor
knotty condor
#

ohh Local As in appdata?

robust pine
#

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

knotty condor
#

Yeah that is me being stupid, I kept being stuck on "jar" must be in the server and ignored "on local installation"

robust pine
#

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

knotty condor
#

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

robust pine
#

What’s the path to your loot tables, starting from /data/

knotty condor
robust pine
#

In your data pack

knotty condor
#

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

robust pine
#
  1. this is in the nofood namespace, look again at the website or your local jar for the correct namespace
  2. this is in the blocks subfolder, look again at the website or your local jar for the correct path
#

Or in other words:

  1. why do you try editing your own loot table when you want to overwrite another one
  2. 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?

knotty condor
#

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?

robust pine
#

the pack itself can be called how you want to

robust pine
knotty condor
#

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"
}
],

robust pine
#

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

knotty condor
#

But I see it looks different from what is in my jar file

knotty condor
robust pine
#

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

knotty condor
#

Arhh gotcha, will try that

knotty condor
#

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