-
Notifications
You must be signed in to change notification settings - Fork 33
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
Remove hard casts to ModFile
and co
#67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, we can finally get rid of all the needless hardcoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question. Rest looks good
FMLLoader.getLoadingModList().getModFiles().stream() | ||
.filter(ModFileInfo::missingLicense) | ||
.filter(modFileInfo -> modFileInfo.getMods().stream().noneMatch(thisModInfo -> this.loadingExceptions.stream().map(ModLoadingException::getModInfo).anyMatch(otherInfo -> otherInfo == thisModInfo))) //Ignore files where any other mod already encountered an error | ||
.map(modFileInfo -> new ModLoadingException(null, ModLoadingStage.VALIDATE, "fml.modloading.missinglicense", null, modFileInfo.getFile())) | ||
.forEach(this.loadingExceptions::add); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not part of the proposed changes why did you add it?
My personal opinion is that making |
@Matyrobbrt Do we wanna kill this? |
We ended up marking IModFile as NonExtendable instead. |
* Removed deprecated methods (cherry picked from commit 72f8d15)
Removes the hard casts to
ModFile
, to makeIModFile
extendable. In order to achieve this, a few more methods were added to SPI.