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

crash with ic2 classic #41

Open
Trinsdar opened this issue Feb 15, 2019 · 1 comment
Open

crash with ic2 classic #41

Trinsdar opened this issue Feb 15, 2019 · 1 comment

Comments

@Trinsdar
Copy link
Contributor

Trinsdar commented Feb 15, 2019

so I ran this with ic2 classic and it crashed saying an int was being casted to a collection.
https://paste.dimdev.org/uroyejiqun.sql

minecraft 1.12.2
forge 14.23.5.2811
mfss 1.12 4.0.1

I'm guessing this line somehow doesn't work with ic2 classic?

https://github.com/nekosune/modularforcefieldsystem/blob/fc0616f53af992b94fa0c2c63d9f9d07dec14ffa/src/main/java/com/nekokittygames/mffs/common/MFFSRecipes.java#L44

Maybe an if loaded check should be added for that line that checks if ic2 classic is not loaded?

@Chocohead
Copy link
Contributor

That's a bug in Classic's ropey API support. Recipes#matterAmplifier is defined as a map from IRecipeInput to Integers that is applied to ItemStacks. Classic's BasicMachineRecipeList#toIC2Exp raw casts an anonymous IBasicMachineRecipeManager which is only really designed for IRecipeInput to Collection<ItemStack> (applied to ItemStacks). For your macerator type machine that is fine as they're defined using that, but for any of the others this will result in class cast exceptions as Java isn't type checking if the casts are really valid until runtime.

MFFS should work fine otherwise as it is using the API correctly everywhere as far as I can tell.

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

No branches or pull requests

2 participants