2014-12-15 00:11:48 +00:00
|
|
|
package com.cricketcraft.chisel.compat;
|
|
|
|
|
|
2015-03-19 20:37:20 -04:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
2015-01-12 23:52:53 -05:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
|
|
2014-12-15 00:11:48 +00:00
|
|
|
import com.cricketcraft.chisel.carving.Carving;
|
2015-03-19 20:37:20 -04:00
|
|
|
import com.google.common.collect.Maps;
|
2014-08-13 16:58:37 +01:00
|
|
|
|
|
|
|
|
import cpw.mods.fml.common.Loader;
|
|
|
|
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
|
|
|
|
2015-01-07 19:50:18 -05:00
|
|
|
public class Compatibility {
|
2014-08-13 16:58:37 +01:00
|
|
|
|
2015-01-12 23:52:53 -05:00
|
|
|
public static String[] rockColorNames = { "gray", "lightgray", "brown", "tan", "reddish", "bluish", "greenish" };
|
|
|
|
|
|
2015-03-19 20:37:20 -04:00
|
|
|
public static Map<Integer, String> tconMap = Maps.newHashMap();
|
|
|
|
|
|
|
|
|
|
static
|
|
|
|
|
{
|
|
|
|
|
tconMap.put(0, "obsidian");
|
|
|
|
|
tconMap.put(1, "sandstone");
|
|
|
|
|
tconMap.put(2, "netherrack");
|
|
|
|
|
tconMap.put(3, "stonebricksmooth");
|
|
|
|
|
tconMap.put(12, "end_stone");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void init(FMLPostInitializationEvent event) {
|
2014-08-13 16:58:37 +01:00
|
|
|
|
2015-01-12 23:52:53 -05:00
|
|
|
/* Proj Red */
|
2015-01-07 19:50:18 -05:00
|
|
|
addSupport("ProjRed|Exploration", "projectred.exploration.stone", "marble", 0, 99);
|
2015-02-27 18:50:32 +00:00
|
|
|
addSupport("ProjRed|Exploration", "projectred.exploration.stone", "marble", 1, 99);
|
2015-01-12 23:52:53 -05:00
|
|
|
|
|
|
|
|
/* Bluepower */
|
2015-01-07 19:50:18 -05:00
|
|
|
addSupport("bluepower", "marble", "marble", 0, 99);
|
|
|
|
|
|
2015-01-12 23:52:53 -05:00
|
|
|
/* 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");
|
2015-01-15 03:16:02 -05:00
|
|
|
if (block != null) {
|
|
|
|
|
for (int i = 0; i < 16; i++) {
|
|
|
|
|
addSupport("limestone", block, i, 99);
|
|
|
|
|
}
|
2015-01-12 23:52:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Geologica */
|
2015-01-07 19:50:18 -05:00
|
|
|
addSupport("PFAAGeologica", "strongStone", "marble", 5, 99);
|
|
|
|
|
addSupport("PFAAGeologica", "strongStoneSlab", "marbleSlab", 5, 99);
|
|
|
|
|
addSupport("PFAAGeologica", "strongStoneBrickStairs.marble", "marbleStairs", 0, 99);
|
|
|
|
|
addSupport("PFAAGeologica", "mediumStone", "limestone", 0, 99);
|
|
|
|
|
addSupport("PFAAGeologica", "mediumStoneSlab", "limestoneSlab", 0, 99);
|
|
|
|
|
addSupport("PFAAGeologica", "mediumStoneBrickStairs.limestone", "limestoneStairs", 0, 99);
|
|
|
|
|
addSupport("PFAAGeologica", "strongStoneBrick", "stoneBrick", 3, 99);
|
|
|
|
|
addSupport("PFAAGeologica", "strongCobble", "cobblestone", 3, 99);
|
2015-02-28 14:43:26 +00:00
|
|
|
|
|
|
|
|
/* Thaumcraft TODO There is probably a cleaner way of doing this */
|
2015-03-01 11:45:01 -05:00
|
|
|
if (Loader.isModLoaded("Thaumcraft")) {
|
|
|
|
|
loadThaumcraftAspects();
|
2015-03-19 20:37:20 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (Integer i : tconMap.keySet())
|
|
|
|
|
{
|
|
|
|
|
addSupport("TConstruct", "decoration.multibrick", tconMap.get(i), i, 99);
|
|
|
|
|
addSupport("TConstruct", "decoration.multibrickfancy", tconMap.get(i), i, 99);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addSupport("TConstruct", "decoration.multibrickfancy", "stonebricksmooth", 14, 99);
|
|
|
|
|
addSupport("TConstruct", "decoration.multibrickfancy", "stonebricksmooth", 15, 99);
|
|
|
|
|
|
|
|
|
|
addSupport("Botania", "endStoneBrick", "end_stone", 12, 0);
|
|
|
|
|
}
|
2015-01-07 19:50:18 -05:00
|
|
|
|
|
|
|
|
public static void addSupport(String modname, String blockname, String name, int metadata, int order) {
|
|
|
|
|
if (Loader.isModLoaded(modname) && GameRegistry.findBlock(modname, blockname) != null) {
|
2015-01-12 23:52:53 -05:00
|
|
|
addSupport(name, GameRegistry.findBlock(modname, blockname), metadata, order);
|
2015-01-07 19:50:18 -05:00
|
|
|
}
|
|
|
|
|
}
|
2015-01-12 23:52:53 -05:00
|
|
|
|
|
|
|
|
public static void addSupport(String name, Block block, int metadata, int order) {
|
|
|
|
|
Carving.chisel.addVariation(name, block, metadata, order);
|
|
|
|
|
}
|
2015-03-01 11:45:01 -05:00
|
|
|
|
|
|
|
|
private static void loadThaumcraftAspects() {
|
2015-04-02 14:52:26 -04:00
|
|
|
// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestone, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));
|
|
|
|
|
// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestoneWall, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));
|
2015-03-01 11:45:01 -05:00
|
|
|
}
|
2014-08-13 16:58:37 +01:00
|
|
|
}
|