Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.12.2[ Texture error


Stenbergcsgo
 Share

Recommended Posts

Hey, I've managed to create following project:

J3WJsqj.png

By following Loremaster's tutorials. I'm currently at the "create a custom item" phase, but my items get texture errors:

12:27:42] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[12:27:42] [main/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[12:27:42] [main/ERROR] [TEXTURE ERRORS]: ==================================================
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:   DOMAIN um
[12:27:42] [main/ERROR] [TEXTURE ERRORS]: --------------------------------------------------
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:   domain um is missing 2 textures
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:     domain um has 1 location:
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:       mod um resources at C:\Users\Frederik\Desktop\WorkspaceUno\Mod\bin
[12:27:42] [main/ERROR] [TEXTURE ERRORS]: -------------------------
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:     The missing resources for domain um are:
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:       textures/items/schematic_sign.png.png
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:       textures/items/paste.png.png
[12:27:42] [main/ERROR] [TEXTURE ERRORS]: -------------------------
[12:27:42] [main/ERROR] [TEXTURE ERRORS]:     No other errors exist for domain um
[12:27:42] [main/ERROR] [TEXTURE ERRORS]: ==================================================

As the error suggest I do believe it might be path or name related, but after triple-checking it seems like it's either not that, or I've stared myself blind. I checked the MOD_ID and it is properly put to "um", and all the naming seem to be as it should. Are there any other reasons this could happen? Hopefully someone can spot something, thank you =)

Link to comment
Share on other sites

1) 

textures/items/schematic_sign.png.png

has two file endings, is this intended?

 

2) You shouldn't add file endings to your json files (don't know if your doing this, the forge log could just be being specific)

 

3)are you prefixing your texture locations with <MODID>:<PATH>

for example my mod's id is wiptech

{
    "parent": "item/generated",
    "textures": {
        "layer0": "wiptech:items/copper_ingot"
    },
    "display": {
        "thirdperson": {
            "rotation": [-90,0,0],
            "translation": [0,1,-3],
            "scale": [0.55,0.55,0.55]
        },
        "firstperson": {
            "rotation": [0,-135,25],
            "translation": [0,4,2],
            "scale": [1.7,1.7,1.7]
        }
    }
}

 

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

If that doesn't fix the problem, please post In-game screenshots, the contents of paste.json and your item registration and model registration code 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

More project info

IGN Image:

MjFPeW9.png

 

RegistryHandler.java:

package com.mta.utzonmod.util.handlers;

import com.mta.utzonmod.init.ModItems;
import com.mta.utzonmod.util.IHasModel;

import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@EventBusSubscriber
public class RegistryHandler {
	@SubscribeEvent
	public static void onItemRegister(RegistryEvent.Register<Item> event) {
		event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0]));
	}
	
	@SubscribeEvent
	public static void onModelRegister(ModelRegistryEvent event) {
		for(Item item : ModItems.ITEMS) {
			if(item instanceof IHasModel) {
				((IHasModel)item).registerModels();
			}
		}
	}
}

 

IHasModel.java:

package com.mta.utzonmod.util;

public interface IHasModel {
	public void registerModels();
}

 

Link to comment
Share on other sites

2 minutes ago, Stenbergcsgo said:

((IHasModel)item).registerModels();

 

2 minutes ago, Stenbergcsgo said:

registerModels();

and this does... what?

please post that code

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

This is how I do it

 

@SubscribeEvent
public static void registerModels(ModelRegistryEvent event)
	{
		for (Block block: Blocks.BLOCKS)
		{
			ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
		}

		for (Item item: Items.ITEMS)
		{
			if(!item.getHasSubtypes()) {
				ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
			} else {
              //register items with subtypes
            }
        }
}

 

Blocks is a Block[] with all my blocks in it and Items is an Item[] with all my items in it

 

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Code from ItemBase.java overriding the registerModels() function from the IHasModel interface:

package com.mta.utzonmod.items;

import com.mta.utzonmod.Main;
import com.mta.utzonmod.init.ModItems;
import com.mta.utzonmod.util.IHasModel;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class ItemBase extends Item implements IHasModel {

	public ItemBase(String name) {
		setUnlocalizedName(name);
		setRegistryName(name);
		setCreativeTab(CreativeTabs.MISC);
		
		ModItems.ITEMS.add(this);
	}
	
	@Override
	public void registerModels() {
		
		Main.proxy.registerItemRenderer(this, 0, "inventory");
		
	}
	
}

 

Link to comment
Share on other sites

6 minutes ago, Stenbergcsgo said:

Main.proxy.registerItemRenderer(this, 0, "inventory");

this code?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Oh no, they register stuff inside the item class...

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

ItemBase.java

package com.mta.utzonmod.item;
import com.mta.utzonmod.Reference;
import net.minecraft.item.Item;
public class ItemBase extends Item
{
    
    public ItemBase(String name)
    {
        super();
        
        this.setRegistryName(Reference.ID, name);
        this.setUnlocalizedName(name);
    }
      
}

 

ItemPaste.java

package com.mta.utzonmod.item;

public class ItemPaste extends ItemBase
{
	public ItemPaste(String name)
	{
		super(name);
	}
}

 

ModItems.java

package com.mta.utzonmod.init;

import com.mta.utzonmod.item.ItemPaste;
import net.minecraft.item.Item;

public class ModItems {
  public static final ItemPaste PASTE = new ItemPaste("paste");
  
  public static final Item[] ITEMS = {
    PASTE,
  };
  
}

 

Client Registry Class (Client Proxy or similar)

 

@Mod.EventBusSubscriber
public class CLIENT_PROXY_CLASS extends COMMON_PROXY_CLASS_OR_SIMILAR
{
  @SubscribeEvent
    public static void registerModels(ModelRegistryEvent event)
  {
    for (Item item: Items.ITEMS)
    {
      if(!item.getHasSubtypes()) {
        ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
      } else {
        //do stuff
      }
    }
  }
}

 

Edited by Cadiboo
Cleaned up code

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

7 minutes ago, Stenbergcsgo said:

Is that bad?

I'm not sure if its actually that bad, but I know that it leads to less clean code and lots of copy/pasted & repetitive code

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

package com.mta.utzonmod.item;

public class ItemPaste extends ItemBase
{
	public ItemPaste(String name)
	{
		super(name);
	}
}

 

package com.mta.utzonmod.item;

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Thanks for your code suggestion, I tried to converting to that, but I am now getting a few errors:

ClientProxy.java:

package com.mta.utzonmod.proxy;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@Mod.EventBusSubscriber
public class ClientProxy extends CommonProxy {
	@SubscribeEvent
	public static void registerModels(ModelRegistryEvent event)
	{
		for (Item item: Items.ITEMS)
		{
			if(!item.getHasSubtypes()) {
				ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
			} else {
//do stuff
}
}
}
}

Error: 

ITEMS can not be resolved or is not a field

 

and my RegistryHandler.java:

package com.mta.utzonmod.util.handlers;

import com.mta.utzonmod.init.ModItems;
import com.mta.utzonmod.util.IHasModel;

import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@EventBusSubscriber
public class RegistryHandler {
	@SubscribeEvent
	public static void onItemRegister(RegistryEvent.Register<Item> event) {
		event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0]));
	}
	
	@SubscribeEvent
	public static void onModelRegister(ModelRegistryEvent event) {
		for(Item item : ModItems.ITEMS) {
			if(item instanceof IHasModel) {
				((IHasModel)item).registerModels();
			}
		}
	}
}

Where I get the error: 

Cannot invoke toArray(Item[]) on the array type Item[]

 

Link to comment
Share on other sites

5 minutes ago, Stenbergcsgo said:

@SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : ModItems.ITEMS) { if(item instanceof IHasModel) { ((IHasModel)item).registerModels(); } } }

Remove this from RegistryHandleer

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

@Mod.EventBusSubscriber
public class COMMON_PROXY_OR_SIMILAR {
  @SubscribeEvent
    public static void registerItems(RegistryEvent.Register<Item> event)
  {	
    event.getRegistry().registerAll(Items.ITEMS);
  }
}

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Please keep in mind that all of this is how I do it, It might not be the best way, but it looks clean and I can't find any problems with it.

 

For me, my common proxy is a mix of RegistryHandler and Common Proxy, and my Client Proxy is pretty much only used for registering models and renders etc

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

My classes are currently as such:

ClientProxy.java:
 

package com.mta.utzonmod.proxy;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@Mod.EventBusSubscriber
public class ClientProxy extends CommonProxy {
	@SubscribeEvent
    public static void registerItems(RegistryEvent.Register<Item> event)
  {	
    event.getRegistry().registerAll(Items.ITEMS);
  }
}

and RegistryHandler.java:
 

package com.mta.utzonmod.util.handlers;

import com.mta.utzonmod.init.ModItems;
import com.mta.utzonmod.util.IHasModel;

import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@EventBusSubscriber
public class RegistryHandler {
	@SubscribeEvent
	public static void onItemRegister(RegistryEvent.Register<Item> event) {
		event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0]));
	}
}

however with same errors

Link to comment
Share on other sites

4 minutes ago, Stenbergcsgo said:

event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0]));

WHY WHY WHY

NO NO NO

should have seen this earlier

This fails so many ways

1) apparently cant event turn ModItems.ITEMS into an array

maybe because it has to be used like this ModItems.ITEMS.toArray() with nothing inside the ()

2) No idea what it would try to do with (new Item[0]), but it would fail absolutely horribly and fatally.

Do you know java or any other Object Oriented language? if so you will know that toArray(new Item[0]) is completely non-sensical and guaranteed to crash everything

 

event.getRegistry().registerAll(ModItems.ITEMS);

 

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

 Share




  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hello There! We are back today with some more Super Craft Bros and this time it's spooky edition! I just want to clarify there is nothing spooky about this it's just us in Halloween skins playing spooky themed maps. There are some pretty funny moments in this video that I know you guys are gonna love! I hope you all enjoy this video and if you did please consider subscribing and while you are at it give the video a like!  
    • Can you send the debug file from the logs folder?
    • So I'm making a custom container but I get the following error when I right click the block [20:28:58] [Render thread/WARN]: Failed to create screen for menu type: ewanmod:rune_pedestal code is here: https://pastebin.com/6g0E2p93
    • I have been following every solution I can from other threads, but nothing has seemed to work so far. My graphics card is a GTX 1650 as well, if that's the problem.  Here is my Launcher Log: https://pastebin.com/0EduJiS9 And here is the report from the 'latest' file in the logs: https://pastebin.com/CsiVmhWS Any sort of help would be much obliged 
    • Ok so what am I supposed to do cause for now there isn't any mod but I'm gonna add mods on the server when it's gonna work. I removed all the mods on my side and on the server and it didn't worked. Maybe my server.properties isn't correct ? #Minecraft server properties #Thu Oct 21 18:17:44 EDT 2021 spawn-protection=16 max-tick-time=60000 query.port=25565 generator-settings= sync-chunk-writes=true force-gamemode=false allow-nether=true enforce-whitelist=false gamemode=survival broadcast-console-to-ops=true enable-query=false player-idle-timeout=0 text-filtering-config= difficulty=easy spawn-monsters=true broadcast-rcon-to-ops=true op-permission-level=4 pvp=true entity-broadcast-range-percentage=100 snooper-enabled=true allow-cheats=true level-type=biomesop hardcore=false enable-status=true enable-command-block=true max-players=20 network-compression-threshold=256 resource-pack-sha1= max-world-size=29999984 function-permission-level=4 rcon.port=25575 server-port=25565 server-ip= spawn-npcs=true allow-flight=false level-name=Serveur view-distance=10 resource-pack= spawn-animals=true white-list=false rcon.password= generate-structures=true max-build-height=256 online-mode=true level-seed= prevent-proxy-connections=false use-native-transport=true enable-jmx-monitoring=false enable-rcon=false rate-limit=0 motd=Bienvenue dans le serveur de PatateDouce45
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.