Skip to content
Permalink
Browse files

Ajout de la table créative

  • Loading branch information...
robin4002 committed Aug 19, 2013
2 parents 110eed2 + 6911ce8 commit 9717bd38f3628cbc54bc2f515a694b5552d039d3
@@ -28,3 +28,6 @@ item.TutorialPickaxe.name=Tutorial Pickaxe
item.TutorialAxe.name=Tutorial Axe
item.TutorialShovel.name=Tutorial Shovel
item.TutorialHoe.name=Tutorial Hoe

#CreativeTabs
itemGroup.TutorialCreativeTabs=Tutorial Creative Table
@@ -27,4 +27,7 @@ item.TutorialSword.name=Épée tutoriel
item.TutorialPickaxe.name=Pioche tutoriel
item.TutorialAxe.name=Hache tutoriel
item.TutorialShovel.name=Pelle tutoriel
item.TutorialHoe.name=Houe tutoriel
item.TutorialHoe.name=Houe tutoriel

#CreativeTabs
itemGroup.TutorialCreativeTabs=Tutoriel Table Créative
@@ -19,7 +19,7 @@
public BlockTutorial(int id)
{
super(id, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setCreativeTab(ModTutoriel.TutorialCreativeTabs);
}

public void registerIcons(IconRegister iconRegister)
@@ -31,7 +31,7 @@
public BlockTutorialMetadata(int id)
{
super(id, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setCreativeTab(ModTutoriel.TutorialCreativeTabs);
}

public void registerIcons(IconRegister iconregister)
@@ -11,7 +11,7 @@
public ItemTutorial(int id)
{
super(id);
this.setCreativeTab(CreativeTabs.tabMaterials);
this.setCreativeTab(ModTutoriel.TutorialCreativeTabs);
}

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
@@ -10,6 +10,7 @@
public ItemTutorialArmor(int id, EnumArmorMaterial armorMaterial, int type, int layer)
{
super(id, armorMaterial, type, layer);
this.setCreativeTab(ModTutoriel.TutorialCreativeTabs);
}

public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer)
@@ -7,5 +7,6 @@
public ItemTutorialEgg(int id, int foodAmount, float saturation, boolean isWolfFood)
{
super(id, foodAmount, saturation, isWolfFood);
this.setCreativeTab(ModTutoriel.TutorialCreativeTabs);
}
}
@@ -19,7 +19,7 @@
public ItemWithMetadata(int id)
{
super(id);
this.setCreativeTab(CreativeTabs.tabMaterials);
this.setCreativeTab(ModTutoriel.TutorialCreativeTabs);
this.setHasSubtypes(true);
}

@@ -1,6 +1,7 @@
package tutoriel.common;

import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
@@ -42,6 +43,9 @@
static EnumArmorMaterial TutorialArmor = EnumHelper.addArmorMaterial("Tutorial", 20, new int[]{2, 8, 4, 2}, 15);
static EnumToolMaterial TutorialMaterial = EnumHelper.addToolMaterial("Tutorial", 3, 761, 14.0F, 4, 5);

//declaration des tables creatives
public static CreativeTabs TutorialCreativeTabs = new TutorialCreativeTabs("TutorialCreativeTabs");

@EventHandler
public void PreInit(FMLPreInitializationEvent event)
{
@@ -160,4 +164,4 @@ public void PostInit(FMLPostInitializationEvent event)
{
//Integration avec les autres mods - integration with others mods
}
}
}
@@ -0,0 +1,19 @@
package tutoriel.common;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;

public class TutorialCreativeTabs extends CreativeTabs
{
public TutorialCreativeTabs(String label)
{
super(label);
}

@Override
public ItemStack getIconItemStack()
{
return new ItemStack(ModTutoriel.BlockTutorial);
}

}

0 comments on commit 9717bd3

Please sign in to comment.
You can’t perform that action at this time.