Skip to content

Commit

Permalink
Add Creative Tab
Browse files Browse the repository at this point in the history
  • Loading branch information
MaPePeR committed Apr 10, 2016
1 parent d9c1add commit 1ad9aa0
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ protected AutoToolStationBlock() {
super(Material.rock);
this.setHardness(1.0F);
this.setBlockName("ats_autotoolstation");
this.setCreativeTab(TiConAutoToolStation.creativeTab);
}

@Override
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/mapeper/ticonautotoolstation/CreativeTab.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package mapeper.ticonautotoolstation;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class CreativeTab extends CreativeTabs {
public CreativeTab()
{
super(TiConAutoToolStation.MODID);
}

@Override
@SideOnly(Side.CLIENT)
public Item getTabIconItem()
{
return TiConAutoToolStation.autoToolStationBlockItem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
Expand All @@ -23,14 +24,19 @@ public class TiConAutoToolStation {
@Mod.Instance(MODID)
public static TiConAutoToolStation instance;

AutoToolStationBlock autoToolStationBlockBlock;
public static CreativeTab creativeTab = new CreativeTab();

static AutoToolStationBlock autoToolStationBlockBlock;
static Item autoToolStationBlockItem;


@EventHandler
public void preInit(FMLPreInitializationEvent event) {
if (!Loader.isModLoaded("TConstruct")) throw new RuntimeException("Need Tinkers Construct installed");
autoToolStationBlockBlock = new AutoToolStationBlock();
GameRegistry.registerBlock(autoToolStationBlockBlock, ItemBlock.class, "ats_autotoolstation");
GameRegistry.registerTileEntity(AutoToolStationTileEntity.class, "ats_autotoolstationTile");
autoToolStationBlockItem = Item.getItemFromBlock(autoToolStationBlockBlock);
}

@EventHandler
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/assets/autotoolstation/lang/de_DE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ ats.autotoolstation.thanksticon=Danke an Tinkers Construct für ihre Creative Co
ats.autotoolstation.currentMode=Modus:
ats.autotoolstation.modechange=Modus geändert zu: %s
ats.autotoolstation.mode.applyUntilDone=Hinzufügen bis fertig.
ats.autotoolstation.mode.fillOne=Nur ein Modifikator
ats.autotoolstation.mode.fillOne=Nur ein Modifikator

itemGroup.TiConAutoToolStation=TConstruct Auto Werkzeugstation
4 changes: 3 additions & 1 deletion src/main/resources/assets/autotoolstation/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ ats.autotoolstation.thanksticon=Thanks to Tinkers Construct for the Creative Com
ats.autotoolstation.currentMode=Mode:
ats.autotoolstation.modechange=Mode changed to: %s
ats.autotoolstation.mode.applyUntilDone=Apply until done
ats.autotoolstation.mode.fillOne=Only One Modifier
ats.autotoolstation.mode.fillOne=Only One Modifier

itemGroup.TiConAutoToolStation=TConstruct Auto Tool Station

0 comments on commit 1ad9aa0

Please sign in to comment.