Applied Energistics 2

Applied Energistics 2

137M Downloads

Re-evaluating the coremod

yueh opened this issue ยท 2 comments

commented

The core mod currently serves 3 purposes, each one should be re-evaluated and when existing replaced with better alternatives.

  • Stripping methods/interface
  • Access transformers
  • Patching minecraft core classes

Stripping methods/interface

Only use case is to remove methods/interfaces from our own classes. Compared to @Optional it supports generics and can also be disabled by a config setting and not just based on API present?.

Alternatives would be moving purely to capabilites, which are injected by forge either on a field or method.
The field approach would make the config option a bit harder. So the method based one would be preferable. Hoping that forge injects it after we had a chance to load the configuration file.

Moving to @Optional would be another option. Due to the issues with generics and it is being impossible to disable any integration through a config option, we should not rely on it too much and still be able to deactivate any integration based on the configuration.

Access transformers

Can simply be moved to a access transformer file. Some of the transformation of internal classes might even be removable. These were mostly needed for integrations like immibis microblocks.

Patching minecraft core classes

Most likely the blocking issue to remove the core mod completely. But we should still consider it. Maybe there are options now provided by forge or even vanilla minecraft.

commented

@shartte that is the problem with forge. But at least vanished documentation has the option to be found again.

iirc the reason against ATs was mostly about "No AT except you have to access it constantly. Otherwise use reflection". Due to the usual information loss it probably became "No AT".

commented

Sorry to annoy you, but please take a look at AEModernMCPort#105. Thanks!