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

Other mod are compatible with coal dust #297

Open
ziyanyaolong opened this issue Sep 24, 2023 · 3 comments
Open

Other mod are compatible with coal dust #297

ziyanyaolong opened this issue Sep 24, 2023 · 3 comments
Labels
bug A bug has been found! code work Needs code implementation enhancement help wanted playtest This pull request needs to be tested before ready

Comments

@ziyanyaolong
Copy link

ziyanyaolong commented Sep 24, 2023

(The following is translated by machine)

Tested version:1.20.x, 1.21.x

I was playing this mod recently and found an issue, I don't know if it's a bug.

When I add coal dust to the resistor's slot, only a portion of the mod's coal dust can be added to this slot(such as EnderIO), so I read the code, and make the following changes:

In ElectricalAge-1.20.x\src\main\java\mods\eln\gui\ItemStackFilter.java, line: 50:

@Override
public boolean tryItemStack(ItemStack itemStack) {
    if (Utils.getItemId(itemStack) != itemId)
        return false;
    if ((itemStack.getItemDamage() & damageMask) != damageValue)
        return false;
    return true;
}

Change to:

@Override
public boolean tryItemStack(ItemStack itemStack) {
    if (Utils.getItemId(itemStack) != itemId)
        return false;
    if (itemStack.getItemDamage() != damageValue)
        return false;
    return true;
}

After this change, it is possible to identify other mods' coal dust.
Here is the test plot:
GT5 (Cannot add):
111
EnderIO (Can add):
222

@TheNicolasDeveloper
Copy link

You should make a pull request for this.

@ziyanyaolong
Copy link
Author

You should make a pull request for this.

I haven't sent a pull request to anyone's project yet, but I thought I'd give it a try.

@jrddunbr
Copy link
Collaborator

jrddunbr commented Nov 9, 2023

I looked at the PR and I'm not sure it's the right solution, but if someone wants to build it for themselves and use that I have no problem with that.

@jrddunbr jrddunbr added bug A bug has been found! enhancement help wanted playtest This pull request needs to be tested before ready code work Needs code implementation labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug has been found! code work Needs code implementation enhancement help wanted playtest This pull request needs to be tested before ready
Projects
None yet
Development

No branches or pull requests

3 participants