Jump to content

Textures not showing up


kenny2810

Recommended Posts

Here is the code i`m using for the generic class:

 

package tutorial.generic;

 

// This Import list will grow longer with each additional tutorial.

// It's not pruned between full class postings, unlike other tutorial code.

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraftforge.common.MinecraftForge;

import cpw.mods.fml.common.Mod;

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

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

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

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

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

import cpw.mods.fml.common.SidedProxy;

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

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

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

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

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

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

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

 

@Mod(modid="generic", name="Generic", version="0.0.0")

@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class Generic

{

        // See Basic items tutorial for Generic Ingot

        public static Item genericIngot;

       

        public static Block genericDirt;

        public static Block genericOre;

       

        @Instance(value="generic")

        public static Generic instance;

       

        @SidedProxy(clientSide="tutorial.generic.client.ClientProxy",

                        serverSide="tutorial.generic.CommonProxy")

        public static CommonProxy proxy;

       

        @EventHandler

        public void preInit(FMLPreInitializationEvent event)

        {

       

        genericIngot = new GenericItem(201).setMaxStackSize(16)

                    .setUnlocalizedName("genericIngot");

genericDirt = new GenericBlock(500, Material.ground)

                .setHardness(0.5F).setStepSound(Block.soundGravelFootstep)

                .setUnlocalizedName("genericDirt").setCreativeTab(CreativeTabs.tabBlock);

genericOre = new GenericOre(501, Material.rock);

        }

       

        @EventHandler

        public void load(FMLInitializationEvent event)

        {

                // See Basic items tutorial for Generic Ingot

                LanguageRegistry.addName(genericIngot, "Generic Ingot");

                LanguageRegistry.addName(genericOre, "Generic Ore");

                MinecraftForge.setBlockHarvestLevel(genericOre, "pickaxe", 3);

                GameRegistry.registerBlock(genericOre, "genericOre");

                // End Basic Blocks

               

                proxy.registerRenderers();

        }

       

        @EventHandler

        public void postInit(FMLPostInitializationEvent event)

        {

                // Stub Method

        }

}

 

 

Here is the code for the ItemClass:

 

package tutorial.generic;

 

import net.minecraft.creativetab.CreativeTabs;

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

import net.minecraft.item.Item;

 

public class GenericItem extends Item {

 

        public GenericItem(int id) {

                super(id); 

                // Constructor Configuration

                maxStackSize = 64;

                setCreativeTab(CreativeTabs.tabMisc);

                setUnlocalizedName("genericItem");

}

}

 

I have the picture which is a .png in the correct folder named Items as is meant to. I Kepp getting these errors, however the bottom two occur as I do not have textures for them yet, but for the first one I do. Can anyone tell me what i`m doing wrong? Here are the errors I`m getting regarding the textures.

 

2013-11-04 13:50:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_457_genericIngot.png

 

2013-11-04 13:50:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_500_genericDirt.png

 

2013-11-04 13:50:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_501_genericOre.png

Link to comment
Share on other sites

Hi

 

No worries mate, we've all got to start somewhere and the documentation is a bit patchy to say the least :-)

 

Put it in your GenericItem and GenericBlock as is, you'll need to replace "generic:picturename" with the name of your mod ("generic" in this case I think) and the name of the file you're using for the texture.

 

If you're just starting out, this sample code might be helpful

http://greyminecraftcoder.blogspot.com.au/2013/09/sample-code-for-rendering-items.html

and especially

https://github.com/TheGreyGhost/ItemRendering/blob/master/src/TestItemRendering/items/ItemSmileyFace.java

https://github.com/TheGreyGhost/ItemRendering/blob/master/src/TestItemRendering/TestItemRenderingMod.java

 

For now ignore all the bits that aren't ItemSmileyFace, they use more advanced rendering methods that you probably don't need yet...

 

-TGG

 

 

 

Link to comment
Share on other sites

Hi

 

You need to set the texture name for the blocks and the item.

eg

  @Override

  public void registerIcons(IconRegister iconRegister)

  {

    itemIcon = iconRegister.registerIcon("generic:picturename");

  }

 

-TGG

 

You only need this if you use more than one texture per block/item.  If it's one texture you can do setTextureName("generic:picturename");

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

Thank you both for your effort to try and help me understand, but for some reason, the textures wont apper. (Also I have not yet added textures for the other two blocks) Here is the entire console log I get after I tried both your changes:

 

Nov 04, 2013 3:37:41 PM net.minecraft.launchwrapper.LogWrapper log

INFO: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

Nov 04, 2013 3:37:41 PM net.minecraft.launchwrapper.LogWrapper log

INFO: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

Nov 04, 2013 3:37:41 PM net.minecraft.launchwrapper.LogWrapper log

INFO: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

2013-11-04 15:37:41 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.4.20.916 for Minecraft 1.6.4 loading

2013-11-04 15:37:41 [iNFO] [ForgeModLoader] Java is Java HotSpot 64-Bit Server VM, version 1.7.0_25, running on Windows 8:amd64:6.2, installed at C:\Program Files\Java\jre7

2013-11-04 15:37:41 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

2013-11-04 15:37:41 [iNFO] [sTDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg

2013-11-04 15:37:41 [iNFO] [sTDOUT] Loaded 109 rules from AccessTransformer config file forge_at.cfg

2013-11-04 15:37:41 [sEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!

2013-11-04 15:37:42 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

2013-11-04 15:37:42 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

2013-11-04 15:37:42 [iNFO] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main}

2013-11-04 15:37:43 [iNFO] [Minecraft-Client] Setting user: Player93

2013-11-04 15:37:43 [iNFO] [Minecraft-Client] (Session ID is null)

2013-11-04 15:37:44 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0

2013-11-04 15:37:44 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default

2013-11-04 15:37:45 [iNFO] [sTDOUT]

2013-11-04 15:37:45 [iNFO] [sTDOUT] Starting up SoundSystem...

2013-11-04 15:37:45 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization

2013-11-04 15:37:45 [iNFO] [sTDOUT] MinecraftForge v9.11.1.916 Initialized

2013-11-04 15:37:45 [iNFO] [ForgeModLoader] MinecraftForge v9.11.1.916 Initialized

2013-11-04 15:37:45 [iNFO] [sTDOUT] Replaced 101 ore recipies

2013-11-04 15:37:45 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization

2013-11-04 15:37:45 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2013-11-04 15:37:45 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2013-11-04 15:37:45 [iNFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Karl\Documents\MinecraftFolders\PersonalMods\Modding\mcp\jars\config\logging.properties

2013-11-04 15:37:45 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL

2013-11-04 15:37:45 [iNFO] [sTDOUT] OpenAL initialized.

2013-11-04 15:37:45 [iNFO] [ForgeModLoader] Searching C:\Users\Karl\Documents\MinecraftFolders\PersonalMods\Modding\mcp\jars\mods for mods

2013-11-04 15:37:45 [iNFO] [sTDOUT]

2013-11-04 15:37:47 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load

2013-11-04 15:37:47 [iNFO] [mcp] Activating mod mcp

2013-11-04 15:37:47 [iNFO] [FML] Activating mod FML

2013-11-04 15:37:47 [iNFO] [Forge] Activating mod Forge

2013-11-04 15:37:47 [iNFO] [generic] Activating mod generic

2013-11-04 15:37:47 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well

2013-11-04 15:37:47 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well

2013-11-04 15:37:47 [WARNING] [Generic] Mod Generic is missing a pack.mcmeta file, things may not work well

2013-11-04 15:37:47 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Generic

2013-11-04 15:37:47 [iNFO] [sTDOUT]

2013-11-04 15:37:47 [iNFO] [sTDOUT] SoundSystem shutting down...

2013-11-04 15:37:47 [iNFO] [sTDOUT]    Author: Paul Lamb, www.paulscode.com

2013-11-04 15:37:47 [iNFO] [sTDOUT]

2013-11-04 15:37:47 [iNFO] [sTDOUT]

2013-11-04 15:37:47 [iNFO] [sTDOUT] Starting up SoundSystem...

2013-11-04 15:37:47 [iNFO] [ForgeModLoader] Registering Forge Packet Handler

2013-11-04 15:37:47 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler

2013-11-04 15:37:47 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

2013-11-04 15:37:47 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2013-11-04 15:37:47 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2013-11-04 15:37:47 [iNFO] [sTDOUT] OpenAL initialized.

2013-11-04 15:37:48 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_500_genericDirt.png

2013-11-04 15:37:48 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_501_genericOre.png

2013-11-04 15:37:48 [iNFO] [sTDOUT]

2013-11-04 15:37:48 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: generic:textures/items/picturename.png

2013-11-04 15:37:48 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods

2013-11-04 15:37:48 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well

2013-11-04 15:37:48 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well

2013-11-04 15:37:48 [WARNING] [Generic] Mod Generic is missing a pack.mcmeta file, things may not work well

2013-11-04 15:37:48 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Generic

2013-11-04 15:37:48 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: generic:textures/items/picturename.png

2013-11-04 15:37:48 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_500_genericDirt.png

2013-11-04 15:37:48 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_501_genericOre.png

2013-11-04 15:37:49 [iNFO] [sTDOUT]

2013-11-04 15:37:49 [iNFO] [sTDOUT] SoundSystem shutting down...

2013-11-04 15:37:49 [iNFO] [sTDOUT]    Author: Paul Lamb, www.paulscode.com

2013-11-04 15:37:49 [iNFO] [sTDOUT]

2013-11-04 15:37:49 [iNFO] [sTDOUT]

2013-11-04 15:37:49 [iNFO] [sTDOUT] Starting up SoundSystem...

2013-11-04 15:37:49 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2013-11-04 15:37:49 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2013-11-04 15:37:49 [iNFO] [sTDOUT] OpenAL initialized.

2013-11-04 15:37:49 [iNFO] [sTDOUT]

2013-11-04 15:37:50 [sEVERE] [Minecraft-Client] Realms: Invalid session id

 

Link to comment
Share on other sites

2013-11-04 15:37:48 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: generic:textures/items/picturename.png

 

It can't find your texture.

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

Here is the code of the GenericItem class:

 

package tutorial.generic;

 

import net.minecraft.creativetab.CreativeTabs;

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

import net.minecraft.item.Item;

 

public class GenericItem extends Item {

 

        public GenericItem(int id) {

                super(id); 

                // Constructor Configuration

                maxStackSize = 64;

                setCreativeTab(CreativeTabs.tabMisc);

                setUnlocalizedName("genericItem");

                setTextureName("generic:picturename");

        }

 

}

Link to comment
Share on other sites

That is out of date.......

 

It's actually not.

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

The icons sections is as it doesnt use the setTextureName("generic:picturename"); function, it uses an older one which is no longer in use.

 

You know how a wiki works, right?

 

You can update the section yourself.

 

What's in that article still works even if there's a cleaner way of doing it in some situations.  As soon as someone needs two icons (say, logs), then setTextureName won't work and so the existing section would have to be added back again if it was removed.

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

As someone who is doing my first mod and am asking for help, I dont feel like im the most qualified to be updating the tutorial which I myself am using. When I tried doing what the article did I recieved an error, and some research later reveled that the method used is a bit outdated. Hopefully someone will update it but it will definitely not be me due to my inexperience.

Link to comment
Share on other sites

The rest of us aren't updating it because we don't realize that it is out of date.  Whereas you do, and then you figure out what the problem is, you're in the unique position of both having the answer and knowing that the tutorial needs to be changed.

 

I'd do it myself (now that I'm aware of the problem), but I don't have the time.

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

Well a small update. I have successfully managed to get the program to locate the textures, but now these errors have cropped up:

 

2013-11-05 19:11:47 [WARNING] [Generic] Mod Generic is missing a pack.mcmeta file, things may not work well

2013-11-05 19:11:47 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Generic

2013-11-05 19:11:47 [sEVERE] [Minecraft-Client] Unable to parse animation metadata from genericmod:textures/items/genericIngot.png: broken aspect ratio and not an animation

 

To fix the previous error I used this coding which was given to me by TheGreyGhost (also after doing some research I also found out why the texture was originally not being found):

 

public void registerIcons(IconRegister iconRegister)

        {

          itemIcon = iconRegister.registerIcon("genericmod:genericIngot");

        }

 

 

}

 

Can anyone shed some light on what this error means? Thanks in advance.

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Turning the Tables: My Journey to Reclaim Stolen Bitcoins with Expert Help. When my Bitcoin wallet was hacked and my entire cryptocurrency portfolio was stolen, I felt utterly devastated and hopeless. Having worked hard to build up my digital assets, the sudden loss was gut-wrenching. It felt like my financial future had been ripped away in an instant, leaving me overwhelmed by a sense of betrayal and despair. In my search for help, I discovered TECH CYBER FORCE Recovery, a renowned cybersecurity firm specializing in cryptocurrency recovery. I was met with professionalism and empathy from my first contact with them. The team demonstrated a steadfast commitment to helping me retrieve my stolen Bitcoins. They understood the emotional toll of my situation and approached my case with genuine concern. TECH CYBER FORCE Recovery swung into action immediately, leveraging its extensive expertise in blockchain forensics and hacker tracking techniques. Their process was meticulous. They analyzed my transaction history, followed the digital trail left by the hackers, and worked diligently to pinpoint the location of the stolen funds. I was impressed by their technical prowess; they employed advanced cryptographic methods and strategic negotiations with the perpetrators, all while keeping me informed about their progress. The recovery process was complex and fraught with challenges. However, the tenacity displayed by the team was truly awe-inspiring. They navigated cryptocurrency crime's murky and ever-evolving landscape with skill and determination. After a series of strategic moves, they managed to recover the majority of my Bitcoins successfully.  
    • I removed giacomos_hud, oculus, (dont know what you mean with iris), enhanced_boss_bars, epicfight and essential.  Server still doesnt want to boot. new logs after removing: https://pastebin.com/LuM2PFtN I dont quite understand the "server side" and "client side" difference..
    • There are client side only mods in your server files   Remove giacomos_hud, oculus, iris, enhanced_boss_bars and epicfight You can keep these mods in your client Maybe also remove essentials
    • Here is my Log with java 17: https://pastebin.com/RPdWSjwq
    • Been working on creating a server for this mod, but i keep getting this error over and over again.  I have tried updating/changing the Forge launcher, Removing/replacing the ops.json and whitelist.json folders, and removing certain mods. Crash report log: https://pastebin.com/Bu046cVq Debug.log https://pastebin.com/7hKm40ke Latest.log https://pastebin.com/nCRLUH3b any help would be great thanks!
  • Topics

×
×
  • Create New...

Important Information

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