TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Adding custom data for a food crashes because it adds the food twice to the Creative Mode tab.

CKenJa opened this issue ยท 3 comments

commented

When adding a custom JSON file for a food item not included in TFC to a data pack, the game crashes because the same food item is added twice to the Creative Mode tab.

Steps to Reproduce:

Add the custom JSON file for the food item not included in TFC to a data pack.
Launch the game and enter Creative Mode.
Notice that the same food item appears twice in the Creative Mode tab.
Attempting to select the item results in a crash with the message: java.lang.IllegalStateException: Accidentally adding the same item stack twice [Sweet Roll] to a Creative Mode Tab: Search Items.

Expected Behavior:

Adding the custom JSON file for the food item to a data pack should only add the item once to the Creative Mode tab, without causing a crash.

Current Behavior:

Adding the custom JSON file for the food item to a data pack results in the item being added twice to the Creative Mode tab, causing a crash.

Related Code or Files:

Attached is the custom JSON file for the food item that causes the crash:
sweet_roll.json
crash-2024-03-03_18.11.45-client.txt

commented

food with data added in JSON showed up in the Creative Inventory search field two at a time, but only one at a time for those that did not.
It is unclear which mod conflicts are the cause; in addition to Create and TFC, at least two more mods seem to be involved.
2024-03-05_10 21 19

commented

This does not make sense. I've seen this report before but only with reference to create's "sweet roll". TFC does not do anything to add food items to creative tabs, nor does the presence of food affect creative tabs in any way. In addition we've had plenty of cases of adding food for mods with no conflicts. This seems almost certainly like a conflict either create or a forge interaction.


Moreover, I cannot reproduce this crash. With the listed version of Create + the attached file, it works fine.

image

commented

Closing as unreproducible.