Jump to content

Recommended Posts

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?

Posted

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]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

 

 

Posted

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.

Posted

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

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