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

it has worked for alot of people! :P if you actually followed it correctly!

 

Pretty sure Draco would have followed it correctly. He's one of the main guys who helps people on this subforum, so he knows his stuff ;)

 

It didn't work for me either, by the way. I'd love to see your source if I can? Maybe you're doing something differently to us anyway.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

  • Replies 90
  • Views 162.8k
  • Created
  • Last Reply

Top Posters In This Topic

I got it to work. Make sure your paths are lower case and that all decorations are in peeing.

I had SOLVED

 

In my case, the problem was the "modname" folder (DONT USE CAPS)

 

Before fix it

 

\minecraft\assets\RSImbued\textures\

 

After

 

\minecraft\assets\rsimbued\textures\

 

i continued using caps in the code

 

public void registerIcons(IconRegister par1IconRegister)

    {

        this.itemIcon = par1IconRegister.registerIcon("RSImbued:___");

              }

 

Perhaps some of those who have the problem can solve with this

 

I hope it will be helpful and sorry for my English level

Why do people call it a pahimar setup? I've been using it since long before he showed it to everyone ><

 

Then i don't know, if you read the readme that dinnerbone put in the assets folder inside of MCP it says that anything placed there will be deleted on start-up.

Hey can you help me on setting up the "pahimar" setup in 1.6.1? I dont which jars to import.

Hello, I still can not seem to get this to work for me... However, I did some debugging and found that the registerIcons method is not actually being called. (did a sysdout )  This probably explains why I wasn't even receiving the missing texture error in the console.  I'm fairly certain that my item(armor) was setup correctly because it does show up in the game with the pink and block icon.  The other thing is, that my armor textures are at least trying to load.  For the armor textures it tells me that it failed to load.  I have put the textures in /src/minecraft/assets/"mymodname"/textures/models/armor/myfile.png  I am unsure weather to call the texture by it's name or to use the way mine craft does it with the name_layer_1.png format. An help is appreciated, thank-you.

I should note that I've also tried:

 

mcp/src/assets/{modid}/textures/{block|item}/{name}.png

mcp/src/minecraft/{modid}/textures/{block|item}/{name}.png

mcp/src/{modid}/textures/{block|item}/{name}.png

mcp/jars/assets/{modid}/textures/{block|item}/{name}.png

mcp/jars/resourcepacks/{modid}/textures/{block|item}/{name}.png

mcp/jars/resourcepacks/assets/{modid}/textures/{block|item}/{name}.png

 

https://github.com/SuitedSlime/1.6-Forge-Mod

 

It works fine. Go ahead, download and compile it.

 

Unfortunately, your github is not set up in a way that those of us NOT using a Pahimar setup can actually use it.

 

I agree. It's all broken, and has to go back to the way it was in 1.5.2, where the "textures" directory

can sit right next to the top source directory along with paulscodes and ibxm and friends.

There is no reason for forge to be moving things around on us.

They are supposed to be SHIELDING us from the underlying changes, not exacerbating them.

Hello? Forge? Please put textures, sounds and such back the way it was.

It was working. Stop messing with it.

 

 

Odds are good I've been programming since before you were born. Yeah. I'm OLD school.

It seems that registerIcons only gets called if you register the block/item in preInit. What confuses me is what the string in the par1IconRegister.registerIcon() actually means. Is it supposed to be a path, the file names of the textures (if so, then why the colons) or something completely different. The reason im asking is that i am trying to apply different icons to different damage items, so if i add a +3 to Main.modid +":"+ this.getUnlocalizedName() will it load modidname3 ?

It seems that registerIcons only gets called if you register the block/item in preInit. What confuses me is what the string in the par1IconRegister.registerIcon() actually means. Is it supposed to be a path, the file names of the textures (if so, then why the colons) or something completely different. The reason im asking is that i am trying to apply different icons to different damage items, so if i add a +3 to Main.modid +":"+ this.getUnlocalizedName() will it load modidname3 ?

 

Do you mean the old:

@PreInit

public void preInit(...)

 

or the new:

 

@EventHandler

public void preInit(...)

Well, I guess it has to be @EventHandler now.  By Register do you mean initialize the variable?

Well this didn't work for me and other methods didn't too FOR HOURS, until I moved all my registering items into PreInit. I have spent all day and now it has worked.

 

I was only texturing items so ya.

This was my code in my items I used:

    public void registerIcons(IconRegister iconRegister)

    {

    this.itemIcon = iconRegister.registerIcon("AlchemistsRPG:elvenAxe");

    }

So...some tips:

In my forge\mcp\src\minecraft\assets, I had a folder named alchemistsrpg.

Make sure that your folder is lowercased. Don't make it named AlchemistsRPG.

However in your code, you can uppercase it. I believe someone posted this tip already.

Also, I think it is good to make sure that the folder is your modid.

 

Dunno if this will help. :P

-Vakar

 

Also, maybe try naming your .png file not like this:

ElvenAxe

You could try naming it:

elvenAxe

 

I'm not sure if it makes a difference, just another tip.

Oh! Oh! I can answer this one now! :)

 

Here's the hidden secret block tutorial that helped me figure it out...

http://www.minecraftforge.net/wiki/Basic_Modding

 

There appear to be a number of key elements here:

1) Everything is initialized in the preInit() function, which now has a qualifier (or whatever you call it)

of @EventHandler. Look at the wiki main mod example.

 

2) Blocks/items are generally declared like

MyFireFish = (new ItemFireFish(BaseBlockID + OreSpawnConstants.FireFishBlockID, 4, 0.6F, false).setUnlocalizedName("firefish"));

The .setUnlocalizedName part is critical. It MUST be the name of your png file, without the .png,

and nothing in front.

 

3) In your item/block class, you now need to add the following magic incantation:

    @Override

    @SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister) {

        this.itemIcon = iconRegister.registerIcon("OreSpawn:" + (this.getUnlocalizedName().substring(5)));

    }

Except that instead of "OreSpawn" use your mod name (case doesn't matter here).

Why substring(5)? I don't know. I don't care. It works.

Yes, you need the ":" after your mod name too.

 

And lastly...

The directory that firefish.png ends up

....forge/mcp/src/minecraft/assets/orespawn/textures/items/firefish.png

 

The important things to notice in the above, is that you need to create this directory tree exactly as is,

from "assets" on down, except that you use your mod name (all lowercase) instead of "orespawn",

which is my mod.

 

Refer to the wiki page referenced above. It was small, simple, and easy to understand.

 

Now, If I can just figure out why my entities won't move... sigh...

 

 

Hope this helped!

 

Odds are good I've been programming since before you were born. Yeah. I'm OLD school.

For some god-aweful reason

 

this.getUnlocalizedName()

 

would return the Unlocalized name except it would incert

tile.

right before it:

textures/blocks/tile.tutorialblock.png

So I cant use it to easily get item names. What do I do??

 

	public void registerIcons(IconRegister reg){
	this.blockIcon = reg.registerIcon(Tutorial.modID + ":" + this.getUnlocalizedName());
}

 

replacing this.getUnlocalizedName() with the direct name of the png file works (after 1 hour wondering why the texture wouldent load) but id like to use setUnlocalizedName when naming my pngs so using that in the icon register seems natural if it went for the tile. crap :/ ?

 

To get rid of the tile. before the picture file, that's where the substring(5) is for.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Oh! Oh! I can answer this one now! :)

 

Here's the hidden secret block tutorial that helped me figure it out...

http://www.minecraftforge.net/wiki/Basic_Modding

 

There appear to be a number of key elements here:

1) Everything is initialized in the preInit() function, which now has a qualifier (or whatever you call it)

of @EventHandler. Look at the wiki main mod example.

 

2) Blocks/items are generally declared like

MyFireFish = (new ItemFireFish(BaseBlockID + OreSpawnConstants.FireFishBlockID, 4, 0.6F, false).setUnlocalizedName("firefish"));

The .setUnlocalizedName part is critical. It MUST be the name of your png file, without the .png,

and nothing in front.

 

3) In your item/block class, you now need to add the following magic incantation:

    @Override

    @SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister) {

        this.itemIcon = iconRegister.registerIcon("OreSpawn:" + (this.getUnlocalizedName().substring(5)));

    }

Except that instead of "OreSpawn" use your mod name (case doesn't matter here).

Why substring(5)? I don't know. I don't care. It works.

Yes, you need the ":" after your mod name too.

 

And lastly...

The directory that firefish.png ends up

....forge/mcp/src/minecraft/assets/orespawn/textures/items/firefish.png

 

The important things to notice in the above, is that you need to create this directory tree exactly as is,

from "assets" on down, except that you use your mod name (all lowercase) instead of "orespawn",

which is my mod.

 

Refer to the wiki page referenced above. It was small, simple, and easy to understand.

 

Now, If I can just figure out why my entities won't move... sigh...

 

 

Hope this helped!

 

 

I am glad I updated that to 1.6.1! It saw that people were having trouble so I updated a few things to 1.6.1 xD

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

For some god-aweful reason

 

this.getUnlocalizedName()

 

would return the Unlocalized name except it would incert

tile.

right before it:

textures/blocks/tile.tutorialblock.png

So I cant use it to easily get item names. What do I do??

 

	public void registerIcons(IconRegister reg){
	this.blockIcon = reg.registerIcon(Tutorial.modID + ":" + this.getUnlocalizedName());
}

 

replacing this.getUnlocalizedName() with the direct name of the png file works (after 1 hour wondering why the texture wouldent load) but id like to use setUnlocalizedName when naming my pngs so using that in the icon register seems natural if it went for the tile. crap :/ ?

You can use .substring(5) :

	public void registerIcons(IconRegister reg){
	this.blockIcon = reg.registerIcon(Tutorial.modID + ":" + this.getUnlocalizedName().substring(5));
}

substring(5) will ignore the first 5 characters, so you'll have no problem with this "tile."

 

Why are you guys dealing with the 'unlocalizedName' and substring shit anyways?

See Block.func_111023_E and Item.func_111208_A along with associated functions/fields

They exist for a reason -.-

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Why are you guys dealing with the 'unlocalizedName' and substring shit anyways?

See Block.func_111023_E and Item.func_111208_A along with associated functions/fields

They exist for a reason -.-

 

Because they're 'unnamed', which implies that we shouldn't use them.

I try to stick to functions that have been renamed into something resembling what they do.

In some cases that's not possible, of course, like func_110143_aJ(), which should

be getEntityHealth().

 

 

 

Odds are good I've been programming since before you were born. Yeah. I'm OLD school.

So what are we supposed to use to call textures now, as im using:

 

itemIcon = iconRegister.registerIcon(Reference.MOD_ID.toLowerCase() + ":" + "stonemallet");

 

And when I start Eclipse up the only error flagging is:

 

[sEVERE] [Minecraft-Client] Using missing texture, unable to load: blocksnmore:textures/items/stonemallet.png

 

But when I am in game the texture is loaded O_o so im confused if I have done something wrong or using an old code to call textures and my item is being loaded during the "preInit" phaze which I believe is the right area to load items/blocks.

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.