Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split-off coremod and mod classes #2604

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Split-off coremod and mod classes due to classloading errors with Spo…
…ngeForge
  • Loading branch information
Sergey Shatunov committed Nov 12, 2016
commit a1c161cda2553d5546617e00a6a2f38c5d29d7b6
82 changes: 82 additions & 0 deletions src/main/java/appeng/transformer/AppEng.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/

package appeng.transformer;

import com.google.common.eventbus.EventBus;

import net.minecraftforge.fml.common.DummyModContainer;
import net.minecraftforge.fml.common.LoadController;
import net.minecraftforge.fml.common.ModMetadata;

import appeng.core.AEConfig;

public final class AppEng extends DummyModContainer
{
private final ModMetadata metadata = new ModMetadata();

public AppEng()
{
this.metadata.autogenerated = false;
this.metadata.authorList.add( "AlgorithmX2" );
this.metadata.credits = "AlgorithmX2";
this.metadata.modId = this.getModId();
this.metadata.version = this.getVersion();
this.metadata.name = this.getName();
this.metadata.url = "http://ae2.ae-mod.info";
this.metadata.logoFile = "assets/appliedenergistics2/meta/logo.png";
this.metadata.description = "Embedded Coremod for Applied Energistics 2";
}

@Override
public ModMetadata getMetadata()
{
return this.metadata;
}

@Override
public String getModId()
{
return "appliedenergistics2-core";
}

@Override
public String getName()
{
return "Applied Energistics 2 Core";
}

@Override
public String getVersion()
{
return AEConfig.VERSION;
}

@Override
public boolean registerBus( final EventBus bus, final LoadController controller )
{
return true;
}

@Override
public String getDisplayVersion()
{
return this.getVersion();
}

}
65 changes: 2 additions & 63 deletions src/main/java/appeng/transformer/AppEngCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,17 @@

import javax.annotation.Nullable;

import com.google.common.eventbus.EventBus;

import net.minecraftforge.fml.common.DummyModContainer;
import net.minecraftforge.fml.common.LoadController;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.relauncher.FMLRelaunchLog;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.MCVersion;

import appeng.core.AEConfig;


@MCVersion( "1.10.2" )
public final class AppEngCore extends DummyModContainer implements IFMLLoadingPlugin
public final class AppEngCore implements IFMLLoadingPlugin
{
private final ModMetadata metadata = new ModMetadata();

public AppEngCore()
{
FMLRelaunchLog.info( "[AppEng] Core Init" );
this.metadata.autogenerated = false;
this.metadata.authorList.add( "AlgorithmX2" );
this.metadata.credits = "AlgorithmX2";
this.metadata.modId = this.getModId();
this.metadata.version = this.getVersion();
this.metadata.name = this.getName();
this.metadata.url = "http://ae2.ae-mod.info";
this.metadata.logoFile = "assets/appliedenergistics2/meta/logo.png";
this.metadata.description = "Embedded Coremod for Applied Energistics 2";
}

@EventHandler
public void load( final FMLInitializationEvent event )
{
}

@Override
Expand All @@ -70,7 +45,7 @@ public String[] getASMTransformerClass()
@Override
public String getModContainerClass()
{
return "appeng.transformer.AppEngCore";
return "appeng.transformer.AppEng";
}

@Nullable
Expand All @@ -92,40 +67,4 @@ public String getAccessTransformerClass()
return "appeng.transformer.asm.ASMTweaker";
}

@Override
public ModMetadata getMetadata()
{
return this.metadata;
}

@Override
public String getModId()
{
return "appliedenergistics2-core";
}

@Override
public String getName()
{
return "Applied Energistics 2 Core";
}

@Override
public String getVersion()
{
return AEConfig.VERSION;
}

@Override
public boolean registerBus( final EventBus bus, final LoadController controller )
{
return true;
}

@Override
public String getDisplayVersion()
{
return this.getVersion();
}

}