Move Facades to own tab
This commit is contained in:
parent
e4cad84af6
commit
6fdbd8c525
24 changed files with 66 additions and 44 deletions
|
@ -269,7 +269,6 @@ public class BuildCraftTransport {
|
|||
|
||||
pipeWaterproof = new ItemBuildCraft(pipeWaterproofId.getInt());
|
||||
pipeWaterproof.setUnlocalizedName("pipeWaterproof");
|
||||
pipeWaterproof.setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
LanguageRegistry.addName(pipeWaterproof, "Pipe Waterproof");
|
||||
genericPipeBlock = new BlockGenericPipe(genericPipeId.getInt());
|
||||
CoreProxy.proxy.registerBlock(genericPipeBlock.setUnlocalizedName("pipeBlock"), ItemBlock.class);
|
||||
|
|
|
@ -42,7 +42,7 @@ public class BlockArchitect extends BlockContainer {
|
|||
public BlockArchitect(int i) {
|
||||
super(i, Material.iron);
|
||||
setHardness(5F);
|
||||
//setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
//setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockBlueprintLibrary extends BlockContainer {
|
|||
|
||||
public BlockBlueprintLibrary(int i) {
|
||||
super(i, Material.wood);
|
||||
//setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
//setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setHardness(5F);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockBuilder extends BlockContainer {
|
|||
public BlockBuilder(int i) {
|
||||
super(i, Material.iron);
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -39,7 +39,7 @@ public class BlockFiller extends BlockContainer {
|
|||
super(i, Material.iron);
|
||||
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,7 +31,7 @@ public class BlockMarker extends BlockContainer {
|
|||
super(i, Material.circuits);
|
||||
|
||||
setLightValue(0.5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
private AxisAlignedBB getBoundingBox(int meta) {
|
||||
|
|
|
@ -27,7 +27,7 @@ public abstract class ItemBptBase extends ItemBuildCraft {
|
|||
super(i);
|
||||
|
||||
maxStackSize = 1;
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "all" })
|
||||
|
|
|
@ -14,7 +14,7 @@ public abstract class BlockBuildCraft extends BlockContainer {
|
|||
protected BlockBuildCraft(int id, Material material) {
|
||||
super(id, material);
|
||||
this.rand = new Random();
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BlockSpring extends Block {
|
|||
setStepSound(soundStoneFootstep);
|
||||
disableStats();
|
||||
setTickRandomly(true);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,24 +1,59 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.core.utils.Localization;
|
||||
import buildcraft.transport.ItemFacade;
|
||||
import java.util.Locale;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class CreativeTabBuildCraft extends CreativeTabs {
|
||||
public enum CreativeTabBuildCraft {
|
||||
|
||||
public static final CreativeTabs tabBuildCraft = new CreativeTabBuildCraft("buildcraft");
|
||||
|
||||
public CreativeTabBuildCraft(String label) {
|
||||
super(label);
|
||||
MACHINES,
|
||||
FACADES;
|
||||
private final CreativeTabs tab;
|
||||
|
||||
private CreativeTabBuildCraft() {
|
||||
tab = new Tab();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(BuildCraftCore.diamondGearItem);
|
||||
public CreativeTabs get() {
|
||||
return tab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTranslatedTabLabel() {
|
||||
return "BuildCraft";
|
||||
|
||||
private String getLabel() {
|
||||
return "buildcraft." + name().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
private String translate() {
|
||||
return Localization.get("tab." + name().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
private ItemStack getItem() {
|
||||
switch (this) {
|
||||
case FACADES:
|
||||
return ItemFacade.getStack(Block.stoneBrick, 0);
|
||||
default:
|
||||
return new ItemStack(BuildCraftCore.diamondGearItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class Tab extends CreativeTabs {
|
||||
|
||||
private Tab() {
|
||||
super(getLabel());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return getItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTranslatedTabLabel() {
|
||||
return translate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class ItemBuildCraft extends Item {
|
|||
|
||||
public ItemBuildCraft(int i) {
|
||||
super(i);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@ public class BlockEngine extends BlockContainer {
|
|||
super(i, Material.iron);
|
||||
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setUnlocalizedName("engineBlock");
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public class ItemBucketBuildcraft extends ItemBucket {
|
|||
|
||||
public ItemBucketBuildcraft(int i, int blockId) {
|
||||
super(i, blockId);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setContainerItem(Item.bucketEmpty);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockFloodGate extends BlockContainer {
|
|||
public BlockFloodGate(int i) {
|
||||
super(i, Material.iron);
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,7 +20,7 @@ public abstract class BlockMachineRoot extends BlockContainer {
|
|||
|
||||
protected BlockMachineRoot(int i, Material material) {
|
||||
super(i, material);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
setHardness(5F);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockPump extends BlockContainer {
|
|||
public BlockPump(int i) {
|
||||
super(i, Material.iron);
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockRefinery extends BlockContainer {
|
|||
super(i, Material.iron);
|
||||
|
||||
setHardness(5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BlockTank extends BlockContainer {
|
|||
super(i, Material.glass);
|
||||
setBlockBounds(0.125F, 0F, 0.125F, 0.875F, 1F, 0.875F);
|
||||
setHardness(0.5F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,7 +28,7 @@ public class BlockLaser extends BlockContainer {
|
|||
public BlockLaser(int i) {
|
||||
super(i, Material.iron);
|
||||
setHardness(10F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,7 @@ public class BlockLaserTable extends BlockContainer {
|
|||
|
||||
setBlockBounds(0, 0, 0, 1, 9F / 16F, 1);
|
||||
setHardness(10F);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.MACHINES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,15 +17,12 @@ import java.util.Set;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class ItemFacade extends ItemBuildCraft {
|
||||
|
||||
|
@ -36,7 +33,7 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setCreativeTab(CreativeTabBuildCraft.FACADES.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,7 +3,6 @@ package buildcraft.transport;
|
|||
import buildcraft.api.gates.ActionManager;
|
||||
import buildcraft.api.gates.IAction;
|
||||
import buildcraft.api.gates.ITrigger;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -45,7 +44,6 @@ public class ItemGate extends ItemBuildCraft {
|
|||
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
setPassSneakClick(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ package buildcraft.transport;
|
|||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.IItemPipe;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -32,7 +31,6 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
|||
|
||||
protected ItemPipe(int i) {
|
||||
super(i);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,21 +1,16 @@
|
|||
package buildcraft.transport;
|
||||
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class ItemPlug extends ItemBuildCraft {
|
||||
|
||||
public ItemPlug(int i) {
|
||||
super(i);
|
||||
setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue