Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

hey guys,

 

im very new to this whole mod making thing and one of the things i cant get to work now is my texture to load. i set the class up correctly and i have set up the main modding class and registered the item in game.

 

main modding class:

 

package com.farmers.farmersdream;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.init.Blocks;

import cpw.mods.fml.common.Mod;

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

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

import cpw.mods.fml.common.ModMetadata;

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

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

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

 

@Mod(modid = FarmersDream.MODID, version = FarmersDream.VERSION)

public class FarmersDream

{

    public static final String MODID = "FarmersDream";

    public static final String VERSION = "1.0";

   

    @Metadata

    public static ModMetadata meta;

   

    public static Block citrineOre;

   

    int citrineOreID = 500;

   

    @EventHandler

    public void init(FMLPreInitializationEvent event)

    {

citrineOre = new citrineOre(citrineOreID, Material.rock).setHardness(1.5F).setBlockName("citrineOre");

 

GameRegistry.registerBlock(citrineOre, "citrineOre");

    }

}

 

Ore Class

 

package com.farmers.farmersdream;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

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

import net.minecraft.creativetab.CreativeTabs;

 

public class citrineOre extends Block {

 

public citrineOre(int id, Material mat){

super(mat);

this.setCreativeTab(CreativeTabs.tabBlock);

}

 

@Override

public void registerBlockIcons(IIconRegister p_149651_1_)

    {

        this.blockIcon = p_149651_1_.registerIcon("citrine:citrineOre");

    }

 

}

 

the error i keep getting is this

 

[18:45:50] [Client thread/ERROR]: Using missing texture, unable to load farmersdream:textures/blocks/citrineOre.png

java.io.FileNotFoundException: farmersdream:textures/blocks/citrineOre.png

at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]

at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]

at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]

at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]

at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:626) [Minecraft.class:?]

at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:585) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

 

 

Any ideas as to whats wrong???

 

please let me know

 

AncientBone

 

In your registerBlockIcons you are doing:

this.blockIcon = p_149651_1_.registerIcon("citrine:citrineOre");

 

its supposed to be:

this.blockIcon = p_149651_1_.registerIcon("FarmersDream:citrineOre");

 

in the register icon function, you have to do your MODID and the texture name. Also make sure it's in the correct location.

The proud(ish) developer of Ancients

Also, be very careful with capitalisation.  It can lead to all sorts of subtle problems because some methods are case-sensitive and others aren't.  What's worse, if you're using GitHub it can be rather painful to change the capitalisation of files and folders once you've comitted them.

 

I would suggest changing your MODID to "farmersdream" instead of "FarmersDream"

 

-TGG

  • Author

thanks to both of you guys.

 

i did what both of you guys said and changed it. i use eclipse so it wasnt hard to change a few names around. also the texture is showing up now.

 

thanks a bunch guys.

 

- AncientBone

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.