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

Hi!

I started to update my mod from 1.7.10 to shi* 1.11.2 and got a tons of problems. Ok, I solved most of them except one: I have JSONs, located in resources/assets/*modid*/models/item and they work fine. But my textures, that located in resources/assets/*modid*/textures/items wont work if they also not located in java/assets/*modid*/textures/items. WTF?

  • Author

OK.

 

ZMDItems:

 

 

public class ZMDItems 
{
public static Item zombieBrain;


public static void itemRegistry()
{
	initItems();
}

private static void initItems()
{
	zombieBrain = registerItem(new ZMDItem("zombie_brain").setCreativeTab(CreativeTabs.MISC));	
}

private static <T extends Item> T registerItem(T item) 
{
	GameRegistry.register(item);

	if(item instanceof IItemRender)
	{
		((IItemRender)item).registerItemRender(item);
	}

	return item;
}
}

 

 

 

ZMDItem:

 

 

public class ZMDItem extends Item implements IItemRender
{
protected String itemName;

public ZMDItem(String name)
{
	this.itemName = name;
	this.setUnlocalizedName(name);
	this.setRegistryName(name);
}

public void registerItemRender(Item item) 
{
	MainRegistry.zmdProxy.registerItemRender(this, 0, itemName);
}
}

 

 

 

IItemRender:

 

 

public interface IItemRender
{
public void registerItemRender(Item item);
}

 

 

 

CommonProxy:

 

 

public class CommonProxy 
{
public void preInit(FMLPreInitializationEvent event)
{
	ZMDItems.itemRegistry();
	ZMDEntities.entityRegistry();
}

public void init(FMLInitializationEvent event)
{

}

public void postInit(FMLPostInitializationEvent event)
{

}

public void registerItemRender(Item item, int meta, String resource) {}
}

...

Also registerItemRender() method in ClientProxy (extends CommonProxy):

@Override
public void registerItemRender(Item item, int metadata, String model)
{
ModelLoader.setCustomModelResourceLocation(item, metadata, new ModelResourceLocation(RefStrings.MODID + ":" + model, "inventory"));
}

 

 

 

My folders structure:

 

 

scr - main - resources - assets - project_zmd - lang - en_US.lang

scr - main - resources - assets - project_zmd - models - item - zombie_brain.JSON

scr - main - resources - assets - project_zmd - textures - items - zombie_brain.png

 

Textures wont work, but if I'll put assets folder to main/java, it will work :/

 

 

 

And error log:

 

 

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]:  DOMAIN project_zmd

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: --------------------------------------------------

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]:  domain project_zmd is missing 3 textures

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]:    domain project_zmd has 1 location:

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]:      unknown resourcepack type net.minecraft.client.resources.LegacyV2Adapter : FMLFileResourcePack:ProjectZMD

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]:    The missing resources for domain project_zmd are:

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]:      textures/items/zombie_brain.png

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]:    No other errors exist for domain project_zmd

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================

[18:45:42] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

 

 

  • Author

Yes. I also noticed that lang files and JSONs does not work too :( And I tested again: at first I copied assets folder to java folder. All working fine. Then I deleted resources/assets folder and again errors. Resources are working only if they're located in BOTH folders :/

P.S. I had the same problem in 1.10.2.

  • Author

Oh lol somehow I fixed it.

I copied assets to bin folder.

And again errors after restart. I really don't understand wtf is this...

  • Author

I got this warning now:

 

 

ad97a20bc5714c93ac1f93f29c9183e5.png

 

 

Resources from resources folder wont copy to output folder.

  • Author

O

M

G

Java, r u serious?! Windows explorer automatically renames x.json to x.JSON and resources won't work. I renamed it with Total Commander and now all works fine...

Windows explorer automatically renames x.json to x.JSON

 

No, it just treats them as identical. To change x.JSON to x.json you first have to change it to x.notjson so that it thinks that it actually changed.

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.

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.