Removed AEApi
Moved all internal access to the internal `Api` class using a new static getter.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.core;
|
||||
|
||||
import appeng.api.AEAddon;
|
||||
import appeng.api.IAppEngApi;
|
||||
import appeng.api.features.IRegistryContainer;
|
||||
import appeng.api.networking.IGridHelper;
|
||||
@@ -31,8 +32,26 @@ import appeng.core.features.registries.PartModels;
|
||||
import appeng.core.features.registries.RegistryContainer;
|
||||
|
||||
public final class Api implements IAppEngApi {
|
||||
|
||||
/**
|
||||
* While permitting public access, directly using {@link Api#instance()} is not
|
||||
* recommended except in very special cases.
|
||||
*/
|
||||
public static final Api INSTANCE = new Api();
|
||||
|
||||
/**
|
||||
* Use primarily to access the API.
|
||||
*
|
||||
* Using {@link IAppEngApi} intentionally to avoid using functionality not
|
||||
* exposed by accident.
|
||||
*
|
||||
* In some cases we might have to access the API before it is announced via
|
||||
* {@link AEAddon}, otherwise we could just inject it into AE2 itself.
|
||||
*/
|
||||
public static IAppEngApi instance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private final ApiPart partHelper;
|
||||
|
||||
// private MovableTileRegistry MovableRegistry = new MovableTileRegistry();
|
||||
|
||||
Reference in New Issue
Block a user