AgriCraft

AgriCraft

30M Downloads

Improper item removal

sfPlayer1 opened this issue ยท 3 comments

commented

After updating from version 1.2.3 to 1.4.0 the following blocks/items are being reported as missing:

AgriCraft:cropMelon
AgriCraft:cropPumpkin
AgriCraft:cropPumpkin
AgriCraft:cropMelon
AgriCraft:sprinklerItem

If they are supposed to be removed, FMLMissingMappingsEvent (FML @mod event) should be used to explicitly ignore the missing mapping.

commented

Didn't know that, I'll go take a look at it, thanks for letting me know.

commented

It's probably as easy as this:

@EventHandler
public void onMissingMappings(FMLMissingMappingsEvent event) {
    for (MissingMapping mapping : event.get()) {
        if (dropped.contains(mapping.name)) {
            mapping.ignore();
        }
    }
}

with dropped being a set with all removed names (like AgriCraft:cropMelon).

commented

I'll finish some more things and then I'll push a new build to CurseForge.