Jump to content

[1.7.10] [SOLVED] Wool clone (block with metadata) not using textures provided


Recommended Posts

Posted

Hello!

So I'm trying to create, basically, a clone of wool. I'm basing it mostly off of these tutorials:

 

 

Though I only want three colors for the block.

However, though the textures are compiling properly, I can't get the block to actually utilize them. They simply have the whole "missing texture" butt-ugly checkerboard.

Code:

  Reveal hidden contents

 

Since the block's textureName is "multiBlock" and the icons are registered as this.textureName + "_" + index, I assumed the texture files would be named multiBlock_1, multiBlock_2, etc. But the files, while not being counted as missing in the launcher, are not being put on the blocks.

Thanks!

Posted

Do you ever call setTextureName() ?

Did you include the error log worth your post?

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.

Posted

1.

	public static final Block multiBlock = new MultiBlock("multiblock", Material.cloth)
		.setHardness(0.1F).setStepSound(Block.soundTypeCloth)
		.setBlockName("multiBlock").setCreativeTab(CreativeTabs.tabBlock)
		.setBlockTextureName("genericmod:multiBlock");

GameRegistry.registerBlock(multiBlock, ItemBlockMultiBlock.class, "multiblock");

TL;DR: Block texture name is set to "genericmod:multiBlock".

2. There's no error as far as I can tell; it simply doesn't load the textures. I'm pretty sure I'm not referring to the files correctly, but I'm not sure in what way.

Posted

For starters: Go back to your OP and replace [Help] with [version]. Every post in this forum is supposed to be help. However, little help can be offered unless the version is known.

 

Second: Show as much code as possible. Often, the problem is a little beyond what you thought was relevant (or else you would have seen it yourself).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted
  On 2/23/2016 at 12:05 AM, SM68 said:

2. There's no error as far as I can tell; it simply doesn't load the textures. I'm pretty sure I'm not referring to the files correctly, but I'm not sure in what way.

 

It might not crash but the log will contain a message that it could not find a 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.

Posted

Right: The file log will contain more messages than the console output.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

I searched fml-client-latest.log for "missing" using Notepad++ and found:

 

  Reveal hidden contents

 

The top two lines occurred because I realized I had registered it as "metablock" rather than "multiblock" and changed it, then entered the same world I was already using, causing Forge to get on my case because that block was now missing - that doesn't matter as far as I can tell. Fixing the name didn't work, though - it still won't map the textures on.

All other results for "missing" were telling me that

[FML/]: The mod container forge-1.7.10-10.13.4.1517-1.7.10.jar appears to be missing an mcmod.info file

or some similar line, or

[17:01:12] [Client thread/DEBUG] [Forge Mod Loader/]: Mod Forge Mod Loader is missing a pack.mcmeta file, substituting a dummy one

or some similar line.

 

Full MultiBlock.class and MultiBlockItemBlock.class:

 

  Reveal hidden contents

 

Launcher log, in case it happens to be relevant:

 

  Reveal hidden contents

 

EDIT: Full error log:

 

  Reveal hidden contents

 

EDIT AGAIN: Searching the latest log for "texture" returned 24 results:

 

  Reveal hidden contents

 

Posted

So I found out why it wasn't working.

public IIcon getIcon(int meta)
{
	if (meta > 2)
		meta = 0;
	return this.icons[meta];
}

See if you can spot the problem. Answer:

 

  Reveal hidden contents

 

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.