Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

二合一样板输入映像(ME)在接口终端中使用主控的名字显示 #156

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

foxwhite25
Copy link
Contributor

@foxwhite25 foxwhite25 commented Jan 27, 2025

    @Override
    public String getName() {
        if (hasCustomName()) {
            return getCustomName();
        }


        T m = getMaster();
        if (m == null) {
            return getLocalName();
        }
        StringBuilder name = new StringBuilder();


        name.append(m.getMachineCraftingIcon().getDisplayName());
        if (m.mInventory[m.getCircuitSlot()] != null) {
            name.append(" - ");
            ItemStack is = m.mInventory[m.getCircuitSlot()];
            if (is.getItem() != GTUtility.getIntegratedCircuit(0).getItem()) {
                name.append(is.getDisplayName());
                if (is.getItemDamage() > 0) {
                    name.append("@").append(is.getItemDamage());
                }
            } else {
                name.append(is.getItemDamage());
            }
        }


        return name.toString();
    }

@reobf reobf merged commit 0f6aec9 into reobf:master Jan 28, 2025
1 check passed
@reobf
Copy link
Owner

reobf commented Jan 28, 2025

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants