initial categorization of items
This commit is contained in:
parent
1677fa3785
commit
4948e02cb5
43 changed files with 417 additions and 457 deletions
|
@ -160,7 +160,11 @@ item.PipeFluidsSandstone.name=Sandstone Fluid Pipe
|
|||
item.Facade.name=Facade
|
||||
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
|
||||
|
||||
tile.architectBlock.name=Architect Table
|
||||
|
|
|
@ -8,31 +8,24 @@
|
|||
*/
|
||||
package buildcraft;
|
||||
|
||||
import static buildcraft.BuildCraftEnergy.spawnOilSprings;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.EnumMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
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.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import buildcraft.api.gates.ActionManager;
|
||||
|
@ -43,6 +36,7 @@ import buildcraft.core.BlockSpring;
|
|||
import buildcraft.core.BuildCraftConfiguration;
|
||||
import buildcraft.core.CommandBuildCraft;
|
||||
import buildcraft.core.CoreIconProvider;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.EntityEnergyLaser;
|
||||
import buildcraft.core.EntityFrame;
|
||||
|
@ -55,12 +49,16 @@ import buildcraft.core.ItemWrench;
|
|||
import buildcraft.core.SpringPopulate;
|
||||
import buildcraft.core.TickHandlerCoreClient;
|
||||
import buildcraft.core.Version;
|
||||
import buildcraft.core.blueprints.BptItem;
|
||||
import buildcraft.core.network.BuildCraftPacket;
|
||||
import buildcraft.core.network.EntityIds;
|
||||
import buildcraft.core.network.PacketHandler;
|
||||
import buildcraft.core.network.PacketUpdate;
|
||||
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.Mode;
|
||||
import buildcraft.core.triggers.ActionRedstoneOutput;
|
||||
|
@ -74,14 +72,8 @@ import buildcraft.core.triggers.TriggerFluidContainerLevel;
|
|||
import buildcraft.core.triggers.TriggerInventory;
|
||||
import buildcraft.core.triggers.TriggerInventoryLevel;
|
||||
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.utils.BCLog;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
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.FMLServerStartingEvent;
|
||||
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.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
@ -113,10 +104,10 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
public static int updateFactor = 10;
|
||||
public static long longUpdateFactor = 40;
|
||||
public static BuildCraftConfiguration mainConfiguration;
|
||||
|
||||
|
||||
// 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 final int trackedPassiveEntityId = 156;
|
||||
public static boolean continuousCurrentModel;
|
||||
public static Block springBlock;
|
||||
|
@ -233,37 +224,46 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
consumeWaterSources = consumeWater.getBoolean(consumeWaterSources);
|
||||
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");
|
||||
CoreProxy.proxy.registerItem(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");
|
||||
CoreProxy.proxy.registerItem(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");
|
||||
CoreProxy.proxy.registerItem(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");
|
||||
CoreProxy.proxy.registerItem(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");
|
||||
CoreProxy.proxy.registerItem(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");
|
||||
CoreProxy.proxy.registerItem(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 {
|
||||
if (mainConfiguration.hasChanged()) {
|
||||
mainConfiguration.save();
|
||||
|
@ -276,7 +276,7 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
public void initialize(FMLInitializationEvent evt) {
|
||||
channels = NetworkRegistry.INSTANCE.newChannel
|
||||
(DefaultProps.NET_CHANNEL_NAME + "-CORE", new PacketHandler());
|
||||
|
||||
|
||||
ActionManager.registerTriggerProvider(new DefaultTriggerProvider());
|
||||
ActionManager.registerActionProvider(new DefaultActionProvider());
|
||||
|
||||
|
@ -309,16 +309,16 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
public void postInit(FMLPostInitializationEvent event) {
|
||||
for (Object o : Block.blockRegistry) {
|
||||
Block block = (Block) o;
|
||||
|
||||
|
||||
if (block instanceof BlockFluidBase || block instanceof IFluidBlock || block instanceof IPlantable) {
|
||||
BuildCraftAPI.softBlocks.add(block);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BuildCraftAPI.softBlocks.add(Blocks.snow);
|
||||
BuildCraftAPI.softBlocks.add(Blocks.vine);
|
||||
BuildCraftAPI.softBlocks.add(Blocks.fire);
|
||||
|
||||
|
||||
FMLCommonHandler.instance().bus().register(new TickHandlerCoreClient());
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import buildcraft.api.fuels.IronEngineFuel;
|
|||
import buildcraft.api.recipes.BuildcraftRecipes;
|
||||
import buildcraft.core.BlockIndex;
|
||||
import buildcraft.core.BlockSpring;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.InterModComms;
|
||||
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);
|
||||
|
||||
LanguageRegistry.addName(new ItemStack(engineBlock, 1, 0), "Redstone Engine");
|
||||
|
@ -188,7 +189,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
|||
// Buckets
|
||||
|
||||
if (blockOil != null) {
|
||||
bucketOil = new ItemBucketBuildcraft(blockOil);
|
||||
bucketOil = new ItemBucketBuildcraft(blockOil, CreativeTabBuildCraft.TIER_2);
|
||||
bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket);
|
||||
LanguageRegistry.addName(bucketOil, "Oil Bucket");
|
||||
CoreProxy.proxy.registerItem(bucketOil);
|
||||
|
@ -196,7 +197,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
|||
}
|
||||
|
||||
if (blockFuel != null) {
|
||||
bucketFuel = new ItemBucketBuildcraft(blockFuel);
|
||||
bucketFuel = new ItemBucketBuildcraft(blockFuel, CreativeTabBuildCraft.TIER_2);
|
||||
bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket);
|
||||
LanguageRegistry.addName(bucketFuel, "Fuel Bucket");
|
||||
CoreProxy.proxy.registerItem(bucketFuel);
|
||||
|
@ -204,7 +205,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
|||
}
|
||||
|
||||
if (blockRedPlasma != null) {
|
||||
bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma);
|
||||
bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma, CreativeTabBuildCraft.TIER_4);
|
||||
bucketRedPlasma.setUnlocalizedName("bucketRedPlasma").setContainerItem(Items.bucket);
|
||||
LanguageRegistry.addName(bucketRedPlasma, "Red Plasma Bucket");
|
||||
CoreProxy.proxy.registerItem(bucketRedPlasma);
|
||||
|
|
|
@ -27,6 +27,7 @@ import buildcraft.api.recipes.BuildcraftRecipes;
|
|||
import buildcraft.api.transport.IExtractionHandler;
|
||||
import buildcraft.api.transport.PipeManager;
|
||||
import buildcraft.api.transport.PipeWire;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.InterModComms;
|
||||
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";
|
||||
groupItemsTrigger = groupItemsTriggerProp.getInt();
|
||||
|
||||
pipeWaterproof = new ItemBuildCraft();
|
||||
pipeWaterproof = new ItemBuildCraft(CreativeTabBuildCraft.TIER_2);
|
||||
pipeWaterproof.setUnlocalizedName("pipeWaterproof");
|
||||
LanguageRegistry.addName(pipeWaterproof, "Pipe Sealant");
|
||||
CoreProxy.proxy.registerItem(pipeWaterproof);
|
||||
|
@ -271,40 +272,40 @@ public class BuildCraftTransport extends BuildCraftMod {
|
|||
genericPipeBlock = new BlockGenericPipe();
|
||||
CoreProxy.proxy.registerBlock(genericPipeBlock.setBlockName("pipeBlock"), ItemBlock.class);
|
||||
|
||||
pipeItemsWood = buildPipe(DefaultProps.PIPE_ITEMS_WOOD_ID, PipeItemsWood.class, "Wooden Transport Pipe", "plankWood", Blocks.glass, "plankWood");
|
||||
pipeItemsEmerald = buildPipe(DefaultProps.PIPE_ITEMS_EMERALD_ID, PipeItemsEmerald.class, "Emerald Transport Pipe", Items.emerald, Blocks.glass, Items.emerald);
|
||||
pipeItemsCobblestone = buildPipe(DefaultProps.PIPE_ITEMS_COBBLESTONE_ID, PipeItemsCobblestone.class, "Cobblestone Transport Pipe", "cobblestone", Blocks.glass, "cobblestone");
|
||||
pipeItemsStone = buildPipe(DefaultProps.PIPE_ITEMS_STONE_ID, PipeItemsStone.class, "Stone Transport Pipe", "stone", Blocks.glass, "stone");
|
||||
pipeItemsQuartz = buildPipe(DefaultProps.PIPE_ITEMS_QUARTZ_ID, PipeItemsQuartz.class, "Quartz Transport Pipe", 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);
|
||||
pipeItemsGold = buildPipe(DefaultProps.PIPE_ITEMS_GOLD_ID, PipeItemsGold.class, "Golden Transport Pipe", 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);
|
||||
pipeItemsObsidian = buildPipe(DefaultProps.PIPE_ITEMS_OBSIDIAN_ID, PipeItemsObsidian.class, "Obsidian Transport Pipe", 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);
|
||||
pipeItemsDaizuli = buildPipe(DefaultProps.PIPE_ITEMS_DAIZULI_ID, PipeItemsDaizuli.class, "Daizuli Transport Pipe", 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);
|
||||
pipeItemsVoid = buildPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe", "dyeBlack", Blocks.glass, Items.redstone);
|
||||
pipeItemsEmzuli = buildPipe(DefaultProps.PIPE_ITEMS_EMZULI_ID, PipeItemsEmzuli.class, "Emzuli Transport Pipe", Blocks.lapis_block, Blocks.glass, Items.emerald);
|
||||
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", CreativeTabBuildCraft.MISC, Items.emerald, Blocks.glass, Items.emerald);
|
||||
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", CreativeTabBuildCraft.TIER_1, "stone", Blocks.glass, "stone");
|
||||
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", CreativeTabBuildCraft.TIER_1, Items.iron_ingot, Blocks.glass, Items.iron_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", CreativeTabBuildCraft.TIER_1, Items.diamond, Blocks.glass, Items.diamond);
|
||||
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", CreativeTabBuildCraft.MISC, Blocks.lapis_block, Blocks.glass, Blocks.lapis_block);
|
||||
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", CreativeTabBuildCraft.TIER_1, Blocks.sandstone, Blocks.glass, Blocks.sandstone);
|
||||
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", CreativeTabBuildCraft.MISC, Blocks.lapis_block, Blocks.glass, Items.emerald);
|
||||
|
||||
pipeFluidsWood = buildPipe(DefaultProps.PIPE_LIQUIDS_WOOD_ID, PipeFluidsWood.class, "Wooden Waterproof Pipe", pipeWaterproof, pipeItemsWood);
|
||||
pipeFluidsCobblestone = buildPipe(DefaultProps.PIPE_LIQUIDS_COBBLESTONE_ID, PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", pipeWaterproof, pipeItemsCobblestone);
|
||||
pipeFluidsStone = buildPipe(DefaultProps.PIPE_LIQUIDS_STONE_ID, PipeFluidsStone.class, "Stone Waterproof Pipe", pipeWaterproof, pipeItemsStone);
|
||||
pipeFluidsIron = buildPipe(DefaultProps.PIPE_LIQUIDS_IRON_ID, PipeFluidsIron.class, "Iron Waterproof Pipe", pipeWaterproof, pipeItemsIron);
|
||||
pipeFluidsGold = buildPipe(DefaultProps.PIPE_LIQUIDS_GOLD_ID, PipeFluidsGold.class, "Golden Waterproof Pipe", pipeWaterproof, pipeItemsGold);
|
||||
pipeFluidsEmerald = buildPipe(DefaultProps.PIPE_LIQUIDS_EMERALD_ID, PipeFluidsEmerald.class, "Emerald Waterproof Pipe", pipeWaterproof, pipeItemsEmerald);
|
||||
pipeFluidsSandstone = buildPipe(DefaultProps.PIPE_LIQUIDS_SANDSTONE_ID, PipeFluidsSandstone.class, "Sandstone Waterproof Pipe", pipeWaterproof, pipeItemsSandstone);
|
||||
pipeFluidsVoid = buildPipe(DefaultProps.PIPE_LIQUIDS_VOID_ID, PipeFluidsVoid.class, "Void Waterproof Pipe", pipeWaterproof, pipeItemsVoid);
|
||||
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", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsCobblestone);
|
||||
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", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsIron);
|
||||
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", CreativeTabBuildCraft.MISC, pipeWaterproof, pipeItemsEmerald);
|
||||
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", CreativeTabBuildCraft.TIER_2, pipeWaterproof, pipeItemsVoid);
|
||||
|
||||
pipePowerWood = buildPipe(DefaultProps.PIPE_POWER_WOOD_ID, PipePowerWood.class, "Wooden Kinesis Pipe", Items.redstone, pipeItemsWood);
|
||||
pipePowerCobblestone = buildPipe(DefaultProps.PIPE_POWER_COBBLESTONE_ID, PipePowerCobblestone.class, "Cobblestone Kinesis Pipe", Items.redstone, pipeItemsCobblestone);
|
||||
pipePowerStone = buildPipe(DefaultProps.PIPE_POWER_STONE_ID, PipePowerStone.class, "Stone Kinesis Pipe", Items.redstone, pipeItemsStone);
|
||||
pipePowerQuartz = buildPipe(DefaultProps.PIPE_POWER_QUARTZ_ID, PipePowerQuartz.class, "Quartz Kinesis Pipe", Items.redstone, pipeItemsQuartz);
|
||||
pipePowerIron = buildPipe(DefaultProps.PIPE_POWER_IRON_ID, PipePowerIron.class, "Iron Kinesis Pipe", Items.redstone, pipeItemsIron);
|
||||
pipePowerGold = buildPipe(DefaultProps.PIPE_POWER_GOLD_ID, PipePowerGold.class, "Golden Kinesis Pipe", Items.redstone, pipeItemsGold);
|
||||
pipePowerDiamond = buildPipe(DefaultProps.PIPE_POWER_DIAMOND_ID, PipePowerDiamond.class, "Diamond Kinesis Pipe", Items.redstone, pipeItemsDiamond);
|
||||
pipePowerHeat = buildPipe(DefaultProps.PIPE_POWER_HEAT_ID, PipePowerHeat.class, "Heat Kinesis Pipe", Blocks.furnace, pipeItemsDiamond);
|
||||
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", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsCobblestone);
|
||||
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", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsQuartz);
|
||||
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", CreativeTabBuildCraft.TIER_2, Items.redstone, pipeItemsGold);
|
||||
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", 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
|
||||
// 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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
ItemPipe res = BlockGenericPipe.registerPipe(clas);
|
||||
ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
|
||||
res.setUnlocalizedName(clas.getSimpleName());
|
||||
LanguageRegistry.addName(res, descr);
|
||||
|
||||
|
|
|
@ -8,18 +8,6 @@
|
|||
*/
|
||||
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.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -33,6 +21,13 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
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 {
|
||||
|
||||
|
@ -45,7 +40,7 @@ public class BlockArchitect extends BlockContainer {
|
|||
public BlockArchitect() {
|
||||
super(Material.iron);
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,15 +8,6 @@
|
|||
*/
|
||||
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.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -26,6 +17,11 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 {
|
||||
|
||||
|
@ -34,7 +30,7 @@ public class BlockBlueprintLibrary extends BlockContainer {
|
|||
|
||||
public BlockBlueprintLibrary() {
|
||||
super(Material.wood);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
|
||||
setHardness(5F);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,17 +8,6 @@
|
|||
*/
|
||||
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.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -31,6 +20,13 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
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 {
|
||||
|
||||
|
@ -41,7 +37,7 @@ public class BlockBuilder extends BlockContainer {
|
|||
public BlockBuilder() {
|
||||
super(Material.iron);
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,27 +8,22 @@
|
|||
*/
|
||||
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.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
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 {
|
||||
|
||||
|
@ -41,7 +36,7 @@ public class BlockFiller extends BlockContainer {
|
|||
super(Material.iron);
|
||||
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,26 +8,21 @@
|
|||
*/
|
||||
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.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
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 {
|
||||
|
||||
|
@ -35,7 +30,7 @@ public class BlockMarker extends BlockContainer {
|
|||
super(Material.circuits);
|
||||
|
||||
setLightLevel(0.5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
|
||||
}
|
||||
|
||||
private AxisAlignedBB getBoundingBox(int meta) {
|
||||
|
|
|
@ -8,25 +8,23 @@
|
|||
*/
|
||||
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.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
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 {
|
||||
|
||||
private IIcon activeMarker;
|
||||
|
||||
public BlockPathMarker() {
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -40,6 +38,7 @@ public class BlockPathMarker extends BlockMarker {
|
|||
super.breakBlock(world, x, y, z, block, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "all" })
|
||||
// @Override (client only)
|
||||
public IIcon getIcon(IBlockAccess iblockaccess, int i, int j, int k, int l) {
|
||||
|
|
|
@ -8,26 +8,24 @@
|
|||
*/
|
||||
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 net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.builders.blueprints.Blueprint;
|
||||
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 ItemBlueprint() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_3);
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,31 +8,32 @@
|
|||
*/
|
||||
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 net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 ItemBptBase() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_3);
|
||||
|
||||
maxStackSize = 1;
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "all" })
|
||||
// @Override (client only)
|
||||
public abstract IIcon getIconFromDamage(int i);
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "all" })
|
||||
// @Override (client only)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean advanced) {
|
||||
|
|
|
@ -31,12 +31,11 @@ public class BlockUrbanist extends BlockBuildCraft {
|
|||
}
|
||||
|
||||
public BlockUrbanist() {
|
||||
super(Material.rock);
|
||||
super(Material.rock, CreativeTabBuildCraft.TIER_4);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
disableStats();
|
||||
setTickRandomly(true);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
*/
|
||||
package buildcraft.core;
|
||||
|
||||
import buildcraft.core.utils.Utils;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -20,15 +18,16 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.core.utils.Utils;
|
||||
|
||||
public abstract class BlockBuildCraft extends BlockContainer {
|
||||
|
||||
protected static boolean keepInventory = false;
|
||||
protected final Random rand = new Random();
|
||||
|
||||
protected BlockBuildCraft(Material material) {
|
||||
protected BlockBuildCraft(Material material, CreativeTabBuildCraft creativeTab) {
|
||||
super(material);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(creativeTab.get());
|
||||
setHardness(5F);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
*/
|
||||
package buildcraft.core;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -22,6 +19,8 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSpring extends Block {
|
||||
|
||||
|
@ -54,13 +53,13 @@ public class BlockSpring extends Block {
|
|||
super(Material.rock);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
|
||||
|
||||
// TODO: set proper sound
|
||||
//setStepSound(soundStoneFootstep);
|
||||
|
||||
|
||||
disableStats();
|
||||
setTickRandomly(true);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.MISC.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,11 +7,16 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import buildcraft.transport.ItemFacade;
|
||||
|
||||
public enum CreativeTabBuildCraft {
|
||||
|
||||
MACHINES,
|
||||
TIER_1,
|
||||
TIER_2,
|
||||
TIER_3,
|
||||
TIER_4,
|
||||
MISC,
|
||||
FACADES;
|
||||
private final CreativeTabs tab;
|
||||
|
||||
|
@ -29,12 +34,21 @@ public enum CreativeTabBuildCraft {
|
|||
|
||||
private ItemStack getItem() {
|
||||
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:
|
||||
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 {
|
||||
|
|
|
@ -8,23 +8,22 @@
|
|||
*/
|
||||
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.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBuildCraft extends Item {
|
||||
|
||||
private String iconName;
|
||||
private boolean passSneakClick = false;
|
||||
|
||||
public ItemBuildCraft() {
|
||||
public ItemBuildCraft(CreativeTabBuildCraft creativeTab) {
|
||||
super();
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
|
||||
setCreativeTab(creativeTab.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,7 @@ public class ItemRobot extends ItemBuildCraft {
|
|||
Class <? extends EntityRobot> robotClass;
|
||||
|
||||
public ItemRobot(Class <? extends EntityRobot> robotClass) {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_4);
|
||||
|
||||
this.robotClass = robotClass;
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ public class ItemRobot extends ItemBuildCraft {
|
|||
try {
|
||||
return this.robotClass.getConstructor(World.class).newInstance(world);
|
||||
} catch (Throwable e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
*/
|
||||
package buildcraft.core;
|
||||
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockButton;
|
||||
import net.minecraft.block.BlockChest;
|
||||
|
@ -19,13 +19,15 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
||||
public class ItemWrench extends ItemBuildCraft implements IToolWrench {
|
||||
|
||||
private final Set<Class<? extends Block>> shiftRotations = new HashSet<Class<? extends Block>>();
|
||||
|
||||
public ItemWrench() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_1);
|
||||
|
||||
setFull3D();
|
||||
setMaxStackSize(1);
|
||||
shiftRotations.add(BlockLever.class);
|
||||
|
@ -44,7 +46,7 @@ public class ItemWrench extends ItemBuildCraft implements IToolWrench {
|
|||
@Override
|
||||
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);
|
||||
|
||||
|
||||
if(block == null)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@ import buildcraft.core.CreativeTabBuildCraft;
|
|||
public class BlockEnergyEmitter extends BlockBuildCraft {
|
||||
|
||||
public BlockEnergyEmitter() {
|
||||
super(Material.glass);
|
||||
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
super(Material.glass, CreativeTabBuildCraft.TIER_4);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,9 +17,7 @@ import buildcraft.core.CreativeTabBuildCraft;
|
|||
public class BlockEnergyReceiver extends BlockBuildCraft {
|
||||
|
||||
public BlockEnergyReceiver() {
|
||||
super(Material.iron);
|
||||
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
super(Material.iron, CreativeTabBuildCraft.TIER_4);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,12 +8,6 @@
|
|||
*/
|
||||
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.Random;
|
||||
|
||||
|
@ -29,6 +23,12 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
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 {
|
||||
|
||||
|
@ -36,8 +36,8 @@ public class BlockEngine extends BlockBuildCraft {
|
|||
private static IIcon stoneTexture;
|
||||
private static IIcon ironTexture;
|
||||
|
||||
public BlockEngine() {
|
||||
super(Material.iron);
|
||||
public BlockEngine(CreativeTabBuildCraft creativeTab) {
|
||||
super(Material.iron, creativeTab);
|
||||
setBlockName("engineBlock");
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ public class BlockEngine extends BlockBuildCraft {
|
|||
}
|
||||
|
||||
if (tile instanceof TileEngine) {
|
||||
return ((TileEngine) tile).onBlockActivated(player, ForgeDirection.getOrientation(side));
|
||||
return tile.onBlockActivated(player, ForgeDirection.getOrientation(side));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -137,9 +137,9 @@ public class BlockEngine extends BlockBuildCraft {
|
|||
return;
|
||||
}
|
||||
|
||||
float f = (float) i + 0.5F;
|
||||
float f1 = (float) j + 0.0F + (random.nextFloat() * 6F) / 16F;
|
||||
float f2 = (float) k + 0.5F;
|
||||
float f = i + 0.5F;
|
||||
float f1 = j + 0.0F + (random.nextFloat() * 6F) / 16F;
|
||||
float f2 = k + 0.5F;
|
||||
float f3 = 0.52F;
|
||||
float f4 = random.nextFloat() * 0.6F - 0.3F;
|
||||
|
||||
|
@ -152,9 +152,12 @@ public class BlockEngine extends BlockBuildCraft {
|
|||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
itemList.add(new ItemStack(this, 1, 0));
|
||||
itemList.add(new ItemStack(this, 1, 1));
|
||||
itemList.add(new ItemStack(this, 1, 2));
|
||||
if (par2CreativeTabs == CreativeTabBuildCraft.TIER_1.get()) {
|
||||
itemList.add(new ItemStack(this, 1, 0));
|
||||
itemList.add(new ItemStack(this, 1, 1));
|
||||
} else {
|
||||
itemList.add(new ItemStack(this, 1, 2));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,25 +8,23 @@
|
|||
*/
|
||||
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.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
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 {
|
||||
|
||||
private String iconName;
|
||||
|
||||
public ItemBucketBuildcraft(Block block) {
|
||||
public ItemBucketBuildcraft(Block block, CreativeTabBuildCraft creativeTab) {
|
||||
super(block);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setContainerItem(Items.bucket);
|
||||
setCreativeTab(creativeTab.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,9 +8,11 @@
|
|||
*/
|
||||
package buildcraft.energy;
|
||||
|
||||
import buildcraft.core.ItemBlockBuildCraft;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.ItemBlockBuildCraft;
|
||||
|
||||
public class ItemEngine extends ItemBlockBuildCraft {
|
||||
|
||||
|
@ -27,11 +29,17 @@ public class ItemEngine extends ItemBlockBuildCraft {
|
|||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
if (itemstack.getItemDamage() == 0)
|
||||
if (itemstack.getItemDamage() == 0) {
|
||||
return "tile.engineWood";
|
||||
else if (itemstack.getItemDamage() == 1)
|
||||
} else if (itemstack.getItemDamage() == 1) {
|
||||
return "tile.engineStone";
|
||||
else
|
||||
} else {
|
||||
return "tile.engineIron";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreativeTabs[] getCreativeTabs() {
|
||||
return new CreativeTabs[] { CreativeTabBuildCraft.TIER_1.get(), CreativeTabBuildCraft.TIER_2.get() };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,21 +8,19 @@
|
|||
*/
|
||||
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.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 {
|
||||
|
||||
|
@ -30,7 +28,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft {
|
|||
IIcon sideTexture;
|
||||
|
||||
public BlockAutoWorkbench() {
|
||||
super(Material.wood);
|
||||
super(Material.wood, CreativeTabBuildCraft.TIER_1);
|
||||
setHardness(3.0F);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,14 @@
|
|||
*/
|
||||
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.core.BlockBuildCraft;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
|
@ -15,18 +23,6 @@ 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.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 {
|
||||
|
||||
private IIcon textureTop;
|
||||
|
@ -34,7 +30,7 @@ public class BlockFloodGate extends BlockBuildCraft {
|
|||
private IIcon textureSide;
|
||||
|
||||
public BlockFloodGate() {
|
||||
super(Material.iron);
|
||||
super(Material.iron, CreativeTabBuildCraft.TIER_2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,29 +8,27 @@
|
|||
*/
|
||||
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.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 {
|
||||
|
||||
private static IIcon icon;
|
||||
|
||||
public BlockHopper() {
|
||||
super(Material.iron);
|
||||
super(Material.iron, CreativeTabBuildCraft.TIER_1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,15 +8,6 @@
|
|||
*/
|
||||
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.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -26,17 +17,23 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
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 {
|
||||
|
||||
IIcon textureFront, textureSides, textureBack, textureTop;
|
||||
|
||||
public BlockMiningWell() {
|
||||
super(Material.ground);
|
||||
super(Material.ground, CreativeTabBuildCraft.TIER_1);
|
||||
|
||||
setHardness(5F);
|
||||
setResistance(10F);
|
||||
|
||||
|
||||
// TODO: set proper sound
|
||||
//setStepSound(soundStoneFootstep);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,14 @@
|
|||
*/
|
||||
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.core.BlockBuildCraft;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
|
@ -15,18 +23,6 @@ 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.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 {
|
||||
|
||||
private IIcon textureTop;
|
||||
|
@ -34,7 +30,7 @@ public class BlockPump extends BlockBuildCraft {
|
|||
private IIcon textureSide;
|
||||
|
||||
public BlockPump() {
|
||||
super(Material.iron);
|
||||
super(Material.iron, CreativeTabBuildCraft.TIER_2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,16 +8,6 @@
|
|||
*/
|
||||
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 net.minecraft.block.Block;
|
||||
|
@ -29,9 +19,16 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
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 {
|
||||
|
||||
|
@ -40,7 +37,7 @@ public class BlockQuarry extends BlockBuildCraft {
|
|||
IIcon textureSide;
|
||||
|
||||
public BlockQuarry() {
|
||||
super(Material.iron);
|
||||
super(Material.iron, CreativeTabBuildCraft.TIER_2);
|
||||
|
||||
setHardness(10F);
|
||||
setResistance(10F);
|
||||
|
|
|
@ -8,19 +8,6 @@
|
|||
*/
|
||||
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.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -33,11 +20,16 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
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 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 {
|
||||
|
||||
|
@ -47,7 +39,7 @@ public class BlockRefinery extends BlockContainer {
|
|||
super(Material.iron);
|
||||
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,7 +128,7 @@ public class BlockRefinery extends BlockContainer {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
|
|
|
@ -8,13 +8,6 @@
|
|||
*/
|
||||
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.material.Material;
|
||||
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.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
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 {
|
||||
|
||||
|
@ -39,7 +36,7 @@ public class BlockTank extends BlockContainer {
|
|||
super(Material.glass);
|
||||
setBlockBounds(0.125F, 0F, 0.125F, 0.875F, 1F, 0.875F);
|
||||
setHardness(0.5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_2.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,7 +85,7 @@ public class BlockTank extends BlockContainer {
|
|||
@Override
|
||||
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();
|
||||
|
||||
|
||||
if (current != null) {
|
||||
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
|
||||
|
||||
|
@ -107,7 +104,7 @@ public class BlockTank extends BlockContainer {
|
|||
// Handle empty containers
|
||||
} else {
|
||||
FluidStack available = tank.getTankInfo(ForgeDirection.UNKNOWN)[0].fluid;
|
||||
|
||||
|
||||
if (available != null) {
|
||||
ItemStack filled = FluidContainerRegistry.fillFluidContainer(available, current);
|
||||
|
||||
|
@ -126,9 +123,9 @@ public class BlockTank extends BlockContainer {
|
|||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, filled);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tank.drain(ForgeDirection.UNKNOWN, liquid.amount, true);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -158,12 +155,12 @@ public class BlockTank extends BlockContainer {
|
|||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
|
||||
if (tile instanceof TileTank) {
|
||||
TileTank tank = (TileTank) tile;
|
||||
return tank.getFluidLightLevel();
|
||||
}
|
||||
|
||||
|
||||
return super.getLightValue(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,18 +8,16 @@
|
|||
*/
|
||||
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.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
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 {
|
||||
|
||||
|
@ -29,7 +27,7 @@ public class BlockLaser extends BlockContainer {
|
|||
public BlockLaser() {
|
||||
super(Material.iron);
|
||||
setHardness(10F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,13 +8,6 @@
|
|||
*/
|
||||
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 net.minecraft.block.Block;
|
||||
|
@ -28,6 +21,11 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 {
|
||||
|
||||
|
@ -39,7 +37,7 @@ public class BlockLaserTable extends BlockContainer {
|
|||
|
||||
setBlockBounds(0, 0, 0, 1, 9F / 16F, 1);
|
||||
setHardness(10F);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setCreativeTab(CreativeTabBuildCraft.TIER_3.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,12 +8,6 @@
|
|||
*/
|
||||
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.Locale;
|
||||
|
||||
|
@ -22,6 +16,12 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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 {
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft {
|
|||
}
|
||||
|
||||
public ItemRedstoneChipset() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_3);
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
}
|
||||
|
|
|
@ -8,28 +8,26 @@
|
|||
*/
|
||||
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.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 {
|
||||
|
||||
private static IIcon blockTexture;
|
||||
|
||||
public BlockFilteredBuffer() {
|
||||
super(Material.iron);
|
||||
super(Material.iron, CreativeTabBuildCraft.MISC);
|
||||
setHardness(5F);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ import buildcraft.api.transport.PipeWire;
|
|||
import buildcraft.core.BlockBuildCraft;
|
||||
import buildcraft.core.BlockIndex;
|
||||
import buildcraft.core.CoreConstants;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.ItemRobot;
|
||||
import buildcraft.core.robots.AIDocked;
|
||||
import buildcraft.core.robots.EntityRobot;
|
||||
|
@ -92,7 +93,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
|||
|
||||
/* Defined subprograms ************************************************* */
|
||||
public BlockGenericPipe() {
|
||||
super(Material.glass);
|
||||
super(Material.glass, CreativeTabBuildCraft.TIER_1);
|
||||
setRenderAllSides();
|
||||
setCreativeTab(null);
|
||||
}
|
||||
|
@ -1038,8 +1039,8 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
|||
static long lastRemovedDate = -1;
|
||||
public static Map<BlockIndex, Pipe> pipeRemoved = new HashMap<BlockIndex, Pipe>();
|
||||
|
||||
public static ItemPipe registerPipe(Class<? extends Pipe> clas) {
|
||||
ItemPipe item = new ItemPipe();
|
||||
public static ItemPipe registerPipe(Class<? extends Pipe> clas, CreativeTabBuildCraft creativeTab) {
|
||||
ItemPipe item = new ItemPipe(creativeTab);
|
||||
item.setUnlocalizedName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH));
|
||||
GameRegistry.registerItem(item, item.getUnlocalizedName());
|
||||
|
||||
|
|
|
@ -8,22 +8,6 @@
|
|||
*/
|
||||
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.List;
|
||||
import java.util.Set;
|
||||
|
@ -41,13 +25,24 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
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 final static LinkedList<ItemStack> allFacades = new LinkedList<ItemStack>();
|
||||
|
||||
public ItemFacade() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.FACADES);
|
||||
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
|
@ -109,12 +104,12 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
}
|
||||
|
||||
public static void initialize() {
|
||||
for (Object o : Block.blockRegistry) {
|
||||
for (Object o : Block.blockRegistry) {
|
||||
Block b = (Block) o;
|
||||
|
||||
if (!(b == Blocks.glass)) {
|
||||
if (b == Blocks.bedrock
|
||||
|| b == Blocks.grass
|
||||
|| b == Blocks.grass
|
||||
|| b == Blocks.leaves
|
||||
|| b == Blocks.sponge
|
||||
|| b == Blocks.chest
|
||||
|
@ -123,17 +118,17 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
|| b == Blocks.lit_pumpkin) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!b.isOpaqueCube()
|
||||
|
||||
if (!b.isOpaqueCube()
|
||||
|| b.hasTileEntity(0)
|
||||
|| !b.renderAsNormalBlock()
|
||||
|| !b.renderAsNormalBlock()
|
||||
|| b.getRenderType() != 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item item = Item.getItemFromBlock(b);
|
||||
|
||||
|
||||
if (item != null) {
|
||||
ItemStack base = new ItemStack(item, 1);
|
||||
|
||||
|
@ -142,7 +137,7 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
|
||||
for (int meta = 0; meta <= 15; meta++) {
|
||||
ItemStack is = new ItemStack(item, 1, meta);
|
||||
|
||||
|
||||
if (!Strings.isNullOrEmpty(is.getUnlocalizedName())
|
||||
&& names.add(is.getUnlocalizedName())) {
|
||||
ItemFacade.addFacade(is);
|
||||
|
@ -186,7 +181,7 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
|
||||
// 3 Structurepipes + this block makes 6 facades
|
||||
BuildcraftRecipes.assemblyTable.addRecipe(8000, facade6, new ItemStack(BuildCraftTransport.pipeStructureCobblestone, 3), itemStack);
|
||||
|
||||
|
||||
Block bl = Block.getBlockFromItem(itemStack.getItem());
|
||||
|
||||
// Special handling for logs
|
||||
|
@ -199,9 +194,9 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
itemStack.getItemDamage() | 8);
|
||||
allFacades.add(rotLog1);
|
||||
allFacades.add(rotLog2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static final Block NULL_BLOCK = null;
|
||||
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) {
|
||||
Block block = ItemFacade.getBlock(slotmatch);
|
||||
int blockMeta = ItemFacade.getMetaData(slotmatch);
|
||||
|
||||
|
||||
|
||||
|
||||
if (block != null && block.getRenderType() == 31 && (blockMeta & 0xC) == 0)
|
||||
return getStack(block, (blockMeta & 0x3) | 4);
|
||||
// Meta | 4 = true
|
||||
|
@ -280,7 +275,7 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
public static ItemStack getStack(Block block, int metadata) {
|
||||
ItemStack stack = new ItemStack(BuildCraftTransport.facadeItem, 1, 0);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setInteger("meta", metadata);
|
||||
nbt.setInteger("meta", metadata);
|
||||
nbt.setInteger("id", Block.blockRegistry.getIDForObject(block));
|
||||
stack.setTagCompound(nbt);
|
||||
return stack;
|
||||
|
|
|
@ -8,14 +8,6 @@
|
|||
*/
|
||||
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.logging.Level;
|
||||
|
||||
|
@ -26,6 +18,14 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 {
|
||||
|
||||
|
@ -33,8 +33,8 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
|||
private IIconProvider iconProvider;
|
||||
private int pipeIconIndex;
|
||||
|
||||
protected ItemPipe() {
|
||||
super();
|
||||
protected ItemPipe(CreativeTabBuildCraft creativeTab) {
|
||||
super(creativeTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,27 +70,27 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
|||
if (itemstack.stackSize == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (world.canPlaceEntityOnSide(block, i, j, k, false, side, entityplayer, itemstack)) {
|
||||
Pipe pipe = BlockGenericPipe.createPipe(this);
|
||||
|
||||
|
||||
if (pipe == null) {
|
||||
BCLog.logger.log(Level.WARNING, "Pipe failed to create during placement at {0},{1},{2}", new Object[]{i, j, k});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (BlockGenericPipe.placePipe(pipe, world, i, j, k, block, 0)) {
|
||||
block.onBlockPlacedBy(world, i, j, k, entityplayer, itemstack);
|
||||
|
||||
|
||||
// TODO: Fix sound
|
||||
//world.playSoundEffect(i + 0.5F, j + 0.5F, k + 0.5F,
|
||||
// block.stepSound.getPlaceSound(),
|
||||
// (block.stepSound.getVolume() + 1.0F) / 2.0F,
|
||||
// block.stepSound.getPitch() * 0.8F);
|
||||
|
||||
|
||||
itemstack.stackSize--;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -8,13 +8,6 @@
|
|||
*/
|
||||
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 net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -22,13 +15,19 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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 {
|
||||
|
||||
private IIcon[] icons;
|
||||
|
||||
public ItemPipeWire() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_3);
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
setPassSneakClick(true);
|
||||
|
|
|
@ -8,25 +8,26 @@
|
|||
*/
|
||||
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.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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 ItemPlug() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
return "item.PipePlug";
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// 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)
|
||||
|
@ -51,7 +52,7 @@ public class ItemPlug extends ItemBuildCraft {
|
|||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) {
|
||||
return true;
|
||||
|
@ -70,5 +71,5 @@ public class ItemPlug extends ItemBuildCraft {
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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;
|
||||
|
@ -19,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class ItemRobotStation extends ItemBuildCraft {
|
||||
|
||||
public ItemRobotStation() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_4);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,24 +8,7 @@
|
|||
*/
|
||||
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.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -40,6 +23,22 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.util.IIcon;
|
||||
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 {
|
||||
|
||||
|
@ -48,7 +47,7 @@ public class ItemGate extends ItemBuildCraft {
|
|||
private static final String NBT_TAG_EX = "ex";
|
||||
|
||||
public ItemGate() {
|
||||
super();
|
||||
super(CreativeTabBuildCraft.TIER_3);
|
||||
setHasSubtypes(false);
|
||||
setMaxDamage(0);
|
||||
setPassSneakClick(true);
|
||||
|
@ -69,17 +68,17 @@ public class ItemGate extends ItemBuildCraft {
|
|||
|
||||
public static GateMaterial getMaterial(ItemStack stack) {
|
||||
NBTTagCompound nbt = getNBT(stack);
|
||||
|
||||
|
||||
if (nbt == null) {
|
||||
return GateMaterial.REDSTONE;
|
||||
} else {
|
||||
return GateMaterial.fromOrdinal(nbt.getByte(NBT_TAG_MAT));
|
||||
return GateMaterial.fromOrdinal(nbt.getByte(NBT_TAG_MAT));
|
||||
}
|
||||
}
|
||||
|
||||
public static GateLogic getLogic(ItemStack stack) {
|
||||
NBTTagCompound nbt = getNBT(stack);
|
||||
|
||||
|
||||
if (nbt == null) {
|
||||
return GateLogic.AND;
|
||||
} else {
|
||||
|
@ -94,11 +93,11 @@ public class ItemGate extends ItemBuildCraft {
|
|||
|
||||
public static void addGateExpansion(ItemStack stack, IGateExpansion expansion) {
|
||||
NBTTagCompound nbt = getNBT(stack);
|
||||
|
||||
|
||||
if (nbt == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal());
|
||||
expansionList.appendTag(new NBTTagString(expansion.getUniqueIdentifier()));
|
||||
nbt.setTag(NBT_TAG_EX, expansionList);
|
||||
|
@ -106,35 +105,35 @@ public class ItemGate extends ItemBuildCraft {
|
|||
|
||||
public static boolean hasGateExpansion(ItemStack stack, IGateExpansion expansion) {
|
||||
NBTTagCompound nbt = getNBT(stack);
|
||||
|
||||
|
||||
if (nbt == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal());
|
||||
|
||||
|
||||
for (int i = 0; i < expansionList.tagCount(); i++) {
|
||||
String ex = expansionList.getStringTagAt(i);
|
||||
|
||||
|
||||
if (ex.equals(expansion.getUniqueIdentifier())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException error) {
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Set<IGateExpansion> getInstalledExpansions(ItemStack stack) {
|
||||
Set<IGateExpansion> expansions = new HashSet<IGateExpansion>();
|
||||
NBTTagCompound nbt = getNBT(stack);
|
||||
|
||||
|
||||
if (nbt == null) {
|
||||
return expansions;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal());
|
||||
for (int i = 0; i < expansionList.tagCount(); i++) {
|
||||
|
@ -145,7 +144,7 @@ public class ItemGate extends ItemBuildCraft {
|
|||
}
|
||||
} catch (RuntimeException error) {
|
||||
}
|
||||
|
||||
|
||||
return expansions;
|
||||
}
|
||||
|
||||
|
@ -154,7 +153,7 @@ public class ItemGate extends ItemBuildCraft {
|
|||
NBTTagCompound nbt = InvUtils.getItemData(stack);
|
||||
nbt.setByte(NBT_TAG_MAT, (byte) material.ordinal());
|
||||
nbt.setByte(NBT_TAG_LOGIC, (byte) logic.ordinal());
|
||||
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
@ -163,11 +162,11 @@ public class ItemGate extends ItemBuildCraft {
|
|||
NBTTagCompound nbt = InvUtils.getItemData(stack);
|
||||
nbt.setByte(NBT_TAG_MAT, (byte) gate.material.ordinal());
|
||||
nbt.setByte(NBT_TAG_LOGIC, (byte) gate.logic.ordinal());
|
||||
|
||||
|
||||
for (IGateExpansion expansion : gate.expansions.keySet()) {
|
||||
addGateExpansion(stack, expansion);
|
||||
}
|
||||
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
@ -175,7 +174,7 @@ public class ItemGate extends ItemBuildCraft {
|
|||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return GateDefinition.getLocalizedName(getMaterial(stack), getLogic(stack));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
|
@ -194,42 +193,42 @@ public class ItemGate extends ItemBuildCraft {
|
|||
|
||||
itemList.add(makeGateItem(material, logic));
|
||||
|
||||
for (IGateExpansion exp : GateExpansions.getExpansions()) {
|
||||
for (IGateExpansion exp : GateExpansions.getExpansions()) {
|
||||
ItemStack stackExpansion = makeGateItem(material, logic);
|
||||
addGateExpansion(stackExpansion, exp);
|
||||
itemList.add(stackExpansion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemStack[] getGateVarients() {
|
||||
ArrayList<ItemStack> gates = new ArrayList<ItemStack>();
|
||||
|
||||
|
||||
for (GateMaterial material : GateMaterial.VALUES) {
|
||||
for (GateLogic logic : GateLogic.VALUES) {
|
||||
if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
gates.add(makeGateItem(material, logic));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return gates.toArray(new ItemStack[gates.size()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) {
|
||||
super.addInformation(stack, player, list, adv);
|
||||
|
||||
|
||||
list.add(StringUtils.localize("tip.gate.wires"));
|
||||
list.add(StringUtils.localize("tip.gate.wires." + getMaterial(stack).getTag()));
|
||||
Set<IGateExpansion> expansions = getInstalledExpansions(stack);
|
||||
|
||||
|
||||
if (!expansions.isEmpty()) {
|
||||
list.add(StringUtils.localize("tip.gate.expansions"));
|
||||
|
||||
|
||||
for (IGateExpansion expansion : expansions) {
|
||||
list.add(expansion.getDisplayName());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue