mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 18:55:06 +00:00
Fix FMP integration. All normal blocks are now auto registered.
Fixes #89 Fixes #93
This commit is contained in:
1 parent
9d63c73e99
commit
1920feeb1d
9 files changed
+59
-257
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package com.cricketcraft.chisel.compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
@@ -8,12 +10,30 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class Compatibility {
|
||||
|
||||
public static void init(FMLPostInitializationEvent event) {
|
||||
new VariationCompat().postInit(event);
|
||||
public static String[] rockColorNames = { "gray", "lightgray", "brown", "tan", "reddish", "bluish", "greenish" };
|
||||
|
||||
public static void init(FMLPostInitializationEvent event) {
|
||||
|
||||
/* Proj Red */
|
||||
addSupport("ProjRed|Exploration", "projectred.exploration.stone", "marble", 0, 99);
|
||||
|
||||
/* Bluepower */
|
||||
addSupport("bluepower", "marble", "marble", 0, 99);
|
||||
|
||||
/* Artifice */
|
||||
addSupport("Artifice", "artifice.marble", "marble", 0, 99);
|
||||
addSupport("Artifice", "artifice.marble.slab", "marble_slab", 0, 99);
|
||||
for (String s : rockColorNames) {
|
||||
addSupport("Artifice", "artifice.limestone." + s, "limestone", 0, 99);
|
||||
}
|
||||
|
||||
/* Mariculture */
|
||||
Block block = GameRegistry.findBlock("mariculture", "limestone");
|
||||
for (int i = 0; i < 16; i++) {
|
||||
addSupport("limestone", block, i, 99);
|
||||
}
|
||||
|
||||
/* Geologica */
|
||||
addSupport("PFAAGeologica", "strongStone", "marble", 5, 99);
|
||||
addSupport("PFAAGeologica", "strongStoneSlab", "marbleSlab", 5, 99);
|
||||
addSupport("PFAAGeologica", "strongStoneBrickStairs.marble", "marbleStairs", 0, 99);
|
||||
@@ -26,7 +46,11 @@ public class Compatibility {
|
||||
|
||||
public static void addSupport(String modname, String blockname, String name, int metadata, int order) {
|
||||
if (Loader.isModLoaded(modname) && GameRegistry.findBlock(modname, blockname) != null) {
|
||||
Carving.chisel.addVariation(name, GameRegistry.findBlock(modname, blockname), metadata, order);
|
||||
addSupport(name, GameRegistry.findBlock(modname, blockname), metadata, order);
|
||||
}
|
||||
}
|
||||
|
||||
public static void addSupport(String name, Block block, int metadata, int order) {
|
||||
Carving.chisel.addVariation(name, block, metadata, order);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user