Jump to content

[1.8] ₪ Trouble with item rendering


Scrapnix

Recommended Posts

Hey,

I`m a newbie at Forge modding and I wanted to make my first mod with an first item.

It`s registered and it is displayed all the time with the right name,

but ingame it has only the black-pink texture.

The problem is the item rendering:

 

The json file for my first item is located at assets.scraputils.models.item.lavaingot.json and the content is:

{
"parent": "builtin/generated",
"textures": {
"layer0": "scraputil:items/lavaingot"
},
"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 ]
}
}
}

 

The texture layer0 is located at assets.scraputils.textures.item.lavaingot.png

 

My ItemRenderRegisterer looks like this:

package com.Scrap.scraputils.client.render.items;

import com.Scrap.scraputils.Main;
import com.Scrap.scraputils.item.ModItems;

import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;

public final class ItemRenderRegister {
public static String modid = Main.MODID;
    public static void registerItemRenderer() {
    	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ModItems.LavaIngot, 0, new ModelResourceLocation("scraputils:lavaingot", "inventory"));    
        reg(ModItems.LavaIngot);
    }

    public static void reg(Item item) {
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(modid + ":" + item.getUnlocalizedName().substring(5), "inventory"));
    }
}

 

Please help me,

Scrapnix

Link to comment
Share on other sites

Hey,

at first, thanks to you for your post,

but I made all like you said and nothing changed :(

I don`t know whats wrong in it.

Every tutorial explains other whises to register Models...

Do you know where I can learn mod coding on the right way?

I`ll give my mod a second try and after that we will see...

 

PS: You`re German? If you want to you can add me in Skype or give me your Skype name, because I`m searching for good coders which can help me. Skype: @battlemac182

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • can we have a example of that for item    inever could make it work for item  for blocks i got this  
    • When opening I am directed to a log called ´´forge-1.20.1-47.2.20-installer.jar.log´´ below the following error is written: JVM info: Oracle Corporation - 21.0.2 - 21.0.2+13- LTS-58 java.net.preferIPv4Stack=true Current Time: 02/27/2024 16:58:33 Host: files.minecraftforge.net [51.79.83.165] Host: maven.minecraftforge.net [51.79.83.165] Host: libraries.minecraft.net [13.107.246.33, 13.107.213.33] Host: launchermeta.mojang.com [13.107.246.33, 13.107.213.33] Host: piston-meta.mojang.com [13.107.246.33, 13.107.213.33] java.net.UnknownHostException: This host is not known (authserver.mojang.com) at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1818) at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1688) at net.minecraftforge.installer.DownloadUtils.getIps(DownloadUtils.java:290) at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:120) Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "net.minecraftforge.installer.DownloadUtils.getIps(String)" is null at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:120)
    • I have downloaded forge version 1.20.4 and I have Java 17 installed but my .jar will not open and the error log text file below is created     JVM info: Oracle Corporation - 17.0.10 - 17.0.10+11-LTS-240 java.net.preferIPv4Stack=true Current Time: 27/02/2024 19:43:19 Host: files.minecraftforge.net [51.79.83.165, 2607:5300:203:65a5:0:0:0:0] Host: maven.minecraftforge.net [51.79.83.165, 2607:5300:203:65a5:0:0:0:0] Host: libraries.minecraft.net [13.107.246.64, 13.107.213.64, 2620:1ec:46:0:0:0:0:64, 2620:1ec:bdf:0:0:0:0:64] Host: launchermeta.mojang.com [13.107.213.64, 13.107.246.64, 2620:1ec:bdf:0:0:0:0:64, 2620:1ec:46:0:0:0:0:64] Host: piston-meta.mojang.com [13.107.213.64, 13.107.246.64, 2620:1ec:46:0:0:0:0:64, 2620:1ec:bdf:0:0:0:0:64] java.net.UnknownHostException: No such host is known (authserver.mojang.com)     at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)     at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:933)     at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1543)     at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852)     at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1532)     at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1384)     at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1305)     at net.minecraftforge.installer.DownloadUtils.getIps(DownloadUtils.java:290)     at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:120) Exception in thread "main"  java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "net.minecraftforge.installer.DownloadUtils.getIps(String)" is null     at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:120)  
    • we tried both versions and both cant run on her laptop for some reason idk what to do  
    • Okay so we tried both versions and both cant run on her pc for some reason!  
  • Topics

×
×
  • Create New...

Important Information

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