almost done making BC modular (minor things in Core left)

This commit is contained in:
asiekierka 2015-03-04 22:44:44 +01:00
parent 8c098dc69e
commit 603d0eea4d
58 changed files with 375 additions and 314 deletions

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.robotics;
package buildcraft.api.robots;
import net.minecraft.tileentity.TileEntity;

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.robotics;
package buildcraft.api.robots;
import net.minecraft.tileentity.TileEntity;

View file

@ -16,19 +16,25 @@ public abstract class RobotManager {
public static IRobotRegistryProvider registryProvider;
public static ArrayList<Class<? extends AIRobot>> aiRobots = new ArrayList<Class<? extends AIRobot>>();
private static Map<Class<? extends AIRobot>, String> aiRobotsNames =
new HashMap<Class<? extends AIRobot>, String>();
private static Map<String, Class<? extends AIRobot>> aiRobotsByNames =
new HashMap<String, Class<? extends AIRobot>>();
private static Map<String, Class<? extends AIRobot>> aiRobotsByLegacyClassNames =
new HashMap<String, Class<? extends AIRobot>>();
static {
aiRobotsByNames = new HashMap<String, Class<? extends AIRobot>>();
aiRobotsNames = new HashMap<Class<? extends AIRobot>, String>();
aiRobotsByLegacyClassNames = new HashMap<String, Class<? extends AIRobot>>();
resourceIdNames = new HashMap<Class<? extends ResourceId>, String>();
resourceIdByNames = new HashMap<String, Class<? extends ResourceId>>();
resourceIdLegacyClassNames = new HashMap<String, Class<? extends ResourceId>>();
private static Map<Class<? extends ResourceId>, String> resourceIdNames =
new HashMap<Class<? extends ResourceId>, String>();
private static Map<String, Class<? extends ResourceId>> resourceIdByNames =
new HashMap<String, Class<? extends ResourceId>>();
private static Map<String, Class<? extends ResourceId>> resourceIdLegacyClassNames =
new HashMap<String, Class<? extends ResourceId>>();
registerResourceId(ResourceIdBlock.class, "resourceIdBlock", "buildcraft.core.robots.ResourceIdBlock");
registerResourceId(ResourceIdRequest.class, "resourceIdRequest", "buildcraft.core.robots.ResourceIdRequest");
}
private static Map<Class<? extends AIRobot>, String> aiRobotsNames;
private static Map<String, Class<? extends AIRobot>> aiRobotsByNames;
private static Map<String, Class<? extends AIRobot>> aiRobotsByLegacyClassNames;
private static Map<Class<? extends ResourceId>, String> resourceIdNames;
private static Map<String, Class<? extends ResourceId>> resourceIdByNames;
private static Map<String, Class<? extends ResourceId>> resourceIdLegacyClassNames;
public static void registerAIRobot(Class<? extends AIRobot> aiRobot, String name) {
registerAIRobot(aiRobot, name, null);

View file

@ -67,7 +67,7 @@ import buildcraft.builders.BlockMarker;
import buildcraft.builders.BlockPathMarker;
import buildcraft.builders.BuilderProxy;
import buildcraft.builders.EventHandlerBuilders;
import buildcraft.builders.GuiHandler;
import buildcraft.builders.BuildersGuiHandler;
import buildcraft.builders.HeuristicBlockDetection;
import buildcraft.builders.ItemBlueprintStandard;
import buildcraft.builders.ItemBlueprintTemplate;
@ -292,7 +292,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
@Mod.EventHandler
public void init(FMLInitializationEvent evt) {
// Register gui handler
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new BuildersGuiHandler());
// Register save handler
MinecraftForge.EVENT_BUS.register(new EventHandlerBuilders());

View file

@ -41,7 +41,6 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -72,12 +71,13 @@ import buildcraft.api.statements.StatementManager;
import buildcraft.api.statements.StatementParameterItemStack;
import buildcraft.api.tiles.IControllable;
import buildcraft.core.AchievementManager;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.BlockSpring;
import buildcraft.core.BuildCraftConfiguration;
import buildcraft.core.CommandBuildCraft;
import buildcraft.core.CoreIconProvider;
import buildcraft.core.DefaultProps;
import buildcraft.core.GuiHandler;
import buildcraft.core.CoreGuiHandler;
import buildcraft.core.InterModComms;
import buildcraft.core.ItemGear;
import buildcraft.core.ItemList;
@ -89,7 +89,6 @@ import buildcraft.core.TickHandlerCore;
import buildcraft.core.Version;
import buildcraft.core.blueprints.SchematicRegistry;
import buildcraft.core.network.ChannelHandler;
import buildcraft.core.network.EntityIds;
import buildcraft.core.network.PacketHandler;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.recipes.AssemblyRecipeManager;
@ -220,6 +219,8 @@ public class BuildCraftCore extends BuildCraftMod {
public void loadConfiguration(FMLPreInitializationEvent evt) {
BCLog.initLog();
new BCCreativeTab("main");
BuildcraftRecipeRegistry.assemblyTable = AssemblyRecipeManager.INSTANCE;
BuildcraftRecipeRegistry.integrationTable = IntegrationRecipeManager.INSTANCE;
BuildcraftRecipeRegistry.refinery = RefineryRecipeManager.INSTANCE;
@ -361,13 +362,16 @@ public class BuildCraftCore extends BuildCraftMod {
if (BuildCraftCore.loadDefaultRecipes) {
loadRecipes();
}
BCCreativeTab.get("main").setIcon(new ItemStack(BuildCraftCore.wrenchItem, 1));
EntityList.stringToClassMapping.remove("BuildCraft|Core.bcLaser");
EntityList.stringToClassMapping.remove("BuildCraft|Core.bcEnergyLaser");
CoreProxy.proxy.initializeRendering();
CoreProxy.proxy.initializeEntityRendering();
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new CoreGuiHandler());
}
@Mod.EventHandler

View file

@ -62,7 +62,7 @@ import buildcraft.energy.BlockEnergyReceiver;
import buildcraft.energy.BlockEngine;
import buildcraft.energy.BucketHandler;
import buildcraft.energy.EnergyProxy;
import buildcraft.energy.GuiHandler;
import buildcraft.energy.EnergyGuiHandler;
import buildcraft.energy.IMCHandlerEnergy;
import buildcraft.energy.ItemBucketBuildcraft;
import buildcraft.energy.ItemEngine;
@ -351,7 +351,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
channels = NetworkRegistry.INSTANCE.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-ENERGY", new ChannelHandler(), new PacketHandlerTransport());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new EnergyGuiHandler());
StatementManager.registerTriggerProvider(new EnergyStatementProvider());

View file

@ -58,7 +58,7 @@ import buildcraft.factory.BlockRefinery;
import buildcraft.factory.BlockTank;
import buildcraft.factory.FactoryProxy;
import buildcraft.factory.FactoryProxyClient;
import buildcraft.factory.GuiHandler;
import buildcraft.factory.FactoryGuiHandler;
import buildcraft.factory.PumpDimensionList;
import buildcraft.factory.TileAutoWorkbench;
import buildcraft.factory.TileFloodGate;
@ -147,7 +147,7 @@ public class BuildCraftFactory extends BuildCraftMod {
@Mod.EventHandler
public void load(FMLInitializationEvent evt) {
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new FactoryGuiHandler());
// EntityRegistry.registerModEntity(EntityMechanicalArm.class, "bcMechanicalArm", EntityIds.MECHANICAL_ARM, instance, 50, 1, true);

View file

@ -11,15 +11,18 @@ package buildcraft;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import buildcraft.api.boards.RedstoneBoardRegistry;
@ -28,21 +31,22 @@ import buildcraft.api.robots.RobotManager;
import buildcraft.api.statements.IActionInternal;
import buildcraft.api.statements.ITriggerInternal;
import buildcraft.api.statements.StatementManager;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.CompatHooks;
import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms;
import buildcraft.core.Version;
import buildcraft.core.network.EntityIds;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.robotics.BlockRequester;
import buildcraft.robotics.BlockZonePlan;
import buildcraft.robotics.BoardProgrammingRecipe;
import buildcraft.robotics.EntityRobot;
import buildcraft.robotics.ImplRedstoneBoardRegistry;
import buildcraft.robotics.ItemRedstoneBoard;
import buildcraft.robotics.ItemRobot;
import buildcraft.robotics.RobotRegistry;
import buildcraft.robotics.RobotRegistryProvider;
import buildcraft.silicon.ResourceIdAssemblyTable;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.robotics.ResourceIdRequest;
import buildcraft.robotics.RoboticsGuiHandler;
import buildcraft.robotics.RobotIntegrationRecipe;
import buildcraft.robotics.RoboticsProxy;
import buildcraft.robotics.ai.AIRobotAttack;
@ -143,6 +147,9 @@ public class BuildCraftRobotics extends BuildCraftMod {
@Mod.Instance("BuildCraft|Robotics")
public static BuildCraftRobotics instance;
public static BlockZonePlan zonePlanBlock;
public static BlockRequester requesterBlock;
public static ItemRedstoneBoard redstoneBoard;
public static Item robotItem;
@ -172,6 +179,8 @@ public class BuildCraftRobotics extends BuildCraftMod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent evt) {
new BCCreativeTab("boards");
chipsetCostMultiplier = BuildCraftCore.mainConfiguration.getFloat("chipset.costMultiplier", "general", 1.0F, 0.001F, 1000.0F, "The multiplier for chipset recipe cost.");
blacklistedRobots = new ArrayList<String>();
@ -186,6 +195,14 @@ public class BuildCraftRobotics extends BuildCraftMod {
redstoneBoard.setUnlocalizedName("redstone_board");
CoreProxy.proxy.registerItem(redstoneBoard);
zonePlanBlock = (BlockZonePlan) CompatHooks.INSTANCE.getBlock(BlockZonePlan.class);
zonePlanBlock.setBlockName("zonePlan");
CoreProxy.proxy.registerBlock(zonePlanBlock);
requesterBlock = (BlockRequester) CompatHooks.INSTANCE.getBlock(BlockRequester.class);
requesterBlock.setBlockName("requester");
CoreProxy.proxy.registerBlock(requesterBlock);
RedstoneBoardRegistry.instance = new ImplRedstoneBoardRegistry();
RedstoneBoardRegistry.instance.registerBoardClass(BoardRobotPickerNBT.instance, 20);
@ -207,7 +224,9 @@ public class BuildCraftRobotics extends BuildCraftMod {
RedstoneBoardRegistry.instance.registerBoardClass(BoardRobotKnightNBT.instance, 1);
RedstoneBoardRegistry.instance.registerBoardClass(BoardRobotBomberNBT.instance, 1);
if (Loader.isModLoaded("BuildCraft|Builders")) {
RedstoneBoardRegistry.instance.registerBoardClass(BoardRobotBuilderNBT.instance, 0.5F);
}
RedstoneBoardRegistry.instance.registerBoardClass(BoardRobotStripesNBT.instance, 0.5F);
StatementManager.registerActionProvider(new RobotsActionProvider());
@ -216,17 +235,23 @@ public class BuildCraftRobotics extends BuildCraftMod {
@Mod.EventHandler
public void init(FMLInitializationEvent evt) {
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new RoboticsGuiHandler());
if (BuildCraftCore.loadDefaultRecipes) {
loadRecipes();
}
BCCreativeTab.get("boards").setIcon(new ItemStack(BuildCraftRobotics.redstoneBoard, 1));
EntityRegistry.registerModEntity(EntityRobot.class, "bcRobot", EntityIds.ROBOT, instance, 50, 1, true);
RobotManager.registryProvider = new RobotRegistryProvider();
RobotManager.registerAIRobot(AIRobotMain.class, "aiRobotMain", "buildcraft.core.robots.AIRobotMain");
RobotManager.registerAIRobot(BoardRobotBomber.class, "boardRobotBomber", "buildcraft.core.robots.boards.BoardRobotBomber");
if (Loader.isModLoaded("BuildCraft|Builders")) {
RobotManager.registerAIRobot(BoardRobotBuilder.class, "boardRobotBuilder", "buildcraft.core.robots.boards.BoardRobotBuilder");
}
RobotManager.registerAIRobot(BoardRobotButcher.class, "boardRobotButcher", "buildcraft.core.robots.boards.BoardRobotButcher");
RobotManager.registerAIRobot(BoardRobotCarrier.class, "boardRobotCarrier", "buildcraft.core.robots.boards.BoardRobotCarrier");
RobotManager.registerAIRobot(BoardRobotCrafter.class, "boardRobotCrafter", "buildcraft.core.robots.boards.BoardRobotCrafter");
@ -280,9 +305,6 @@ public class BuildCraftRobotics extends BuildCraftMod {
RobotManager.registerAIRobot(AIRobotUnload.class, "aiRobotUnload", "buildcraft.core.robots.AIRobotUnload");
RobotManager.registerAIRobot(AIRobotUnloadFluids.class, "aiRobotUnloadFluids", "buildcraft.core.robots.AIRobotUnloadFluids");
RobotManager.registerAIRobot(AIRobotUseToolOnBlock.class, "aiRobotUseToolOnBlock", "buildcraft.core.robots.AIRobotUseToolOnBlock");
RobotManager.registerResourceId(ResourceIdAssemblyTable.class, "resourceIdAssemblyTable", "buildcraft.core.robots.ResourceIdAssemblyTable");
RobotManager.registerResourceId(ResourceIdBlock.class, "resourceIdBlock", "buildcraft.core.robots.ResourceIdBlock");
RobotManager.registerResourceId(ResourceIdRequest.class, "resourceIdRequest", "buildcraft.core.robots.ResourceIdRequest");
RoboticsProxy.proxy.registerRenderers();
}
@ -296,7 +318,6 @@ public class BuildCraftRobotics extends BuildCraftMod {
'R', BuildCraftSilicon.redstoneCrystal,
'C', ItemRedstoneChipset.Chipset.DIAMOND.getStack());
CoreProxy.proxy.addCraftingRecipe(new ItemStack(redstoneBoard),
"PPP",
"PRP",
@ -304,6 +325,26 @@ public class BuildCraftRobotics extends BuildCraftMod {
'R', "dustRedstone",
'P', Items.paper);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0),
"IRI",
"GMG",
"IDI",
'M', Items.map,
'R', "dustRedstone",
'G', "gearGold",
'D', "gearDiamond",
'I', "ingotIron");
CoreProxy.proxy.addCraftingRecipe(new ItemStack(requesterBlock, 1, 0),
"IPI",
"GCG",
"IRI",
'C', Blocks.chest,
'R', "dustRedstone",
'P', Blocks.piston,
'G', "gearIron",
'I', "ingotIron");
BuildcraftRecipeRegistry.programmingTable.addRecipe(new BoardProgrammingRecipe());
BuildcraftRecipeRegistry.integrationTable.addRecipe(new RobotIntegrationRecipe("buildcraft:robotIntegration"));
}
@ -312,17 +353,4 @@ public class BuildCraftRobotics extends BuildCraftMod {
public void processRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event);
}
@Mod.EventHandler
public void remap(FMLMissingMappingsEvent event) {
for (FMLMissingMappingsEvent.MissingMapping mapping: event.get()) {
if (mapping.type == GameRegistry.Type.ITEM) {
if (mapping.name.equals("BuildCraft|Silicon:robot")) {
mapping.remap(robotItem);
} else if (mapping.name.equals("BuildCraft|Silicon:redstone_board")) {
mapping.remap(redstoneBoard);
}
}
}
}
}

View file

@ -8,6 +8,7 @@
*/
package buildcraft;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
@ -25,13 +26,11 @@ import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import buildcraft.api.blueprints.BuilderAPI;
import buildcraft.api.boards.RedstoneBoardRegistry;
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
import buildcraft.api.robots.RobotManager;
import buildcraft.builders.schematics.SchematicRotateMeta;
import buildcraft.commander.BlockRequester;
import buildcraft.commander.BlockZonePlan;
import buildcraft.commander.TileRequester;
import buildcraft.commander.TileZonePlan;
import buildcraft.robotics.TileRequester;
import buildcraft.robotics.TileZonePlan;
import buildcraft.core.CompatHooks;
import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms;
@ -41,10 +40,11 @@ import buildcraft.core.network.ChannelHandler;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.silicon.BlockLaser;
import buildcraft.silicon.BlockLaserTable;
import buildcraft.silicon.GuiHandler;
import buildcraft.silicon.SiliconGuiHandler;
import buildcraft.silicon.ItemLaserTable;
import buildcraft.silicon.ItemRedstoneChipset;
import buildcraft.silicon.ItemRedstoneChipset.Chipset;
import buildcraft.silicon.ResourceIdAssemblyTable;
import buildcraft.silicon.SiliconProxy;
import buildcraft.silicon.TileAdvancedCraftingTable;
import buildcraft.silicon.TileAssemblyTable;
@ -62,8 +62,6 @@ public class BuildCraftSilicon extends BuildCraftMod {
public static ItemRedstoneChipset redstoneChipset;
public static BlockLaser laserBlock;
public static BlockLaserTable assemblyTableBlock;
public static BlockZonePlan zonePlanBlock;
public static BlockRequester requesterBlock;
public static Item redstoneCrystal;
public static Achievement timeForSomeLogicAchievement;
@ -85,14 +83,6 @@ public class BuildCraftSilicon extends BuildCraftMod {
assemblyTableBlock.setBlockName("laserTableBlock");
CoreProxy.proxy.registerBlock(assemblyTableBlock, ItemLaserTable.class);
zonePlanBlock = (BlockZonePlan) CompatHooks.INSTANCE.getBlock(BlockZonePlan.class);
zonePlanBlock.setBlockName("zonePlan");
CoreProxy.proxy.registerBlock(zonePlanBlock);
requesterBlock = (BlockRequester) CompatHooks.INSTANCE.getBlock(BlockRequester.class);
requesterBlock.setBlockName("requester");
CoreProxy.proxy.registerBlock(requesterBlock);
redstoneChipset = new ItemRedstoneChipset();
redstoneChipset.setUnlocalizedName("redstoneChipset");
CoreProxy.proxy.registerItem(redstoneChipset);
@ -109,7 +99,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-SILICON", new ChannelHandler(), new PacketHandlerSilicon());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new SiliconGuiHandler());
CoreProxy.proxy.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser");
CoreProxy.proxy.registerTileEntity(TileAssemblyTable.class,
"net.minecraft.src.buildcraft.factory.TileAssemblyTable");
@ -126,6 +116,8 @@ public class BuildCraftSilicon extends BuildCraftMod {
BuilderAPI.schematicRegistry.registerSchematicBlock(laserBlock, SchematicRotateMeta.class, new int[] {2, 5, 3, 4}, true);
RobotManager.registerResourceId(ResourceIdAssemblyTable.class, "resourceIdAssemblyTable", "buildcraft.core.robots.ResourceIdAssemblyTable");
timeForSomeLogicAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.timeForSomeLogic", "timeForSomeLogicAchievement", 9, -2, assemblyTableBlock, BuildCraftCore.diamondGearAchievement));
tinglyLaserAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.tinglyLaser", "tinglyLaserAchievement", 11, -2, laserBlock, timeForSomeLogicAchievement));
@ -192,27 +184,6 @@ public class BuildCraftSilicon extends BuildCraftMod {
'C', Items.emerald,
'G', "gearDiamond");
// COMMANDER BLOCKS
CoreProxy.proxy.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0),
"IRI",
"GMG",
"IDI",
'M', Items.map,
'R', "dustRedstone",
'G', "gearGold",
'D', "gearDiamond",
'I', "ingotIron");
CoreProxy.proxy.addCraftingRecipe(new ItemStack(requesterBlock, 1, 0),
"IPI",
"GCG",
"IRI",
'C', Blocks.chest,
'R', "dustRedstone",
'P', Blocks.piston,
'G', "gearIron",
'I', "ingotIron");
// CHIPSETS
BuildcraftRecipeRegistry.assemblyTable.addRecipe("buildcraft:redstoneChipset", Math.round(100000 * chipsetCostMultiplier), Chipset.RED.getStack(),
"dustRedstone");
@ -264,6 +235,25 @@ public class BuildCraftSilicon extends BuildCraftMod {
mapping.remap(assemblyTableBlock);
}
}
// Silicon -> Robotics migration code
if (mapping.type == GameRegistry.Type.ITEM) {
if (mapping.name.equals("BuildCraft|Silicon:robot")) {
mapping.remap((Item) Item.itemRegistry.getObject("BuildCraft|Robotics:robot"));
} else if (mapping.name.equals("BuildCraft|Silicon:redstone_board")) {
mapping.remap((Item) Item.itemRegistry.getObject("BuildCraft|Robotics:redstone_board"));
} else if (mapping.name.equals("BuildCraft|Silicon:requester")) {
mapping.remap((Item) Item.itemRegistry.getObject("BuildCraft|Robotics:requester"));
} else if (mapping.name.equals("BuildCraft|Silicon:zonePlan")) {
mapping.remap((Item) Item.itemRegistry.getObject("BuildCraft|Robotics:zonePlan"));
}
} else if (mapping.type == GameRegistry.Type.BLOCK) {
if (mapping.name.equals("BuildCraft|Silicon:requester")) {
mapping.remap(Block.getBlockFromName("BuildCraft|Robotics:requester"));
} else if (mapping.name.equals("BuildCraft|Silicon:zonePlan")) {
mapping.remap(Block.getBlockFromName("BuildCraft|Robotics:zonePlan"));
}
}
}
}
}

View file

@ -46,7 +46,7 @@ import buildcraft.api.statements.StatementManager;
import buildcraft.api.transport.PipeManager;
import buildcraft.api.transport.PipeWire;
import buildcraft.core.CompatHooks;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms;
import buildcraft.core.ItemBuildCraft;
@ -61,7 +61,7 @@ import buildcraft.silicon.ItemRedstoneChipset.Chipset;
import buildcraft.transport.BlockFilteredBuffer;
import buildcraft.transport.BlockGenericPipe;
import buildcraft.transport.FacadePluggable;
import buildcraft.transport.GuiHandler;
import buildcraft.transport.TransportGuiHandler;
import buildcraft.transport.IMCHandlerTransport;
import buildcraft.transport.ItemFacade;
import buildcraft.transport.ItemGateCopier;
@ -263,6 +263,9 @@ public class BuildCraftTransport extends BuildCraftMod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent evt) {
new BCCreativeTab("pipes");
new BCCreativeTab("facades");
try {
Property durability = BuildCraftCore.mainConfiguration.get("general", "pipes.durability", DefaultProps.PIPES_DURABILITY);
durability.comment = "How long a pipe will take to break";
@ -333,45 +336,45 @@ public class BuildCraftTransport extends BuildCraftMod {
CoreProxy.proxy.registerBlock(genericPipeBlock.setBlockName("pipeBlock"), ItemBlock.class);
pipeItemsWood = buildPipe(PipeItemsWood.class, "Wooden Transport Pipe", CreativeTabBuildCraft.PIPES, "plankWood", Blocks.glass, "plankWood");
pipeItemsEmerald = buildPipe(PipeItemsEmerald.class, "Emerald Transport Pipe", CreativeTabBuildCraft.PIPES, "gemEmerald", Blocks.glass, "gemEmerald");
pipeItemsCobblestone = buildPipe(PipeItemsCobblestone.class, "Cobblestone Transport Pipe", CreativeTabBuildCraft.PIPES, "cobblestone", Blocks.glass, "cobblestone");
pipeItemsStone = buildPipe(PipeItemsStone.class, "Stone Transport Pipe", CreativeTabBuildCraft.PIPES, "stone", Blocks.glass, "stone");
pipeItemsQuartz = buildPipe(PipeItemsQuartz.class, "Quartz Transport Pipe", CreativeTabBuildCraft.PIPES, "blockQuartz", Blocks.glass, "blockQuartz");
pipeItemsIron = buildPipe(PipeItemsIron.class, "Iron Transport Pipe", CreativeTabBuildCraft.PIPES, "ingotIron", Blocks.glass, "ingotIron");
pipeItemsGold = buildPipe(PipeItemsGold.class, "Golden Transport Pipe", CreativeTabBuildCraft.PIPES, "ingotGold", Blocks.glass, "ingotGold");
pipeItemsDiamond = buildPipe(PipeItemsDiamond.class, "Diamond Transport Pipe", CreativeTabBuildCraft.PIPES, "gemDiamond", Blocks.glass, "gemDiamond");
pipeItemsObsidian = buildPipe(PipeItemsObsidian.class, "Obsidian Transport Pipe", CreativeTabBuildCraft.PIPES, Blocks.obsidian, Blocks.glass, Blocks.obsidian);
pipeItemsLapis = buildPipe(PipeItemsLapis.class, "Lapis Transport Pipe", CreativeTabBuildCraft.PIPES, "blockLapis", Blocks.glass, "blockLapis");
pipeItemsDaizuli = buildPipe(PipeItemsDaizuli.class, "Daizuli Transport Pipe", CreativeTabBuildCraft.PIPES, "blockLapis", Blocks.glass, "gemDiamond");
pipeItemsSandstone = buildPipe(PipeItemsSandstone.class, "Sandstone Transport Pipe", CreativeTabBuildCraft.PIPES, Blocks.sandstone, Blocks.glass, Blocks.sandstone);
pipeItemsVoid = buildPipe(PipeItemsVoid.class, "Void Transport Pipe", CreativeTabBuildCraft.PIPES, "dyeBlack", Blocks.glass, "dustRedstone");
pipeItemsEmzuli = buildPipe(PipeItemsEmzuli.class, "Emzuli Transport Pipe", CreativeTabBuildCraft.PIPES, "blockLapis", Blocks.glass, "gemEmerald");
pipeItemsStripes = buildPipe(PipeItemsStripes.class, "Stripes Transport Pipe", CreativeTabBuildCraft.PIPES, "gearGold", Blocks.glass, "gearGold");
pipeItemsClay = buildPipe(PipeItemsClay.class, "Clay Transport Pipe", CreativeTabBuildCraft.PIPES, Blocks.clay, Blocks.glass, Blocks.clay);
pipeItemsWood = buildPipe(PipeItemsWood.class, "Wooden Transport Pipe", BCCreativeTab.get("pipes"), "plankWood", Blocks.glass, "plankWood");
pipeItemsEmerald = buildPipe(PipeItemsEmerald.class, "Emerald Transport Pipe", BCCreativeTab.get("pipes"), "gemEmerald", Blocks.glass, "gemEmerald");
pipeItemsCobblestone = buildPipe(PipeItemsCobblestone.class, "Cobblestone Transport Pipe", BCCreativeTab.get("pipes"), "cobblestone", Blocks.glass, "cobblestone");
pipeItemsStone = buildPipe(PipeItemsStone.class, "Stone Transport Pipe", BCCreativeTab.get("pipes"), "stone", Blocks.glass, "stone");
pipeItemsQuartz = buildPipe(PipeItemsQuartz.class, "Quartz Transport Pipe", BCCreativeTab.get("pipes"), "blockQuartz", Blocks.glass, "blockQuartz");
pipeItemsIron = buildPipe(PipeItemsIron.class, "Iron Transport Pipe", BCCreativeTab.get("pipes"), "ingotIron", Blocks.glass, "ingotIron");
pipeItemsGold = buildPipe(PipeItemsGold.class, "Golden Transport Pipe", BCCreativeTab.get("pipes"), "ingotGold", Blocks.glass, "ingotGold");
pipeItemsDiamond = buildPipe(PipeItemsDiamond.class, "Diamond Transport Pipe", BCCreativeTab.get("pipes"), "gemDiamond", Blocks.glass, "gemDiamond");
pipeItemsObsidian = buildPipe(PipeItemsObsidian.class, "Obsidian Transport Pipe", BCCreativeTab.get("pipes"), Blocks.obsidian, Blocks.glass, Blocks.obsidian);
pipeItemsLapis = buildPipe(PipeItemsLapis.class, "Lapis Transport Pipe", BCCreativeTab.get("pipes"), "blockLapis", Blocks.glass, "blockLapis");
pipeItemsDaizuli = buildPipe(PipeItemsDaizuli.class, "Daizuli Transport Pipe", BCCreativeTab.get("pipes"), "blockLapis", Blocks.glass, "gemDiamond");
pipeItemsSandstone = buildPipe(PipeItemsSandstone.class, "Sandstone Transport Pipe", BCCreativeTab.get("pipes"), Blocks.sandstone, Blocks.glass, Blocks.sandstone);
pipeItemsVoid = buildPipe(PipeItemsVoid.class, "Void Transport Pipe", BCCreativeTab.get("pipes"), "dyeBlack", Blocks.glass, "dustRedstone");
pipeItemsEmzuli = buildPipe(PipeItemsEmzuli.class, "Emzuli Transport Pipe", BCCreativeTab.get("pipes"), "blockLapis", Blocks.glass, "gemEmerald");
pipeItemsStripes = buildPipe(PipeItemsStripes.class, "Stripes Transport Pipe", BCCreativeTab.get("pipes"), "gearGold", Blocks.glass, "gearGold");
pipeItemsClay = buildPipe(PipeItemsClay.class, "Clay Transport Pipe", BCCreativeTab.get("pipes"), Blocks.clay, Blocks.glass, Blocks.clay);
pipeFluidsWood = buildPipe(PipeFluidsWood.class, "Wooden Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsWood);
pipeFluidsCobblestone = buildPipe(PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsCobblestone);
pipeFluidsStone = buildPipe(PipeFluidsStone.class, "Stone Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsStone);
pipeFluidsQuartz = buildPipe(PipeFluidsQuartz.class, "Quartz Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsQuartz);
pipeFluidsIron = buildPipe(PipeFluidsIron.class, "Iron Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsIron);
pipeFluidsGold = buildPipe(PipeFluidsGold.class, "Golden Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsGold);
pipeFluidsEmerald = buildPipe(PipeFluidsEmerald.class, "Emerald Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsEmerald);
pipeFluidsDiamond = buildPipe(PipeFluidsDiamond.class, "Diamond Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsDiamond);
pipeFluidsSandstone = buildPipe(PipeFluidsSandstone.class, "Sandstone Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsSandstone);
pipeFluidsVoid = buildPipe(PipeFluidsVoid.class, "Void Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsVoid);
pipeFluidsWood = buildPipe(PipeFluidsWood.class, "Wooden Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsWood);
pipeFluidsCobblestone = buildPipe(PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsCobblestone);
pipeFluidsStone = buildPipe(PipeFluidsStone.class, "Stone Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsStone);
pipeFluidsQuartz = buildPipe(PipeFluidsQuartz.class, "Quartz Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsQuartz);
pipeFluidsIron = buildPipe(PipeFluidsIron.class, "Iron Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsIron);
pipeFluidsGold = buildPipe(PipeFluidsGold.class, "Golden Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsGold);
pipeFluidsEmerald = buildPipe(PipeFluidsEmerald.class, "Emerald Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsEmerald);
pipeFluidsDiamond = buildPipe(PipeFluidsDiamond.class, "Diamond Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsDiamond);
pipeFluidsSandstone = buildPipe(PipeFluidsSandstone.class, "Sandstone Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsSandstone);
pipeFluidsVoid = buildPipe(PipeFluidsVoid.class, "Void Waterproof Pipe", BCCreativeTab.get("pipes"), pipeWaterproof, pipeItemsVoid);
pipePowerWood = buildPipe(PipePowerWood.class, "Wooden Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsWood);
pipePowerCobblestone = buildPipe(PipePowerCobblestone.class, "Cobblestone Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsCobblestone);
pipePowerStone = buildPipe(PipePowerStone.class, "Stone Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsStone);
pipePowerQuartz = buildPipe(PipePowerQuartz.class, "Quartz Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsQuartz);
pipePowerIron = buildPipe(PipePowerIron.class, "Iron Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsIron);
pipePowerGold = buildPipe(PipePowerGold.class, "Golden Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsGold);
pipePowerDiamond = buildPipe(PipePowerDiamond.class, "Diamond Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsDiamond);
pipePowerEmerald = buildPipe(PipePowerEmerald.class, "Emerald Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsEmerald);
pipePowerSandstone = buildPipe(PipePowerSandstone.class, "Sandstone Kinesis Pipe", CreativeTabBuildCraft.PIPES, "dustRedstone", pipeItemsSandstone);
pipePowerWood = buildPipe(PipePowerWood.class, "Wooden Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsWood);
pipePowerCobblestone = buildPipe(PipePowerCobblestone.class, "Cobblestone Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsCobblestone);
pipePowerStone = buildPipe(PipePowerStone.class, "Stone Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsStone);
pipePowerQuartz = buildPipe(PipePowerQuartz.class, "Quartz Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsQuartz);
pipePowerIron = buildPipe(PipePowerIron.class, "Iron Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsIron);
pipePowerGold = buildPipe(PipePowerGold.class, "Golden Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsGold);
pipePowerDiamond = buildPipe(PipePowerDiamond.class, "Diamond Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsDiamond);
pipePowerEmerald = buildPipe(PipePowerEmerald.class, "Emerald Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsEmerald);
pipePowerSandstone = buildPipe(PipePowerSandstone.class, "Sandstone Kinesis Pipe", BCCreativeTab.get("pipes"), "dustRedstone", pipeItemsSandstone);
pipeStructureCobblestone = buildPipe(PipeStructureCobblestone.class, "Cobblestone Structure Pipe", CreativeTabBuildCraft.PIPES, Blocks.gravel, pipeItemsCobblestone);
pipeStructureCobblestone = buildPipe(PipeStructureCobblestone.class, "Cobblestone Structure Pipe", BCCreativeTab.get("pipes"), Blocks.gravel, pipeItemsCobblestone);
pipeWire = new ItemPipeWire();
CoreProxy.proxy.registerItem(pipeWire);
@ -473,6 +476,9 @@ public class BuildCraftTransport extends BuildCraftMod {
new BptItemPipeFilters(pipeItemsDiamond);
BCCreativeTab.get("pipes").setIcon(new ItemStack(BuildCraftTransport.pipeItemsDiamond, 1));
BCCreativeTab.get("facades").setIcon(facadeItem.getFacadeForBlock(Blocks.brick_block, 0));
StatementManager.registerParameterClass(TriggerParameterSignal.class);
StatementManager.registerParameterClass(ActionParameterSignal.class);
StatementManager.registerTriggerProvider(new PipeTriggerProvider());
@ -498,7 +504,7 @@ public class BuildCraftTransport extends BuildCraftMod {
}
TransportProxy.proxy.registerRenderers();
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new TransportGuiHandler());
}
@Mod.EventHandler
@ -626,7 +632,7 @@ public class BuildCraftTransport extends BuildCraftMod {
}
public static Item buildPipe(Class<? extends Pipe> clas,
String descr, CreativeTabBuildCraft creativeTab,
String descr, BCCreativeTab creativeTab,
Object... ingredients) {
ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
res.setUnlocalizedName(clas.getSimpleName());

View file

@ -30,7 +30,7 @@ import buildcraft.BuildCraftBuilders;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.GuiIds;
import buildcraft.core.utils.Utils;
@ -40,7 +40,7 @@ public class BlockArchitect extends BlockBuildCraft {
IIcon blockTextureFront;
public BlockArchitect() {
super(Material.iron, CreativeTabBuildCraft.BLOCKS);
super(Material.iron, BCCreativeTab.get("main"));
}
@Override

View file

@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.GuiIds;
public class BlockBlueprintLibrary extends BlockBuildCraft {
@ -31,7 +31,7 @@ public class BlockBlueprintLibrary extends BlockBuildCraft {
private IIcon textureSide;
public BlockBlueprintLibrary() {
super(Material.wood, CreativeTabBuildCraft.BLOCKS);
super(Material.wood, BCCreativeTab.get("main"));
}
@Override

View file

@ -30,7 +30,7 @@ import buildcraft.BuildCraftBuilders;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.GuiIds;
import buildcraft.core.fluids.TankUtils;
import buildcraft.core.utils.Utils;
@ -44,7 +44,7 @@ public class BlockBuilder extends BlockBuildCraft {
public BlockBuilder() {
super(Material.iron);
setHardness(5F);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
@Override

View file

@ -27,7 +27,7 @@ import buildcraft.BuildCraftBuilders;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.api.filler.IFillerPattern;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.GuiIds;
import buildcraft.core.utils.Utils;
@ -42,7 +42,7 @@ public class BlockFiller extends BlockBuildCraft {
super(Material.iron);
setHardness(5F);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
@Override

View file

@ -27,7 +27,7 @@ import buildcraft.BuildCraftCore;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.api.items.IMapLocation;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.utils.Utils;
public class BlockMarker extends BlockBuildCraft {
@ -37,7 +37,7 @@ public class BlockMarker extends BlockBuildCraft {
setLightLevel(0.5F);
setHardness(0.0F);
setCreativeTab(CreativeTabBuildCraft.ITEMS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
public static boolean canPlaceTorch(World world, int x, int y, int z, ForgeDirection side) {

View file

@ -25,15 +25,9 @@ import buildcraft.builders.gui.GuiFiller;
import buildcraft.builders.urbanism.ContainerUrbanist;
import buildcraft.builders.urbanism.GuiUrbanist;
import buildcraft.builders.urbanism.TileUrbanist;
import buildcraft.commander.ContainerRequester;
import buildcraft.commander.ContainerZonePlan;
import buildcraft.commander.GuiRequester;
import buildcraft.commander.GuiZonePlan;
import buildcraft.commander.TileRequester;
import buildcraft.commander.TileZonePlan;
import buildcraft.core.GuiIds;
public class GuiHandler implements IGuiHandler {
public class BuildersGuiHandler implements IGuiHandler {
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
@ -75,18 +69,6 @@ public class GuiHandler implements IGuiHandler {
}
return new GuiUrbanist(player.inventory, (TileUrbanist) tile);
case GuiIds.MAP:
if (!(tile instanceof TileZonePlan)) {
return null;
}
return new GuiZonePlan(player.inventory, (TileZonePlan) tile);
case GuiIds.REQUESTER:
if (!(tile instanceof TileRequester)) {
return null;
}
return new GuiRequester(player.inventory, (TileRequester) tile);
default:
return null;
}
@ -135,20 +117,6 @@ public class GuiHandler implements IGuiHandler {
return new ContainerUrbanist(player.inventory, (TileUrbanist) tile);
}
case GuiIds.MAP:
if (!(tile instanceof TileZonePlan)) {
return null;
} else {
return new ContainerZonePlan(player.inventory, (TileZonePlan) tile);
}
case GuiIds.REQUESTER:
if (!(tile instanceof TileRequester)) {
return null;
} else {
return new ContainerRequester(player.inventory, (TileRequester) tile);
}
default:
return null;
}

View file

@ -17,7 +17,7 @@ import net.minecraft.nbt.NBTTagCompound;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.blueprints.BuildingPermission;
import buildcraft.core.blueprints.BlueprintId;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.blueprints.BlueprintBase;
import buildcraft.core.utils.NBTUtils;
@ -26,7 +26,7 @@ import buildcraft.core.utils.StringUtils;
public abstract class ItemBlueprint extends ItemBuildCraft {
public ItemBlueprint() {
super(CreativeTabBuildCraft.ITEMS);
super(BCCreativeTab.get("main"));
}
@Override

View file

@ -66,6 +66,7 @@ import buildcraft.core.network.Packet;
import buildcraft.core.network.CommandWriter;
import buildcraft.core.network.PacketCommand;
import buildcraft.core.utils.NetworkUtils;
import buildcraft.api.robots.ResourceIdRequest;
public class TileBuilder extends TileAbstractBuilder implements IHasWork, IFluidHandler, IRequestProvider, IControllable {

View file

@ -0,0 +1,56 @@
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.core;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class BCCreativeTab extends CreativeTabs {
private static final Map<String, BCCreativeTab> tabs = new HashMap<String, BCCreativeTab>();
private final String name;
private ItemStack icon;
public BCCreativeTab(String name) {
super("buildcraft." + name);
this.name = name;
tabs.put(name, this);
}
public static BCCreativeTab get(String name) {
return tabs.get(name);
}
public void setIcon(ItemStack icon) {
this.icon = icon;
}
private ItemStack getItem() {
if (icon == null || icon.getItem() == null) {
return new ItemStack(Blocks.brick_block, 1);
}
return icon;
}
@Override
public ItemStack getIconItemStack() {
return getItem();
}
@Override
public Item getTabIconItem() {
return getItem().getItem();
}
}

View file

@ -13,6 +13,7 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -32,12 +33,12 @@ public abstract class BlockBuildCraft extends BlockContainer {
protected final Random rand = new Random();
protected BlockBuildCraft(Material material) {
this(material, CreativeTabBuildCraft.BLOCKS);
this(material, BCCreativeTab.get("main"));
}
protected BlockBuildCraft(Material material, CreativeTabBuildCraft creativeTab) {
protected BlockBuildCraft(Material material, CreativeTabs creativeTab) {
super(material);
setCreativeTab(creativeTab.get());
setCreativeTab(creativeTab);
setHardness(5F);
}

View file

@ -58,7 +58,7 @@ public class BlockSpring extends Block {
disableStats();
setTickRandomly(true);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
@Override

View file

@ -16,7 +16,7 @@ import cpw.mods.fml.common.network.IGuiHandler;
import buildcraft.core.gui.ContainerList;
import buildcraft.core.gui.GuiList;
public class GuiHandler implements IGuiHandler {
public class CoreGuiHandler implements IGuiHandler {
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {

View file

@ -1,78 +0,0 @@
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.core;
import java.util.Locale;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftFactory;
import buildcraft.BuildCraftRobotics;
import buildcraft.BuildCraftSilicon;
import buildcraft.BuildCraftTransport;
public enum CreativeTabBuildCraft {
BLOCKS,
ITEMS,
PIPES,
FACADES,
BOARDS;
private final CreativeTabs tab;
private CreativeTabBuildCraft() {
tab = new Tab();
}
public CreativeTabs get() {
return tab;
}
private String getLabel() {
return "buildcraft." + name().toLowerCase(Locale.ENGLISH);
}
private ItemStack getItem() {
switch (this) {
case BLOCKS:
return new ItemStack (BuildCraftFactory.quarryBlock, 1);
case ITEMS:
return new ItemStack (BuildCraftCore.wrenchItem, 1);
case PIPES:
return new ItemStack (BuildCraftTransport.pipeItemsDiamond, 1);
case FACADES:
return BuildCraftTransport.facadeItem.getFacadeForBlock(Blocks.brick_block, 0);
case BOARDS:
return new ItemStack(BuildCraftRobotics.redstoneBoard, 1);
}
return BuildCraftTransport.facadeItem.getFacadeForBlock(Blocks.brick_block, 0);
}
private final class Tab extends CreativeTabs {
private Tab() {
super(getLabel());
}
@Override
public ItemStack getIconItemStack() {
return getItem();
}
@Override
public Item getTabIconItem() {
return getItem().getItem();
}
}
}

View file

@ -9,6 +9,7 @@
package buildcraft.core;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.world.World;
@ -22,13 +23,13 @@ public class ItemBuildCraft extends Item {
private boolean passSneakClick = false;
public ItemBuildCraft() {
this(CreativeTabBuildCraft.ITEMS);
this(BCCreativeTab.get("items"));
}
public ItemBuildCraft(CreativeTabBuildCraft creativeTab) {
public ItemBuildCraft(CreativeTabs creativeTab) {
super();
setCreativeTab(creativeTab.get());
setCreativeTab(creativeTab);
}
@Override

View file

@ -45,7 +45,7 @@ public class ItemMapLocation extends ItemBuildCraft implements IMapLocation {
public IIcon zone;
public ItemMapLocation() {
super(CreativeTabBuildCraft.ITEMS);
super(BCCreativeTab.get("main"));
}
@Override

View file

@ -19,7 +19,7 @@ import buildcraft.energy.gui.ContainerEngine;
import buildcraft.energy.gui.GuiCombustionEngine;
import buildcraft.energy.gui.GuiStoneEngine;
public class GuiHandler implements IGuiHandler {
public class EnergyGuiHandler implements IGuiHandler {
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {

View file

@ -10,6 +10,7 @@ package buildcraft.energy;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBucket;
@ -17,20 +18,20 @@ import net.minecraft.item.ItemBucket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
public class ItemBucketBuildcraft extends ItemBucket {
private String iconName;
public ItemBucketBuildcraft(Block block) {
this(block, CreativeTabBuildCraft.ITEMS);
this(block, BCCreativeTab.get("main"));
}
public ItemBucketBuildcraft(Block block, CreativeTabBuildCraft creativeTab) {
public ItemBucketBuildcraft(Block block, CreativeTabs creativeTab) {
super(block);
setContainerItem(Items.bucket);
setCreativeTab(creativeTab.get());
setCreativeTab(creativeTab);
}
@Override

View file

@ -11,14 +11,14 @@ package buildcraft.energy;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.ItemBlockBuildCraft;
public class ItemEngine extends ItemBlockBuildCraft {
public ItemEngine(Block block) {
super(block);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
setMaxDamage(0);
setHasSubtypes(true);
}

View file

@ -31,7 +31,7 @@ import buildcraft.BuildCraftFactory;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.GuiIds;
import buildcraft.core.fluids.TankUtils;
import buildcraft.core.utils.Utils;
@ -44,7 +44,7 @@ public class BlockRefinery extends BlockBuildCraft {
super(Material.iron);
setHardness(5F);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
@Override

View file

@ -29,7 +29,7 @@ import net.minecraftforge.fluids.IFluidContainerItem;
import buildcraft.BuildCraftCore;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.inventory.InvUtils;
public class BlockTank extends BlockBuildCraft {
@ -42,7 +42,7 @@ public class BlockTank extends BlockBuildCraft {
super(Material.glass);
setBlockBounds(0.125F, 0F, 0.125F, 0.875F, 1F, 0.875F);
setHardness(0.5F);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
@Override

View file

@ -22,7 +22,7 @@ import buildcraft.factory.gui.GuiAutoCrafting;
import buildcraft.factory.gui.GuiHopper;
import buildcraft.factory.gui.GuiRefinery;
public class GuiHandler implements IGuiHandler {
public class FactoryGuiHandler implements IGuiHandler {
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -23,7 +23,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftBuilders;
import buildcraft.BuildCraftRobotics;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.GuiIds;
@ -54,7 +54,7 @@ public class BlockRequester extends BlockBuildCraft {
}
if (!world.isRemote) {
entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.REQUESTER,
entityplayer.openGui(BuildCraftRobotics.instance, GuiIds.REQUESTER,
world, i, j, k);
}

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -23,7 +23,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftBuilders;
import buildcraft.BuildCraftRobotics;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.GuiIds;
@ -54,7 +54,7 @@ public class BlockZonePlan extends BlockBuildCraft {
}
if (!world.isRemote) {
entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.MAP,
entityplayer.openGui(BuildCraftRobotics.instance, GuiIds.MAP,
world, i, j, k);
}

View file

@ -22,10 +22,9 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.BuildCraftRobotics;
import buildcraft.BuildCraftSilicon;
import buildcraft.api.boards.RedstoneBoardNBT;
import buildcraft.api.boards.RedstoneBoardRegistry;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.utils.NBTUtils;
@ -35,7 +34,7 @@ public class ItemRedstoneBoard extends ItemBuildCraft {
public IIcon unknownBoard;
public ItemRedstoneBoard() {
super(CreativeTabBuildCraft.BOARDS);
super(BCCreativeTab.get("boards"));
}
@Override

View file

@ -31,7 +31,7 @@ import buildcraft.api.boards.RedstoneBoardRegistry;
import buildcraft.api.boards.RedstoneBoardRobotNBT;
import buildcraft.api.events.RobotPlacementEvent;
import buildcraft.api.robots.EntityRobotBase;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.utils.NBTUtils;
import buildcraft.transport.BlockGenericPipe;
@ -40,7 +40,7 @@ import buildcraft.transport.Pipe;
public class ItemRobot extends ItemBuildCraft implements IEnergyContainerItem {
public ItemRobot() {
super(CreativeTabBuildCraft.BOARDS);
super(BCCreativeTab.get("boards"));
}
public EntityRobot createRobot(ItemStack stack, World world) {

View file

@ -21,13 +21,13 @@ import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.transport.IPipe;
import buildcraft.api.transport.pluggable.IPipePluggableItem;
import buildcraft.api.transport.pluggable.PipePluggable;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.ItemBuildCraft;
public class ItemRobotStation extends ItemBuildCraft implements IPipePluggableItem {
public ItemRobotStation() {
super(CreativeTabBuildCraft.ITEMS);
super(BCCreativeTab.get("robots"));
}
@Override

View file

@ -0,0 +1,77 @@
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.robotics;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
import buildcraft.core.GuiIds;
import buildcraft.robotics.gui.ContainerRequester;
import buildcraft.robotics.gui.ContainerZonePlan;
import buildcraft.robotics.gui.GuiRequester;
import buildcraft.robotics.gui.GuiZonePlan;
public class RoboticsGuiHandler implements IGuiHandler {
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (!world.blockExists(x, y, z)) {
return null;
}
TileEntity tile = world.getTileEntity(x, y, z);
switch (id) {
case GuiIds.MAP:
if (!(tile instanceof TileZonePlan)) {
return null;
}
return new GuiZonePlan(player.inventory, (TileZonePlan) tile);
case GuiIds.REQUESTER:
if (!(tile instanceof TileRequester)) {
return null;
}
return new GuiRequester(player.inventory, (TileRequester) tile);
default:
return null;
}
}
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (!world.blockExists(x, y, z)) {
return null;
}
TileEntity tile = world.getTileEntity(x, y, z);
switch (id) {
case GuiIds.MAP:
if (!(tile instanceof TileZonePlan)) {
return null;
} else {
return new ContainerZonePlan(player.inventory, (TileZonePlan) tile);
}
case GuiIds.REQUESTER:
if (!(tile instanceof TileRequester)) {
return null;
} else {
return new ContainerRequester(player.inventory, (TileRequester) tile);
}
default:
return null;
}
}
}

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics;
import io.netty.buffer.ByteBuf;
@ -29,8 +29,7 @@ import buildcraft.core.network.CommandWriter;
import buildcraft.core.network.ICommandReceiver;
import buildcraft.core.network.PacketCommand;
import buildcraft.core.utils.NetworkUtils;
import buildcraft.robotics.ResourceIdRequest;
import buildcraft.robotics.RobotRegistry;
import buildcraft.api.robots.ResourceIdRequest;
public class TileRequester extends TileBuildCraft implements IInventory, IRequestProvider, ICommandReceiver {
public static final int NB_ITEMS = 20;

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics;
import io.netty.buffer.ByteBuf;

View file

@ -33,8 +33,7 @@ import buildcraft.core.inventory.filters.IStackFilter;
import buildcraft.robotics.DockingStation;
import buildcraft.robotics.IStationFilter;
import buildcraft.silicon.ResourceIdAssemblyTable;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.robotics.RobotRegistry;
import buildcraft.api.robots.ResourceIdBlock;
import buildcraft.robotics.statements.ActionRobotFilter;
import buildcraft.robotics.statements.ActionStationAllowCraft;
import buildcraft.silicon.BlockLaserTable;

View file

@ -27,7 +27,7 @@ import buildcraft.core.inventory.filters.ArrayStackFilter;
import buildcraft.core.inventory.filters.IStackFilter;
import buildcraft.robotics.DockingStation;
import buildcraft.robotics.IStationFilter;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.api.robots.ResourceIdBlock;
import buildcraft.robotics.statements.ActionRobotFilter;
import buildcraft.robotics.statements.ActionStationAllowCraft;

View file

@ -11,7 +11,7 @@ import buildcraft.api.robots.EntityRobotBase;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.core.utils.IterableAlgorithmRunner;
import buildcraft.core.utils.PathFindingSearch;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.api.robots.ResourceIdBlock;
public class AIRobotSearchBlockBase extends AIRobot {

View file

@ -22,7 +22,7 @@ import buildcraft.api.robots.AIRobot;
import buildcraft.api.robots.EntityRobotBase;
import buildcraft.core.inventory.filters.IStackFilter;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.api.robots.ResourceIdBlock;
import buildcraft.robotics.ai.AIRobotFetchAndEquipItemStack;
import buildcraft.robotics.ai.AIRobotGotoBlock;
import buildcraft.robotics.ai.AIRobotGotoSleep;

View file

@ -25,7 +25,7 @@ import buildcraft.api.statements.StatementParameterItemStack;
import buildcraft.core.inventory.filters.IStackFilter;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.robotics.DockingStation;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.api.robots.ResourceIdBlock;
import buildcraft.robotics.ai.AIRobotBreak;
import buildcraft.robotics.ai.AIRobotFetchAndEquipItemStack;
import buildcraft.robotics.ai.AIRobotGotoBlock;

View file

@ -32,7 +32,7 @@ import buildcraft.core.inventory.filters.ArrayStackOrListFilter;
import buildcraft.core.inventory.filters.CompositeFilter;
import buildcraft.core.inventory.filters.IStackFilter;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.api.robots.ResourceIdBlock;
import buildcraft.robotics.ai.AIRobotFetchAndEquipItemStack;
import buildcraft.robotics.ai.AIRobotGotoBlock;
import buildcraft.robotics.ai.AIRobotGotoSleep;

View file

@ -31,7 +31,7 @@ import buildcraft.api.statements.IStatementParameter;
import buildcraft.api.statements.StatementParameterItemStack;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.robotics.DockingStation;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.api.robots.ResourceIdBlock;
import buildcraft.robotics.ai.AIRobotGotoBlock;
import buildcraft.robotics.ai.AIRobotGotoSleep;
import buildcraft.robotics.ai.AIRobotGotoStationAndUnloadFluids;

View file

@ -19,7 +19,7 @@ import buildcraft.api.robots.AIRobot;
import buildcraft.api.robots.EntityRobotBase;
import buildcraft.core.inventory.filters.IStackFilter;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.robotics.ResourceIdBlock;
import buildcraft.api.robots.ResourceIdBlock;
import buildcraft.robotics.ai.AIRobotFetchAndEquipItemStack;
import buildcraft.robotics.ai.AIRobotGotoBlock;
import buildcraft.robotics.ai.AIRobotGotoSleep;

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics.gui;
import io.netty.buffer.ByteBuf;
@ -23,7 +23,7 @@ import buildcraft.core.network.CommandWriter;
import buildcraft.core.network.ICommandReceiver;
import buildcraft.core.network.PacketCommand;
import buildcraft.core.utils.NetworkUtils;
import buildcraft.core.utils.Utils;
import buildcraft.robotics.TileRequester;
public class ContainerRequester extends BuildCraftContainer implements ICommandReceiver {

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics.gui;
import io.netty.buffer.ByteBuf;
@ -25,6 +25,7 @@ import buildcraft.core.gui.slots.SlotOutput;
import buildcraft.core.network.CommandWriter;
import buildcraft.core.network.ICommandReceiver;
import buildcraft.core.network.PacketCommand;
import buildcraft.robotics.TileZonePlan;
public class ContainerZonePlan extends BuildCraftContainer implements ICommandReceiver {

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics.gui;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@ -15,6 +15,7 @@ import net.minecraft.util.ResourceLocation;
import buildcraft.core.DefaultProps;
import buildcraft.core.gui.AdvancedSlot;
import buildcraft.core.gui.GuiAdvancedInterface;
import buildcraft.robotics.TileRequester;
public class GuiRequester extends GuiAdvancedInterface {

View file

@ -6,7 +6,7 @@
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.commander;
package buildcraft.robotics.gui;
import java.util.LinkedList;
import java.util.List;
@ -35,6 +35,7 @@ import buildcraft.core.gui.tooltips.ToolTipLine;
import buildcraft.core.network.CommandWriter;
import buildcraft.core.network.PacketCommand;
import buildcraft.core.utils.StringUtils;
import buildcraft.robotics.TileZonePlan;
public class GuiZonePlan extends GuiAdvancedInterface {

View file

@ -28,7 +28,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.ICustomHighlight;
public class BlockLaser extends BlockBuildCraft implements ICustomHighlight {
@ -48,7 +48,7 @@ public class BlockLaser extends BlockBuildCraft implements ICustomHighlight {
public BlockLaser() {
super(Material.iron);
setHardness(10F);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
@Override

View file

@ -29,7 +29,7 @@ import buildcraft.BuildCraftSilicon;
import buildcraft.api.events.BlockInteractionEvent;
import buildcraft.api.power.ILaserTargetBlock;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.utils.Utils;
public class BlockLaserTable extends BlockBuildCraft implements ILaserTargetBlock {
@ -44,7 +44,7 @@ public class BlockLaserTable extends BlockBuildCraft implements ILaserTargetBloc
setBlockBounds(0, 0, 0, 1, 9F / 16F, 1);
setHardness(10F);
setCreativeTab(CreativeTabBuildCraft.BLOCKS.get());
setCreativeTab(BCCreativeTab.get("main"));
}
@Override

View file

@ -25,7 +25,7 @@ import buildcraft.silicon.gui.GuiChargingTable;
import buildcraft.silicon.gui.GuiIntegrationTable;
import buildcraft.silicon.gui.GuiProgrammingTable;
public class GuiHandler implements IGuiHandler {
public class SiliconGuiHandler implements IGuiHandler {
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {

View file

@ -62,7 +62,7 @@ import buildcraft.api.transport.pluggable.IPipePluggableItem;
import buildcraft.api.transport.pluggable.PipePluggable;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CoreConstants;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.TileBuffer;
import buildcraft.core.utils.MatrixTranformations;
import buildcraft.core.utils.Utils;
@ -836,7 +836,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
}
/* Registration ******************************************************** */
public static ItemPipe registerPipe(Class<? extends Pipe> clas, CreativeTabBuildCraft creativeTab) {
public static ItemPipe registerPipe(Class<? extends Pipe> clas, BCCreativeTab creativeTab) {
ItemPipe item = new ItemPipe(creativeTab);
item.setUnlocalizedName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH));
GameRegistry.registerItem(item, item.getUnlocalizedName());

View file

@ -42,7 +42,7 @@ import buildcraft.api.transport.PipeWire;
import buildcraft.api.transport.pluggable.IPipePluggableItem;
import buildcraft.api.transport.pluggable.PipePluggable;
import buildcraft.core.BlockSpring;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.StringUtils;
@ -145,7 +145,7 @@ public class ItemFacade extends ItemBuildCraft implements IFacadeItem, IPipePlug
private static final ItemStack NO_MATCH = new ItemStack(NULL_BLOCK, 0, 0);
public ItemFacade() {
super(CreativeTabBuildCraft.FACADES);
super(BCCreativeTab.get("facades"));
setHasSubtypes(true);
setMaxDamage(0);

View file

@ -28,7 +28,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.BCLog;
import buildcraft.api.core.IIconProvider;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.IItemPipe;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.utils.ColorUtils;
@ -40,7 +40,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
private IIconProvider iconProvider;
private int pipeIconIndex;
protected ItemPipe(CreativeTabBuildCraft creativeTab) {
protected ItemPipe(BCCreativeTab creativeTab) {
super(creativeTab);
this.setMaxDamage(0);
this.setHasSubtypes(true);

View file

@ -34,7 +34,7 @@ import buildcraft.transport.pipes.PipeFluidsEmerald;
import buildcraft.transport.pipes.PipeItemsEmerald;
import buildcraft.transport.pipes.PipeItemsEmzuli;
public class GuiHandler implements IGuiHandler {
public class TransportGuiHandler implements IGuiHandler {
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {