Skip to content

Copy of EngineCrafter77's PR "Updated to latest version of ImmersiveEngineering" - #1

Merged
NuclearManD merged 12 commits into
NuclearManD:masterfrom
Enginecrafter77:master
May 31, 2022
Merged

Copy of EngineCrafter77's PR "Updated to latest version of ImmersiveEngineering"#1
NuclearManD merged 12 commits into
NuclearManD:masterfrom
Enginecrafter77:master

Conversation

@NuclearManD

Copy link
Copy Markdown
Owner

Copy of EngineCrafter77's text:

This PR aims to provide better compatibility with the latest version of Immersive Engineering for 1.12.2.

Additional features include:

Greatly simplified the codebase
Removed some of Immersive Engineering circumventions
Fixed bad coding practices (CodeFactor.io rated as A)
Updated build.gradle to use later version of forge and stable MCP mappings (stable_39)
Added config translations
Simplified the config menu
Removed registry name dependency on translation keys (see minecraft forge documentation on how bad this is)
Added config option to use IE's creative tab instead of creating new one
The mod was tested on both singleplayer and dedicated server, all seems well. It would be good if you made a new version out of this.

See original: Pull Request 13

Some weird variable name indentation using tabs was fixed. Tabs are cool, but variable type should be separated using SINGLE space from variable's name.
Line 70 and 71 of ALternatingFlux.java were using legacy string key-based registration. As this method is (was?) deprecated, I replaced it with the standard ResourceLocation-based registration. It was done in background anyways, but this eliminates the need to do additional checks.
Well, not exactly the latest, but the latest usable forge version. Newer versions require Forge Gradle 3, which works only for MC 1.13+.
Also, general optimizations were done to the codebase.
The ItemIEBase was absolutely unsuitable to inherit from, since it does nothing besides promoting bad coding practice of tying registry names together with translation keys. Minecraft Forge officially states that this kind of relationship is considered a bad coding practice. As such, it was removed, and replaced with much cleaner implementation.
The code was moved over to BlockAFTileProvider
As stated in the last commit, the registry names have nothing to do with translation keys. This commit is a final sentence to that statement. It completely removes the leftover dependance in the main mod class, and also increases flexibility a little bit (See BlockUnregisteredIETileProvider).
The oridinal integer seemed like a remant from copy of the original IE class ItemWireCoil. As such, I removed it to only cover the needs of the AF system.
Moved the manual managing code to standalone class.
Also, JEI was added as runtime-only dependency, so the recipes are easier to navigate.
Fixed 2 switch statements without default case and 1 empty if block.
@NuclearManD
NuclearManD merged commit 67ebe70 into NuclearManD:master May 31, 2022
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