Jump to content

Recommended Posts

Posted

https://github.com/Squishling/Test-Mod

 

Hi.  I am Squishling.

I am having trouble with my first item's model rendering.  I have tried everything that I have found online, but no luck.

 

Goal: To have an item rendered with a texture.

Status: Black & purple cube.

 

I have included a link to my code (At the top) and my console output (below).

 

  Reveal hidden contents

 

Thanks in advance,

~ Squishling

Posted

You need to use the registry events. Models need to be registered (exactly as you have) but in the ModelRegistryEvent

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.

Posted (edited)
  On 10/15/2017 at 7:46 PM, Draco18s said:

You need to use the registry events. Models need to be registered (exactly as you have) but in the ModelRegistryEvent

Expand  

Thanks.  Will try this tomorrow (in ~20 hrs).  This sounds like a very logical soloution. :)

 

EDIT: I tried it now, and I still have the same problem.  Code used:

    package co.uk.squishling.TestMod.registry;

    import co.uk.squishling.TestMod.init.ModItems;
    import net.minecraftforge.client.event.ModelRegistryEvent;
    import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

    @EventBusSubscriber

    public class ModelRegistry {
        @SubscribeEvent    
        public void register(ModelRegistryEvent event) {
            ModItems.registerRenders();
        }
    }

 

Edited by Squishling
Code edit
Posted

Your method needs to be static.

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.

Posted (edited)

@Draco18s sorry to be a nag, but now it is displaying as the text

  Quote

stestmod:packet#inventor

y

Expand  

Over a black and pink box.

I think it might be something to do with it not loading my model file?

 

EDIT: This is my model file:

    {

        "parent": "item/generated",

        "textures": {

            "layer0": "stestmod:items/packet"

        }

    }

Edited by Squishling
Edit
Posted

@Jay Avery The console log?

  Reveal hidden contents

 

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.