summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2014-10-19 18:36:56 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2014-10-19 18:36:56 +0100
commitcb51f55c6e1e06bca96c38fb57d99b8715de43ba (patch)
treef8d6d5e497ad7de3d04a865f54ba03167a0335ec
parent0c97228aef3b6f723021403decd73c07da2f4266 (diff)
downloadnoctis-cb51f55c6e1e06bca96c38fb57d99b8715de43ba.tar.bz2
Sort out creative tabs
-rw-r--r--src/main/java/net/flarn/noctis/creative/CreativeTabNoctis.java15
-rw-r--r--src/main/java/net/flarn/noctis/item/ItemGlassSword.java4
-rw-r--r--src/main/java/net/flarn/noctis/item/ItemNoctisBase.java3
-rw-r--r--src/main/java/net/flarn/noctis/refs/Refs.java3
-rw-r--r--src/main/resources/assets/noctis/lang/en_GB.lang4
5 files changed, 25 insertions, 4 deletions
diff --git a/src/main/java/net/flarn/noctis/creative/CreativeTabNoctis.java b/src/main/java/net/flarn/noctis/creative/CreativeTabNoctis.java
new file mode 100644
index 0000000..431c169
--- /dev/null
+++ b/src/main/java/net/flarn/noctis/creative/CreativeTabNoctis.java
@@ -0,0 +1,15 @@
+package net.flarn.noctis.creative;
+
+import net.flarn.noctis.init.ModItems;
+import net.flarn.noctis.refs.Refs;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+
+public class CreativeTabNoctis {
+ public static final CreativeTabs NoctisTab = new CreativeTabs(Refs.CREATIVE_TAB_NAME_MAIN) {
+ @Override
+ public Item getTabIconItem() {
+ return ModItems.glassSword;
+ }
+ };
+}
diff --git a/src/main/java/net/flarn/noctis/item/ItemGlassSword.java b/src/main/java/net/flarn/noctis/item/ItemGlassSword.java
index 1822355..5fea020 100644
--- a/src/main/java/net/flarn/noctis/item/ItemGlassSword.java
+++ b/src/main/java/net/flarn/noctis/item/ItemGlassSword.java
@@ -1,9 +1,5 @@
package net.flarn.noctis.item;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.item.Item;
-
public class ItemGlassSword extends ItemNoctisBase {
public ItemGlassSword() {
diff --git a/src/main/java/net/flarn/noctis/item/ItemNoctisBase.java b/src/main/java/net/flarn/noctis/item/ItemNoctisBase.java
index a1165b5..e0d5cc5 100644
--- a/src/main/java/net/flarn/noctis/item/ItemNoctisBase.java
+++ b/src/main/java/net/flarn/noctis/item/ItemNoctisBase.java
@@ -2,6 +2,7 @@ package net.flarn.noctis.item;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import net.flarn.noctis.creative.CreativeTabNoctis;
import net.flarn.noctis.refs.Textures;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
@@ -12,6 +13,8 @@ public class ItemNoctisBase extends Item {
super();
this.maxStackSize = 1;
this.setNoRepair();
+ this.setCreativeTab(CreativeTabNoctis.NoctisTab);
+
}
@Override
diff --git a/src/main/java/net/flarn/noctis/refs/Refs.java b/src/main/java/net/flarn/noctis/refs/Refs.java
index 9aceee1..bf35ae3 100644
--- a/src/main/java/net/flarn/noctis/refs/Refs.java
+++ b/src/main/java/net/flarn/noctis/refs/Refs.java
@@ -7,4 +7,7 @@ public class Refs {
public static final String VERSION = "1.7.10-0.0.1";
public static final String GUI_FACTORY_CLASS = "net.flarn.noctis.client.gui.GuiFactory";
+
+ public static final String CREATIVE_TAB_NAME_MAIN = "noctis";
+ public static final String CREATIVE_TAB_NAME_CREATIVE = "noctis.creative";
}
diff --git a/src/main/resources/assets/noctis/lang/en_GB.lang b/src/main/resources/assets/noctis/lang/en_GB.lang
index 6dd5f3f..2b04600 100644
--- a/src/main/resources/assets/noctis/lang/en_GB.lang
+++ b/src/main/resources/assets/noctis/lang/en_GB.lang
@@ -1,2 +1,6 @@
+# Creative Tab
+itemGroup.noctis=Noctis - Spatio inter Stellarum
+itemGroup.noctis.creative=Noctis - Creative Mode Only Itemss
+
# Item localisations
item.noctis:glassSword.name=Un-attuned Glass Sword