add RailCraft-esque fine-tuned block/item control
This commit is contained in:
parent
808535e322
commit
fe5a2aa661
12 changed files with 301 additions and 206 deletions
|
@ -1,6 +1,7 @@
|
||||||
Additions:
|
Additions:
|
||||||
|
|
||||||
* Config option to disable showing every facade in Creative/NEI (asie)
|
* Config option to disable showing every facade in Creative/NEI (asie)
|
||||||
|
* Objects.cfg, a config file letting you enable/disable almost any block and item in BuildCraft individually! (asie)
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ import buildcraft.builders.schematics.SchematicSkull;
|
||||||
import buildcraft.builders.schematics.SchematicStone;
|
import buildcraft.builders.schematics.SchematicStone;
|
||||||
import buildcraft.builders.schematics.SchematicTripWireHook;
|
import buildcraft.builders.schematics.SchematicTripWireHook;
|
||||||
import buildcraft.builders.statements.BuildersActionProvider;
|
import buildcraft.builders.statements.BuildersActionProvider;
|
||||||
|
import buildcraft.core.BCRegistry;
|
||||||
import buildcraft.core.CompatHooks;
|
import buildcraft.core.CompatHooks;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
|
@ -493,45 +494,43 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
public void preInit(FMLPreInitializationEvent evt) {
|
public void preInit(FMLPreInitializationEvent evt) {
|
||||||
templateItem = new ItemBlueprintTemplate();
|
templateItem = new ItemBlueprintTemplate();
|
||||||
templateItem.setUnlocalizedName("templateItem");
|
templateItem.setUnlocalizedName("templateItem");
|
||||||
CoreProxy.proxy.registerItem(templateItem);
|
BCRegistry.INSTANCE.registerItem(templateItem, false);
|
||||||
|
|
||||||
blueprintItem = new ItemBlueprintStandard();
|
blueprintItem = new ItemBlueprintStandard();
|
||||||
blueprintItem.setUnlocalizedName("blueprintItem");
|
blueprintItem.setUnlocalizedName("blueprintItem");
|
||||||
CoreProxy.proxy.registerItem(blueprintItem);
|
BCRegistry.INSTANCE.registerItem(blueprintItem, false);
|
||||||
|
|
||||||
quarryBlock = (BlockQuarry) CompatHooks.INSTANCE.getBlock(BlockQuarry.class);
|
quarryBlock = (BlockQuarry) CompatHooks.INSTANCE.getBlock(BlockQuarry.class);
|
||||||
CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
|
BCRegistry.INSTANCE.registerBlock(quarryBlock.setBlockName("machineBlock"), false);
|
||||||
|
|
||||||
fillerBlock = (BlockFiller) CompatHooks.INSTANCE.getBlock(BlockFiller.class);
|
fillerBlock = (BlockFiller) CompatHooks.INSTANCE.getBlock(BlockFiller.class);
|
||||||
CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
|
BCRegistry.INSTANCE.registerBlock(fillerBlock.setBlockName("fillerBlock"), false);
|
||||||
|
|
||||||
frameBlock = new BlockFrame();
|
frameBlock = new BlockFrame();
|
||||||
CoreProxy.proxy.registerBlock(frameBlock.setBlockName("frameBlock"));
|
BCRegistry.INSTANCE.registerBlock(frameBlock.setBlockName("frameBlock"), true);
|
||||||
|
|
||||||
builderBlock = (BlockBuilder) CompatHooks.INSTANCE.getBlock(BlockBuilder.class);
|
builderBlock = (BlockBuilder) CompatHooks.INSTANCE.getBlock(BlockBuilder.class);
|
||||||
CoreProxy.proxy.registerBlock(builderBlock.setBlockName("builderBlock"));
|
BCRegistry.INSTANCE.registerBlock(builderBlock.setBlockName("builderBlock"), false);
|
||||||
|
|
||||||
architectBlock = (BlockArchitect) CompatHooks.INSTANCE.getBlock(BlockArchitect.class);
|
architectBlock = (BlockArchitect) CompatHooks.INSTANCE.getBlock(BlockArchitect.class);
|
||||||
CoreProxy.proxy.registerBlock(architectBlock.setBlockName("architectBlock"));
|
BCRegistry.INSTANCE.registerBlock(architectBlock.setBlockName("architectBlock"), false);
|
||||||
|
|
||||||
libraryBlock = (BlockBlueprintLibrary) CompatHooks.INSTANCE.getBlock(BlockBlueprintLibrary.class);
|
libraryBlock = (BlockBlueprintLibrary) CompatHooks.INSTANCE.getBlock(BlockBlueprintLibrary.class);
|
||||||
CoreProxy.proxy.registerBlock(libraryBlock.setBlockName("libraryBlock"));
|
BCRegistry.INSTANCE.registerBlock(libraryBlock.setBlockName("libraryBlock"), false);
|
||||||
|
|
||||||
CoreProxy.proxy.registerTileEntity(TileQuarry.class, "Machine");
|
BCRegistry.INSTANCE.registerTileEntity(TileQuarry.class, "Machine");
|
||||||
CoreProxy.proxy.registerTileEntity(TileMarker.class, "Marker");
|
BCRegistry.INSTANCE.registerTileEntity(TileMarker.class, "Marker");
|
||||||
CoreProxy.proxy.registerTileEntity(TileFiller.class, "Filler");
|
BCRegistry.INSTANCE.registerTileEntity(TileFiller.class, "Filler");
|
||||||
CoreProxy.proxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
BCRegistry.INSTANCE.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
||||||
CoreProxy.proxy.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate");
|
BCRegistry.INSTANCE.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate");
|
||||||
CoreProxy.proxy.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker");
|
BCRegistry.INSTANCE.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker");
|
||||||
CoreProxy.proxy.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary");
|
BCRegistry.INSTANCE.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary");
|
||||||
|
|
||||||
if (Loader.isModLoaded("BuildCraft|Robotics")) {
|
constructionMarkerBlock = (BlockConstructionMarker) CompatHooks.INSTANCE.getBlock(BlockConstructionMarker.class);
|
||||||
constructionMarkerBlock = (BlockConstructionMarker) CompatHooks.INSTANCE.getBlock(BlockConstructionMarker.class);
|
BCRegistry.INSTANCE.registerBlock(constructionMarkerBlock.setBlockName("constructionMarkerBlock"),
|
||||||
CoreProxy.proxy.registerBlock(constructionMarkerBlock.setBlockName("constructionMarkerBlock"),
|
ItemConstructionMarker.class, false);
|
||||||
ItemConstructionMarker.class);
|
|
||||||
|
|
||||||
CoreProxy.proxy.registerTileEntity(TileConstructionMarker.class, "net.minecraft.src.builders.TileConstructionMarker");
|
BCRegistry.INSTANCE.registerTileEntity(TileConstructionMarker.class, "net.minecraft.src.builders.TileConstructionMarker");
|
||||||
}
|
|
||||||
|
|
||||||
SchematicRegistry.INSTANCE.readConfiguration(BuildCraftCore.mainConfiguration);
|
SchematicRegistry.INSTANCE.readConfiguration(BuildCraftCore.mainConfiguration);
|
||||||
|
|
||||||
|
@ -546,7 +545,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadRecipes() {
|
public static void loadRecipes() {
|
||||||
CoreProxy.proxy.addCraftingRecipe(
|
BCRegistry.INSTANCE.addCraftingRecipe(
|
||||||
new ItemStack(quarryBlock),
|
new ItemStack(quarryBlock),
|
||||||
"ipi",
|
"ipi",
|
||||||
"gig",
|
"gig",
|
||||||
|
@ -557,31 +556,31 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
'd', "gearDiamond",
|
'd', "gearDiamond",
|
||||||
'D', Items.diamond_pickaxe);
|
'D', Items.diamond_pickaxe);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(templateItem, 1), "ppp", "pip", "ppp", 'i',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(templateItem, 1), "ppp", "pip", "ppp", 'i',
|
||||||
"dyeBlack", 'p', Items.paper);
|
"dyeBlack", 'p', Items.paper);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(blueprintItem, 1), "ppp", "pip", "ppp", 'i',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(blueprintItem, 1), "ppp", "pip", "ppp", 'i',
|
||||||
"gemLapis", 'p', Items.paper);
|
"gemLapis", 'p', Items.paper);
|
||||||
|
|
||||||
if (constructionMarkerBlock != null) {
|
if (constructionMarkerBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(constructionMarkerBlock, 1), "l ", "r ", 'l',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(constructionMarkerBlock, 1), "l ", "r ", 'l',
|
||||||
"gearGold", 'r', Blocks.redstone_torch);
|
"gearGold", 'r', Blocks.redstone_torch);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), "btb", "ycy", "gCg", 'b',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(fillerBlock, 1), "btb", "ycy", "gCg", 'b',
|
||||||
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
||||||
'c', Blocks.crafting_table, 'g', "gearGold", 'C', Blocks.chest);
|
'c', Blocks.crafting_table, 'g', "gearGold", 'C', Blocks.chest);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(builderBlock, 1), "btb", "ycy", "gCg", 'b',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(builderBlock, 1), "btb", "ycy", "gCg", 'b',
|
||||||
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
||||||
'c', Blocks.crafting_table, 'g', "gearDiamond", 'C', Blocks.chest);
|
'c', Blocks.crafting_table, 'g', "gearDiamond", 'C', Blocks.chest);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(architectBlock, 1), "btb", "ycy", "gCg", 'b',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(architectBlock, 1), "btb", "ycy", "gCg", 'b',
|
||||||
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
"dyeBlack", 't', BuildCraftCore.markerBlock, 'y', "dyeYellow",
|
||||||
'c', Blocks.crafting_table, 'g', "gearDiamond", 'C',
|
'c', Blocks.crafting_table, 'g', "gearDiamond", 'C',
|
||||||
new ItemStack(blueprintItem, 1));
|
new ItemStack(blueprintItem, 1));
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), "igi", "bBb", "iri", 'B',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(libraryBlock, 1), "igi", "bBb", "iri", 'B',
|
||||||
new ItemStack(blueprintItem), 'b', Blocks.bookshelf, 'i', "ingotIron", 'g', "gearIron", 'r', Items.redstone);
|
new ItemStack(blueprintItem), 'b', Blocks.bookshelf, 'i', "ingotIron", 'g', "gearIron", 'r', Items.redstone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ import buildcraft.api.tablet.TabletAPI;
|
||||||
import buildcraft.api.tiles.IControllable;
|
import buildcraft.api.tiles.IControllable;
|
||||||
import buildcraft.core.AchievementManager;
|
import buildcraft.core.AchievementManager;
|
||||||
import buildcraft.core.BCCreativeTab;
|
import buildcraft.core.BCCreativeTab;
|
||||||
|
import buildcraft.core.BCRegistry;
|
||||||
import buildcraft.core.BlockBuildTool;
|
import buildcraft.core.BlockBuildTool;
|
||||||
import buildcraft.core.BlockEngine;
|
import buildcraft.core.BlockEngine;
|
||||||
import buildcraft.core.BlockMarker;
|
import buildcraft.core.BlockMarker;
|
||||||
|
@ -283,6 +284,8 @@ public class BuildCraftCore extends BuildCraftMod {
|
||||||
|
|
||||||
BuilderAPI.schematicRegistry = SchematicRegistry.INSTANCE;
|
BuilderAPI.schematicRegistry = SchematicRegistry.INSTANCE;
|
||||||
|
|
||||||
|
BCRegistry.INSTANCE.setRegistryConfig(new File(evt.getModConfigurationDirectory(), "buildcraft/objects.cfg"));
|
||||||
|
|
||||||
mainConfiguration = new BuildCraftConfiguration(new File(evt.getModConfigurationDirectory(), "buildcraft/main.cfg"));
|
mainConfiguration = new BuildCraftConfiguration(new File(evt.getModConfigurationDirectory(), "buildcraft/main.cfg"));
|
||||||
mainConfigManager = new ConfigManager(mainConfiguration);
|
mainConfigManager = new ConfigManager(mainConfiguration);
|
||||||
mainConfiguration.load();
|
mainConfiguration.load();
|
||||||
|
@ -309,66 +312,71 @@ public class BuildCraftCore extends BuildCraftMod {
|
||||||
reloadConfig(ConfigManager.RestartRequirement.GAME);
|
reloadConfig(ConfigManager.RestartRequirement.GAME);
|
||||||
|
|
||||||
wrenchItem = (new ItemWrench()).setUnlocalizedName("wrenchItem");
|
wrenchItem = (new ItemWrench()).setUnlocalizedName("wrenchItem");
|
||||||
CoreProxy.proxy.registerItem(wrenchItem);
|
BCRegistry.INSTANCE.registerItem(wrenchItem, false);
|
||||||
|
|
||||||
mapLocationItem = (new ItemMapLocation()).setUnlocalizedName("mapLocation");
|
mapLocationItem = (new ItemMapLocation()).setUnlocalizedName("mapLocation");
|
||||||
CoreProxy.proxy.registerItem(mapLocationItem);
|
BCRegistry.INSTANCE.registerItem(mapLocationItem, false);
|
||||||
|
|
||||||
listItem = (ItemList) (new ItemList()).setUnlocalizedName("list");
|
listItem = (ItemList) (new ItemList()).setUnlocalizedName("list");
|
||||||
CoreProxy.proxy.registerItem(listItem);
|
BCRegistry.INSTANCE.registerItem(listItem, false);
|
||||||
|
|
||||||
debuggerItem = (new ItemDebugger()).setUnlocalizedName("debugger");
|
debuggerItem = (new ItemDebugger()).setUnlocalizedName("debugger");
|
||||||
CoreProxy.proxy.registerItem(debuggerItem);
|
BCRegistry.INSTANCE.registerItem(debuggerItem, false);
|
||||||
|
|
||||||
if (BuildCraftCore.modifyWorld) {
|
if (BuildCraftCore.modifyWorld) {
|
||||||
BlockSpring.EnumSpring.WATER.canGen = BuildCraftCore.mainConfigManager.get("worldgen.generateWaterSprings").getBoolean();
|
BlockSpring.EnumSpring.WATER.canGen = BuildCraftCore.mainConfigManager.get("worldgen.generateWaterSprings").getBoolean();
|
||||||
springBlock = new BlockSpring().setBlockName("eternalSpring");
|
springBlock = new BlockSpring().setBlockName("eternalSpring");
|
||||||
CoreProxy.proxy.registerBlock(springBlock, ItemSpring.class);
|
BCRegistry.INSTANCE.registerBlock(springBlock, ItemSpring.class, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
woodenGearItem = (new ItemGear()).setUnlocalizedName("woodenGearItem");
|
woodenGearItem = (new ItemGear()).setUnlocalizedName("woodenGearItem");
|
||||||
CoreProxy.proxy.registerItem(woodenGearItem);
|
if (BCRegistry.INSTANCE.registerItem(woodenGearItem, false)) {
|
||||||
OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem));
|
OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem));
|
||||||
|
}
|
||||||
|
|
||||||
stoneGearItem = (new ItemGear()).setUnlocalizedName("stoneGearItem");
|
stoneGearItem = (new ItemGear()).setUnlocalizedName("stoneGearItem");
|
||||||
CoreProxy.proxy.registerItem(stoneGearItem);
|
if (BCRegistry.INSTANCE.registerItem(stoneGearItem, false)) {
|
||||||
OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem));
|
OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem));
|
||||||
|
}
|
||||||
|
|
||||||
ironGearItem = (new ItemGear()).setUnlocalizedName("ironGearItem");
|
ironGearItem = (new ItemGear()).setUnlocalizedName("ironGearItem");
|
||||||
CoreProxy.proxy.registerItem(ironGearItem);
|
if (BCRegistry.INSTANCE.registerItem(ironGearItem, false)) {
|
||||||
OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem));
|
OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem));
|
||||||
|
}
|
||||||
|
|
||||||
goldGearItem = (new ItemGear()).setUnlocalizedName("goldGearItem");
|
goldGearItem = (new ItemGear()).setUnlocalizedName("goldGearItem");
|
||||||
CoreProxy.proxy.registerItem(goldGearItem);
|
if (BCRegistry.INSTANCE.registerItem(goldGearItem, false)) {
|
||||||
OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem));
|
OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem));
|
||||||
|
}
|
||||||
|
|
||||||
diamondGearItem = (new ItemGear()).setUnlocalizedName("diamondGearItem");
|
diamondGearItem = (new ItemGear()).setUnlocalizedName("diamondGearItem");
|
||||||
CoreProxy.proxy.registerItem(diamondGearItem);
|
if (BCRegistry.INSTANCE.registerItem(diamondGearItem, false)) {
|
||||||
OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem));
|
OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem));
|
||||||
|
}
|
||||||
|
|
||||||
paintbrushItem = (new ItemPaintbrush()).setUnlocalizedName("paintbrush");
|
paintbrushItem = (new ItemPaintbrush()).setUnlocalizedName("paintbrush");
|
||||||
CoreProxy.proxy.registerItem(paintbrushItem);
|
BCRegistry.INSTANCE.registerItem(paintbrushItem, false);
|
||||||
|
|
||||||
if (DEVELOPER_MODE) {
|
if (DEVELOPER_MODE) {
|
||||||
tabletItem = new ItemTablet();
|
tabletItem = new ItemTablet();
|
||||||
tabletItem.setUnlocalizedName("tablet");
|
tabletItem.setUnlocalizedName("tablet");
|
||||||
CoreProxy.proxy.registerItem(tabletItem);
|
BCRegistry.INSTANCE.registerItem(tabletItem, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildToolBlock = new BlockBuildTool();
|
buildToolBlock = new BlockBuildTool();
|
||||||
buildToolBlock.setBlockName("buildToolBlock");
|
buildToolBlock.setBlockName("buildToolBlock");
|
||||||
CoreProxy.proxy.registerBlock(buildToolBlock);
|
BCRegistry.INSTANCE.registerBlock(buildToolBlock, true);
|
||||||
|
|
||||||
engineBlock = (BlockEngine) CompatHooks.INSTANCE.getBlock(BlockEngine.class);
|
engineBlock = (BlockEngine) CompatHooks.INSTANCE.getBlock(BlockEngine.class);
|
||||||
CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class);
|
BCRegistry.INSTANCE.registerBlock(engineBlock, ItemEngine.class, true);
|
||||||
engineBlock.registerTile((Class<? extends TileEngineBase>) CompatHooks.INSTANCE.getTile(TileEngineWood.class), "tile.engineWood", "buildcraftcore:engineWood");
|
engineBlock.registerTile((Class<? extends TileEngineBase>) CompatHooks.INSTANCE.getTile(TileEngineWood.class), 0, "tile.engineWood", "buildcraftcore:engineWood");
|
||||||
CoreProxy.proxy.registerTileEntity(TileEngineWood.class, "net.minecraft.src.buildcraft.energy.TileEngineWood");
|
BCRegistry.INSTANCE.registerTileEntity(TileEngineWood.class, "net.minecraft.src.buildcraft.energy.TileEngineWood");
|
||||||
|
|
||||||
markerBlock = (BlockMarker) CompatHooks.INSTANCE.getBlock(BlockMarker.class);
|
markerBlock = (BlockMarker) CompatHooks.INSTANCE.getBlock(BlockMarker.class);
|
||||||
CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock"));
|
BCRegistry.INSTANCE.registerBlock(markerBlock.setBlockName("markerBlock"), false);
|
||||||
|
|
||||||
pathMarkerBlock = (BlockPathMarker) CompatHooks.INSTANCE.getBlock(BlockPathMarker.class);
|
pathMarkerBlock = (BlockPathMarker) CompatHooks.INSTANCE.getBlock(BlockPathMarker.class);
|
||||||
CoreProxy.proxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock"));
|
BCRegistry.INSTANCE.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock"), false);
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().register(this);
|
FMLCommonHandler.instance().bus().register(this);
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
|
@ -477,6 +485,8 @@ public class BuildCraftCore extends BuildCraftMod {
|
||||||
public void postInit(FMLPostInitializationEvent event) {
|
public void postInit(FMLPostInitializationEvent event) {
|
||||||
BCLog.logger.info("BuildCraft's fake player: UUID = " + gameProfile.getId().toString() + ", name = '" + gameProfile.getName() + "'!");
|
BCLog.logger.info("BuildCraft's fake player: UUID = " + gameProfile.getId().toString() + ", name = '" + gameProfile.getName() + "'!");
|
||||||
|
|
||||||
|
BCRegistry.INSTANCE.save();
|
||||||
|
|
||||||
for (Object o : Block.blockRegistry) {
|
for (Object o : Block.blockRegistry) {
|
||||||
Block block = (Block) o;
|
Block block = (Block) o;
|
||||||
|
|
||||||
|
@ -625,35 +635,35 @@ public class BuildCraftCore extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadRecipes() {
|
public void loadRecipes() {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(wrenchItem), "I I", " G ", " I ", 'I', "ingotIron", 'G', "gearStone");
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(wrenchItem), "I I", " G ", " I ", 'I', "ingotIron", 'G', "gearStone");
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(woodenGearItem), " S ", "S S",
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(woodenGearItem), " S ", "S S",
|
||||||
" S ", 'S',
|
" S ", 'S',
|
||||||
"stickWood");
|
"stickWood");
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(stoneGearItem), " I ", "IGI",
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(stoneGearItem), " I ", "IGI",
|
||||||
" I ", 'I',
|
" I ", 'I',
|
||||||
"cobblestone", 'G',
|
"cobblestone", 'G',
|
||||||
"gearWood");
|
"gearWood");
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(ironGearItem), " I ", "IGI",
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(ironGearItem), " I ", "IGI",
|
||||||
" I ", 'I',
|
" I ", 'I',
|
||||||
"ingotIron", 'G', "gearStone");
|
"ingotIron", 'G', "gearStone");
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(goldGearItem), " I ", "IGI",
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(goldGearItem), " I ", "IGI",
|
||||||
" I ", 'I',
|
" I ", 'I',
|
||||||
"ingotGold", 'G', "gearIron");
|
"ingotGold", 'G', "gearIron");
|
||||||
CoreProxy.proxy.addCraftingRecipe(
|
BCRegistry.INSTANCE.addCraftingRecipe(
|
||||||
new ItemStack(diamondGearItem), " I ", "IGI", " I ", 'I', "gemDiamond", 'G', "gearGold");
|
new ItemStack(diamondGearItem), " I ", "IGI", " I ", 'I', "gemDiamond", 'G', "gearGold");
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(mapLocationItem), "ppp", "pYp", "ppp", 'p', Items.paper, 'Y', "dyeYellow");
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(mapLocationItem), "ppp", "pYp", "ppp", 'p', Items.paper, 'Y', "dyeYellow");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 0),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(engineBlock, 1, 0),
|
||||||
"www", " g ", "GpG", 'w', "plankWood", 'g', "blockGlass", 'G',
|
"www", " g ", "GpG", 'w', "plankWood", 'g', "blockGlass", 'G',
|
||||||
"gearWood", 'p', Blocks.piston);
|
"gearWood", 'p', Blocks.piston);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(markerBlock, 1), "l ", "r ", 'l',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(markerBlock, 1), "l ", "r ", 'l',
|
||||||
new ItemStack(Items.dye, 1, 4), 'r', Blocks.redstone_torch);
|
new ItemStack(Items.dye, 1, 4), 'r', Blocks.redstone_torch);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(pathMarkerBlock, 1), "l ", "r ", 'l',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(pathMarkerBlock, 1), "l ", "r ", 'l',
|
||||||
"dyeGreen", 'r', Blocks.redstone_torch);
|
"dyeGreen", 'r', Blocks.redstone_torch);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(paintbrushItem), " iw", " gi", "s ",
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(paintbrushItem), " iw", " gi", "s ",
|
||||||
's', "stickWood", 'g', "gearWood", 'w', new ItemStack(Blocks.wool, 1, 0), 'i', Items.string);
|
's', "stickWood", 'g', "gearWood", 'w', new ItemStack(Blocks.wool, 1, 0), 'i', Items.string);
|
||||||
|
|
||||||
ItemStack anyPaintbrush = new ItemStack(paintbrushItem, 1, OreDictionary.WILDCARD_VALUE);
|
ItemStack anyPaintbrush = new ItemStack(paintbrushItem, 1, OreDictionary.WILDCARD_VALUE);
|
||||||
|
@ -661,16 +671,16 @@ public class BuildCraftCore extends BuildCraftMod {
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
ItemStack outputStack = new ItemStack(paintbrushItem);
|
ItemStack outputStack = new ItemStack(paintbrushItem);
|
||||||
NBTUtils.getItemData(outputStack).setByte("color", (byte) i);
|
NBTUtils.getItemData(outputStack).setByte("color", (byte) i);
|
||||||
CoreProxy.proxy.addShapelessRecipe(outputStack, anyPaintbrush, EnumColor.fromId(i).getDye());
|
BCRegistry.INSTANCE.addShapelessRecipe(outputStack, anyPaintbrush, EnumColor.fromId(i).getDye());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert old lists to new lists
|
// Convert old lists to new lists
|
||||||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(listItem, 1, 1), new ItemStack(listItem, 1, 0));
|
BCRegistry.INSTANCE.addShapelessRecipe(new ItemStack(listItem, 1, 1), new ItemStack(listItem, 1, 0));
|
||||||
|
|
||||||
if (Loader.isModLoaded("BuildCraft|Silicon")) {
|
if (Loader.isModLoaded("BuildCraft|Silicon")) {
|
||||||
CoreSiliconRecipes.loadSiliconRecipes();
|
CoreSiliconRecipes.loadSiliconRecipes();
|
||||||
} else {
|
} else {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(listItem, 1, 1), "ppp", "pYp", "ppp", 'p', Items.paper, 'Y',
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(listItem, 1, 1), "ppp", "pYp", "ppp", 'p', Items.paper, 'Y',
|
||||||
"dyeGreen");
|
"dyeGreen");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ import buildcraft.api.fuels.BuildcraftFuelRegistry;
|
||||||
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
||||||
import buildcraft.api.statements.ITriggerExternal;
|
import buildcraft.api.statements.ITriggerExternal;
|
||||||
import buildcraft.api.statements.StatementManager;
|
import buildcraft.api.statements.StatementManager;
|
||||||
|
import buildcraft.core.BCRegistry;
|
||||||
import buildcraft.core.BlockSpring;
|
import buildcraft.core.BlockSpring;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
|
@ -207,7 +208,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
||||||
if (fluidOil.getBlock() == null) {
|
if (fluidOil.getBlock() == null) {
|
||||||
blockOil = new BlockBuildCraftFluid(fluidOil, Material.water, MapColor.blackColor).setFlammability(0);
|
blockOil = new BlockBuildCraftFluid(fluidOil, Material.water, MapColor.blackColor).setFlammability(0);
|
||||||
blockOil.setBlockName("blockOil").setLightOpacity(8);
|
blockOil.setBlockName("blockOil").setLightOpacity(8);
|
||||||
CoreProxy.proxy.registerBlock(blockOil);
|
BCRegistry.INSTANCE.registerBlock(blockOil, true);
|
||||||
fluidOil.setBlock(blockOil);
|
fluidOil.setBlock(blockOil);
|
||||||
|
|
||||||
BuildCraftCore.mainConfigManager.register("general.oilCanBurn", true, "Should oil burn when lit on fire?", ConfigManager.RestartRequirement.NONE);
|
BuildCraftCore.mainConfigManager.register("general.oilCanBurn", true, "Should oil burn when lit on fire?", ConfigManager.RestartRequirement.NONE);
|
||||||
|
@ -227,7 +228,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
||||||
if (fluidFuel.getBlock() == null) {
|
if (fluidFuel.getBlock() == null) {
|
||||||
blockFuel = new BlockBuildCraftFluid(fluidFuel, Material.water, MapColor.yellowColor).setFlammable(true).setFlammability(5).setParticleColor(0.7F, 0.7F, 0.0F);
|
blockFuel = new BlockBuildCraftFluid(fluidFuel, Material.water, MapColor.yellowColor).setFlammable(true).setFlammability(5).setParticleColor(0.7F, 0.7F, 0.0F);
|
||||||
blockFuel.setBlockName("blockFuel").setLightOpacity(3);
|
blockFuel.setBlockName("blockFuel").setLightOpacity(3);
|
||||||
CoreProxy.proxy.registerBlock(blockFuel);
|
BCRegistry.INSTANCE.registerBlock(blockFuel, true);
|
||||||
fluidFuel.setBlock(blockFuel);
|
fluidFuel.setBlock(blockFuel);
|
||||||
} else {
|
} else {
|
||||||
blockFuel = fluidFuel.getBlock();
|
blockFuel = fluidFuel.getBlock();
|
||||||
|
@ -237,7 +238,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
||||||
blockRedPlasma = new BlockBuildCraftFluid(fluidRedPlasma, Material.water, MapColor.redColor).setFlammable(
|
blockRedPlasma = new BlockBuildCraftFluid(fluidRedPlasma, Material.water, MapColor.redColor).setFlammable(
|
||||||
false).setParticleColor(0.9F, 0, 0);
|
false).setParticleColor(0.9F, 0, 0);
|
||||||
blockRedPlasma.setBlockName("blockRedPlasma");
|
blockRedPlasma.setBlockName("blockRedPlasma");
|
||||||
CoreProxy.proxy.registerBlock(blockRedPlasma);
|
BCRegistry.INSTANCE.registerBlock(blockRedPlasma, true);
|
||||||
fluidRedPlasma.setBlock(blockRedPlasma);
|
fluidRedPlasma.setBlock(blockRedPlasma);
|
||||||
} else {
|
} else {
|
||||||
blockRedPlasma = fluidRedPlasma.getBlock();
|
blockRedPlasma = fluidRedPlasma.getBlock();
|
||||||
|
@ -248,14 +249,14 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
||||||
if (blockOil != null) {
|
if (blockOil != null) {
|
||||||
bucketOil = new ItemBucketBuildcraft(blockOil);
|
bucketOil = new ItemBucketBuildcraft(blockOil);
|
||||||
bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket);
|
bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket);
|
||||||
CoreProxy.proxy.registerItem(bucketOil);
|
BCRegistry.INSTANCE.registerItem(bucketOil, true);
|
||||||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Items.bucket));
|
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Items.bucket));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blockFuel != null) {
|
if (blockFuel != null) {
|
||||||
bucketFuel = new ItemBucketBuildcraft(blockFuel);
|
bucketFuel = new ItemBucketBuildcraft(blockFuel);
|
||||||
bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket);
|
bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket);
|
||||||
CoreProxy.proxy.registerItem(bucketFuel);
|
BCRegistry.INSTANCE.registerItem(bucketFuel, true);
|
||||||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Items.bucket));
|
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Items.bucket));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +264,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
||||||
if (blockRedPlasma != null) {
|
if (blockRedPlasma != null) {
|
||||||
bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma);
|
bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma);
|
||||||
bucketRedPlasma.setUnlocalizedName("bucketRedPlasma").setContainerItem(Items.bucket);
|
bucketRedPlasma.setUnlocalizedName("bucketRedPlasma").setContainerItem(Items.bucket);
|
||||||
CoreProxy.proxy.registerItem(bucketRedPlasma);
|
BCRegistry.INSTANCE.registerItem(bucketRedPlasma, true);
|
||||||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("redplasma", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketRedPlasma), new ItemStack(Items.bucket));
|
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("redplasma", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketRedPlasma), new ItemStack(Items.bucket));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,9 +288,9 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
||||||
BuildcraftFuelRegistry.coolant.addSolidCoolant(StackKey.stack(Blocks.ice), StackKey.fluid(FluidRegistry.WATER), 1.5f);
|
BuildcraftFuelRegistry.coolant.addSolidCoolant(StackKey.stack(Blocks.ice), StackKey.fluid(FluidRegistry.WATER), 1.5f);
|
||||||
BuildcraftFuelRegistry.coolant.addSolidCoolant(StackKey.stack(Blocks.packed_ice), StackKey.fluid(FluidRegistry.WATER), 2.0f);
|
BuildcraftFuelRegistry.coolant.addSolidCoolant(StackKey.stack(Blocks.packed_ice), StackKey.fluid(FluidRegistry.WATER), 2.0f);
|
||||||
|
|
||||||
BuildCraftCore.engineBlock.registerTile(TileEngineStone.class, "tile.engineStone", "buildcraftenergy:engineStone");
|
BuildCraftCore.engineBlock.registerTile(TileEngineStone.class, 1, "tile.engineStone", "buildcraftenergy:engineStone");
|
||||||
BuildCraftCore.engineBlock.registerTile(TileEngineIron.class, "tile.engineIron", "buildcraftenergy:engineIron");
|
BuildCraftCore.engineBlock.registerTile(TileEngineIron.class, 2, "tile.engineIron", "buildcraftenergy:engineIron");
|
||||||
BuildCraftCore.engineBlock.registerTile(TileEngineCreative.class, "tile.engineCreative", "buildcraftenergy:engineCreative");
|
BuildCraftCore.engineBlock.registerTile(TileEngineCreative.class, 3, "tile.engineCreative", "buildcraftenergy:engineCreative");
|
||||||
|
|
||||||
InterModComms.registerHandler(new IMCHandlerEnergy());
|
InterModComms.registerHandler(new IMCHandlerEnergy());
|
||||||
|
|
||||||
|
@ -411,10 +412,10 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadRecipes() {
|
public static void loadRecipes() {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(BuildCraftCore.engineBlock, 1, 1),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(BuildCraftCore.engineBlock, 1, 1),
|
||||||
"www", " g ", "GpG", 'w', "cobblestone",
|
"www", " g ", "GpG", 'w', "cobblestone",
|
||||||
'g', "blockGlass", 'G', "gearStone", 'p', Blocks.piston);
|
'g', "blockGlass", 'G', "gearStone", 'p', Blocks.piston);
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(BuildCraftCore.engineBlock, 1, 2),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(BuildCraftCore.engineBlock, 1, 2),
|
||||||
"www", " g ", "GpG", 'w', "ingotIron",
|
"www", " g ", "GpG", 'w', "ingotIron",
|
||||||
'g', "blockGlass", 'G', "gearIron", 'p', Blocks.piston);
|
'g', "blockGlass", 'G', "gearIron", 'p', Blocks.piston);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
import buildcraft.api.blueprints.BuilderAPI;
|
import buildcraft.api.blueprints.BuilderAPI;
|
||||||
import buildcraft.api.blueprints.SchematicTile;
|
import buildcraft.api.blueprints.SchematicTile;
|
||||||
|
import buildcraft.core.BCRegistry;
|
||||||
import buildcraft.core.CompatHooks;
|
import buildcraft.core.CompatHooks;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
|
@ -95,13 +96,13 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
public void load(FMLInitializationEvent evt) {
|
public void load(FMLInitializationEvent evt) {
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new FactoryGuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new FactoryGuiHandler());
|
||||||
|
|
||||||
CoreProxy.proxy.registerTileEntity(TileMiningWell.class, "MiningWell");
|
BCRegistry.INSTANCE.registerTileEntity(TileMiningWell.class, "MiningWell");
|
||||||
CoreProxy.proxy.registerTileEntity(TileAutoWorkbench.class, "AutoWorkbench");
|
BCRegistry.INSTANCE.registerTileEntity(TileAutoWorkbench.class, "AutoWorkbench");
|
||||||
CoreProxy.proxy.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump");
|
BCRegistry.INSTANCE.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump");
|
||||||
CoreProxy.proxy.registerTileEntity(TileFloodGate.class, "net.minecraft.src.buildcraft.factory.TileFloodGate");
|
BCRegistry.INSTANCE.registerTileEntity(TileFloodGate.class, "net.minecraft.src.buildcraft.factory.TileFloodGate");
|
||||||
CoreProxy.proxy.registerTileEntity(TileTank.class, "net.minecraft.src.buildcraft.factory.TileTank");
|
BCRegistry.INSTANCE.registerTileEntity(TileTank.class, "net.minecraft.src.buildcraft.factory.TileTank");
|
||||||
CoreProxy.proxy.registerTileEntity(TileRefinery.class, "net.minecraft.src.buildcraft.factory.Refinery");
|
BCRegistry.INSTANCE.registerTileEntity(TileRefinery.class, "net.minecraft.src.buildcraft.factory.Refinery");
|
||||||
CoreProxy.proxy.registerTileEntity(TileHopper.class, "net.minecraft.src.buildcraft.factory.TileHopper");
|
BCRegistry.INSTANCE.registerTileEntity(TileHopper.class, "net.minecraft.src.buildcraft.factory.TileHopper");
|
||||||
|
|
||||||
FactoryProxy.proxy.initializeTileEntities();
|
FactoryProxy.proxy.initializeTileEntities();
|
||||||
|
|
||||||
|
@ -142,28 +143,28 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
reloadConfig(ConfigManager.RestartRequirement.GAME);
|
reloadConfig(ConfigManager.RestartRequirement.GAME);
|
||||||
|
|
||||||
miningWellBlock = (BlockMiningWell) CompatHooks.INSTANCE.getBlock(BlockMiningWell.class);
|
miningWellBlock = (BlockMiningWell) CompatHooks.INSTANCE.getBlock(BlockMiningWell.class);
|
||||||
CoreProxy.proxy.registerBlock(miningWellBlock.setBlockName("miningWellBlock"));
|
if (BCRegistry.INSTANCE.registerBlock(miningWellBlock.setBlockName("miningWellBlock"), false)) {
|
||||||
|
plainPipeBlock = new BlockPlainPipe();
|
||||||
plainPipeBlock = new BlockPlainPipe();
|
BCRegistry.INSTANCE.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock"), true);
|
||||||
CoreProxy.proxy.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock"));
|
}
|
||||||
|
|
||||||
autoWorkbenchBlock = (BlockAutoWorkbench) CompatHooks.INSTANCE.getBlock(BlockAutoWorkbench.class);
|
autoWorkbenchBlock = (BlockAutoWorkbench) CompatHooks.INSTANCE.getBlock(BlockAutoWorkbench.class);
|
||||||
CoreProxy.proxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"));
|
BCRegistry.INSTANCE.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"), false);
|
||||||
|
|
||||||
tankBlock = (BlockTank) CompatHooks.INSTANCE.getBlock(BlockTank.class);
|
tankBlock = (BlockTank) CompatHooks.INSTANCE.getBlock(BlockTank.class);
|
||||||
CoreProxy.proxy.registerBlock(tankBlock.setBlockName("tankBlock"));
|
BCRegistry.INSTANCE.registerBlock(tankBlock.setBlockName("tankBlock"), false);
|
||||||
|
|
||||||
pumpBlock = (BlockPump) CompatHooks.INSTANCE.getBlock(BlockPump.class);
|
pumpBlock = (BlockPump) CompatHooks.INSTANCE.getBlock(BlockPump.class);
|
||||||
CoreProxy.proxy.registerBlock(pumpBlock.setBlockName("pumpBlock"));
|
BCRegistry.INSTANCE.registerBlock(pumpBlock.setBlockName("pumpBlock"), false);
|
||||||
|
|
||||||
floodGateBlock = (BlockFloodGate) CompatHooks.INSTANCE.getBlock(BlockFloodGate.class);
|
floodGateBlock = (BlockFloodGate) CompatHooks.INSTANCE.getBlock(BlockFloodGate.class);
|
||||||
CoreProxy.proxy.registerBlock(floodGateBlock.setBlockName("floodGateBlock"));
|
BCRegistry.INSTANCE.registerBlock(floodGateBlock.setBlockName("floodGateBlock"), false);
|
||||||
|
|
||||||
refineryBlock = (BlockRefinery) CompatHooks.INSTANCE.getBlock(BlockRefinery.class);
|
refineryBlock = (BlockRefinery) CompatHooks.INSTANCE.getBlock(BlockRefinery.class);
|
||||||
CoreProxy.proxy.registerBlock(refineryBlock.setBlockName("refineryBlock"));
|
BCRegistry.INSTANCE.registerBlock(refineryBlock.setBlockName("refineryBlock"), false);
|
||||||
|
|
||||||
hopperBlock = (BlockHopper) CompatHooks.INSTANCE.getBlock(BlockHopper.class);
|
hopperBlock = (BlockHopper) CompatHooks.INSTANCE.getBlock(BlockHopper.class);
|
||||||
CoreProxy.proxy.registerBlock(hopperBlock.setBlockName("blockHopper"));
|
BCRegistry.INSTANCE.registerBlock(hopperBlock.setBlockName("blockHopper"), false);
|
||||||
|
|
||||||
FactoryProxy.proxy.initializeEntityRenders();
|
FactoryProxy.proxy.initializeEntityRenders();
|
||||||
|
|
||||||
|
@ -173,7 +174,7 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
|
|
||||||
public static void loadRecipes() {
|
public static void loadRecipes() {
|
||||||
if (miningWellBlock != null) {
|
if (miningWellBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(miningWellBlock, 1),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(miningWellBlock, 1),
|
||||||
"ipi",
|
"ipi",
|
||||||
"igi",
|
"igi",
|
||||||
"iPi",
|
"iPi",
|
||||||
|
@ -184,7 +185,7 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pumpBlock != null) {
|
if (pumpBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(
|
BCRegistry.INSTANCE.addCraftingRecipe(
|
||||||
new ItemStack(pumpBlock),
|
new ItemStack(pumpBlock),
|
||||||
"ipi",
|
"ipi",
|
||||||
"igi",
|
"igi",
|
||||||
|
@ -197,12 +198,12 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autoWorkbenchBlock != null) {
|
if (autoWorkbenchBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(autoWorkbenchBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(autoWorkbenchBlock),
|
||||||
"gwg",
|
"gwg",
|
||||||
'w', "craftingTableWood",
|
'w', "craftingTableWood",
|
||||||
'g', "gearStone");
|
'g', "gearStone");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(autoWorkbenchBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(autoWorkbenchBlock),
|
||||||
"g",
|
"g",
|
||||||
"w",
|
"w",
|
||||||
"g",
|
"g",
|
||||||
|
@ -212,7 +213,7 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
|
|
||||||
|
|
||||||
if (tankBlock != null) {
|
if (tankBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(tankBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(tankBlock),
|
||||||
"ggg",
|
"ggg",
|
||||||
"g g",
|
"g g",
|
||||||
"ggg",
|
"ggg",
|
||||||
|
@ -220,7 +221,7 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (refineryBlock != null) {
|
if (refineryBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(refineryBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(refineryBlock),
|
||||||
"RTR",
|
"RTR",
|
||||||
"TGT",
|
"TGT",
|
||||||
'T', tankBlock != null ? tankBlock : "blockGlass",
|
'T', tankBlock != null ? tankBlock : "blockGlass",
|
||||||
|
@ -229,18 +230,18 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hopperBlock != null) {
|
if (hopperBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(hopperBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(hopperBlock),
|
||||||
"ICI",
|
"ICI",
|
||||||
" G ",
|
" G ",
|
||||||
'I', "ingotIron",
|
'I', "ingotIron",
|
||||||
'C', "chestWood",
|
'C', "chestWood",
|
||||||
'G', "gearStone");
|
'G', "gearStone");
|
||||||
|
|
||||||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(hopperBlock), Blocks.hopper, "gearStone");
|
BCRegistry.INSTANCE.addShapelessRecipe(new ItemStack(hopperBlock), Blocks.hopper, "gearStone");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (floodGateBlock != null) {
|
if (floodGateBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(floodGateBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(floodGateBlock),
|
||||||
"IGI",
|
"IGI",
|
||||||
"FTF",
|
"FTF",
|
||||||
"IFI",
|
"IFI",
|
||||||
|
|
|
@ -46,6 +46,7 @@ import buildcraft.api.statements.ITriggerInternal;
|
||||||
import buildcraft.api.statements.StatementManager;
|
import buildcraft.api.statements.StatementManager;
|
||||||
import buildcraft.api.transport.PipeManager;
|
import buildcraft.api.transport.PipeManager;
|
||||||
import buildcraft.core.BCCreativeTab;
|
import buildcraft.core.BCCreativeTab;
|
||||||
|
import buildcraft.core.BCRegistry;
|
||||||
import buildcraft.core.CompatHooks;
|
import buildcraft.core.CompatHooks;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
|
@ -196,22 +197,22 @@ public class BuildCraftRobotics extends BuildCraftMod {
|
||||||
reloadConfig(ConfigManager.RestartRequirement.GAME);
|
reloadConfig(ConfigManager.RestartRequirement.GAME);
|
||||||
|
|
||||||
robotItem = new ItemRobot().setUnlocalizedName("robot");
|
robotItem = new ItemRobot().setUnlocalizedName("robot");
|
||||||
CoreProxy.proxy.registerItem(robotItem);
|
BCRegistry.INSTANCE.registerItem(robotItem, false);
|
||||||
|
|
||||||
robotStationItem = new ItemRobotStation().setUnlocalizedName("robotStation");
|
robotStationItem = new ItemRobotStation().setUnlocalizedName("robotStation");
|
||||||
CoreProxy.proxy.registerItem(robotStationItem);
|
BCRegistry.INSTANCE.registerItem(robotStationItem, false);
|
||||||
|
|
||||||
redstoneBoard = new ItemRedstoneBoard();
|
redstoneBoard = new ItemRedstoneBoard();
|
||||||
redstoneBoard.setUnlocalizedName("redstone_board");
|
redstoneBoard.setUnlocalizedName("redstone_board");
|
||||||
CoreProxy.proxy.registerItem(redstoneBoard);
|
BCRegistry.INSTANCE.registerItem(redstoneBoard, false);
|
||||||
|
|
||||||
zonePlanBlock = (BlockZonePlan) CompatHooks.INSTANCE.getBlock(BlockZonePlan.class);
|
zonePlanBlock = (BlockZonePlan) CompatHooks.INSTANCE.getBlock(BlockZonePlan.class);
|
||||||
zonePlanBlock.setBlockName("zonePlan");
|
zonePlanBlock.setBlockName("zonePlan");
|
||||||
CoreProxy.proxy.registerBlock(zonePlanBlock);
|
BCRegistry.INSTANCE.registerBlock(zonePlanBlock, false);
|
||||||
|
|
||||||
requesterBlock = (BlockRequester) CompatHooks.INSTANCE.getBlock(BlockRequester.class);
|
requesterBlock = (BlockRequester) CompatHooks.INSTANCE.getBlock(BlockRequester.class);
|
||||||
requesterBlock.setBlockName("requester");
|
requesterBlock.setBlockName("requester");
|
||||||
CoreProxy.proxy.registerBlock(requesterBlock);
|
BCRegistry.INSTANCE.registerBlock(requesterBlock, false);
|
||||||
|
|
||||||
RedstoneBoardRegistry.instance = new ImplRedstoneBoardRegistry();
|
RedstoneBoardRegistry.instance = new ImplRedstoneBoardRegistry();
|
||||||
|
|
||||||
|
@ -268,8 +269,8 @@ public class BuildCraftRobotics extends BuildCraftMod {
|
||||||
PipeManager.registerPipePluggable(RobotStationPluggable.class, "robotStation");
|
PipeManager.registerPipePluggable(RobotStationPluggable.class, "robotStation");
|
||||||
EntityRegistry.registerModEntity(EntityRobot.class, "bcRobot", EntityIds.ROBOT, instance, 50, 1, true);
|
EntityRegistry.registerModEntity(EntityRobot.class, "bcRobot", EntityIds.ROBOT, instance, 50, 1, true);
|
||||||
|
|
||||||
CoreProxy.proxy.registerTileEntity(TileZonePlan.class, "net.minecraft.src.buildcraft.commander.TileZonePlan");
|
BCRegistry.INSTANCE.registerTileEntity(TileZonePlan.class, "net.minecraft.src.buildcraft.commander.TileZonePlan");
|
||||||
CoreProxy.proxy.registerTileEntity(TileRequester.class, "net.minecraft.src.buildcraft.commander.TileRequester");
|
BCRegistry.INSTANCE.registerTileEntity(TileRequester.class, "net.minecraft.src.buildcraft.commander.TileRequester");
|
||||||
|
|
||||||
RobotManager.registryProvider = new RobotRegistryProvider();
|
RobotManager.registryProvider = new RobotRegistryProvider();
|
||||||
|
|
||||||
|
@ -340,7 +341,7 @@ public class BuildCraftRobotics extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadRecipes() {
|
public static void loadRecipes() {
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(robotItem),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(robotItem),
|
||||||
"PPP",
|
"PPP",
|
||||||
"PRP",
|
"PRP",
|
||||||
"C C",
|
"C C",
|
||||||
|
@ -348,14 +349,14 @@ public class BuildCraftRobotics extends BuildCraftMod {
|
||||||
'R', "crystalRedstone",
|
'R', "crystalRedstone",
|
||||||
'C', ItemRedstoneChipset.Chipset.DIAMOND.getStack());
|
'C', ItemRedstoneChipset.Chipset.DIAMOND.getStack());
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(redstoneBoard),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(redstoneBoard),
|
||||||
"PPP",
|
"PPP",
|
||||||
"PRP",
|
"PRP",
|
||||||
"PPP",
|
"PPP",
|
||||||
'R', "dustRedstone",
|
'R', "dustRedstone",
|
||||||
'P', Items.paper);
|
'P', Items.paper);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0),
|
||||||
"IRI",
|
"IRI",
|
||||||
"GMG",
|
"GMG",
|
||||||
"IDI",
|
"IDI",
|
||||||
|
@ -365,7 +366,7 @@ public class BuildCraftRobotics extends BuildCraftMod {
|
||||||
'D', "gearDiamond",
|
'D', "gearDiamond",
|
||||||
'I', "ingotIron");
|
'I', "ingotIron");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(requesterBlock, 1, 0),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(requesterBlock, 1, 0),
|
||||||
"IPI",
|
"IPI",
|
||||||
"GCG",
|
"GCG",
|
||||||
"IRI",
|
"IRI",
|
||||||
|
@ -375,7 +376,7 @@ public class BuildCraftRobotics extends BuildCraftMod {
|
||||||
'G', "gearIron",
|
'G', "gearIron",
|
||||||
'I', "ingotIron");
|
'I', "ingotIron");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(robotStationItem), " ", " I ", "ICI",
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(robotStationItem), " ", " I ", "ICI",
|
||||||
'I', "ingotIron",
|
'I', "ingotIron",
|
||||||
'C', ItemRedstoneChipset.Chipset.GOLD.getStack());
|
'C', ItemRedstoneChipset.Chipset.GOLD.getStack());
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import buildcraft.api.blueprints.BuilderAPI;
|
import buildcraft.api.blueprints.BuilderAPI;
|
||||||
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
||||||
|
import buildcraft.core.BCRegistry;
|
||||||
import buildcraft.core.CompatHooks;
|
import buildcraft.core.CompatHooks;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
|
@ -90,30 +91,30 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
|
|
||||||
laserBlock = (BlockLaser) CompatHooks.INSTANCE.getBlock(BlockLaser.class);
|
laserBlock = (BlockLaser) CompatHooks.INSTANCE.getBlock(BlockLaser.class);
|
||||||
laserBlock.setBlockName("laserBlock");
|
laserBlock.setBlockName("laserBlock");
|
||||||
CoreProxy.proxy.registerBlock(laserBlock);
|
BCRegistry.INSTANCE.registerBlock(laserBlock, false);
|
||||||
|
|
||||||
assemblyTableBlock = (BlockLaserTable) CompatHooks.INSTANCE.getBlock(BlockLaserTable.class);
|
assemblyTableBlock = (BlockLaserTable) CompatHooks.INSTANCE.getBlock(BlockLaserTable.class);
|
||||||
assemblyTableBlock.setBlockName("laserTableBlock");
|
assemblyTableBlock.setBlockName("laserTableBlock");
|
||||||
CoreProxy.proxy.registerBlock(assemblyTableBlock, ItemLaserTable.class);
|
BCRegistry.INSTANCE.registerBlock(assemblyTableBlock, ItemLaserTable.class, false);
|
||||||
|
|
||||||
packagerBlock = (BlockPackager) CompatHooks.INSTANCE.getBlock(BlockPackager.class);
|
packagerBlock = (BlockPackager) CompatHooks.INSTANCE.getBlock(BlockPackager.class);
|
||||||
packagerBlock.setBlockName("packagerBlock");
|
packagerBlock.setBlockName("packagerBlock");
|
||||||
CoreProxy.proxy.registerBlock(packagerBlock);
|
BCRegistry.INSTANCE.registerBlock(packagerBlock, false);
|
||||||
|
|
||||||
redstoneChipset = new ItemRedstoneChipset();
|
redstoneChipset = new ItemRedstoneChipset();
|
||||||
redstoneChipset.setUnlocalizedName("redstoneChipset");
|
redstoneChipset.setUnlocalizedName("redstoneChipset");
|
||||||
CoreProxy.proxy.registerItem(redstoneChipset);
|
BCRegistry.INSTANCE.registerItem(redstoneChipset, false);
|
||||||
redstoneChipset.registerItemStacks();
|
redstoneChipset.registerItemStacks();
|
||||||
|
|
||||||
packageItem = new ItemPackage();
|
packageItem = new ItemPackage();
|
||||||
packageItem.setUnlocalizedName("package");
|
packageItem.setUnlocalizedName("package");
|
||||||
CoreProxy.proxy.registerItem(packageItem);
|
BCRegistry.INSTANCE.registerItem(packageItem, false);
|
||||||
|
|
||||||
redstoneCrystal = (new ItemBuildCraft()).setUnlocalizedName("redstoneCrystal");
|
redstoneCrystal = (new ItemBuildCraft()).setUnlocalizedName("redstoneCrystal");
|
||||||
CoreProxy.proxy.registerItem(redstoneCrystal);
|
if (BCRegistry.INSTANCE.registerItem(redstoneCrystal, false)) {
|
||||||
|
OreDictionary.registerOre("redstoneCrystal", new ItemStack(redstoneCrystal)); // Deprecated
|
||||||
OreDictionary.registerOre("redstoneCrystal", new ItemStack(redstoneCrystal)); // Deprecated
|
OreDictionary.registerOre("crystalRedstone", new ItemStack(redstoneCrystal));
|
||||||
OreDictionary.registerOre("crystalRedstone", new ItemStack(redstoneCrystal));
|
}
|
||||||
|
|
||||||
EntityRegistry.registerModEntity(EntityPackage.class, "bcPackageThrowable", EntityIds.PACKAGE_THROWABLE, instance, 48, 10, true);
|
EntityRegistry.registerModEntity(EntityPackage.class, "bcPackageThrowable", EntityIds.PACKAGE_THROWABLE, instance, 48, 10, true);
|
||||||
}
|
}
|
||||||
|
@ -125,19 +126,19 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
(DefaultProps.NET_CHANNEL_NAME + "-SILICON", new ChannelHandler(), new PacketHandlerSilicon());
|
(DefaultProps.NET_CHANNEL_NAME + "-SILICON", new ChannelHandler(), new PacketHandlerSilicon());
|
||||||
|
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new SiliconGuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new SiliconGuiHandler());
|
||||||
CoreProxy.proxy.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser");
|
BCRegistry.INSTANCE.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser");
|
||||||
CoreProxy.proxy.registerTileEntity(TileAssemblyTable.class,
|
BCRegistry.INSTANCE.registerTileEntity(TileAssemblyTable.class,
|
||||||
"net.minecraft.src.buildcraft.factory.TileAssemblyTable");
|
"net.minecraft.src.buildcraft.factory.TileAssemblyTable");
|
||||||
CoreProxy.proxy.registerTileEntity(TileAdvancedCraftingTable.class,
|
BCRegistry.INSTANCE.registerTileEntity(TileAdvancedCraftingTable.class,
|
||||||
"net.minecraft.src.buildcraft.factory.TileAssemblyAdvancedWorkbench");
|
"net.minecraft.src.buildcraft.factory.TileAssemblyAdvancedWorkbench");
|
||||||
CoreProxy.proxy.registerTileEntity(TileIntegrationTable.class,
|
BCRegistry.INSTANCE.registerTileEntity(TileIntegrationTable.class,
|
||||||
"net.minecraft.src.buildcraft.factory.TileIntegrationTable");
|
"net.minecraft.src.buildcraft.factory.TileIntegrationTable");
|
||||||
CoreProxy.proxy.registerTileEntity(TileChargingTable.class,
|
BCRegistry.INSTANCE.registerTileEntity(TileChargingTable.class,
|
||||||
"net.minecraft.src.buildcraft.factory.TileChargingTable");
|
"net.minecraft.src.buildcraft.factory.TileChargingTable");
|
||||||
CoreProxy.proxy.registerTileEntity(TileProgrammingTable.class,
|
BCRegistry.INSTANCE.registerTileEntity(TileProgrammingTable.class,
|
||||||
"net.minecraft.src.buildcraft.factory.TileProgrammingTable");
|
"net.minecraft.src.buildcraft.factory.TileProgrammingTable");
|
||||||
CoreProxy.proxy.registerTileEntity(TilePackager.class, "buildcraft.TilePackager");
|
BCRegistry.INSTANCE.registerTileEntity(TilePackager.class, "buildcraft.TilePackager");
|
||||||
CoreProxy.proxy.registerTileEntity(TileStampingTable.class, "buildcraft.TileStampingTable");
|
BCRegistry.INSTANCE.registerTileEntity(TileStampingTable.class, "buildcraft.TileStampingTable");
|
||||||
|
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(laserBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(laserBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||||
|
|
||||||
|
@ -164,7 +165,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
public static void loadRecipes() {
|
public static void loadRecipes() {
|
||||||
|
|
||||||
// TABLES
|
// TABLES
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(laserBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(laserBlock),
|
||||||
"ORR",
|
"ORR",
|
||||||
"DDR",
|
"DDR",
|
||||||
"ORR",
|
"ORR",
|
||||||
|
@ -172,7 +173,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'R', "dustRedstone",
|
'R', "dustRedstone",
|
||||||
'D', "gemDiamond");
|
'D', "gemDiamond");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(laserBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(laserBlock),
|
||||||
"RRO",
|
"RRO",
|
||||||
"RDD",
|
"RDD",
|
||||||
"RRO",
|
"RRO",
|
||||||
|
@ -180,7 +181,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'R', "dustRedstone",
|
'R', "dustRedstone",
|
||||||
'D', "gemDiamond");
|
'D', "gemDiamond");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(laserBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(laserBlock),
|
||||||
"RRR",
|
"RRR",
|
||||||
"RDR",
|
"RDR",
|
||||||
"ODO",
|
"ODO",
|
||||||
|
@ -188,7 +189,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'R', "dustRedstone",
|
'R', "dustRedstone",
|
||||||
'D', "gemDiamond");
|
'D', "gemDiamond");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(laserBlock),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(laserBlock),
|
||||||
"ODO",
|
"ODO",
|
||||||
"RDR",
|
"RDR",
|
||||||
"RRR",
|
"RRR",
|
||||||
|
@ -196,7 +197,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'R', "dustRedstone",
|
'R', "dustRedstone",
|
||||||
'D', "gemDiamond");
|
'D', "gemDiamond");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 0),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 0),
|
||||||
"ODO",
|
"ODO",
|
||||||
"ORO",
|
"ORO",
|
||||||
"OGO",
|
"OGO",
|
||||||
|
@ -205,7 +206,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'D', "gemDiamond",
|
'D', "gemDiamond",
|
||||||
'G', "gearDiamond");
|
'G', "gearDiamond");
|
||||||
|
|
||||||
/* CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 1),
|
/* BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 1),
|
||||||
"OWO",
|
"OWO",
|
||||||
"OCO",
|
"OCO",
|
||||||
"ORO",
|
"ORO",
|
||||||
|
@ -214,7 +215,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'C', Blocks.chest,
|
'C', Blocks.chest,
|
||||||
'R', new ItemStack(redstoneChipset, 1, 0)); */
|
'R', new ItemStack(redstoneChipset, 1, 0)); */
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 2),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 2),
|
||||||
"OIO",
|
"OIO",
|
||||||
"OCO",
|
"OCO",
|
||||||
"OGO",
|
"OGO",
|
||||||
|
@ -223,7 +224,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'C', new ItemStack(redstoneChipset, 1, 0),
|
'C', new ItemStack(redstoneChipset, 1, 0),
|
||||||
'G', "gearDiamond");
|
'G', "gearDiamond");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 3),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 3),
|
||||||
"OIO",
|
"OIO",
|
||||||
"OCO",
|
"OCO",
|
||||||
"OGO",
|
"OGO",
|
||||||
|
@ -232,7 +233,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'C', new ItemStack(redstoneChipset, 1, 0),
|
'C', new ItemStack(redstoneChipset, 1, 0),
|
||||||
'G', "gearGold");
|
'G', "gearGold");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 4),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 4),
|
||||||
"OCO",
|
"OCO",
|
||||||
"ORO",
|
"ORO",
|
||||||
"OGO",
|
"OGO",
|
||||||
|
@ -241,7 +242,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'C', "gemEmerald",
|
'C', "gemEmerald",
|
||||||
'G', "gearDiamond");
|
'G', "gearDiamond");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 5),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 5),
|
||||||
"OWO",
|
"OWO",
|
||||||
"ORO",
|
"ORO",
|
||||||
"OGO",
|
"OGO",
|
||||||
|
@ -250,7 +251,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'G', "gearGold",
|
'G', "gearGold",
|
||||||
'R', new ItemStack(redstoneChipset, 1, 0));
|
'R', new ItemStack(redstoneChipset, 1, 0));
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(packagerBlock, 1, 0),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(packagerBlock, 1, 0),
|
||||||
" I ",
|
" I ",
|
||||||
"ICI",
|
"ICI",
|
||||||
" P ",
|
" P ",
|
||||||
|
|
|
@ -59,6 +59,7 @@ import buildcraft.api.statements.StatementManager;
|
||||||
import buildcraft.api.transport.PipeManager;
|
import buildcraft.api.transport.PipeManager;
|
||||||
import buildcraft.api.transport.PipeWire;
|
import buildcraft.api.transport.PipeWire;
|
||||||
import buildcraft.core.BCCreativeTab;
|
import buildcraft.core.BCCreativeTab;
|
||||||
|
import buildcraft.core.BCRegistry;
|
||||||
import buildcraft.core.CompatHooks;
|
import buildcraft.core.CompatHooks;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
|
@ -330,14 +331,14 @@ public class BuildCraftTransport extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
filteredBufferBlock = new BlockFilteredBuffer();
|
filteredBufferBlock = new BlockFilteredBuffer();
|
||||||
CoreProxy.proxy.registerBlock(filteredBufferBlock.setBlockName("filteredBufferBlock"));
|
BCRegistry.INSTANCE.registerBlock(filteredBufferBlock.setBlockName("filteredBufferBlock"), false);
|
||||||
|
|
||||||
pipeWaterproof = new ItemBuildCraft();
|
pipeWaterproof = new ItemBuildCraft();
|
||||||
pipeWaterproof.setUnlocalizedName("pipeWaterproof");
|
pipeWaterproof.setUnlocalizedName("pipeWaterproof");
|
||||||
CoreProxy.proxy.registerItem(pipeWaterproof);
|
BCRegistry.INSTANCE.registerItem(pipeWaterproof, false);
|
||||||
|
|
||||||
genericPipeBlock = (BlockGenericPipe) CompatHooks.INSTANCE.getBlock(BlockGenericPipe.class);
|
genericPipeBlock = (BlockGenericPipe) CompatHooks.INSTANCE.getBlock(BlockGenericPipe.class);
|
||||||
CoreProxy.proxy.registerBlock(genericPipeBlock.setBlockName("pipeBlock"), ItemBlock.class);
|
BCRegistry.INSTANCE.registerBlock(genericPipeBlock.setBlockName("pipeBlock"), ItemBlock.class, true);
|
||||||
|
|
||||||
pipeItemsWood = buildPipe(PipeItemsWood.class, "plankWood", "blockGlassColorless", "plankWood");
|
pipeItemsWood = buildPipe(PipeItemsWood.class, "plankWood", "blockGlassColorless", "plankWood");
|
||||||
pipeItemsEmerald = buildPipe(PipeItemsEmerald.class, "gemEmerald", "blockGlassColorless", "gemEmerald");
|
pipeItemsEmerald = buildPipe(PipeItemsEmerald.class, "gemEmerald", "blockGlassColorless", "gemEmerald");
|
||||||
|
@ -381,32 +382,32 @@ public class BuildCraftTransport extends BuildCraftMod {
|
||||||
pipeStructureCobblestone = buildPipe(PipeStructureCobblestone.class, Blocks.cobblestone, Blocks.gravel, Blocks.cobblestone);
|
pipeStructureCobblestone = buildPipe(PipeStructureCobblestone.class, Blocks.cobblestone, Blocks.gravel, Blocks.cobblestone);
|
||||||
|
|
||||||
pipeWire = new ItemPipeWire();
|
pipeWire = new ItemPipeWire();
|
||||||
CoreProxy.proxy.registerItem(pipeWire);
|
BCRegistry.INSTANCE.registerItem(pipeWire, false);
|
||||||
PipeWire.item = pipeWire;
|
PipeWire.item = pipeWire;
|
||||||
|
|
||||||
pipeGate = new ItemGate();
|
pipeGate = new ItemGate();
|
||||||
pipeGate.setUnlocalizedName("pipeGate");
|
pipeGate.setUnlocalizedName("pipeGate");
|
||||||
CoreProxy.proxy.registerItem(pipeGate);
|
BCRegistry.INSTANCE.registerItem(pipeGate, false);
|
||||||
|
|
||||||
facadeItem = new ItemFacade();
|
facadeItem = new ItemFacade();
|
||||||
facadeItem.setUnlocalizedName("pipeFacade");
|
facadeItem.setUnlocalizedName("pipeFacade");
|
||||||
CoreProxy.proxy.registerItem(facadeItem);
|
BCRegistry.INSTANCE.registerItem(facadeItem, false);
|
||||||
FacadeAPI.facadeItem = facadeItem;
|
FacadeAPI.facadeItem = facadeItem;
|
||||||
|
|
||||||
plugItem = new ItemPlug();
|
plugItem = new ItemPlug();
|
||||||
plugItem.setUnlocalizedName("pipePlug");
|
plugItem.setUnlocalizedName("pipePlug");
|
||||||
CoreProxy.proxy.registerItem(plugItem);
|
BCRegistry.INSTANCE.registerItem(plugItem, false);
|
||||||
|
|
||||||
lensItem = new ItemLens();
|
lensItem = new ItemLens();
|
||||||
lensItem.setUnlocalizedName("pipeLens");
|
lensItem.setUnlocalizedName("pipeLens");
|
||||||
CoreProxy.proxy.registerItem(lensItem);
|
BCRegistry.INSTANCE.registerItem(lensItem, false);
|
||||||
|
|
||||||
powerAdapterItem = new ItemPowerAdapter();
|
powerAdapterItem = new ItemPowerAdapter();
|
||||||
powerAdapterItem.setUnlocalizedName("pipePowerAdapter");
|
powerAdapterItem.setUnlocalizedName("pipePowerAdapter");
|
||||||
CoreProxy.proxy.registerItem(powerAdapterItem);
|
BCRegistry.INSTANCE.registerItem(powerAdapterItem, false);
|
||||||
|
|
||||||
gateCopier = new ItemGateCopier();
|
gateCopier = new ItemGateCopier();
|
||||||
CoreProxy.proxy.registerItem(gateCopier);
|
BCRegistry.INSTANCE.registerItem(gateCopier, false);
|
||||||
|
|
||||||
for (PipeContents kind : PipeContents.values()) {
|
for (PipeContents kind : PipeContents.values()) {
|
||||||
triggerPipe[kind.ordinal()] = new TriggerPipeContents(kind);
|
triggerPipe[kind.ordinal()] = new TriggerPipeContents(kind);
|
||||||
|
@ -657,16 +658,16 @@ public class BuildCraftTransport extends BuildCraftMod {
|
||||||
// Add pipe recipes
|
// Add pipe recipes
|
||||||
for (PipeRecipe pipe : pipeRecipes) {
|
for (PipeRecipe pipe : pipeRecipes) {
|
||||||
if (pipe.isShapeless) {
|
if (pipe.isShapeless) {
|
||||||
CoreProxy.proxy.addShapelessRecipe(pipe.result, pipe.input);
|
BCRegistry.INSTANCE.addShapelessRecipe(pipe.result, pipe.input);
|
||||||
} else {
|
} else {
|
||||||
CoreProxy.proxy.addCraftingRecipe(pipe.result, pipe.input);
|
BCRegistry.INSTANCE.addCraftingRecipe(pipe.result, pipe.input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GameRegistry.addRecipe(new PipeColoringRecipe());
|
GameRegistry.addRecipe(new PipeColoringRecipe());
|
||||||
RecipeSorter.register("buildcraft:pipecoloring", PipeColoringRecipe.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
|
RecipeSorter.register("buildcraft:pipecoloring", PipeColoringRecipe.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(filteredBufferBlock, 1),
|
BCRegistry.INSTANCE.addCraftingRecipe(new ItemStack(filteredBufferBlock, 1),
|
||||||
"wdw", "wcw", "wpw", 'w', "plankWood", 'd',
|
"wdw", "wcw", "wpw", 'w', "plankWood", 'd',
|
||||||
BuildCraftTransport.pipeItemsDiamond, 'c', "chestWood", 'p',
|
BuildCraftTransport.pipeItemsDiamond, 'c', "chestWood", 'p',
|
||||||
Blocks.piston);
|
Blocks.piston);
|
||||||
|
@ -722,9 +723,19 @@ public class BuildCraftTransport extends BuildCraftMod {
|
||||||
|
|
||||||
public static Item buildPipe(Class<? extends Pipe<?>> clas, BCCreativeTab creativeTab,
|
public static Item buildPipe(Class<? extends Pipe<?>> clas, BCCreativeTab creativeTab,
|
||||||
Object... ingredients) {
|
Object... ingredients) {
|
||||||
|
if (!BCRegistry.INSTANCE.isEnabled("pipes", clas.getSimpleName())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
|
ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
|
||||||
res.setUnlocalizedName(clas.getSimpleName());
|
res.setUnlocalizedName(clas.getSimpleName());
|
||||||
|
|
||||||
|
for (Object o : ingredients) {
|
||||||
|
if (o == null) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add appropriate recipes to temporary list
|
// Add appropriate recipes to temporary list
|
||||||
if (ingredients.length == 3) {
|
if (ingredients.length == 3) {
|
||||||
for (int i = 0; i < 17; i++) {
|
for (int i = 0; i < 17; i++) {
|
||||||
|
|
90
common/buildcraft/core/BCRegistry.java
Normal file
90
common/buildcraft/core/BCRegistry.java
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
package buildcraft.core;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import net.minecraftforge.common.config.Configuration;
|
||||||
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||||
|
import buildcraft.core.lib.items.ItemBlockBuildCraft;
|
||||||
|
|
||||||
|
public class BCRegistry {
|
||||||
|
public static final BCRegistry INSTANCE = new BCRegistry();
|
||||||
|
private Configuration regCfg;
|
||||||
|
|
||||||
|
private BCRegistry() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEnabled(String category, String name) {
|
||||||
|
return regCfg.get(category, name, true).getBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistryConfig(File f) {
|
||||||
|
regCfg = new Configuration(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean registerBlock(Block block, boolean forced) {
|
||||||
|
return registerBlock(block, ItemBlockBuildCraft.class, forced);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean registerBlock(Block block, Class<? extends ItemBlock> item, boolean forced) {
|
||||||
|
String name = block.getUnlocalizedName().replace("tile.", "");
|
||||||
|
if (forced || regCfg.get("blocks", name, true).getBoolean()) {
|
||||||
|
GameRegistry.registerBlock(block, item, name);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean registerItem(Item item, boolean forced) {
|
||||||
|
String name = item.getUnlocalizedName().replace("item.", "");
|
||||||
|
if (forced || regCfg.get("items", name, true).getBoolean()) {
|
||||||
|
GameRegistry.registerItem(item, name);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
|
public void registerTileEntity(Class clas, String ident) {
|
||||||
|
GameRegistry.registerTileEntity(CompatHooks.INSTANCE.getTile(clas), ident);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addCraftingRecipe(ItemStack result, Object... recipe) {
|
||||||
|
for (Object o : recipe) {
|
||||||
|
if (o instanceof Block && Block.getIdFromBlock((Block) o) < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (o instanceof Item && Item.getIdFromItem((Item) o) < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (o instanceof ItemStack && ((ItemStack) o).getItem() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(result, recipe));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addShapelessRecipe(ItemStack result, Object... recipe) {
|
||||||
|
for (Object o : recipe) {
|
||||||
|
if (o instanceof Block && Block.getIdFromBlock((Block) o) < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (o instanceof Item && Item.getIdFromItem((Item) o) < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (o instanceof ItemStack && ((ItemStack) o).getItem() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GameRegistry.addRecipe(new ShapelessOreRecipe(result, recipe));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save() {
|
||||||
|
regCfg.save();
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,26 +13,26 @@ import buildcraft.core.lib.engines.BlockEngineBase;
|
||||||
import buildcraft.core.lib.engines.TileEngineBase;
|
import buildcraft.core.lib.engines.TileEngineBase;
|
||||||
|
|
||||||
public class BlockEngine extends BlockEngineBase {
|
public class BlockEngine extends BlockEngineBase {
|
||||||
private final ArrayList<Class<? extends TileEngineBase>> engineTiles;
|
private final Class[] engineTiles;
|
||||||
private final ArrayList<String> names;
|
private final String[] names;
|
||||||
private final ArrayList<String> texturePaths;
|
private final String[] texturePaths;
|
||||||
|
|
||||||
public BlockEngine() {
|
public BlockEngine() {
|
||||||
super();
|
super();
|
||||||
setBlockName("engineBlock");
|
setBlockName("engineBlock");
|
||||||
|
|
||||||
engineTiles = new ArrayList<Class<? extends TileEngineBase>>(16);
|
engineTiles = new Class[16];
|
||||||
names = new ArrayList<String>(16);
|
names = new String[16];
|
||||||
texturePaths = new ArrayList<String>(16);
|
texturePaths = new String[16];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTexturePrefix(int meta, boolean addPrefix) {
|
public String getTexturePrefix(int meta, boolean addPrefix) {
|
||||||
if (meta < texturePaths.size()) {
|
if (texturePaths[meta] != null) {
|
||||||
if (addPrefix) {
|
if (addPrefix) {
|
||||||
return texturePaths.get(meta).replaceAll(":", ":textures/blocks/");
|
return texturePaths[meta].replaceAll(":", ":textures/blocks/");
|
||||||
} else {
|
} else {
|
||||||
return texturePaths.get(meta);
|
return texturePaths[meta];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -41,19 +41,21 @@ public class BlockEngine extends BlockEngineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName(int metadata) {
|
public String getUnlocalizedName(int metadata) {
|
||||||
return names.get(metadata % names.size());
|
return names[metadata] != null ? names[metadata] : "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerTile(Class<? extends TileEngineBase> engineTile, String name, String texturePath) {
|
public void registerTile(Class<? extends TileEngineBase> engineTile, int meta, String name, String texturePath) {
|
||||||
engineTiles.add(engineTile);
|
if (BCRegistry.INSTANCE.isEnabled("engines", name)) {
|
||||||
names.add(name);
|
engineTiles[meta] = engineTile;
|
||||||
texturePaths.add(texturePath);
|
names[meta] = name;
|
||||||
|
texturePaths[meta] = texturePath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createTileEntity(World world, int metadata) {
|
public TileEntity createTileEntity(World world, int metadata) {
|
||||||
try {
|
try {
|
||||||
return engineTiles.get(metadata % engineTiles.size()).newInstance();
|
return (TileEntity) engineTiles[metadata].newInstance();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
|
@ -63,12 +65,14 @@ public class BlockEngine extends BlockEngineBase {
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
@Override
|
@Override
|
||||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||||
for (int i = 0; i < engineTiles.size(); i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
itemList.add(new ItemStack(this, 1, i));
|
if (engineTiles[i] != null) {
|
||||||
|
itemList.add(new ItemStack(this, 1, i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getEngineCount() {
|
public boolean hasEngine(int meta) {
|
||||||
return engineTiles.size();
|
return engineTiles[meta] != null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,36 +80,10 @@ public class CoreProxy implements ICoreProxy {
|
||||||
public void initializeEntityRendering() {
|
public void initializeEntityRendering() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* REGISTRATION */
|
|
||||||
public void registerBlock(Block block) {
|
|
||||||
registerBlock(block, ItemBlockBuildCraft.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerBlock(Block block, Class<? extends ItemBlock> item) {
|
|
||||||
GameRegistry.registerBlock(block, item, block.getUnlocalizedName().replace("tile.", ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerItem(Item item) {
|
|
||||||
GameRegistry.registerItem(item, item.getUnlocalizedName().replace("item.", ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
|
||||||
public void registerTileEntity(Class clas, String ident) {
|
|
||||||
GameRegistry.registerTileEntity(CompatHooks.INSTANCE.getTile(clas), ident);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onCraftingPickup(World world, EntityPlayer player, ItemStack stack) {
|
public void onCraftingPickup(World world, EntityPlayer player, ItemStack stack) {
|
||||||
stack.onCrafting(world, player, stack.stackSize);
|
stack.onCrafting(world, player, stack.stackSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addCraftingRecipe(ItemStack result, Object... recipe) {
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(result, recipe));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addShapelessRecipe(ItemStack result, Object... recipe) {
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(result, recipe));
|
|
||||||
}
|
|
||||||
|
|
||||||
public String playerName() {
|
public String playerName() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,11 +98,13 @@ public class CoreProxyClient extends CoreProxy {
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TilePathMarker.class, new RenderPathMarker());
|
ClientRegistry.bindTileEntitySpecialRenderer(TilePathMarker.class, new RenderPathMarker());
|
||||||
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEngineBase.class, new RenderEngine());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEngineBase.class, new RenderEngine());
|
||||||
for (int i = 0; i < BuildCraftCore.engineBlock.getEngineCount(); i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
TileEngineBase engineTile = (TileEngineBase) BuildCraftCore.engineBlock.createTileEntity(null, i);
|
if (BuildCraftCore.engineBlock.hasEngine(i)) {
|
||||||
engineTile.blockType = BuildCraftCore.engineBlock;
|
TileEngineBase engineTile = (TileEngineBase) BuildCraftCore.engineBlock.createTileEntity(null, i);
|
||||||
engineTile.blockMetadata = i;
|
engineTile.blockType = BuildCraftCore.engineBlock;
|
||||||
RenderingEntityBlocks.blockByEntityRenders.put(new RenderingEntityBlocks.EntityRenderIndex(BuildCraftCore.engineBlock, i), new RenderEngine(engineTile));
|
engineTile.blockMetadata = i;
|
||||||
|
RenderingEntityBlocks.blockByEntityRenders.put(new RenderingEntityBlocks.EntityRenderIndex(BuildCraftCore.engineBlock, i), new RenderEngine(engineTile));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue