Skip to content

EMI registry duplication of upgraded turtles and pocket computers #2463

Description

@DadoIrie

Minecraft Version

1.21.1

Version

1.120.0 (but also before that)

Details

instead of explaining it I'll simply post my changes I did with my own kitchen sink mod in order to fix various issues of all kinda mods:

as a sidenote & clarification: the issue is happening with only EMI and CC in the instance - meaning it ain't a mod issue caused by another mod

    public void register(EmiRegistry registry) {
        registry.setDefaultComparison(ModRegistry.Items.TURTLE_NORMAL.get(), turtleComparison);
        registry.setDefaultComparison(ModRegistry.Items.TURTLE_ADVANCED.get(), turtleComparison);
        registry.setDefaultComparison(ModRegistry.Items.POCKET_COMPUTER_NORMAL.get(), pocketComparison);
        registry.setDefaultComparison(ModRegistry.Items.POCKET_COMPUTER_ADVANCED.get(), pocketComparison);

        for (var stack : RecipeModHelpers.getExtraStacks(Minecraft.getInstance().level.registryAccess())) {
            EmiStack emiStack = EmiStack.of(stack);

            boolean alreadyRegistered = EmiStackList.stacks.stream()
                    .anyMatch(s -> s.equals(emiStack));

            if (!alreadyRegistered) {
                registry.addEmiStack(emiStack);
            }
        }
    }

BEFORE: (without mixin)
Image

AFTER: (with mixin)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem or unexpected behaviour with the mod.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions