Skip to content

Commit

Permalink
Add integration type for CoFH IToolHammer
Browse files Browse the repository at this point in the history
  • Loading branch information
firenoo committed Oct 10, 2023
1 parent 5cd467b commit f3594c1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
5 changes: 4 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ dependencies {
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.17-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:waila:1.6.0:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.0:api') {transitive = false}

compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api')
compileOnly('curse.maven:minefactory-reloaded-66672:2366150')
compileOnly('pneumaticCraft:PneumaticCraft-1.7.10:1.12.7-152:api') {transitive = false}
compileOnly('curse.maven:better-storage-232919:2731636')
compileOnly('api:immibis:1')

// Uncomment to add thermal expansion + foundation for testing
// runtimeOnlyNonPublishable('curse.maven:thermal-foundation-222880:2388753')
// runtimeOnlyNonPublishable('curse.maven:thermal-expansion-69163:2388759')

testImplementation('junit:junit:4.12')
functionalTestImplementation(platform('org.junit:junit-bom:5.9.2'))
functionalTestImplementation('org.junit.jupiter:junit-jupiter')
Expand Down
1 change: 1 addition & 0 deletions src/main/java/appeng/integration/IntegrationType.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public enum IntegrationType {
RF(IntegrationSide.BOTH, "RedstoneFlux Power - Tiles", "CoFHAPI"),

RFItem(IntegrationSide.BOTH, "RedstoneFlux Power - Items", "CoFHAPI"),
CoFHWrench(IntegrationSide.BOTH, "CoFHWrench", "CoFHAPI"),

MFR(IntegrationSide.BOTH, "Mine Factory Reloaded", "MineFactoryReloaded"),

Expand Down
21 changes: 21 additions & 0 deletions src/main/java/appeng/integration/modules/CoFHWrench.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package appeng.integration.modules;

import appeng.helpers.Reflected;
import appeng.integration.IIntegrationModule;
import appeng.integration.IntegrationHelper;

public class CoFHWrench implements IIntegrationModule {

@Reflected
public static CoFHWrench instance;

public CoFHWrench() {
IntegrationHelper.testClassExistence(this, cofh.api.item.IToolHammer.class);
}

@Override
public void init() {}

@Override
public void postInit() {}
}
9 changes: 4 additions & 5 deletions src/main/java/appeng/transformer/asm/ASMIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ public final class ASMIntegration implements IClassTransformer {

@Reflected
public ASMIntegration() {

/**
* Side, Display Name, ModID ClassPostFix
*/
for (final IntegrationType type : IntegrationType.values()) {
IntegrationRegistry.INSTANCE.add(type);
}

// These are kept so we don't have to search through git for stuff like this
/*
* Side, Display Name, ModID ClassPostFix
*/
// integrationModules.add( IntegrationSide.BOTH, "Thermal Expansion", "ThermalExpansion", IntegrationType.TE );
// integrationModules.add( IntegrationSide.BOTH, "Mystcraft", "Mystcraft", IntegrationType.Mystcraft );
// integrationModules.add( IntegrationSide.BOTH, "Greg Tech", "gregtech_addon", IntegrationType.GT );
Expand Down

0 comments on commit f3594c1

Please sign in to comment.