Jump to content

Releasing mod- where do I put my textures? [1.6.4]


Athire

Recommended Posts

Hello all! I'm about ready to release a super early alpha version of my mod, just something my friends and I can play around with to test it out. I recompiled and reobfuscated it all, I turned it into a .zip file (I'm using forge for 1.6.4), and I tried applying it to my forge minecraft profile. The mod loads and all of the items and ores work like  they should, but none of my textures load. I tried adding my textures directly to the .jar file (sorted correctly for blocks/items/gui), I even tried putting it in my zip file as just the .png's, in a textures folder, and even in a textures folder under a mod name folder (like in my mcp folder). All of my textures worked in the eclipse work space. To add my textures to an item I'm using the method .setTextureName("innerpower: InnerPower_itemname") where innerpower is the name of the folder under mcp>>src>>assets which houses the textures, and "InnerPower_itemname" is the .png. For example one line of my code is:

 

public static final Item STFireball= new SpellTomeFireball(5000).setTextureName("innerpower:InnerPower_SpellTome_Fireball");

 

So is this an issue with with the function I'm using, or am i just not putting my textures in the right place? Every tutorial I've seen so far has a different place to put them (such as directly into the .jar or in the zipped folder) so it's a bit difficult to figure out D: As always thank you guys for all your help! I'm definitely adding some names to my credits section once an official release comes out! :) And thanks again to everyone who has helped me with my other questions so far! This mod is far from over but you guys have been a huge help in getting me this far!

Link to comment
Share on other sites

Thank you so much! That just about fixed my issue! There is still one stubborn texture that refuses to load though. It's weird because it's an item texture in the same folder as my other item textures which are loading fine. I can't see anything different between the textures which are loading and this one item texture which will not :( Any suggestions?

 

Here is the bit of code that initializes the item:

public static final Item InrPwrWispEssence = new Item(5001).setCreativeTab(CreativeTabs.tabMisc).setUnlocalizedName("essenceWisp").setTextureName("innerpower:InnerPower_Essence_WispyEssence");

 

Thank you again!

Link to comment
Share on other sites

Hi

 

Keen, sounds like you've nearly cracked it.

 

At a guess - since your other Items work ok - your InnerPower_Essence_WispyEssence doesn't match the filename.  Try renaming them both to something very simple, like

setTextureName("innerpower:fred");

and

fred.png

 

If that doesn't fix the problem, post your code and the error log showing the "using missing texture" error message?

 

-TGG

 

 

Link to comment
Share on other sites

You were right! Turns out i capitalized the E in "_Essence" in the code but not in the png! I thought i triple checked that but for some reason i just didn't catch it. It's strange that it would work in eclipse though, I wonder why that is?

 

anyway thank you so much! I'll add your name to the list of people to put in the credits :)

Link to comment
Share on other sites

You were right! Turns out i capitalized the E in "_Essence" in the code but not in the png! I thought i triple checked that but for some reason i just didn't catch it.

yeah that's a real trap.  Been there several times myself

 

 

It's strange that it would work in eclipse though, I wonder why that is?

That's because the windows file system isn't case sensitive, so essence and Essence still match.  But zip files are case-sensitive, so when you package up your mod it suddenly doesn't work any more.

 

anyway thank you so much! I'll add your name to the list of people to put in the credits :)

you're welcome, thanks :-)

 

Link to comment
Share on other sites

Hello,

 

Basically, I need help with the same thing. I can load my texture fine when I run minecraft off eclipse (when you press the "play" button on eclipse when you are testing the mod) but when I recompile my mod and add it to my mods folder in the .minecraft folder the textures won't load. I think it's because I don't know where to put my textures.

 

If you need any more information about my problem, just ask :D.

 

Main class

 

package ASHninja1997.CrystalOrb; //Package directory

 

import net.minecraft.block.Block;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemFood;

import net.minecraft.item.ItemStack;

import net.minecraft.item.ItemHoe;

import net.minecraftforge.common.EnumHelper;

import net.minecraftforge.common.MinecraftForge;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

 

/*

* Basic needed forge stuff

*/

@Mod(modid="CrystalOrbMod",name="Crystal Orb Mod",version="v1.3")

@NetworkMod(clientSideRequired=true,serverSideRequired=false)

 

public class Main {

 

/*

* ToolMaterial

*/

 

//Telling forge that we are creating these

 

public static final String modid = "ASHninja1997_CrystalOrb";

 

//static EnumToolMaterial WOOD = EnumHelper.addToolMaterial(name, harvestLevel, maxUses, efficiency, damage, enchantability)

static EnumToolMaterial Crystalbasic= EnumHelper.addToolMaterial("Cystal", 3, 3561, 15F, 3, 30);

static EnumToolMaterial Crystalbasic2= EnumHelper.addToolMaterial("Cystal", 3, 3561, 18F, 3, 30);

static EnumToolMaterial CrystalSword= EnumHelper.addToolMaterial("Cystal", 3, 3561, 15F, 6, 30);

 

//items

public static Item orb_blue;

public static Item orb_red;

public static Item orb_crystal;

 

public static Item OrbAxe;

public static Item OrbShovel;

public static Item OrbSword;

public static Item OrbPickaxe;

public static Item OrbHoe;

 

//block

public static Block orb_blue_ore;

public static Block orb_red_ore;

public static Block orb_crystal_block;

 

//Declaring Init

@Init

public void load(FMLInitializationEvent event){

// define items/blocks

 

orb_blue_ore = new OrbBlockBlue(2079, "orb_blue_ore").setUnlocalizedName("orb_blue_ore").setHardness(8.0F).setStepSound(Block.soundStoneFootstep).setResistance(10.0F);

GameRegistry.registerBlock(orb_blue_ore, "orb_blue_ore");

LanguageRegistry.addName(orb_blue_ore, "BlueOrb Ore");

 

orb_red_ore = new OrbBlockRed(2080, "orb_red_ore").setUnlocalizedName("orb_red_ore").setHardness(8.0F).setStepSound(Block.soundStoneFootstep).setResistance(10.0F);

GameRegistry.registerBlock(orb_red_ore, "orb_red_ore");

LanguageRegistry.addName(orb_red_ore, "RedOrb Ore");

 

orb_crystal_block = new OrbBlockRed(2088, "orb_crystal_block").setUnlocalizedName("orb_crystal_block").setHardness(8.0F).setStepSound(Block.soundMetalFootstep).setResistance(14.0F);

GameRegistry.registerBlock(orb_crystal_block, "orb_crystal_block");

orb_blue_ore.func_82506_l();

LanguageRegistry.addName(orb_crystal_block, "CrystalOrb Block");

 

 

orb_red = new OrbItems(2081).setUnlocalizedName("orb_red");

orb_blue = new OrbItems(2078).setUnlocalizedName("orb_blue");

orb_crystal = new OrbItems(2082).setUnlocalizedName("orb_crystal");

 

OrbAxe = new OrbAxe(2083, Crystalbasic).setUnlocalizedName("orb_crystal_axe");

OrbShovel = new OrbShovel(2084, Crystalbasic2).setUnlocalizedName("orb_crystal_shovel");

OrbPickaxe = new OrbPickaxe(2085, Crystalbasic).setUnlocalizedName("orb_crystal_pickaxe");

OrbHoe = new OrbHoe(2086, Crystalbasic).setUnlocalizedName("orb_crystal_hoe");

OrbSword = new OrbSword(2087, CrystalSword).setUnlocalizedName("orb_crystal_sword");

 

MinecraftForge.setToolClass(OrbPickaxe, "pickaxe", 3);

MinecraftForge.setToolClass(OrbShovel, "shovel", 3);

MinecraftForge.setToolClass(OrbAxe, "axe", 3);

 

MinecraftForge.setBlockHarvestLevel(orb_blue_ore, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(orb_red_ore, "pickaxe", 2);

 

//adding names

 

 

LanguageRegistry.addName(orb_blue, "Blue Orb");

LanguageRegistry.addName(orb_red, "Red Orb");

LanguageRegistry.addName(orb_crystal, "Crystal Orb");

LanguageRegistry.addName(OrbAxe, "Crystal Axe");

LanguageRegistry.addName(OrbShovel, "Crystal Shovel");

LanguageRegistry.addName(OrbPickaxe, "Crystal Pickaxe");

LanguageRegistry.addName(OrbSword, "Crystal Sword");

LanguageRegistry.addName(OrbHoe, "Crystal Hoe");

 

//crafting

 

GameRegistry.addRecipe(new ItemStack(orb_crystal,1), new Object[]{

"BRB","RBR","BRB",'B', orb_blue, 'R', orb_red

});

 

GameRegistry.addRecipe(new ItemStack(OrbSword,1), new Object[]{

" C "," C "," S ",'C', orb_crystal, 'S', Item.stick

});

 

GameRegistry.addRecipe(new ItemStack(OrbAxe,1), new Object[]{

" CC"," SC"," S ",'C', orb_crystal, 'S', Item.stick

});

 

GameRegistry.addRecipe(new ItemStack(OrbShovel,1), new Object[]{

" C "," S "," S ",'C', orb_crystal, 'S', Item.stick

});

 

GameRegistry.addRecipe(new ItemStack(OrbPickaxe,1), new Object[]{

"CCC"," S "," S ",'C', orb_crystal, 'S', Item.stick

});

 

GameRegistry.addRecipe(new ItemStack(OrbHoe,1), new Object[]{

" CC"," S "," S ",'C', orb_crystal, 'S', Item.stick

});

 

GameRegistry.addRecipe(new ItemStack(orb_crystal_block,1), new Object[]{

"CCC","CCC","CCC",'C', orb_crystal,

});

 

//reverse

 

 

//world Generator

GameRegistry.registerWorldGenerator(new WorldGeneratorORB());

 

 

 

 

}

 

}

 

 

 

Block Class

 

package ASHninja1997.CrystalOrb;

 

import java.io.File;

import java.util.Random;

 

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.registry.LanguageRegistry;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.creativetab.CreativeTabs;

 

public class OrbBlockBlue extends Block {

 

 

public OrbBlockBlue(int par1, String texture) {

super(par1, Material.rock);

setCreativeTab(CreativeTabs.tabBlock); //place in creative tabs

 

}

 

//drops when broken with pickaxe

public int idDropped(int par1, Random par2Random, int par3)

{

return Main.orb_blue.itemID;

}

public int quantityDropped(Random random)

{

return 1;

}

 

@SideOnly(Side.CLIENT)

public void registerIcons(IconRegister iconRegister)

{

blockIcon = iconRegister.registerIcon("CrystalOrb:orb_blue_ore");

}

 

}

 

Every day is a new day to learn.

I acknowledge the hard work of original content.

I will always improve in many ways.

 

Java > c

Link to comment
Share on other sites

You were right! Turns out i capitalized the E in "_Essence" in the code but not in the png!

 

And now you know why I use lower case for everything asset related and tell new modders to always use all lower case for their assets, double and triple check.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.