Changing drops in chickens.json doesn't seem to affect output
katubug opened this issue · 17 comments
Issue Description:
I have edited the chickens.json to edit both the laid item and the on-kill drop item, but neither is changing.
Steps to reproduce (important):
- Edit the chickens.json file. This applies to any chickens in the file, but here's my example for Diamond Chickens:
"chickens:diamondchicken": {
"name": "DiamondChicken",
"is_enabled": true,
"lay_coefficient": 1.0,
"lay_item": {
"itemID": "thermalfoundation:material:16",
"metaID": 0
},
"drop_item": {
"itemID": "thermalfoundation:material:16",
"metaID": 0
},
"spawn_type": "NORMAL",
"parent_1": "chickens:glasschicken",
"parent_2": "chickens:goldchicken"
},
- Spawn in a Diamond Chicken.
- Wait for it to lay, or kill it.
What happens:
The Diamond Chickens still produce Diamonds, despite the .json file configuring them to drop Diamond Nuggets. This also happens with Iron Chickens and vanilla Iron Nuggets, so I know it's not a mod issue. Any chickens modified by the morechickens.json are correctly altered.
What you expected to happen:
I expected the chickens to produce the specified Diamond Nuggets (or Iron in the case of Iron Chickens).
Affected Versions (Do not use "latest"):
- Chickens: 6.1.0
- Minecraft: 1.12.2
- Forge: 14.23.5.2825
Okay so bizarrely, the Iron Chickens have correctly started laying Iron Nuggets. Maybe because it's a vanilla item and Diamond/Emerald Nuggets are modded? I have no idea. But my Diamond and Emerald Chickens are still laying the full gems instead of the nuggets that I've configured them to.
Sorry meant to respond, but im in a job transition atm. Modding has been put on a back burner for the time being. I had thought this was fixed.. but I will look into it when I can. Cant say when I will get an update atm.
@GenDeathrow The problem is more than likely due to a mod load order, should be a simple fix by adding mods by their modid as dependencies in the mcmod.info file as well as adding and setting "useDependencyInformation" to true. In this case, thermal foundation would need to be here. In the problem I posted, Mystical Agriculture would need to be here. It isn't a problem if you have them listed as dependencies, because as stated, if the mod isn't there, it won't do anything. There are a few more small changes such as adding "useMetadata = true" to the @mod annotation in the ChickensMod.java to use these changes
I'm not exactly sure how to fix the chickens:liquid_egg issue as I would have to look more in-depth into the files, and I'm pretty sure listing a mod as it's own dependency probably wouldn't be a good thing haha
This would make sense if I depended on mod load order, but I don't. The item name gets stored into a loader file that doesn't try to create the item until a chicken dies.
This gets called by the Entity chicken when it dies, so all mods are loaded at this time. If its the first time the item holder has been called than it creates the item from a name in the config file.
But what might be actually happening is jei is calling to get the drop item during the start up which causes the issue to fail. And I store which itemholders failed and cause it to stop from trying again. I wrote this new system because I dont want to force it to load after mods and I can handle mod loading order via forge.
So.. now I know what the issue is... I need to find a way to make jei happy.. and chickens. I can push an update out that will ignore my failing items. Its a fix and not a fix at the same time. I will say if you didn't bring it up like this I may not have come across this issue. Either way jei wont be happy with this and will not show the updated items. And I dont like that... I will have to play around with it to see what happens.
So technically my jei plugin doesn't like what I tried to do.
I gotcha, at least it was somewhat helpful haha. If I had the time to study the classes and such I may have been of more use. Unfortunately, like you, I haven't had much time lately. It takes most of my free time just working on and pushing an update for my modpack lol.
I appreciate the response though, good luck creating a fix
@GenDeathrow didn't have time yesterday to test, but managed to squeeze in some time today. The crashes seem to be exactly the same. Doesn't seem to be a specific mod causing it. Can't make it past the the Pre-init phase
If you would like to try this out before I push it, id appreciate it. I feel like jei will be broken with updated drops. but this is about all the time I have for atm. I may have to set it to load after all mods..
I'll get to it as soon as I can, hopefully tonight!
If you do have to set it to load after mods, maybe it would be possible to detect what mods the items are coming from and set those mods to be the dependencies/load before this one, that way it isn't completely last. But I haven't spent much time with forge yet, so I could be saying something that isn't easily possible.
I wish that was possible but its not.. I can set it to load after a mod or all mods that's it.. but issue with that is if one of those mods do the same.. than the same issue could still happen. Its works 90% of the time.. but Ive had issues in the past with it not working properly. That's why I tried this way. but didn't think my own jei plugin would cause an issue.
I feel you. I'll definitely check it out and give you feedback. I'll test with one mod at a time and then several at a time, and give you the feedback and logs
Yeah thats cause there is an issue with the json format. So there is an issue with a chanage in your file. Use something like https://jsonlint.com/ < or similar to test your json format of the file.
I found it reading through it, when i changed one i left out a comma lol
Re-testing now
So for some items it worked, but not all. For instance it loaded spider essence from mystical agriculture fine, but for other items like iron essence it did not. And I validated the json, it is perfectly fine. I'll post a log with this. Also, this test was using a small amount of mods (approximately 40 or so)
Going over the logs, it didn't say any items were missing tho.
Figured jei would have issues with what I did. also in your logs there is a chickens folder with a chicken's only log. Make it easier to find printouts from the mod.
Hey @GenDeathrow, sorry for such a late response. The log file isn't really helpful as this is all it is...
Not sure if that's how it's supposed to look or not, but there it is.
On further inspection, the only chicken that actually changed was the string chicken, every other chicken stayed the same