mirror of
https://github.com/TechnoVisionDev/Forge-Modding-Tutorial-1.16
synced 2024-10-27 20:34:04 +00:00
Add custom creative tab
This commit is contained in:
parent
dd95ad5525
commit
cdb7c91668
@ -1,6 +1,10 @@
|
||||
package com.technovision.tutorial;
|
||||
|
||||
import com.technovision.tutorial.util.RegistryHandler;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
@ -27,4 +31,13 @@ public class Tutorial
|
||||
private void setup(final FMLCommonSetupEvent event) { }
|
||||
|
||||
private void doClientStuff(final FMLClientSetupEvent event) { }
|
||||
|
||||
// Custom ItemGroup TAB
|
||||
public static final ItemGroup TAB = new ItemGroup("tutorialTab") {
|
||||
@Override
|
||||
public ItemStack createIcon() {
|
||||
return new ItemStack(RegistryHandler.RUBY.get());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
package com.technovision.tutorial.items;
|
||||
|
||||
import com.technovision.tutorial.Tutorial;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
|
||||
public class ItemBase extends Item {
|
||||
|
||||
public ItemBase() {
|
||||
super(new Item.Properties().group(ItemGroup.MATERIALS));
|
||||
super(new Item.Properties().group(Tutorial.TAB));
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"item.tutorial.ruby": "Ruby"
|
||||
"item.tutorial.ruby": "Ruby",
|
||||
"itemGroup.tutorialTab": "Tutorial"
|
||||
}
|
Loading…
Reference in New Issue
Block a user