Merge pull request #1466 from thatsIch/e-instance-factory
Uses an instance factory access for AE2
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
|
||||
@@ -29,7 +29,7 @@ import appeng.api.exceptions.RegistrationError;
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IIngredient;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IRC;
|
||||
import appeng.recipes.RecipeHandler;
|
||||
@@ -61,9 +61,9 @@ public class Crusher implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if( AppEng.instance.isIntegrationEnabled( IntegrationType.RC ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.RC ) )
|
||||
{
|
||||
IRC rc = (IRC) AppEng.instance.getIntegration( IntegrationType.RC );
|
||||
IRC rc = (IRC) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.RC );
|
||||
for( ItemStack is : this.pro_input.getItemStackSet() )
|
||||
{
|
||||
try
|
||||
|
||||
@@ -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
|
||||
@@ -29,7 +29,7 @@ import appeng.api.exceptions.RegistrationError;
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IIngredient;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IFZ;
|
||||
import appeng.recipes.RecipeHandler;
|
||||
@@ -61,9 +61,9 @@ public class GrindFZ implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if( AppEng.instance.isIntegrationEnabled( IntegrationType.FZ ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.FZ ) )
|
||||
{
|
||||
IFZ fz = (IFZ) AppEng.instance.getIntegration( IntegrationType.FZ );
|
||||
IFZ fz = (IFZ) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.FZ );
|
||||
for( ItemStack is : this.pro_input.getItemStackSet() )
|
||||
{
|
||||
try
|
||||
|
||||
@@ -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
|
||||
@@ -29,7 +29,7 @@ import appeng.api.exceptions.RegistrationError;
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IIngredient;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IIC2;
|
||||
import appeng.recipes.RecipeHandler;
|
||||
@@ -61,9 +61,9 @@ public class Macerator implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if( AppEng.instance.isIntegrationEnabled( IntegrationType.IC2 ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.IC2 ) )
|
||||
{
|
||||
IIC2 ic2 = (IIC2) AppEng.instance.getIntegration( IntegrationType.IC2 );
|
||||
IIC2 ic2 = (IIC2) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.IC2 );
|
||||
for( ItemStack is : this.pro_input.getItemStackSet() )
|
||||
{
|
||||
try
|
||||
|
||||
@@ -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
|
||||
@@ -29,7 +29,7 @@ import appeng.api.exceptions.RegistrationError;
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IIngredient;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IMekanism;
|
||||
import appeng.recipes.RecipeHandler;
|
||||
@@ -62,9 +62,9 @@ public class MekCrusher implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if( AppEng.instance.isIntegrationEnabled( IntegrationType.Mekanism ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.Mekanism ) )
|
||||
{
|
||||
IMekanism rc = (IMekanism) AppEng.instance.getIntegration( IntegrationType.Mekanism );
|
||||
IMekanism rc = (IMekanism) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.Mekanism );
|
||||
for( ItemStack is : this.pro_input.getItemStackSet() )
|
||||
{
|
||||
try
|
||||
|
||||
@@ -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
|
||||
@@ -29,7 +29,7 @@ import appeng.api.exceptions.RegistrationError;
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IIngredient;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IMekanism;
|
||||
import appeng.recipes.RecipeHandler;
|
||||
@@ -61,9 +61,9 @@ public class MekEnrichment implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if( AppEng.instance.isIntegrationEnabled( IntegrationType.Mekanism ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.Mekanism ) )
|
||||
{
|
||||
IMekanism rc = (IMekanism) AppEng.instance.getIntegration( IntegrationType.Mekanism );
|
||||
IMekanism rc = (IMekanism) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.Mekanism );
|
||||
for( ItemStack is : this.pro_input.getItemStackSet() )
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user