forked from AE2-UEL/AE2FluidCraft-Rework
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/byebyeEC2' into dev
- Loading branch information
Showing
28 changed files
with
1,457 additions
and
18 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
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
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/glodblock/github/crossmod/extracells/EC2Replacer.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.glodblock.github.crossmod.extracells; | ||
|
||
import java.util.List; | ||
|
||
import net.minecraft.item.Item; | ||
|
||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent; | ||
import cpw.mods.fml.common.registry.GameRegistry; | ||
|
||
public class EC2Replacer { | ||
|
||
/** | ||
* Should be called if and only if replaceEC2 config is true and EC2 not present. Registers proxy items for the | ||
* entire EC2 mod. After running this once, you should set replaceEC2 back to false. | ||
*/ | ||
public static void initReplacer() { | ||
ItemReplacements.init(); | ||
} | ||
|
||
public static void replaceExtraCells(FMLMissingMappingsEvent event) { | ||
List<FMLMissingMappingsEvent.MissingMapping> mappings = event.getAll(); | ||
for (FMLMissingMappingsEvent.MissingMapping m : mappings) { | ||
if (m.type == GameRegistry.Type.ITEM && ItemReplacements.registry.containsKey(m.name)) { | ||
Item toRemap = ItemReplacements.registry.get(m.name); | ||
m.remap(toRemap); | ||
} else { | ||
m.warn(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.