initial categorization of items

This commit is contained in:
SpaceToad 2014-02-16 17:21:22 +01:00
parent 1677fa3785
commit 4948e02cb5
43 changed files with 417 additions and 457 deletions

View file

@ -160,7 +160,11 @@ item.PipeFluidsSandstone.name=Sandstone Fluid Pipe
item.Facade.name=Facade item.Facade.name=Facade
item.PipePlug.name=Pipe Plug item.PipePlug.name=Pipe Plug
itemGroup.buildcraft.machines=Buildcraft Machines itemGroup.buildcraft.tier_1=Buildcraft Tier 1 Machines
itemGroup.buildcraft.tier_2=Buildcraft Tier 2 Machines
itemGroup.buildcraft.tier_3=Buildcraft Tier 3 Machines
itemGroup.buildcraft.tier_4=Buildcraft Tier 4 Machines
itemGroup.buildcraft.misc=Buildcraft Uncategorized Machines
itemGroup.buildcraft.facades=Buildcraft Facades itemGroup.buildcraft.facades=Buildcraft Facades
tile.architectBlock.name=Architect Table tile.architectBlock.name=Architect Table

View file

@ -8,31 +8,24 @@
*/ */
package buildcraft; package buildcraft;
import static buildcraft.BuildCraftEnergy.spawnOilSprings;
import java.io.File; import java.io.File;
import java.util.EnumMap;
import java.util.TreeMap; import java.util.TreeMap;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.network.Packet;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property; import net.minecraftforge.common.config.Property;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.fluids.BlockFluidBase; import net.minecraftforge.fluids.BlockFluidBase;
import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.oredict.OreDictionary;
import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.core.IIconProvider; import buildcraft.api.core.IIconProvider;
import buildcraft.api.gates.ActionManager; import buildcraft.api.gates.ActionManager;
@ -43,6 +36,7 @@ import buildcraft.core.BlockSpring;
import buildcraft.core.BuildCraftConfiguration; import buildcraft.core.BuildCraftConfiguration;
import buildcraft.core.CommandBuildCraft; import buildcraft.core.CommandBuildCraft;
import buildcraft.core.CoreIconProvider; import buildcraft.core.CoreIconProvider;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.EntityEnergyLaser; import buildcraft.core.EntityEnergyLaser;
import buildcraft.core.EntityFrame; import buildcraft.core.EntityFrame;
@ -55,12 +49,16 @@ import buildcraft.core.ItemWrench;
import buildcraft.core.SpringPopulate; import buildcraft.core.SpringPopulate;
import buildcraft.core.TickHandlerCoreClient; import buildcraft.core.TickHandlerCoreClient;
import buildcraft.core.Version; import buildcraft.core.Version;
import buildcraft.core.blueprints.BptItem;
import buildcraft.core.network.BuildCraftPacket;
import buildcraft.core.network.EntityIds; import buildcraft.core.network.EntityIds;
import buildcraft.core.network.PacketHandler; import buildcraft.core.network.PacketHandler;
import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.PacketUpdate;
import buildcraft.core.proxy.CoreProxy; import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.recipes.AssemblyRecipeManager;
import buildcraft.core.recipes.IntegrationRecipeManager;
import buildcraft.core.recipes.RefineryRecipeManager;
import buildcraft.core.robots.EntityRobot;
import buildcraft.core.robots.EntityRobotBuilder;
import buildcraft.core.robots.EntityRobotPicker;
import buildcraft.core.triggers.ActionMachineControl; import buildcraft.core.triggers.ActionMachineControl;
import buildcraft.core.triggers.ActionMachineControl.Mode; import buildcraft.core.triggers.ActionMachineControl.Mode;
import buildcraft.core.triggers.ActionRedstoneOutput; import buildcraft.core.triggers.ActionRedstoneOutput;
@ -74,14 +72,8 @@ import buildcraft.core.triggers.TriggerFluidContainerLevel;
import buildcraft.core.triggers.TriggerInventory; import buildcraft.core.triggers.TriggerInventory;
import buildcraft.core.triggers.TriggerInventoryLevel; import buildcraft.core.triggers.TriggerInventoryLevel;
import buildcraft.core.triggers.TriggerMachine; import buildcraft.core.triggers.TriggerMachine;
import buildcraft.core.utils.BCLog;
import buildcraft.core.recipes.AssemblyRecipeManager;
import buildcraft.core.recipes.IntegrationRecipeManager;
import buildcraft.core.recipes.RefineryRecipeManager;
import buildcraft.core.robots.EntityRobot;
import buildcraft.core.robots.EntityRobotBuilder;
import buildcraft.core.robots.EntityRobotPicker;
import buildcraft.core.triggers.TriggerRedstoneInput; import buildcraft.core.triggers.TriggerRedstoneInput;
import buildcraft.core.utils.BCLog;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.EventHandler;
@ -92,7 +84,6 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
@ -113,10 +104,10 @@ public class BuildCraftCore extends BuildCraftMod {
public static int updateFactor = 10; public static int updateFactor = 10;
public static long longUpdateFactor = 40; public static long longUpdateFactor = 40;
public static BuildCraftConfiguration mainConfiguration; public static BuildCraftConfiguration mainConfiguration;
// TODO: This doesn't seem used anymore. Remove if it's the case. // TODO: This doesn't seem used anymore. Remove if it's the case.
public static TreeMap<BlockIndex, PacketUpdate> bufferedDescriptions = new TreeMap<BlockIndex, PacketUpdate>(); public static TreeMap<BlockIndex, PacketUpdate> bufferedDescriptions = new TreeMap<BlockIndex, PacketUpdate>();
public static final int trackedPassiveEntityId = 156; public static final int trackedPassiveEntityId = 156;
public static boolean continuousCurrentModel; public static boolean continuousCurrentModel;
public static Block springBlock; public static Block springBlock;
@ -233,37 +224,46 @@ public class BuildCraftCore extends BuildCraftMod {
consumeWaterSources = consumeWater.getBoolean(consumeWaterSources); consumeWaterSources = consumeWater.getBoolean(consumeWaterSources);
consumeWater.comment = "set to true if the Pump should consume water"; consumeWater.comment = "set to true if the Pump should consume water";
woodenGearItem = (new ItemBuildCraft()).setUnlocalizedName("woodenGearItem"); woodenGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("woodenGearItem");
LanguageRegistry.addName(woodenGearItem, "Wooden Gear"); LanguageRegistry.addName(woodenGearItem, "Wooden Gear");
CoreProxy.proxy.registerItem(woodenGearItem); CoreProxy.proxy.registerItem(woodenGearItem);
OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem)); OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem));
stoneGearItem = (new ItemBuildCraft()).setUnlocalizedName("stoneGearItem"); stoneGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("stoneGearItem");
LanguageRegistry.addName(stoneGearItem, "Stone Gear"); LanguageRegistry.addName(stoneGearItem, "Stone Gear");
CoreProxy.proxy.registerItem(stoneGearItem); CoreProxy.proxy.registerItem(stoneGearItem);
OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem)); OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem));
ironGearItem = (new ItemBuildCraft()).setUnlocalizedName("ironGearItem"); ironGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("ironGearItem");
LanguageRegistry.addName(ironGearItem, "Iron Gear"); LanguageRegistry.addName(ironGearItem, "Iron Gear");
CoreProxy.proxy.registerItem(ironGearItem); CoreProxy.proxy.registerItem(ironGearItem);
OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem)); OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem));
goldGearItem = (new ItemBuildCraft()).setUnlocalizedName("goldGearItem"); goldGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("goldGearItem");
LanguageRegistry.addName(goldGearItem, "Gold Gear"); LanguageRegistry.addName(goldGearItem, "Gold Gear");
CoreProxy.proxy.registerItem(goldGearItem); CoreProxy.proxy.registerItem(goldGearItem);
OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem)); OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem));
diamondGearItem = (new ItemBuildCraft()).setUnlocalizedName("diamondGearItem"); diamondGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("diamondGearItem");
LanguageRegistry.addName(diamondGearItem, "Diamond Gear"); LanguageRegistry.addName(diamondGearItem, "Diamond Gear");
CoreProxy.proxy.registerItem(diamondGearItem); CoreProxy.proxy.registerItem(diamondGearItem);
OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem)); OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem));
redstoneCrystal = (new ItemBuildCraft()).setUnlocalizedName("redstoneCrystal"); redstoneCrystal = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_3)).setUnlocalizedName("redstoneCrystal");
LanguageRegistry.addName(redstoneCrystal, "Redstone Crystal"); LanguageRegistry.addName(redstoneCrystal, "Redstone Crystal");
CoreProxy.proxy.registerItem(redstoneCrystal); CoreProxy.proxy.registerItem(redstoneCrystal);
OreDictionary.registerOre("redstoneCrystal", new ItemStack(redstoneCrystal)); OreDictionary.registerOre("redstoneCrystal", new ItemStack(redstoneCrystal));
MinecraftForge.EVENT_BUS.register(this); robotBaseItem = new ItemRobot(EntityRobot.class).setUnlocalizedName("robotBase");
CoreProxy.proxy.registerItem(robotBaseItem);
robotPickerItem = new ItemRobot(EntityRobotPicker.class).setUnlocalizedName("robotPicker");
CoreProxy.proxy.registerItem(robotPickerItem);
robotBuilderItem = new ItemRobot(EntityRobotBuilder.class).setUnlocalizedName("robotBuilder");
CoreProxy.proxy.registerItem(robotBuilderItem);
MinecraftForge.EVENT_BUS.register(this);
} finally { } finally {
if (mainConfiguration.hasChanged()) { if (mainConfiguration.hasChanged()) {
mainConfiguration.save(); mainConfiguration.save();
@ -276,7 +276,7 @@ public class BuildCraftCore extends BuildCraftMod {
public void initialize(FMLInitializationEvent evt) { public void initialize(FMLInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel channels = NetworkRegistry.INSTANCE.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-CORE", new PacketHandler()); (DefaultProps.NET_CHANNEL_NAME + "-CORE", new PacketHandler());
ActionManager.registerTriggerProvider(new DefaultTriggerProvider()); ActionManager.registerTriggerProvider(new DefaultTriggerProvider());
ActionManager.registerActionProvider(new DefaultActionProvider()); ActionManager.registerActionProvider(new DefaultActionProvider());
@ -309,16 +309,16 @@ public class BuildCraftCore extends BuildCraftMod {
public void postInit(FMLPostInitializationEvent event) { public void postInit(FMLPostInitializationEvent event) {
for (Object o : Block.blockRegistry) { for (Object o : Block.blockRegistry) {
Block block = (Block) o; Block block = (Block) o;
if (block instanceof BlockFluidBase || block instanceof IFluidBlock || block instanceof IPlantable) { if (block instanceof BlockFluidBase || block instanceof IFluidBlock || block instanceof IPlantable) {
BuildCraftAPI.softBlocks.add(block); BuildCraftAPI.softBlocks.add(block);
} }
} }
BuildCraftAPI.softBlocks.add(Blocks.snow); BuildCraftAPI.softBlocks.add(Blocks.snow);
BuildCraftAPI.softBlocks.add(Blocks.vine); BuildCraftAPI.softBlocks.add(Blocks.vine);
BuildCraftAPI.softBlocks.add(Blocks.fire); BuildCraftAPI.softBlocks.add(Blocks.fire);
FMLCommonHandler.instance().bus().register(new TickHandlerCoreClient()); FMLCommonHandler.instance().bus().register(new TickHandlerCoreClient());
} }

View file

@ -29,6 +29,7 @@ import buildcraft.api.fuels.IronEngineFuel;
import buildcraft.api.recipes.BuildcraftRecipes; import buildcraft.api.recipes.BuildcraftRecipes;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.BlockSpring; import buildcraft.core.BlockSpring;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms; import buildcraft.core.InterModComms;
import buildcraft.core.Version; import buildcraft.core.Version;
@ -131,7 +132,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
} }
engineBlock = new BlockEngine(); engineBlock = new BlockEngine(CreativeTabBuildCraft.TIER_1);
CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class); CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class);
LanguageRegistry.addName(new ItemStack(engineBlock, 1, 0), "Redstone Engine"); LanguageRegistry.addName(new ItemStack(engineBlock, 1, 0), "Redstone Engine");
@ -188,7 +189,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
// Buckets // Buckets
if (blockOil != null) { if (blockOil != null) {
bucketOil = new ItemBucketBuildcraft(blockOil); bucketOil = new ItemBucketBuildcraft(blockOil, CreativeTabBuildCraft.TIER_2);
bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket); bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket);
LanguageRegistry.addName(bucketOil, "Oil Bucket"); LanguageRegistry.addName(bucketOil, "Oil Bucket");
CoreProxy.proxy.registerItem(bucketOil); CoreProxy.proxy.registerItem(bucketOil);
@ -196,7 +197,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
} }
if (blockFuel != null) { if (blockFuel != null) {
bucketFuel = new ItemBucketBuildcraft(blockFuel); bucketFuel = new ItemBucketBuildcraft(blockFuel, CreativeTabBuildCraft.TIER_2);
bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket); bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket);
LanguageRegistry.addName(bucketFuel, "Fuel Bucket"); LanguageRegistry.addName(bucketFuel, "Fuel Bucket");
CoreProxy.proxy.registerItem(bucketFuel); CoreProxy.proxy.registerItem(bucketFuel);
@ -204,7 +205,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
} }
if (blockRedPlasma != null) { if (blockRedPlasma != null) {
bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma); bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma, CreativeTabBuildCraft.TIER_4);
bucketRedPlasma.setUnlocalizedName("bucketRedPlasma").setContainerItem(Items.bucket); bucketRedPlasma.setUnlocalizedName("bucketRedPlasma").setContainerItem(Items.bucket);
LanguageRegistry.addName(bucketRedPlasma, "Red Plasma Bucket"); LanguageRegistry.addName(bucketRedPlasma, "Red Plasma Bucket");
CoreProxy.proxy.registerItem(bucketRedPlasma); CoreProxy.proxy.registerItem(bucketRedPlasma);

View file

@ -27,6 +27,7 @@ import buildcraft.api.recipes.BuildcraftRecipes;
import buildcraft.api.transport.IExtractionHandler; import buildcraft.api.transport.IExtractionHandler;
import buildcraft.api.transport.PipeManager; import buildcraft.api.transport.PipeManager;
import buildcraft.api.transport.PipeWire; import buildcraft.api.transport.PipeWire;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms; import buildcraft.core.InterModComms;
import buildcraft.core.ItemBuildCraft; import buildcraft.core.ItemBuildCraft;
@ -263,7 +264,7 @@ public class BuildCraftTransport extends BuildCraftMod {
groupItemsTriggerProp.comment = "when reaching this amount of objects in a pipes, items will be automatically grouped"; groupItemsTriggerProp.comment = "when reaching this amount of objects in a pipes, items will be automatically grouped";
groupItemsTrigger = groupItemsTriggerProp.getInt(); groupItemsTrigger = groupItemsTriggerProp.getInt();
pipeWaterproof = new ItemBuildCraft(); pipeWaterproof = new ItemBuildCraft(CreativeTabBuildCraft.TIER_2);
pipeWaterproof.setUnlocalizedName("pipeWaterproof"); pipeWaterproof.setUnlocalizedName("pipeWaterproof");
LanguageRegistry.addName(pipeWaterproof, "Pipe Sealant"); LanguageRegistry.addName(pipeWaterproof, "Pipe Sealant");
CoreProxy.proxy.registerItem(pipeWaterproof); CoreProxy.proxy.registerItem(pipeWaterproof);
@ -271,40 +272,40 @@ public class BuildCraftTransport extends BuildCraftMod {
genericPipeBlock = new BlockGenericPipe(); genericPipeBlock = new BlockGenericPipe();
CoreProxy.proxy.registerBlock(genericPipeBlock.setBlockName("pipeBlock"), ItemBlock.class); CoreProxy.proxy.registerBlock(genericPipeBlock.setBlockName("pipeBlock"), ItemBlock.class);
pipeItemsWood = buildPipe(DefaultProps.PIPE_ITEMS_WOOD_ID, PipeItemsWood.class, "Wooden Transport Pipe", "plankWood", Blocks.glass, "plankWood"); pipeItemsWood = buildPipe(DefaultProps.PIPE_ITEMS_WOOD_ID, PipeItemsWood.class, "Wooden Transport Pipe", CreativeTabBuildCraft.TIER_1, "plankWood", Blocks.glass, "plankWood");
pipeItemsEmerald = buildPipe(DefaultProps.PIPE_ITEMS_EMERALD_ID, PipeItemsEmerald.class, "Emerald Transport Pipe", Items.emerald, Blocks.glass, Items.emerald); pipeItemsEmerald = buildPipe(DefaultProps.PIPE_ITEMS_EMERALD_ID, PipeItemsEmerald.class, "Emerald Transport Pipe", CreativeTabBuildCraft.MISC, Items.emerald, Blocks.glass, Items.emerald);
pipeItemsCobblestone = buildPipe(DefaultProps.PIPE_ITEMS_COBBLESTONE_ID, PipeItemsCobblestone.class, "Cobblestone Transport Pipe", "cobblestone", Blocks.glass, "cobblestone"); pipeItemsCobblestone = buildPipe(DefaultProps.PIPE_ITEMS_COBBLESTONE_ID, PipeItemsCobblestone.class, "Cobblestone Transport Pipe", CreativeTabBuildCraft.TIER_1, "cobblestone", Blocks.glass, "cobblestone");
pipeItemsStone = buildPipe(DefaultProps.PIPE_ITEMS_STONE_ID, PipeItemsStone.class, "Stone Transport Pipe", "stone", Blocks.glass, "stone"); pipeItemsStone = buildPipe(DefaultProps.PIPE_ITEMS_STONE_ID, PipeItemsStone.class, "Stone Transport Pipe", CreativeTabBuildCraft.TIER_1, "stone", Blocks.glass, "stone");
pipeItemsQuartz = buildPipe(DefaultProps.PIPE_ITEMS_QUARTZ_ID, PipeItemsQuartz.class, "Quartz Transport Pipe", Blocks.quartz_block, Blocks.glass, Blocks.quartz_block); pipeItemsQuartz = buildPipe(DefaultProps.PIPE_ITEMS_QUARTZ_ID, PipeItemsQuartz.class, "Quartz Transport Pipe", CreativeTabBuildCraft.TIER_1, Blocks.quartz_block, Blocks.glass, Blocks.quartz_block);
pipeItemsIron = buildPipe(DefaultProps.PIPE_ITEMS_IRON_ID, PipeItemsIron.class, "Iron Transport Pipe", Items.iron_ingot, Blocks.glass, Items.iron_ingot); pipeItemsIron = buildPipe(DefaultProps.PIPE_ITEMS_IRON_ID, PipeItemsIron.class, "Iron Transport Pipe", CreativeTabBuildCraft.TIER_1, Items.iron_ingot, Blocks.glass, Items.iron_ingot);
pipeItemsGold = buildPipe(DefaultProps.PIPE_ITEMS_GOLD_ID, PipeItemsGold.class, "Golden Transport Pipe", Items.gold_ingot, Blocks.glass, Items.gold_ingot); pipeItemsGold = buildPipe(DefaultProps.PIPE_ITEMS_GOLD_ID, PipeItemsGold.class, "Golden Transport Pipe", CreativeTabBuildCraft.TIER_1, Items.gold_ingot, Blocks.glass, Items.gold_ingot);
pipeItemsDiamond = buildPipe(DefaultProps.PIPE_ITEMS_DIAMOND_ID, PipeItemsDiamond.class, "Diamond Transport Pipe", Items.diamond, Blocks.glass, Items.diamond); pipeItemsDiamond = buildPipe(DefaultProps.PIPE_ITEMS_DIAMOND_ID, PipeItemsDiamond.class, "Diamond Transport Pipe", CreativeTabBuildCraft.TIER_1, Items.diamond, Blocks.glass, Items.diamond);
pipeItemsObsidian = buildPipe(DefaultProps.PIPE_ITEMS_OBSIDIAN_ID, PipeItemsObsidian.class, "Obsidian Transport Pipe", Blocks.obsidian, Blocks.glass, Blocks.obsidian); pipeItemsObsidian = buildPipe(DefaultProps.PIPE_ITEMS_OBSIDIAN_ID, PipeItemsObsidian.class, "Obsidian Transport Pipe", CreativeTabBuildCraft.TIER_1, Blocks.obsidian, Blocks.glass, Blocks.obsidian);
pipeItemsLapis = buildPipe(DefaultProps.PIPE_ITEMS_LAPIS_ID, PipeItemsLapis.class, "Lapis Transport Pipe", Blocks.lapis_block, Blocks.glass, Blocks.lapis_block); pipeItemsLapis = buildPipe(DefaultProps.PIPE_ITEMS_LAPIS_ID, PipeItemsLapis.class, "Lapis Transport Pipe", CreativeTabBuildCraft.MISC, Blocks.lapis_block, Blocks.glass, Blocks.lapis_block);
pipeItemsDaizuli = buildPipe(DefaultProps.PIPE_ITEMS_DAIZULI_ID, PipeItemsDaizuli.class, "Daizuli Transport Pipe", Blocks.lapis_block, Blocks.glass, Items.diamond); pipeItemsDaizuli = buildPipe(DefaultProps.PIPE_ITEMS_DAIZULI_ID, PipeItemsDaizuli.class, "Daizuli Transport Pipe", CreativeTabBuildCraft.MISC, Blocks.lapis_block, Blocks.glass, Items.diamond);
pipeItemsSandstone = buildPipe(DefaultProps.PIPE_ITEMS_SANDSTONE_ID, PipeItemsSandstone.class, "Sandstone Transport Pipe", Blocks.sandstone, Blocks.glass, Blocks.sandstone); pipeItemsSandstone = buildPipe(DefaultProps.PIPE_ITEMS_SANDSTONE_ID, PipeItemsSandstone.class, "Sandstone Transport Pipe", CreativeTabBuildCraft.TIER_1, Blocks.sandstone, Blocks.glass, Blocks.sandstone);
pipeItemsVoid = buildPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe", "dyeBlack", Blocks.glass, Items.redstone); pipeItemsVoid = buildPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe", CreativeTabBuildCraft.TIER_1, "dyeBlack", Blocks.glass, Items.redstone);
pipeItemsEmzuli = buildPipe(DefaultProps.PIPE_ITEMS_EMZULI_ID, PipeItemsEmzuli.class, "Emzuli Transport Pipe", Blocks.lapis_block, Blocks.glass, Items.emerald); pipeItemsEmzuli = buildPipe(DefaultProps.PIPE_ITEMS_EMZULI_ID, PipeItemsEmzuli.class, "Emzuli Transport Pipe", CreativeTabBuildCraft.MISC, Blocks.lapis_block, Blocks.glass, Items.emerald);
pipeFluidsWood = buildPipe(DefaultProps.PIPE_LIQUIDS_WOOD_ID, PipeFluidsWood.class, "Wooden Waterproof Pipe", pipeWaterproof, pipeItemsWood); pipeFluidsWood = buildPipe(DefaultProps.PIPE_LIQUIDS_WOOD_ID, PipeFluidsWood.class, "Wooden Waterproof Pipe", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsWood);
pipeFluidsCobblestone = buildPipe(DefaultProps.PIPE_LIQUIDS_COBBLESTONE_ID, PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", pipeWaterproof, pipeItemsCobblestone); pipeFluidsCobblestone = buildPipe(DefaultProps.PIPE_LIQUIDS_COBBLESTONE_ID, PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsCobblestone);
pipeFluidsStone = buildPipe(DefaultProps.PIPE_LIQUIDS_STONE_ID, PipeFluidsStone.class, "Stone Waterproof Pipe", pipeWaterproof, pipeItemsStone); pipeFluidsStone = buildPipe(DefaultProps.PIPE_LIQUIDS_STONE_ID, PipeFluidsStone.class, "Stone Waterproof Pipe", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsStone);
pipeFluidsIron = buildPipe(DefaultProps.PIPE_LIQUIDS_IRON_ID, PipeFluidsIron.class, "Iron Waterproof Pipe", pipeWaterproof, pipeItemsIron); pipeFluidsIron = buildPipe(DefaultProps.PIPE_LIQUIDS_IRON_ID, PipeFluidsIron.class, "Iron Waterproof Pipe", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsIron);
pipeFluidsGold = buildPipe(DefaultProps.PIPE_LIQUIDS_GOLD_ID, PipeFluidsGold.class, "Golden Waterproof Pipe", pipeWaterproof, pipeItemsGold); pipeFluidsGold = buildPipe(DefaultProps.PIPE_LIQUIDS_GOLD_ID, PipeFluidsGold.class, "Golden Waterproof Pipe", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsGold);
pipeFluidsEmerald = buildPipe(DefaultProps.PIPE_LIQUIDS_EMERALD_ID, PipeFluidsEmerald.class, "Emerald Waterproof Pipe", pipeWaterproof, pipeItemsEmerald); pipeFluidsEmerald = buildPipe(DefaultProps.PIPE_LIQUIDS_EMERALD_ID, PipeFluidsEmerald.class, "Emerald Waterproof Pipe", CreativeTabBuildCraft.MISC, pipeWaterproof, pipeItemsEmerald);
pipeFluidsSandstone = buildPipe(DefaultProps.PIPE_LIQUIDS_SANDSTONE_ID, PipeFluidsSandstone.class, "Sandstone Waterproof Pipe", pipeWaterproof, pipeItemsSandstone); pipeFluidsSandstone = buildPipe(DefaultProps.PIPE_LIQUIDS_SANDSTONE_ID, PipeFluidsSandstone.class, "Sandstone Waterproof Pipe", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsSandstone);
pipeFluidsVoid = buildPipe(DefaultProps.PIPE_LIQUIDS_VOID_ID, PipeFluidsVoid.class, "Void Waterproof Pipe", pipeWaterproof, pipeItemsVoid); pipeFluidsVoid = buildPipe(DefaultProps.PIPE_LIQUIDS_VOID_ID, PipeFluidsVoid.class, "Void Waterproof Pipe", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsVoid);
pipePowerWood = buildPipe(DefaultProps.PIPE_POWER_WOOD_ID, PipePowerWood.class, "Wooden Kinesis Pipe", Items.redstone, pipeItemsWood); pipePowerWood = buildPipe(DefaultProps.PIPE_POWER_WOOD_ID, PipePowerWood.class, "Wooden Kinesis Pipe", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsWood);
pipePowerCobblestone = buildPipe(DefaultProps.PIPE_POWER_COBBLESTONE_ID, PipePowerCobblestone.class, "Cobblestone Kinesis Pipe", Items.redstone, pipeItemsCobblestone); pipePowerCobblestone = buildPipe(DefaultProps.PIPE_POWER_COBBLESTONE_ID, PipePowerCobblestone.class, "Cobblestone Kinesis Pipe", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsCobblestone);
pipePowerStone = buildPipe(DefaultProps.PIPE_POWER_STONE_ID, PipePowerStone.class, "Stone Kinesis Pipe", Items.redstone, pipeItemsStone); pipePowerStone = buildPipe(DefaultProps.PIPE_POWER_STONE_ID, PipePowerStone.class, "Stone Kinesis Pipe", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsStone);
pipePowerQuartz = buildPipe(DefaultProps.PIPE_POWER_QUARTZ_ID, PipePowerQuartz.class, "Quartz Kinesis Pipe", Items.redstone, pipeItemsQuartz); pipePowerQuartz = buildPipe(DefaultProps.PIPE_POWER_QUARTZ_ID, PipePowerQuartz.class, "Quartz Kinesis Pipe", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsQuartz);
pipePowerIron = buildPipe(DefaultProps.PIPE_POWER_IRON_ID, PipePowerIron.class, "Iron Kinesis Pipe", Items.redstone, pipeItemsIron); pipePowerIron = buildPipe(DefaultProps.PIPE_POWER_IRON_ID, PipePowerIron.class, "Iron Kinesis Pipe", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsIron);
pipePowerGold = buildPipe(DefaultProps.PIPE_POWER_GOLD_ID, PipePowerGold.class, "Golden Kinesis Pipe", Items.redstone, pipeItemsGold); pipePowerGold = buildPipe(DefaultProps.PIPE_POWER_GOLD_ID, PipePowerGold.class, "Golden Kinesis Pipe", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsGold);
pipePowerDiamond = buildPipe(DefaultProps.PIPE_POWER_DIAMOND_ID, PipePowerDiamond.class, "Diamond Kinesis Pipe", Items.redstone, pipeItemsDiamond); pipePowerDiamond = buildPipe(DefaultProps.PIPE_POWER_DIAMOND_ID, PipePowerDiamond.class, "Diamond Kinesis Pipe", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsDiamond);
pipePowerHeat = buildPipe(DefaultProps.PIPE_POWER_HEAT_ID, PipePowerHeat.class, "Heat Kinesis Pipe", Blocks.furnace, pipeItemsDiamond); pipePowerHeat = buildPipe(DefaultProps.PIPE_POWER_HEAT_ID, PipePowerHeat.class, "Heat Kinesis Pipe", CreativeTabBuildCraft.TIER_3, Blocks.furnace, pipeItemsDiamond);
pipeStructureCobblestone = buildPipe(DefaultProps.PIPE_STRUCTURE_COBBLESTONE_ID, PipeStructureCobblestone.class, "Cobblestone Structure Pipe", Blocks.gravel, pipeItemsCobblestone); pipeStructureCobblestone = buildPipe(DefaultProps.PIPE_STRUCTURE_COBBLESTONE_ID, PipeStructureCobblestone.class, "Cobblestone Structure Pipe", CreativeTabBuildCraft.TIER_1, Blocks.gravel, pipeItemsCobblestone);
// Fix the recipe // Fix the recipe
// pipeItemsStipes = createPipe(DefaultProps.PIPE_ITEMS_STRIPES_ID, PipeItemsStripes.class, "Stripes Transport Pipe", new ItemStack(Item.dyePowder, // pipeItemsStipes = createPipe(DefaultProps.PIPE_ITEMS_STRIPES_ID, PipeItemsStripes.class, "Stripes Transport Pipe", new ItemStack(Item.dyePowder,
@ -445,10 +446,12 @@ public class BuildCraftTransport extends BuildCraftMod {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }
public static Item buildPipe(int defaultID, Class<? extends Pipe> clas, String descr, Object... ingredients) { public static Item buildPipe(int defaultID, Class<? extends Pipe> clas,
String descr, CreativeTabBuildCraft creativeTab,
Object... ingredients) {
String name = Character.toLowerCase(clas.getSimpleName().charAt(0)) + clas.getSimpleName().substring(1); String name = Character.toLowerCase(clas.getSimpleName().charAt(0)) + clas.getSimpleName().substring(1);
ItemPipe res = BlockGenericPipe.registerPipe(clas); ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
res.setUnlocalizedName(clas.getSimpleName()); res.setUnlocalizedName(clas.getSimpleName());
LanguageRegistry.addName(res, descr); LanguageRegistry.addName(res, descr);

View file

@ -8,18 +8,6 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.core.Position;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -33,6 +21,13 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockArchitect extends BlockContainer { public class BlockArchitect extends BlockContainer {
@ -45,7 +40,7 @@ public class BlockArchitect extends BlockContainer {
public BlockArchitect() { public BlockArchitect() {
super(Material.iron); super(Material.iron);
setHardness(5F); setHardness(5F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
} }
@Override @Override

View file

@ -8,15 +8,6 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.BuildCraftBuilders;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.proxy.CoreProxy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -26,6 +17,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftBuilders;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBlueprintLibrary extends BlockContainer { public class BlockBlueprintLibrary extends BlockContainer {
@ -34,7 +30,7 @@ public class BlockBlueprintLibrary extends BlockContainer {
public BlockBlueprintLibrary() { public BlockBlueprintLibrary() {
super(Material.wood); super(Material.wood);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
setHardness(5F); setHardness(5F);
} }

View file

@ -8,17 +8,6 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -31,6 +20,13 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBuilder extends BlockContainer { public class BlockBuilder extends BlockContainer {
@ -41,7 +37,7 @@ public class BlockBuilder extends BlockContainer {
public BlockBuilder() { public BlockBuilder() {
super(Material.iron); super(Material.iron);
setHardness(5F); setHardness(5F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
} }
@Override @Override

View file

@ -8,27 +8,22 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.filler.IFillerPattern;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftBuilders;
import buildcraft.api.filler.IFillerPattern;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockFiller extends BlockContainer { public class BlockFiller extends BlockContainer {
@ -41,7 +36,7 @@ public class BlockFiller extends BlockContainer {
super(Material.iron); super(Material.iron);
setHardness(5F); setHardness(5F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
} }
@Override @Override

View file

@ -8,26 +8,21 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.BuildCraftBuilders;
import buildcraft.BuildCraftCore;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftCore;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockMarker extends BlockContainer { public class BlockMarker extends BlockContainer {
@ -35,7 +30,7 @@ public class BlockMarker extends BlockContainer {
super(Material.circuits); super(Material.circuits);
setLightLevel(0.5F); setLightLevel(0.5F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
} }
private AxisAlignedBB getBoundingBox(int meta) { private AxisAlignedBB getBoundingBox(int meta) {

View file

@ -8,25 +8,23 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockPathMarker extends BlockMarker { public class BlockPathMarker extends BlockMarker {
private IIcon activeMarker; private IIcon activeMarker;
public BlockPathMarker() { public BlockPathMarker() {
setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
} }
@Override @Override
@ -40,6 +38,7 @@ public class BlockPathMarker extends BlockMarker {
super.breakBlock(world, x, y, z, block, par6); super.breakBlock(world, x, y, z, block, par6);
} }
@Override
@SuppressWarnings({ "all" }) @SuppressWarnings({ "all" })
// @Override (client only) // @Override (client only)
public IIcon getIcon(IBlockAccess iblockaccess, int i, int j, int k, int l) { public IIcon getIcon(IBlockAccess iblockaccess, int i, int j, int k, int l) {

View file

@ -8,26 +8,24 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.BuildCraftBuilders;
import buildcraft.builders.blueprints.Blueprint;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.utils.NBTUtils;
import buildcraft.core.utils.StringUtils;
import java.util.List; import java.util.List;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import buildcraft.BuildCraftBuilders;
import buildcraft.builders.blueprints.Blueprint;
import buildcraft.builders.blueprints.BlueprintId; import buildcraft.builders.blueprints.BlueprintId;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.utils.NBTUtils;
import buildcraft.core.utils.StringUtils;
public abstract class ItemBlueprint extends ItemBuildCraft { public abstract class ItemBlueprint extends ItemBuildCraft {
public ItemBlueprint() { public ItemBlueprint() {
super(); super(CreativeTabBuildCraft.TIER_3);
setMaxStackSize(1); setMaxStackSize(1);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
} }
@Override @Override

View file

@ -8,31 +8,32 @@
*/ */
package buildcraft.builders; package buildcraft.builders;
import buildcraft.BuildCraftBuilders;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.blueprints.BptBase;
import buildcraft.core.proxy.CoreProxy;
import java.util.List; import java.util.List;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftBuilders;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.blueprints.BptBase;
public abstract class ItemBptBase extends ItemBuildCraft { public abstract class ItemBptBase extends ItemBuildCraft {
public ItemBptBase() { public ItemBptBase() {
super(); super(CreativeTabBuildCraft.TIER_3);
maxStackSize = 1; maxStackSize = 1;
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
} }
@Override
@SuppressWarnings({ "all" }) @SuppressWarnings({ "all" })
// @Override (client only) // @Override (client only)
public abstract IIcon getIconFromDamage(int i); public abstract IIcon getIconFromDamage(int i);
@Override
@SuppressWarnings({ "all" }) @SuppressWarnings({ "all" })
// @Override (client only) // @Override (client only)
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean advanced) { public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean advanced) {

View file

@ -31,12 +31,11 @@ public class BlockUrbanist extends BlockBuildCraft {
} }
public BlockUrbanist() { public BlockUrbanist() {
super(Material.rock); super(Material.rock, CreativeTabBuildCraft.TIER_4);
setBlockUnbreakable(); setBlockUnbreakable();
setResistance(6000000.0F); setResistance(6000000.0F);
disableStats(); disableStats();
setTickRandomly(true); setTickRandomly(true);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
} }
@Override @Override

View file

@ -8,8 +8,6 @@
*/ */
package buildcraft.core; package buildcraft.core;
import buildcraft.core.utils.Utils;
import java.util.Random; import java.util.Random;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -20,15 +18,16 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.core.utils.Utils;
public abstract class BlockBuildCraft extends BlockContainer { public abstract class BlockBuildCraft extends BlockContainer {
protected static boolean keepInventory = false; protected static boolean keepInventory = false;
protected final Random rand = new Random(); protected final Random rand = new Random();
protected BlockBuildCraft(Material material) { protected BlockBuildCraft(Material material, CreativeTabBuildCraft creativeTab) {
super(material); super(material);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(creativeTab.get());
setHardness(5F); setHardness(5F);
} }

View file

@ -8,9 +8,6 @@
*/ */
package buildcraft.core; package buildcraft.core;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
@ -22,6 +19,8 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockSpring extends Block { public class BlockSpring extends Block {
@ -54,13 +53,13 @@ public class BlockSpring extends Block {
super(Material.rock); super(Material.rock);
setBlockUnbreakable(); setBlockUnbreakable();
setResistance(6000000.0F); setResistance(6000000.0F);
// TODO: set proper sound // TODO: set proper sound
//setStepSound(soundStoneFootstep); //setStepSound(soundStoneFootstep);
disableStats(); disableStats();
setTickRandomly(true); setTickRandomly(true);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.MISC.get());
} }
@Override @Override

View file

@ -7,11 +7,16 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftEnergy;
import buildcraft.transport.ItemFacade; import buildcraft.transport.ItemFacade;
public enum CreativeTabBuildCraft { public enum CreativeTabBuildCraft {
MACHINES, TIER_1,
TIER_2,
TIER_3,
TIER_4,
MISC,
FACADES; FACADES;
private final CreativeTabs tab; private final CreativeTabs tab;
@ -29,12 +34,21 @@ public enum CreativeTabBuildCraft {
private ItemStack getItem() { private ItemStack getItem() {
switch (this) { switch (this) {
case TIER_1:
return new ItemStack (BuildCraftCore.woodenGearItem, 1);
case TIER_2:
return new ItemStack (BuildCraftEnergy.bucketOil, 1);
case TIER_3:
return new ItemStack (BuildCraftCore.redstoneCrystal, 1);
case TIER_4:
return new ItemStack (BuildCraftCore.springBlock, 1);
case MISC:
return new ItemStack (BuildCraftCore.springBlock, 1);
case FACADES: case FACADES:
return ItemFacade.getStack(Blocks.brick_block, 0); return ItemFacade.getStack(Blocks.brick_block, 0);
default:
return new ItemStack(BuildCraftCore.diamondGearItem);
} }
return ItemFacade.getStack(Blocks.brick_block, 0);
} }
private class Tab extends CreativeTabs { private class Tab extends CreativeTabs {

View file

@ -8,23 +8,22 @@
*/ */
package buildcraft.core; package buildcraft.core;
import buildcraft.core.utils.StringUtils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemBuildCraft extends Item { public class ItemBuildCraft extends Item {
private String iconName; private String iconName;
private boolean passSneakClick = false; private boolean passSneakClick = false;
public ItemBuildCraft() { public ItemBuildCraft(CreativeTabBuildCraft creativeTab) {
super(); super();
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
setCreativeTab(creativeTab.get());
} }
@Override @Override

View file

@ -16,7 +16,7 @@ public class ItemRobot extends ItemBuildCraft {
Class <? extends EntityRobot> robotClass; Class <? extends EntityRobot> robotClass;
public ItemRobot(Class <? extends EntityRobot> robotClass) { public ItemRobot(Class <? extends EntityRobot> robotClass) {
super(); super(CreativeTabBuildCraft.TIER_4);
this.robotClass = robotClass; this.robotClass = robotClass;
} }
@ -25,7 +25,6 @@ public class ItemRobot extends ItemBuildCraft {
try { try {
return this.robotClass.getConstructor(World.class).newInstance(world); return this.robotClass.getConstructor(World.class).newInstance(world);
} catch (Throwable e) { } catch (Throwable e) {
// TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
return null; return null;
} }

View file

@ -8,9 +8,9 @@
*/ */
package buildcraft.core; package buildcraft.core;
import buildcraft.api.tools.IToolWrench;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockButton; import net.minecraft.block.BlockButton;
import net.minecraft.block.BlockChest; import net.minecraft.block.BlockChest;
@ -19,13 +19,15 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.tools.IToolWrench;
public class ItemWrench extends ItemBuildCraft implements IToolWrench { public class ItemWrench extends ItemBuildCraft implements IToolWrench {
private final Set<Class<? extends Block>> shiftRotations = new HashSet<Class<? extends Block>>(); private final Set<Class<? extends Block>> shiftRotations = new HashSet<Class<? extends Block>>();
public ItemWrench() { public ItemWrench() {
super(); super(CreativeTabBuildCraft.TIER_1);
setFull3D(); setFull3D();
setMaxStackSize(1); setMaxStackSize(1);
shiftRotations.add(BlockLever.class); shiftRotations.add(BlockLever.class);
@ -44,7 +46,7 @@ public class ItemWrench extends ItemBuildCraft implements IToolWrench {
@Override @Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
Block block = world.getBlock(x, y, z); Block block = world.getBlock(x, y, z);
if(block == null) if(block == null)
return false; return false;

View file

@ -19,9 +19,7 @@ import buildcraft.core.CreativeTabBuildCraft;
public class BlockEnergyEmitter extends BlockBuildCraft { public class BlockEnergyEmitter extends BlockBuildCraft {
public BlockEnergyEmitter() { public BlockEnergyEmitter() {
super(Material.glass); super(Material.glass, CreativeTabBuildCraft.TIER_4);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
} }
@Override @Override

View file

@ -17,9 +17,7 @@ import buildcraft.core.CreativeTabBuildCraft;
public class BlockEnergyReceiver extends BlockBuildCraft { public class BlockEnergyReceiver extends BlockBuildCraft {
public BlockEnergyReceiver() { public BlockEnergyReceiver() {
super(Material.iron); super(Material.iron, CreativeTabBuildCraft.TIER_4);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
} }
@Override @Override

View file

@ -8,12 +8,6 @@
*/ */
package buildcraft.energy; package buildcraft.energy;
import buildcraft.BuildCraftCore;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.IItemPipe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
@ -29,6 +23,12 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftCore;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.IItemPipe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockEngine extends BlockBuildCraft { public class BlockEngine extends BlockBuildCraft {
@ -36,8 +36,8 @@ public class BlockEngine extends BlockBuildCraft {
private static IIcon stoneTexture; private static IIcon stoneTexture;
private static IIcon ironTexture; private static IIcon ironTexture;
public BlockEngine() { public BlockEngine(CreativeTabBuildCraft creativeTab) {
super(Material.iron); super(Material.iron, creativeTab);
setBlockName("engineBlock"); setBlockName("engineBlock");
} }
@ -109,7 +109,7 @@ public class BlockEngine extends BlockBuildCraft {
} }
if (tile instanceof TileEngine) { if (tile instanceof TileEngine) {
return ((TileEngine) tile).onBlockActivated(player, ForgeDirection.getOrientation(side)); return tile.onBlockActivated(player, ForgeDirection.getOrientation(side));
} }
return false; return false;
@ -137,9 +137,9 @@ public class BlockEngine extends BlockBuildCraft {
return; return;
} }
float f = (float) i + 0.5F; float f = i + 0.5F;
float f1 = (float) j + 0.0F + (random.nextFloat() * 6F) / 16F; float f1 = j + 0.0F + (random.nextFloat() * 6F) / 16F;
float f2 = (float) k + 0.5F; float f2 = k + 0.5F;
float f3 = 0.52F; float f3 = 0.52F;
float f4 = random.nextFloat() * 0.6F - 0.3F; float f4 = random.nextFloat() * 0.6F - 0.3F;
@ -152,9 +152,12 @@ public class BlockEngine extends BlockBuildCraft {
@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) {
itemList.add(new ItemStack(this, 1, 0)); if (par2CreativeTabs == CreativeTabBuildCraft.TIER_1.get()) {
itemList.add(new ItemStack(this, 1, 1)); itemList.add(new ItemStack(this, 1, 0));
itemList.add(new ItemStack(this, 1, 2)); itemList.add(new ItemStack(this, 1, 1));
} else {
itemList.add(new ItemStack(this, 1, 2));
}
} }
@Override @Override

View file

@ -8,25 +8,23 @@
*/ */
package buildcraft.energy; package buildcraft.energy;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.utils.StringUtils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemBucket;
import net.minecraft.item.ItemStack; import buildcraft.core.CreativeTabBuildCraft;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemBucketBuildcraft extends ItemBucket { public class ItemBucketBuildcraft extends ItemBucket {
private String iconName; private String iconName;
public ItemBucketBuildcraft(Block block) { public ItemBucketBuildcraft(Block block, CreativeTabBuildCraft creativeTab) {
super(block); super(block);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
setContainerItem(Items.bucket); setContainerItem(Items.bucket);
setCreativeTab(creativeTab.get());
} }
@Override @Override

View file

@ -8,9 +8,11 @@
*/ */
package buildcraft.energy; package buildcraft.energy;
import buildcraft.core.ItemBlockBuildCraft;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBlockBuildCraft;
public class ItemEngine extends ItemBlockBuildCraft { public class ItemEngine extends ItemBlockBuildCraft {
@ -27,11 +29,17 @@ public class ItemEngine extends ItemBlockBuildCraft {
@Override @Override
public String getUnlocalizedName(ItemStack itemstack) { public String getUnlocalizedName(ItemStack itemstack) {
if (itemstack.getItemDamage() == 0) if (itemstack.getItemDamage() == 0) {
return "tile.engineWood"; return "tile.engineWood";
else if (itemstack.getItemDamage() == 1) } else if (itemstack.getItemDamage() == 1) {
return "tile.engineStone"; return "tile.engineStone";
else } else {
return "tile.engineIron"; return "tile.engineIron";
}
}
@Override
public CreativeTabs[] getCreativeTabs() {
return new CreativeTabs[] { CreativeTabBuildCraft.TIER_1.get(), CreativeTabBuildCraft.TIER_2.get() };
} }
} }

View file

@ -8,21 +8,19 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import buildcraft.BuildCraftFactory;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe;
import buildcraft.core.proxy.CoreProxy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftFactory;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockAutoWorkbench extends BlockBuildCraft { public class BlockAutoWorkbench extends BlockBuildCraft {
@ -30,7 +28,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft {
IIcon sideTexture; IIcon sideTexture;
public BlockAutoWorkbench() { public BlockAutoWorkbench() {
super(Material.wood); super(Material.wood, CreativeTabBuildCraft.TIER_1);
setHardness(3.0F); setHardness(3.0F);
} }

View file

@ -8,6 +8,14 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.core.BlockBuildCraft; import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.CreativeTabBuildCraft;
@ -15,18 +23,6 @@ import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockFloodGate extends BlockBuildCraft { public class BlockFloodGate extends BlockBuildCraft {
private IIcon textureTop; private IIcon textureTop;
@ -34,7 +30,7 @@ public class BlockFloodGate extends BlockBuildCraft {
private IIcon textureSide; private IIcon textureSide;
public BlockFloodGate() { public BlockFloodGate() {
super(Material.iron); super(Material.iron, CreativeTabBuildCraft.TIER_2);
} }
@Override @Override

View file

@ -8,29 +8,27 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftFactory;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe;
import buildcraft.core.proxy.CoreProxy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftFactory;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockHopper extends BlockBuildCraft { public class BlockHopper extends BlockBuildCraft {
private static IIcon icon; private static IIcon icon;
public BlockHopper() { public BlockHopper() {
super(Material.iron); super(Material.iron, CreativeTabBuildCraft.TIER_1);
} }
@Override @Override

View file

@ -8,15 +8,6 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import buildcraft.BuildCraftFactory;
import buildcraft.api.core.Position;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -26,17 +17,23 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftFactory;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockMiningWell extends BlockBuildCraft { public class BlockMiningWell extends BlockBuildCraft {
IIcon textureFront, textureSides, textureBack, textureTop; IIcon textureFront, textureSides, textureBack, textureTop;
public BlockMiningWell() { public BlockMiningWell() {
super(Material.ground); super(Material.ground, CreativeTabBuildCraft.TIER_1);
setHardness(5F); setHardness(5F);
setResistance(10F); setResistance(10F);
// TODO: set proper sound // TODO: set proper sound
//setStepSound(soundStoneFootstep); //setStepSound(soundStoneFootstep);
} }

View file

@ -8,6 +8,14 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.core.BlockBuildCraft; import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.CreativeTabBuildCraft;
@ -15,18 +23,6 @@ import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockPump extends BlockBuildCraft { public class BlockPump extends BlockBuildCraft {
private IIcon textureTop; private IIcon textureTop;
@ -34,7 +30,7 @@ public class BlockPump extends BlockBuildCraft {
private IIcon textureSide; private IIcon textureSide;
public BlockPump() { public BlockPump() {
super(Material.iron); super(Material.iron, CreativeTabBuildCraft.TIER_2);
} }
@Override @Override

View file

@ -8,16 +8,6 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import buildcraft.BuildCraftFactory;
import buildcraft.api.core.Position;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.Box;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList; import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -29,9 +19,16 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftFactory;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.Box;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockQuarry extends BlockBuildCraft { public class BlockQuarry extends BlockBuildCraft {
@ -40,7 +37,7 @@ public class BlockQuarry extends BlockBuildCraft {
IIcon textureSide; IIcon textureSide;
public BlockQuarry() { public BlockQuarry() {
super(Material.iron); super(Material.iron, CreativeTabBuildCraft.TIER_2);
setHardness(10F); setHardness(10F);
setResistance(10F); setResistance(10F);

View file

@ -8,19 +8,6 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftFactory;
import buildcraft.api.core.Position;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.fluids.FluidUtils;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -33,11 +20,16 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import static net.minecraftforge.common.util.ForgeDirection.EAST;
import static net.minecraftforge.common.util.ForgeDirection.NORTH;
import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
import static net.minecraftforge.common.util.ForgeDirection.WEST;
import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidContainerRegistry;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftFactory;
import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.fluids.FluidUtils;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockRefinery extends BlockContainer { public class BlockRefinery extends BlockContainer {
@ -47,7 +39,7 @@ public class BlockRefinery extends BlockContainer {
super(Material.iron); super(Material.iron);
setHardness(5F); setHardness(5F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
} }
@Override @Override
@ -136,7 +128,7 @@ public class BlockRefinery extends BlockContainer {
return true; return true;
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister par1IconRegister) { public void registerBlockIcons(IIconRegister par1IconRegister) {

View file

@ -8,13 +8,6 @@
*/ */
package buildcraft.factory; package buildcraft.factory;
import buildcraft.BuildCraftCore;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.inventory.InvUtils;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -25,9 +18,13 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import buildcraft.BuildCraftCore;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.inventory.InvUtils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockTank extends BlockContainer { public class BlockTank extends BlockContainer {
@ -39,7 +36,7 @@ public class BlockTank extends BlockContainer {
super(Material.glass); super(Material.glass);
setBlockBounds(0.125F, 0F, 0.125F, 0.875F, 1F, 0.875F); setBlockBounds(0.125F, 0F, 0.125F, 0.875F, 1F, 0.875F);
setHardness(0.5F); setHardness(0.5F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
} }
@Override @Override
@ -88,7 +85,7 @@ public class BlockTank extends BlockContainer {
@Override @Override
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) {
ItemStack current = entityplayer.inventory.getCurrentItem(); ItemStack current = entityplayer.inventory.getCurrentItem();
if (current != null) { if (current != null) {
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
@ -107,7 +104,7 @@ public class BlockTank extends BlockContainer {
// Handle empty containers // Handle empty containers
} else { } else {
FluidStack available = tank.getTankInfo(ForgeDirection.UNKNOWN)[0].fluid; FluidStack available = tank.getTankInfo(ForgeDirection.UNKNOWN)[0].fluid;
if (available != null) { if (available != null) {
ItemStack filled = FluidContainerRegistry.fillFluidContainer(available, current); ItemStack filled = FluidContainerRegistry.fillFluidContainer(available, current);
@ -126,9 +123,9 @@ public class BlockTank extends BlockContainer {
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, filled); entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, filled);
} }
} }
tank.drain(ForgeDirection.UNKNOWN, liquid.amount, true); tank.drain(ForgeDirection.UNKNOWN, liquid.amount, true);
return true; return true;
} }
} }
@ -158,12 +155,12 @@ public class BlockTank extends BlockContainer {
@Override @Override
public int getLightValue(IBlockAccess world, int x, int y, int z) { public int getLightValue(IBlockAccess world, int x, int y, int z) {
TileEntity tile = world.getTileEntity(x, y, z); TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileTank) { if (tile instanceof TileTank) {
TileTank tank = (TileTank) tile; TileTank tank = (TileTank) tile;
return tank.getFluidLightLevel(); return tank.getFluidLightLevel();
} }
return super.getLightValue(world, x, y, z); return super.getLightValue(world, x, y, z);
} }
} }

View file

@ -8,18 +8,16 @@
*/ */
package buildcraft.silicon; package buildcraft.silicon;
import buildcraft.core.CreativeTabBuildCraft;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.core.CreativeTabBuildCraft;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockLaser extends BlockContainer { public class BlockLaser extends BlockContainer {
@ -29,7 +27,7 @@ public class BlockLaser extends BlockContainer {
public BlockLaser() { public BlockLaser() {
super(Material.iron); super(Material.iron);
setHardness(10F); setHardness(10F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
} }
@Override @Override

View file

@ -8,13 +8,6 @@
*/ */
package buildcraft.silicon; package buildcraft.silicon;
import buildcraft.BuildCraftSilicon;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -28,6 +21,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftSilicon;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockLaserTable extends BlockContainer { public class BlockLaserTable extends BlockContainer {
@ -39,7 +37,7 @@ public class BlockLaserTable extends BlockContainer {
setBlockBounds(0, 0, 0, 1, 9F / 16F, 1); setBlockBounds(0, 0, 0, 1, 9F / 16F, 1);
setHardness(10F); setHardness(10F);
setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
} }
@Override @Override

View file

@ -8,12 +8,6 @@
*/ */
package buildcraft.silicon; package buildcraft.silicon;
import buildcraft.BuildCraftSilicon;
import buildcraft.core.ItemBuildCraft;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
@ -22,6 +16,12 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import buildcraft.BuildCraftSilicon;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemRedstoneChipset extends ItemBuildCraft { public class ItemRedstoneChipset extends ItemBuildCraft {
@ -57,7 +57,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft {
} }
public ItemRedstoneChipset() { public ItemRedstoneChipset() {
super(); super(CreativeTabBuildCraft.TIER_3);
setHasSubtypes(true); setHasSubtypes(true);
setMaxDamage(0); setMaxDamage(0);
} }

View file

@ -8,28 +8,26 @@
*/ */
package buildcraft.transport; package buildcraft.transport;
import buildcraft.BuildCraftTransport;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe;
import buildcraft.core.proxy.CoreProxy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftTransport;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockFilteredBuffer extends BlockBuildCraft { public class BlockFilteredBuffer extends BlockBuildCraft {
private static IIcon blockTexture; private static IIcon blockTexture;
public BlockFilteredBuffer() { public BlockFilteredBuffer() {
super(Material.iron); super(Material.iron, CreativeTabBuildCraft.MISC);
setHardness(5F); setHardness(5F);
} }

View file

@ -45,6 +45,7 @@ import buildcraft.api.transport.PipeWire;
import buildcraft.core.BlockBuildCraft; import buildcraft.core.BlockBuildCraft;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.CoreConstants; import buildcraft.core.CoreConstants;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemRobot; import buildcraft.core.ItemRobot;
import buildcraft.core.robots.AIDocked; import buildcraft.core.robots.AIDocked;
import buildcraft.core.robots.EntityRobot; import buildcraft.core.robots.EntityRobot;
@ -92,7 +93,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
/* Defined subprograms ************************************************* */ /* Defined subprograms ************************************************* */
public BlockGenericPipe() { public BlockGenericPipe() {
super(Material.glass); super(Material.glass, CreativeTabBuildCraft.TIER_1);
setRenderAllSides(); setRenderAllSides();
setCreativeTab(null); setCreativeTab(null);
} }
@ -1038,8 +1039,8 @@ public class BlockGenericPipe extends BlockBuildCraft {
static long lastRemovedDate = -1; static long lastRemovedDate = -1;
public static Map<BlockIndex, Pipe> pipeRemoved = new HashMap<BlockIndex, Pipe>(); public static Map<BlockIndex, Pipe> pipeRemoved = new HashMap<BlockIndex, Pipe>();
public static ItemPipe registerPipe(Class<? extends Pipe> clas) { public static ItemPipe registerPipe(Class<? extends Pipe> clas, CreativeTabBuildCraft creativeTab) {
ItemPipe item = new ItemPipe(); ItemPipe item = new ItemPipe(creativeTab);
item.setUnlocalizedName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH)); item.setUnlocalizedName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH));
GameRegistry.registerItem(item, item.getUnlocalizedName()); GameRegistry.registerItem(item, item.getUnlocalizedName());

View file

@ -8,22 +8,6 @@
*/ */
package buildcraft.transport; package buildcraft.transport;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.Position;
import buildcraft.api.recipes.BuildcraftRecipes;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.proxy.CoreProxy;
import com.google.common.base.Strings;
import com.google.common.collect.Sets;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -41,13 +25,24 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.Position;
import buildcraft.api.recipes.BuildcraftRecipes;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import com.google.common.base.Strings;
import com.google.common.collect.Sets;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemFacade extends ItemBuildCraft { public class ItemFacade extends ItemBuildCraft {
public final static LinkedList<ItemStack> allFacades = new LinkedList<ItemStack>(); public final static LinkedList<ItemStack> allFacades = new LinkedList<ItemStack>();
public ItemFacade() { public ItemFacade() {
super(); super(CreativeTabBuildCraft.FACADES);
setHasSubtypes(true); setHasSubtypes(true);
setMaxDamage(0); setMaxDamage(0);
@ -109,12 +104,12 @@ public class ItemFacade extends ItemBuildCraft {
} }
public static void initialize() { public static void initialize() {
for (Object o : Block.blockRegistry) { for (Object o : Block.blockRegistry) {
Block b = (Block) o; Block b = (Block) o;
if (!(b == Blocks.glass)) { if (!(b == Blocks.glass)) {
if (b == Blocks.bedrock if (b == Blocks.bedrock
|| b == Blocks.grass || b == Blocks.grass
|| b == Blocks.leaves || b == Blocks.leaves
|| b == Blocks.sponge || b == Blocks.sponge
|| b == Blocks.chest || b == Blocks.chest
@ -123,17 +118,17 @@ public class ItemFacade extends ItemBuildCraft {
|| b == Blocks.lit_pumpkin) { || b == Blocks.lit_pumpkin) {
continue; continue;
} }
if (!b.isOpaqueCube() if (!b.isOpaqueCube()
|| b.hasTileEntity(0) || b.hasTileEntity(0)
|| !b.renderAsNormalBlock() || !b.renderAsNormalBlock()
|| b.getRenderType() != 0) { || b.getRenderType() != 0) {
continue; continue;
} }
} }
Item item = Item.getItemFromBlock(b); Item item = Item.getItemFromBlock(b);
if (item != null) { if (item != null) {
ItemStack base = new ItemStack(item, 1); ItemStack base = new ItemStack(item, 1);
@ -142,7 +137,7 @@ public class ItemFacade extends ItemBuildCraft {
for (int meta = 0; meta <= 15; meta++) { for (int meta = 0; meta <= 15; meta++) {
ItemStack is = new ItemStack(item, 1, meta); ItemStack is = new ItemStack(item, 1, meta);
if (!Strings.isNullOrEmpty(is.getUnlocalizedName()) if (!Strings.isNullOrEmpty(is.getUnlocalizedName())
&& names.add(is.getUnlocalizedName())) { && names.add(is.getUnlocalizedName())) {
ItemFacade.addFacade(is); ItemFacade.addFacade(is);
@ -186,7 +181,7 @@ public class ItemFacade extends ItemBuildCraft {
// 3 Structurepipes + this block makes 6 facades // 3 Structurepipes + this block makes 6 facades
BuildcraftRecipes.assemblyTable.addRecipe(8000, facade6, new ItemStack(BuildCraftTransport.pipeStructureCobblestone, 3), itemStack); BuildcraftRecipes.assemblyTable.addRecipe(8000, facade6, new ItemStack(BuildCraftTransport.pipeStructureCobblestone, 3), itemStack);
Block bl = Block.getBlockFromItem(itemStack.getItem()); Block bl = Block.getBlockFromItem(itemStack.getItem());
// Special handling for logs // Special handling for logs
@ -199,9 +194,9 @@ public class ItemFacade extends ItemBuildCraft {
itemStack.getItemDamage() | 8); itemStack.getItemDamage() | 8);
allFacades.add(rotLog1); allFacades.add(rotLog1);
allFacades.add(rotLog2); allFacades.add(rotLog2);
} }
} }
private static final Block NULL_BLOCK = null; private static final Block NULL_BLOCK = null;
private static final ItemStack NO_MATCH = new ItemStack(NULL_BLOCK, 0, 0); private static final ItemStack NO_MATCH = new ItemStack(NULL_BLOCK, 0, 0);
@ -240,8 +235,8 @@ public class ItemFacade extends ItemBuildCraft {
if (slotmatch != null && slotmatch != NO_MATCH) { if (slotmatch != null && slotmatch != NO_MATCH) {
Block block = ItemFacade.getBlock(slotmatch); Block block = ItemFacade.getBlock(slotmatch);
int blockMeta = ItemFacade.getMetaData(slotmatch); int blockMeta = ItemFacade.getMetaData(slotmatch);
if (block != null && block.getRenderType() == 31 && (blockMeta & 0xC) == 0) if (block != null && block.getRenderType() == 31 && (blockMeta & 0xC) == 0)
return getStack(block, (blockMeta & 0x3) | 4); return getStack(block, (blockMeta & 0x3) | 4);
// Meta | 4 = true // Meta | 4 = true
@ -280,7 +275,7 @@ public class ItemFacade extends ItemBuildCraft {
public static ItemStack getStack(Block block, int metadata) { public static ItemStack getStack(Block block, int metadata) {
ItemStack stack = new ItemStack(BuildCraftTransport.facadeItem, 1, 0); ItemStack stack = new ItemStack(BuildCraftTransport.facadeItem, 1, 0);
NBTTagCompound nbt = new NBTTagCompound(); NBTTagCompound nbt = new NBTTagCompound();
nbt.setInteger("meta", metadata); nbt.setInteger("meta", metadata);
nbt.setInteger("id", Block.blockRegistry.getIDForObject(block)); nbt.setInteger("id", Block.blockRegistry.getIDForObject(block));
stack.setTagCompound(nbt); stack.setTagCompound(nbt);
return stack; return stack;

View file

@ -8,14 +8,6 @@
*/ */
package buildcraft.transport; package buildcraft.transport;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.core.IItemPipe;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.utils.BCLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
@ -26,6 +18,14 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.IItemPipe;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.utils.BCLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemPipe extends ItemBuildCraft implements IItemPipe { public class ItemPipe extends ItemBuildCraft implements IItemPipe {
@ -33,8 +33,8 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
private IIconProvider iconProvider; private IIconProvider iconProvider;
private int pipeIconIndex; private int pipeIconIndex;
protected ItemPipe() { protected ItemPipe(CreativeTabBuildCraft creativeTab) {
super(); super(creativeTab);
} }
@Override @Override
@ -70,27 +70,27 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
if (itemstack.stackSize == 0) { if (itemstack.stackSize == 0) {
return false; return false;
} }
if (world.canPlaceEntityOnSide(block, i, j, k, false, side, entityplayer, itemstack)) { if (world.canPlaceEntityOnSide(block, i, j, k, false, side, entityplayer, itemstack)) {
Pipe pipe = BlockGenericPipe.createPipe(this); Pipe pipe = BlockGenericPipe.createPipe(this);
if (pipe == null) { if (pipe == null) {
BCLog.logger.log(Level.WARNING, "Pipe failed to create during placement at {0},{1},{2}", new Object[]{i, j, k}); BCLog.logger.log(Level.WARNING, "Pipe failed to create during placement at {0},{1},{2}", new Object[]{i, j, k});
return true; return true;
} }
if (BlockGenericPipe.placePipe(pipe, world, i, j, k, block, 0)) { if (BlockGenericPipe.placePipe(pipe, world, i, j, k, block, 0)) {
block.onBlockPlacedBy(world, i, j, k, entityplayer, itemstack); block.onBlockPlacedBy(world, i, j, k, entityplayer, itemstack);
// TODO: Fix sound // TODO: Fix sound
//world.playSoundEffect(i + 0.5F, j + 0.5F, k + 0.5F, //world.playSoundEffect(i + 0.5F, j + 0.5F, k + 0.5F,
// block.stepSound.getPlaceSound(), // block.stepSound.getPlaceSound(),
// (block.stepSound.getVolume() + 1.0F) / 2.0F, // (block.stepSound.getVolume() + 1.0F) / 2.0F,
// block.stepSound.getPitch() * 0.8F); // block.stepSound.getPitch() * 0.8F);
itemstack.stackSize--; itemstack.stackSize--;
} }
return true; return true;
} else { } else {
return false; return false;

View file

@ -8,13 +8,6 @@
*/ */
package buildcraft.transport; package buildcraft.transport;
import buildcraft.api.transport.PipeWire;
import buildcraft.core.ItemBuildCraft;
import buildcraft.silicon.ItemRedstoneChipset.Chipset;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -22,13 +15,19 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import buildcraft.api.transport.PipeWire;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemPipeWire extends ItemBuildCraft { public class ItemPipeWire extends ItemBuildCraft {
private IIcon[] icons; private IIcon[] icons;
public ItemPipeWire() { public ItemPipeWire() {
super(); super(CreativeTabBuildCraft.TIER_3);
setHasSubtypes(true); setHasSubtypes(true);
setMaxDamage(0); setMaxDamage(0);
setPassSneakClick(true); setPassSneakClick(true);

View file

@ -8,25 +8,26 @@
*/ */
package buildcraft.transport; package buildcraft.transport;
import buildcraft.core.ItemBuildCraft;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemPlug extends ItemBuildCraft { public class ItemPlug extends ItemBuildCraft {
public ItemPlug() { public ItemPlug() {
super(); super(CreativeTabBuildCraft.TIER_1);
} }
@Override @Override
public String getUnlocalizedName(ItemStack itemstack) { public String getUnlocalizedName(ItemStack itemstack) {
return "item.PipePlug"; return "item.PipePlug";
} }
// @Override // @Override
// public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World worldObj, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { // public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World worldObj, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
// if (worldObj.isRemote) // if (worldObj.isRemote)
@ -51,7 +52,7 @@ public class ItemPlug extends ItemBuildCraft {
// return false; // return false;
// } // }
// } // }
@Override @Override
public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) {
return true; return true;
@ -70,5 +71,5 @@ public class ItemPlug extends ItemBuildCraft {
{ {
return 0; return 0;
} }
} }

View file

@ -12,6 +12,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft; import buildcraft.core.ItemBuildCraft;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -19,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemRobotStation extends ItemBuildCraft { public class ItemRobotStation extends ItemBuildCraft {
public ItemRobotStation() { public ItemRobotStation() {
super(); super(CreativeTabBuildCraft.TIER_4);
} }
@Override @Override

View file

@ -8,24 +8,7 @@
*/ */
package buildcraft.transport.gates; package buildcraft.transport.gates;
import buildcraft.api.gates.GateExpansions;
import buildcraft.api.gates.IGateExpansion;
import buildcraft.BuildCraftTransport;
import buildcraft.api.gates.ActionManager;
import buildcraft.api.gates.IAction;
import buildcraft.api.gates.ITrigger;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.inventory.InvUtils;
import buildcraft.core.utils.StringUtils;
import buildcraft.core.utils.Utils;
import buildcraft.transport.Gate;
import buildcraft.transport.gates.GateDefinition.GateLogic;
import buildcraft.transport.gates.GateDefinition.GateMaterial;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -40,6 +23,22 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString; import net.minecraft.nbt.NBTTagString;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import buildcraft.BuildCraftTransport;
import buildcraft.api.gates.ActionManager;
import buildcraft.api.gates.GateExpansions;
import buildcraft.api.gates.IAction;
import buildcraft.api.gates.IGateExpansion;
import buildcraft.api.gates.ITrigger;
import buildcraft.core.CreativeTabBuildCraft;
import buildcraft.core.ItemBuildCraft;
import buildcraft.core.inventory.InvUtils;
import buildcraft.core.utils.StringUtils;
import buildcraft.core.utils.Utils;
import buildcraft.transport.Gate;
import buildcraft.transport.gates.GateDefinition.GateLogic;
import buildcraft.transport.gates.GateDefinition.GateMaterial;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemGate extends ItemBuildCraft { public class ItemGate extends ItemBuildCraft {
@ -48,7 +47,7 @@ public class ItemGate extends ItemBuildCraft {
private static final String NBT_TAG_EX = "ex"; private static final String NBT_TAG_EX = "ex";
public ItemGate() { public ItemGate() {
super(); super(CreativeTabBuildCraft.TIER_3);
setHasSubtypes(false); setHasSubtypes(false);
setMaxDamage(0); setMaxDamage(0);
setPassSneakClick(true); setPassSneakClick(true);
@ -69,17 +68,17 @@ public class ItemGate extends ItemBuildCraft {
public static GateMaterial getMaterial(ItemStack stack) { public static GateMaterial getMaterial(ItemStack stack) {
NBTTagCompound nbt = getNBT(stack); NBTTagCompound nbt = getNBT(stack);
if (nbt == null) { if (nbt == null) {
return GateMaterial.REDSTONE; return GateMaterial.REDSTONE;
} else { } else {
return GateMaterial.fromOrdinal(nbt.getByte(NBT_TAG_MAT)); return GateMaterial.fromOrdinal(nbt.getByte(NBT_TAG_MAT));
} }
} }
public static GateLogic getLogic(ItemStack stack) { public static GateLogic getLogic(ItemStack stack) {
NBTTagCompound nbt = getNBT(stack); NBTTagCompound nbt = getNBT(stack);
if (nbt == null) { if (nbt == null) {
return GateLogic.AND; return GateLogic.AND;
} else { } else {
@ -94,11 +93,11 @@ public class ItemGate extends ItemBuildCraft {
public static void addGateExpansion(ItemStack stack, IGateExpansion expansion) { public static void addGateExpansion(ItemStack stack, IGateExpansion expansion) {
NBTTagCompound nbt = getNBT(stack); NBTTagCompound nbt = getNBT(stack);
if (nbt == null) { if (nbt == null) {
return; return;
} }
NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal());
expansionList.appendTag(new NBTTagString(expansion.getUniqueIdentifier())); expansionList.appendTag(new NBTTagString(expansion.getUniqueIdentifier()));
nbt.setTag(NBT_TAG_EX, expansionList); nbt.setTag(NBT_TAG_EX, expansionList);
@ -106,35 +105,35 @@ public class ItemGate extends ItemBuildCraft {
public static boolean hasGateExpansion(ItemStack stack, IGateExpansion expansion) { public static boolean hasGateExpansion(ItemStack stack, IGateExpansion expansion) {
NBTTagCompound nbt = getNBT(stack); NBTTagCompound nbt = getNBT(stack);
if (nbt == null) { if (nbt == null) {
return false; return false;
} }
try { try {
NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal());
for (int i = 0; i < expansionList.tagCount(); i++) { for (int i = 0; i < expansionList.tagCount(); i++) {
String ex = expansionList.getStringTagAt(i); String ex = expansionList.getStringTagAt(i);
if (ex.equals(expansion.getUniqueIdentifier())) { if (ex.equals(expansion.getUniqueIdentifier())) {
return true; return true;
} }
} }
} catch (RuntimeException error) { } catch (RuntimeException error) {
} }
return false; return false;
} }
public static Set<IGateExpansion> getInstalledExpansions(ItemStack stack) { public static Set<IGateExpansion> getInstalledExpansions(ItemStack stack) {
Set<IGateExpansion> expansions = new HashSet<IGateExpansion>(); Set<IGateExpansion> expansions = new HashSet<IGateExpansion>();
NBTTagCompound nbt = getNBT(stack); NBTTagCompound nbt = getNBT(stack);
if (nbt == null) { if (nbt == null) {
return expansions; return expansions;
} }
try { try {
NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal());
for (int i = 0; i < expansionList.tagCount(); i++) { for (int i = 0; i < expansionList.tagCount(); i++) {
@ -145,7 +144,7 @@ public class ItemGate extends ItemBuildCraft {
} }
} catch (RuntimeException error) { } catch (RuntimeException error) {
} }
return expansions; return expansions;
} }
@ -154,7 +153,7 @@ public class ItemGate extends ItemBuildCraft {
NBTTagCompound nbt = InvUtils.getItemData(stack); NBTTagCompound nbt = InvUtils.getItemData(stack);
nbt.setByte(NBT_TAG_MAT, (byte) material.ordinal()); nbt.setByte(NBT_TAG_MAT, (byte) material.ordinal());
nbt.setByte(NBT_TAG_LOGIC, (byte) logic.ordinal()); nbt.setByte(NBT_TAG_LOGIC, (byte) logic.ordinal());
return stack; return stack;
} }
@ -163,11 +162,11 @@ public class ItemGate extends ItemBuildCraft {
NBTTagCompound nbt = InvUtils.getItemData(stack); NBTTagCompound nbt = InvUtils.getItemData(stack);
nbt.setByte(NBT_TAG_MAT, (byte) gate.material.ordinal()); nbt.setByte(NBT_TAG_MAT, (byte) gate.material.ordinal());
nbt.setByte(NBT_TAG_LOGIC, (byte) gate.logic.ordinal()); nbt.setByte(NBT_TAG_LOGIC, (byte) gate.logic.ordinal());
for (IGateExpansion expansion : gate.expansions.keySet()) { for (IGateExpansion expansion : gate.expansions.keySet()) {
addGateExpansion(stack, expansion); addGateExpansion(stack, expansion);
} }
return stack; return stack;
} }
@ -175,7 +174,7 @@ public class ItemGate extends ItemBuildCraft {
public String getUnlocalizedName(ItemStack stack) { public String getUnlocalizedName(ItemStack stack) {
return GateDefinition.getLocalizedName(getMaterial(stack), getLogic(stack)); return GateDefinition.getLocalizedName(getMaterial(stack), getLogic(stack));
} }
@Override @Override
public String getItemStackDisplayName(ItemStack stack) public String getItemStackDisplayName(ItemStack stack)
{ {
@ -194,42 +193,42 @@ public class ItemGate extends ItemBuildCraft {
itemList.add(makeGateItem(material, logic)); itemList.add(makeGateItem(material, logic));
for (IGateExpansion exp : GateExpansions.getExpansions()) { for (IGateExpansion exp : GateExpansions.getExpansions()) {
ItemStack stackExpansion = makeGateItem(material, logic); ItemStack stackExpansion = makeGateItem(material, logic);
addGateExpansion(stackExpansion, exp); addGateExpansion(stackExpansion, exp);
itemList.add(stackExpansion); itemList.add(stackExpansion);
} }
} }
} }
} }
public static ItemStack[] getGateVarients() { public static ItemStack[] getGateVarients() {
ArrayList<ItemStack> gates = new ArrayList<ItemStack>(); ArrayList<ItemStack> gates = new ArrayList<ItemStack>();
for (GateMaterial material : GateMaterial.VALUES) { for (GateMaterial material : GateMaterial.VALUES) {
for (GateLogic logic : GateLogic.VALUES) { for (GateLogic logic : GateLogic.VALUES) {
if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) { if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) {
continue; continue;
} }
gates.add(makeGateItem(material, logic)); gates.add(makeGateItem(material, logic));
} }
} }
return gates.toArray(new ItemStack[gates.size()]); return gates.toArray(new ItemStack[gates.size()]);
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) { public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) {
super.addInformation(stack, player, list, adv); super.addInformation(stack, player, list, adv);
list.add(StringUtils.localize("tip.gate.wires")); list.add(StringUtils.localize("tip.gate.wires"));
list.add(StringUtils.localize("tip.gate.wires." + getMaterial(stack).getTag())); list.add(StringUtils.localize("tip.gate.wires." + getMaterial(stack).getTag()));
Set<IGateExpansion> expansions = getInstalledExpansions(stack); Set<IGateExpansion> expansions = getInstalledExpansions(stack);
if (!expansions.isEmpty()) { if (!expansions.isEmpty()) {
list.add(StringUtils.localize("tip.gate.expansions")); list.add(StringUtils.localize("tip.gate.expansions"));
for (IGateExpansion expansion : expansions) { for (IGateExpansion expansion : expansions) {
list.add(expansion.getDisplayName()); list.add(expansion.getDisplayName());
} }