-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow NAE2 Upgrade Cards in AE2FC Dual Interfaces
- Loading branch information
1 parent
7afde6a
commit ca923ed
Showing
5 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/com/nomiceu/nomilabs/integration/nae2/AE2FCIntegration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.nomiceu.nomilabs.integration.nae2; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraftforge.fml.common.Optional; | ||
|
||
import com.glodblock.github.loader.FCBlocks; | ||
import com.glodblock.github.loader.FCItems; | ||
|
||
import co.neeve.nae2.NAE2; | ||
import co.neeve.nae2.common.registration.definitions.Upgrades; | ||
|
||
/** | ||
* Temporary class to add NAE2 upgrade card support to AE2 FC Interfaces. | ||
*/ | ||
public class AE2FCIntegration { | ||
|
||
public static void postInit() { | ||
Upgrades upgrades = NAE2.definitions().upgrades(); | ||
|
||
if (upgrades.autoComplete().isEnabled()) | ||
registerUpgradeFc(Upgrades.UpgradeType.AUTO_COMPLETE); | ||
if (upgrades.gregtechCircuit().isEnabled()) | ||
registerUpgradeFc(Upgrades.UpgradeType.GREGTECH_CIRCUIT); | ||
} | ||
|
||
@Optional.Method(modid = "nae2") | ||
private static void registerUpgradeFc(Upgrades.UpgradeType upgrade) { | ||
upgrade.registerItem(new ItemStack(FCBlocks.DUAL_INTERFACE), 1); | ||
upgrade.registerItem(new ItemStack(FCItems.PART_DUAL_INTERFACE), 1); | ||
} | ||
} |