Duplicate keys in mappings
Prometheius opened this issue ยท 18 comments
Crash with most recent commit of EE3.
full crash log: http://pastebin.com/j9jDmVug
---- Minecraft Crash Report ----
// Why is it breaking :(
Time: 11/8/13 12:13 AM
Description: Initializing game
java.lang.IllegalArgumentException: Duplicate keys in mappings 1xitemStack[387:0:item.writtenBook:net.minecraft.item.ItemEditableBook]=[ CORPOREAL:180.0 ] and 1xitemStack[387:0:item.writtenBook:net.minecraft.item.ItemEditableBook]=[ CORPOREAL:180.0 ]
at com.google.common.collect.ImmutableSortedMap.validateEntries(ImmutableSortedMap.java:304)
at com.google.common.collect.ImmutableSortedMap.access$100(ImmutableSortedMap.java:61)
at com.google.common.collect.ImmutableSortedMap$Builder.build(ImmutableSortedMap.java:416)
at com.pahimar.ee3.emc.EmcRegistry.init(EmcRegistry.java:68)
at com.pahimar.ee3.emc.EmcRegistry.lazyInit(EmcRegistry.java:36)
at com.pahimar.ee3.EquivalentExchange3.modsLoaded(EquivalentExchange3.java:164)
...
...
...
A detailed walkthrough of the error, its code path and all known details is as follows:
-- Head --
Stacktrace:
at com.google.common.collect.ImmutableSortedMap.validateEntries(ImmutableSortedMap.java:304)
at com.google.common.collect.ImmutableSortedMap.access$100(ImmutableSortedMap.java:61)
at com.google.common.collect.ImmutableSortedMap$Builder.build(ImmutableSortedMap.java:416)
at com.pahimar.ee3.emc.EmcRegistry.init(EmcRegistry.java:68)
at com.pahimar.ee3.emc.EmcRegistry.lazyInit(EmcRegistry.java:36)
at com.pahimar.ee3.EquivalentExchange3.modsLoaded(EquivalentExchange3.java:164)
...
...
...
First, sorry about the huge lettering, I don't what caused it to get that big.
Additional info, EE3 loads up just fine if it is the only mod installed. Unfortunately, I don't know which of the 200+ mods is causing the issue.
(I figured out what causes the huge lettering, it's the line of dashes that the crash log had.)
It happens when you're using a customized launcher I think (MultiMC maybe)?
Also, pahimar is looking into it, so yeah.
@pahimar So to recap:
Mods sometimes add recipe for written books.
These recipes will create the same itemstack, but with other NBT data.
EE3 does not block recipes of itemstacks with NBT data, blocking this will probably fix this issue.
Pahimar and I where talking about this. Do you have a mod that changes something about books and in particular the written book? For some weird reason ee3 is able to find the EMC value of the written book, but there is no recipe in vanilla that makes a written book. When ee3 knows the EMC value for the book it will be able to use the copy recipe in vanilla, which turns one written book into two written books, for finding another emc value for the written book (that's probably causing the crash).
I think that's the only reason this could happen, but it's good it happens now, so it can be fixed before the next official build.
There probably is something more to this (it shouldn't try to find a recipe when it already has one).
You are sort of correct. After using Craft Guide I found that I have two mods that have items that MC recognizes as a "Written Book" and have the same item ID as the "Written Book".
Father Toast's 'Utility Mobs' has 6 manuals that can be created (they don't show up in NEI but do show up in Craft Guide).
http://www.minecraftforum.net/topic/1736145-
Recipes:
Book + Pumpkin -> Golem Manual
Book + Dispenser -> Turret Manual
Book + Ender Pearl -> Turret Upgrades Manual
Book + Skeleton Skull -> Block Golem Manual
Book + Rotten Flesh -> Mob Target List
Book + Wither Skull -> Hostile Golem Manual (currently unsused)
Book + Bone -> Player Permissions (MC didn't list this when I searched for "written" in Craft Guide.
.
.
skyboy026's version of 'MineFactory Reloaded' has a "PRC Owner's Manual" that can be created (this shows up in NEI and Craft Guide).
http://www.minecraftforum.net/topic/2016680-
Recipe:
Smelt MFR raw rubber -> Smelt MFR rubber bar -> MFR raw plastic
OR
Smelt/Extract IC2 rubber resin/wood/sapling -> Smelt rubber ball -> MFR raw plastic
http://i.imgur.com/7kyYE.png
crafting: 4 MFR raw plastic -> MFR plastic sheets
http://i.imgur.com/9LVqB.png
crafting: MFR plastic sheets + redstone dust + book -> "PRC Owner's Manual"
http://i.imgur.com/WQ0qgFa.png
I just tried Wliu's build of the latest commit. When I added EE3 to my mods directory, MC loaded up with no errors or crashes. When I added Energy From Matter, Equivalency and LomLib, the game crashed on startup.
I have a stubbed in comment to remind me to add duplicate key protection, I'll write the bit to trunk tonight so that we can close this issue.
He just said it's an issue with EE3 and that it's on his todo list. The only thing Equivalency interacts with EE3 is using the Minium/Philosophers stone. At the moment, it does NOT interact with the DynEMC system at all.
I just tried again adding only the most recent version of EE3, MC starts up with zero errors. When I use a prior version MC crashes on startup. Also, when I use the most recent version of EE3 with EMF, MC starts up with zero errors.
So the current issue isn't EE3, it's something to do with Equivalency and it's interaction with EE3.
k. I guess I'll have to take everyone's word on it. It's just weird that MC doesn't crash when I add EE3 and EFM to the mods directory and I can play as I usually do, but when Equivalency is added MC EE3 errors and MC crashes on startup.
I don't know if it would help, but if it's needed/wanted I can get a full Forge log for MC working with EE3 + EFM and a full Forge log + crashlog when Equivalency is added.
If it's not needed, my final words in here are AWESOME MODS EVERYONE. Thank you for your patience with my newbness.
@Prometheius As already stated in the duplicate issue, the crash is being caused by
Multiple recipes that output item stacks that only differ in the NBT value.
Forgot that this still existed. Getting more reports from the thread :P
http://pastebin.com/ZtTtfJRU
Related to #487
Going to close this one so that we can track duplicate map entry problems on #487
Please test with the current code base. I think it's fixed now.