Jump to content

Recommended Posts

Posted

I feel like an idiot asking such a mundane question, especially since I've done it countless times before, but maybe I'm just blind and someone here can help me out.

I made and registred models (and textures) for my items, but only one texture shows up on one item, and it's even the wrong texture:

 

The items are all new instances of the same Class, but I don't see how that would cause a problem.

The Item registration:

	public static Item tier1;
	public static Item tier2;
	public static Item tier3;
	public static Item tier4;
	public static Item tier5;

	private static List<Item> items = new ArrayList<Item>();
	
	public static void registerItems()
	{
		items.add(tier1 = new BuildersBagItem(1, "one"));
		items.add(tier2 = new BuildersBagItem(2, "two"));
		items.add(tier3 = new BuildersBagItem(3, "three"));
		items.add(tier4 = new BuildersBagItem(4, "four"));
		items.add(tier5 = new BuildersBagItem(5, "five"));
	}

 

I call registerItems during preInit, as you'd expect.

 

Then I call this from my client side, also during preInit, after Item registration:

	public static void regItemRenders()
	{
		register(RegistryHandler.tier1);
		register(RegistryHandler.tier2);
		register(RegistryHandler.tier3);
		register(RegistryHandler.tier4);
		register(RegistryHandler.tier5);
	}
	
	
	public static void register(Item item)
	{
		System.out.println("Registering model for " + item.getRegistryName());
		ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
	}

The debug output gets printed, I've checked. Also there are no model errors being printed.

My model folder looks like this:

50425b5515a2f8924e09343b48e94b99.png

 

Now, what's interesting is: Only the first item gets a texture ingame. Interestingly enough, it is the texture of the tier 5 item, not the tier 1 (as it should be).

If I uncomment the registration of the tier 5 item, it gets the texture of the tier 4 item instead.

Only the first uncommented item gets a texture. The others don't even get the "missing model" model (the one with the registred name as text).

It's almost as if the texture gets overwritten and only applied on the first item.

I am utterly confused, I have never encountered this.

Can someone help me with this situation?

 

 

Posted (edited)

Oh crap, this is gonna get locked because 1.12 isn't supported, isn't it? Well, if anyone sees this and knows the answer, I'd also appreciate a PM

Edited by Tschipp
Posted

1.12 is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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