Adding Armor to custom tab (Help please!)

4 posts / 0 new
Last post
Offline
Last seen: 1 year 1 month ago
Joined: 04/24/2015 - 08:44
Gems: 0
Adding Armor to custom tab (Help please!)

So i just recently created a post, and got lost in what i was supposed to do,

 

I'm trying to change my armor to my custom tab

but I am recieving an error, stating 

:compileApiJava UP-TO-DATE
>:processApiResources UP-TO-DATE
>:apiClasses UP-TO-DATE
>:sourceMainJava
>C:\Users\Sebastian\Documents\My Games\Minecraft\Mcreator\forge\build\sources\java\mod\mcreator\mcreator_adamantitearmor.java:116: error: cannot find symbol
>helmet.setCreativeTab(mcreator_oreigins.tab);
>                      ^
>  symbol:   variable mcreator_oreigins
>  location: class mcreator_adamantitearmor
>C:\Users\Sebastian\Documents\My Games\Minecraft\Mcreator\forge\build\sources\java\mod\mcreator\mcreator_adamantitearmor.java:117: error: cannot find symbol
>body.setCreativeTab(mcreator_oreigins.tab);
>                    ^
>  symbol:   variable mcreator_oreigins
>  location: class mcreator_adamantitearmor
>C:\Users\Sebastian\Documents\My Games\Minecraft\Mcreator\forge\build\sources\java\mod\mcreator\mcreator_adamantitearmor.java:118: error: cannot find symbol
>legs.setCreativeTab(mcreator_oreigins.tab);
>                    ^
>  symbol:   variable mcreator_oreigins
>  location: class mcreator_adamantitearmor
>C:\Users\Sebastian\Documents\My Games\Minecraft\Mcreator\forge\build\sources\java\mod\mcreator\mcreator_adamantitearmor.java:119: error: cannot find symbol
>boots.setCreativeTab(mcreator_oreigins.tab);
>                     ^
>  symbol:   variable mcreator_oreigins
>  location: class mcreator_adamantitearmor
>4 errors
>:compileJava FAILED
>FAILURE: Build failed with an exception.
>* What went wrong:
>Execution failed for task ':compileJava'.
>> Compilation failed; see the compiler error output for details.
>* Try:
>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
>BUILD FAILED
>Total time: 15.15 secs
>C:\Users\Sebastian\Documents\My Games\Minecraft\Mcreator\forge>
>Task completed with return code 0 in 15979 milliseconds
 
 
 
Every time I attempt to change the armor tab through "View Source"
it gives me this error, then the armor wont show up when i go to edit it, the name is red?!?!
Please Help!


Offline
Last seen: 1 year 9 months ago
Joined: 05/16/2014 - 13:42
Gems: 0
I Think you have put it into

I Think you have put it into the wrong place but I don't know where it has to be placed for armor.

Offline
Last seen: 10 months 3 weeks ago
Joined: 12/09/2014 - 13:40
Gems: 0
Go to this webb adress this
Offline
Last seen: 1 year 10 months ago
Joined: 03/01/2014 - 17:01
Gems: 0
That's probably because you

That's probably because you are using '.setCreativeTab' with the wrong variable, let me show you what i did to a sword that had the same problem in a mod of mine:

package mod.mcreator;//based on master condiguration

import cpw.mods.fml.client.*;
import cpw.mods.fml.client.registry.*;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.asm.*;
import cpw.mods.fml.common.asm.transformers.*;
import cpw.mods.fml.common.discovery.*;
import cpw.mods.fml.common.discovery.asm.*;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.functions.*;
import cpw.mods.fml.common.network.*;
import cpw.mods.fml.common.registry.*;
import cpw.mods.fml.common.toposort.*;
import cpw.mods.fml.common.versioning.*;
import cpw.mods.fml.relauncher.*;
import cpw.mods.fml.server.*;
import net.minecraft.block.*;
import net.minecraft.block.material.*;
import net.minecraft.client.*;
import net.minecraft.client.audio.*;
import net.minecraft.client.entity.*;
import net.minecraft.client.gui.*;
import net.minecraft.client.gui.achievement.*;
import net.minecraft.client.gui.inventory.*;
import net.minecraft.client.model.*;
import net.minecraft.client.multiplayer.*;
import net.minecraft.client.particle.*;
import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.culling.*;
import net.minecraft.client.renderer.entity.*;
import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.*;
import net.minecraft.command.*;
import net.minecraft.crash.*;
import net.minecraft.creativetab.*;
import net.minecraft.dispenser.*;
import net.minecraft.enchantment.*;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.boss.*;
import net.minecraft.entity.effect.*;
import net.minecraft.entity.item.*;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.*;
import net.minecraft.entity.projectile.*;
import net.minecraft.inventory.*;
import net.minecraft.item.*;
import net.minecraft.item.crafting.*;
import net.minecraft.nbt.*;
import net.minecraft.network.*;
import net.minecraft.network.rcon.*;
import net.minecraft.pathfinding.*;
import net.minecraft.potion.*;
import net.minecraft.profiler.*;
import net.minecraft.server.*;
import net.minecraft.server.dedicated.*;
import net.minecraft.server.gui.*;
import net.minecraft.server.integrated.*;
import net.minecraft.server.management.*;
import net.minecraft.src.*;
import net.minecraft.stats.*;
import net.minecraft.tileentity.*;
import net.minecraft.util.*;
import net.minecraft.village.*;
import net.minecraft.world.*;
import net.minecraft.world.biome.*;
import net.minecraft.world.chunk.*;
import net.minecraft.world.chunk.storage.*;
import net.minecraft.world.demo.*;
import net.minecraft.world.gen.*;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.layer.*;
import net.minecraft.world.gen.structure.*;
import net.minecraft.world.storage.*;
import net.minecraftforge.classloading.*;
import net.minecraftforge.client.*;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.*;
import net.minecraftforge.common.*;
import net.minecraftforge.event.*;
import net.minecraftforge.event.entity.*;
import net.minecraftforge.event.entity.item.*;
import net.minecraftforge.event.entity.living.*;
import net.minecraftforge.event.entity.minecart.*;
import net.minecraftforge.event.entity.player.*;
import net.minecraftforge.event.terraingen.*;
import net.minecraftforge.event.world.*;
import net.minecraftforge.oredict.*;
import net.minecraftforge.transformers.*;
import net.minecraft.init.*;
import java.util.*;

import net.minecraftforge.common.util.*;public class mcreator_egyptcraftIronKhopesh{

public mcreator_egyptcraftIronKhopesh(){}

public static Item block;
public static Object instance;public void load(){
ItemStack stack = new ItemStack(block, 1);
GameRegistry.addRecipe(stack, new Object[]{
    "XXX", "X4X", "X7X", Character.valueOf('4'), new ItemStack(mcreator_egyptcraftIronKhopeshBlade.block, 1), Character.valueOf('7'), new ItemStack(mcreator_egyptcraftWoodenHandle.block, 1), 
});}
public void generateNether(World world, Random random, int chunkX, int chunkZ){}
public void generateSurface(World world, Random random, int chunkX, int chunkZ){}
public int addFuel(ItemStack fuel){return 0;}
public void serverLoad(FMLServerStartingEvent event){}
public void preInit(FMLPreInitializationEvent event){}
public void registerRenderers(){}


static{
Item.ToolMaterial enumt = EnumHelper.addToolMaterial("EGYPTCRAFTIRONKHOPESH", 1, 500, 4F, 6, 2);block = (Item)(new ItemSword(enumt){public Set<String> getToolClasses(ItemStack stack){
block.setCreativeTab(mcreator_egyptcraftTab.tab);
HashMap<String, Integer> ret = new HashMap<String, Integer>();
ret.put("sword", 1);
return ret.keySet();
}
}).setUnlocalizedName("EgyptcraftIronKhopesh").setTextureName("IronKhopesh");
Item.itemRegistry.addObject(427, "EgyptcraftIronKhopesh", block);

}

}