only load the Construction Marker if Robotics is present
This commit is contained in:
parent
3be9c9af37
commit
d0b144872d
1 changed files with 18 additions and 10 deletions
|
@ -34,6 +34,7 @@ import net.minecraft.stats.Achievement;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
|
@ -84,8 +85,6 @@ import buildcraft.builders.TileBlueprintLibrary;
|
||||||
import buildcraft.builders.TileBuilder;
|
import buildcraft.builders.TileBuilder;
|
||||||
import buildcraft.builders.TileConstructionMarker;
|
import buildcraft.builders.TileConstructionMarker;
|
||||||
import buildcraft.builders.TileFiller;
|
import buildcraft.builders.TileFiller;
|
||||||
import buildcraft.core.TileMarker;
|
|
||||||
import buildcraft.core.TilePathMarker;
|
|
||||||
import buildcraft.builders.TileQuarry;
|
import buildcraft.builders.TileQuarry;
|
||||||
import buildcraft.builders.blueprints.RealBlueprintDeployer;
|
import buildcraft.builders.blueprints.RealBlueprintDeployer;
|
||||||
import buildcraft.builders.schematics.SchematicAir;
|
import buildcraft.builders.schematics.SchematicAir;
|
||||||
|
@ -125,6 +124,8 @@ import buildcraft.builders.urbanism.UrbanistToolsIconProvider;
|
||||||
import buildcraft.core.CompatHooks;
|
import buildcraft.core.CompatHooks;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
|
import buildcraft.core.TileMarker;
|
||||||
|
import buildcraft.core.TilePathMarker;
|
||||||
import buildcraft.core.Version;
|
import buildcraft.core.Version;
|
||||||
import buildcraft.core.blueprints.SchematicRegistry;
|
import buildcraft.core.blueprints.SchematicRegistry;
|
||||||
import buildcraft.core.builders.schematics.SchematicBlockCreative;
|
import buildcraft.core.builders.schematics.SchematicBlockCreative;
|
||||||
|
@ -494,7 +495,9 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
schemes.registerSchematicBlock(architectBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
schemes.registerSchematicBlock(architectBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||||
schemes.registerSchematicBlock(builderBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
schemes.registerSchematicBlock(builderBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||||
|
|
||||||
schemes.registerSchematicBlock(constructionMarkerBlock, SchematicIgnore.class);
|
if (constructionMarkerBlock != null) {
|
||||||
|
schemes.registerSchematicBlock(constructionMarkerBlock, SchematicIgnore.class);
|
||||||
|
}
|
||||||
schemes.registerSchematicBlock(frameBlock, SchematicFree.class);
|
schemes.registerSchematicBlock(frameBlock, SchematicFree.class);
|
||||||
|
|
||||||
// Factories required to save entities in world
|
// Factories required to save entities in world
|
||||||
|
@ -536,10 +539,6 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
quarryBlock = (BlockQuarry) CompatHooks.INSTANCE.getBlock(BlockQuarry.class);
|
quarryBlock = (BlockQuarry) CompatHooks.INSTANCE.getBlock(BlockQuarry.class);
|
||||||
CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
|
CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
|
||||||
|
|
||||||
constructionMarkerBlock = (BlockConstructionMarker) CompatHooks.INSTANCE.getBlock(BlockConstructionMarker.class);
|
|
||||||
CoreProxy.proxy.registerBlock(constructionMarkerBlock.setBlockName("constructionMarkerBlock"),
|
|
||||||
ItemConstructionMarker.class);
|
|
||||||
|
|
||||||
fillerBlock = (BlockFiller) CompatHooks.INSTANCE.getBlock(BlockFiller.class);
|
fillerBlock = (BlockFiller) CompatHooks.INSTANCE.getBlock(BlockFiller.class);
|
||||||
CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
|
CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
|
||||||
|
|
||||||
|
@ -567,9 +566,16 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
CoreProxy.proxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
CoreProxy.proxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
||||||
CoreProxy.proxy.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate");
|
CoreProxy.proxy.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate");
|
||||||
CoreProxy.proxy.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker");
|
CoreProxy.proxy.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker");
|
||||||
CoreProxy.proxy.registerTileEntity(TileConstructionMarker.class, "net.minecraft.src.builders.TileConstructionMarker");
|
|
||||||
CoreProxy.proxy.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary");
|
CoreProxy.proxy.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary");
|
||||||
|
|
||||||
|
if (Loader.isModLoaded("BuildCraft|Robotics")) {
|
||||||
|
constructionMarkerBlock = (BlockConstructionMarker) CompatHooks.INSTANCE.getBlock(BlockConstructionMarker.class);
|
||||||
|
CoreProxy.proxy.registerBlock(constructionMarkerBlock.setBlockName("constructionMarkerBlock"),
|
||||||
|
ItemConstructionMarker.class);
|
||||||
|
|
||||||
|
CoreProxy.proxy.registerTileEntity(TileConstructionMarker.class, "net.minecraft.src.builders.TileConstructionMarker");
|
||||||
|
}
|
||||||
|
|
||||||
SchematicRegistry.INSTANCE.readConfiguration(BuildCraftCore.mainConfiguration);
|
SchematicRegistry.INSTANCE.readConfiguration(BuildCraftCore.mainConfiguration);
|
||||||
|
|
||||||
if (BuildCraftCore.mainConfiguration.hasChanged()) {
|
if (BuildCraftCore.mainConfiguration.hasChanged()) {
|
||||||
|
@ -600,8 +606,10 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(blueprintItem, 1), "ppp", "pip", "ppp", 'i',
|
CoreProxy.proxy.addCraftingRecipe(new ItemStack(blueprintItem, 1), "ppp", "pip", "ppp", 'i',
|
||||||
new ItemStack(Items.dye, 1, 4), 'p', Items.paper);
|
new ItemStack(Items.dye, 1, 4), 'p', Items.paper);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(constructionMarkerBlock, 1), "l ", "r ", 'l',
|
if (constructionMarkerBlock != null) {
|
||||||
"gearGold", 'r', Blocks.redstone_torch);
|
CoreProxy.proxy.addCraftingRecipe(new ItemStack(constructionMarkerBlock, 1), "l ", "r ", 'l',
|
||||||
|
"gearGold", 'r', Blocks.redstone_torch);
|
||||||
|
}
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), "btb", "ycy", "gCg", 'b',
|
CoreProxy.proxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), "btb", "ycy", "gCg", 'b',
|
||||||
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
||||||
|
|
Loading…
Reference in a new issue