Uses an instance factory access for AE2
Removes the improper way to set itself into a public static non-final variable. Removes the direct access to the IntegrationRegistry from AppEng. Will be added at some later point somewhere else for non-singleton access. Constructor is set to package private to enable possible construction from unit tests. Are current not runnable sind it is currently tied to the FML Loader instance.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -23,7 +23,7 @@ import java.util.Comparator;
|
||||
|
||||
import appeng.api.config.SortDir;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IInvTweaks;
|
||||
import appeng.util.item.AEItemStack;
|
||||
@@ -114,9 +114,9 @@ public class ItemSorters
|
||||
return;
|
||||
}
|
||||
|
||||
if( AppEng.instance.isIntegrationEnabled( IntegrationType.InvTweaks ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.InvTweaks ) )
|
||||
{
|
||||
api = (IInvTweaks) AppEng.instance.getIntegration( IntegrationType.InvTweaks );
|
||||
api = (IInvTweaks) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.InvTweaks );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user