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:
thatsIch
2015-05-16 20:48:32 +02:00
parent 4b5fd35056
commit 192848e383
33 changed files with 151 additions and 159 deletions
+4 -2
View File
@@ -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
@@ -38,6 +38,8 @@ import appeng.core.api.imc.IMCSpatial;
*/
public class IMCHandler
{
private static final int INITIAL_PROCESSORS_CAPACITY = 20;
/**
* Contains the processors,
*
@@ -51,7 +53,7 @@ public class IMCHandler
*/
public IMCHandler()
{
this.processors = new HashMap<String, IIMCProcessor>();
this.processors = new HashMap<String, IIMCProcessor>( INITIAL_PROCESSORS_CAPACITY );
this.processors.put( "blacklist-block-spatial", new IMCBlackListSpatial() );
this.processors.put( "whitelist-spatial", new IMCSpatial() );