Can't seem to get blacklisting to function
MissPotato opened this issue ยท 3 comments
After doing what you suggested on the other issue, add all the sections, I found that changing the hunger values of items worked, but that blacklisting anything did not. (Harvesting, Drops, and Food) Here is a copy of my JSON. I do not know if this stems from the same problem that is fixed once beta 5 comes out, but I hope I helped, and am not being too much of a pain in your ass.
There's a syntax error in that JSON. Your log will probably have something like:
[20:45:39] [Client thread/INFO] [HungerOverhaul/HungerOverhaul]: Loading JSON Files
[20:45:39] [Client thread/WARN] [HungerOverhaul/HungerOverhaul]: Error Loading json files:
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected name at line 29 column 10
The error is the trailing comma after "minecraft:wheat"
here:
"name": "minecraft:wheat",
//"meta": 7
There's a second error due to defining a blank food in the foods array.
"foods": [
{
// empty object
}
]
To define an empty array, you'd do this instead:
"foods": [
]
I'll commit a fix for the error that an empty food causes in a bit.
Here's a working version of the JSON you posted:
{
// a list of foods that should not have their food values modified by HO
// the foods in this list will not have their values changed by HO at all (even if specified in the 'foods' section above)
"foodsBlacklist": [
],
// a list of crop blocks that should not have their drops modified by HO
"dropsBlacklist": [
{
// the name of the block in "mod:name" format
"name": "minecraft:wheat",
// [optional] the metadata value of the block (default: wildcard (any metadata))
"meta": 7
}
],
// a list of crop blocks that should not have their right-click behavior modified by HO
"harvestBlacklist": [
{
// the name of the block in "mod:name" format
"name": "minecraft:wheat"
}
],
"foods": [
]
}
Oh, and by the way:
I hope I helped, and am not being too much of a pain in your ass.
Bugs getting reported is never a pain. Thanks for taking the time to report them.