From the very top of your crash report:
Also, please share a link to your logs or crash reports on paste.ee in future rather than dumping it directly in the forums, as it becomes hard to read on mobile.
The log is here https://pastebin.com/eK7U0a9b
I have the following mods:
1.alexsdelight-1.4.1
2.alexsmobs-1.21.1
3.citadel-2.1.4-1.19
4.FarmersDelight-1.19.2-1.2.3
5.jei-1.19.2-forge-11.5.0.297
6.journeymap-1.19.2-5.9.0-forge
7.Optifine_1.19.2_HD_U_H9
8.sophisticatedbackpacks-1.19.2-3.19.1.960
9.sophisticatedcore-1.19.2-0.5.106.503
The error code is -1. If anyone can help please do.
i think the more suitable would be using the nbt format and use the ChestBlockEntity methods to get the items
other could be list all the registered items make a list and get the item from the list
Map<String, Item> lista_de_items = new HashMap<String, Item>();
int count = 0;
for (Map.Entry<net.minecraft.resources.ResourceKey<Item>, Item> ResourceKey : ForgeRegistries.ITEMS.getEntries()) {
Item actualItem = ResourceKey.getValue();//.defaultBlockState().getBlock();
String nnn = ForgeRegistries.ITEMS.getKey(actualItem).toString();
lista_de_items.put(nnn, actualItem);
System.out.println( count + " [" + nnn + "]" );
count++;
}
Item cosa = lista_de_items.get("minecraft:apple");