Jump to content

Recommended Posts

Posted

So, I finally started making a 1.12 mod, but when I tried to create an item (copper ingot because I wanted it to work before I changed anything I didn't have to from my tutorial, which by the way doesn't have any way to ask for help) it doesn't show up. At all. It's probably some stupid mistake, but I can't figure it out. I just attached all the methods I have created because I figured you didn't need the ones that were there when I set up the forge 1.12 mod folder.

ClientProxy.java

CommonProxy.java

HanksMod.java

ItemBase.java

ModItems.java

Posted

Please post your mod as a GitHub Repo, making sure the git root is next to your build.gradle and the .gitignore provided by Forge's MDK.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

 

  Quote
        @SubscribeEvent
        public static void registerItems(ModelRegistryEvent event) {
            ModItems.registerModels();
        }

 

Expand  

This will crash the dedicated server. The ModelRegistryEvent is client side only.

  Quote
	public ItemBase(String name) {
		this.name = name;
		setUnlocalizedName(name);
		setRegistryName(name);
	}

 

Expand  

You should set your unlocalized name to your registry name; Problematic Code #10 .

  Quote
	public void registerItemModel() {
		HanksMod.proxy.registerItemRenderer(this, 0, name);
	}

 

Expand  

There is no reason for this to be in the Item class, all items need models and you can make that call externally just fine:

HanksMod.proxy.registerItemRenderer(ModItems.copperIngot, 0, copperIngot.getRegistryName())

 

 

  • Like 1

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
  On 6/29/2018 at 6:44 PM, Draco18s said:
  Quote

@SubscribeEvent
        public static void registerItems(ModelRegistryEvent event) {
            ModItems.registerModels();
        }

  

Expand  

This will crash the dedicated server. The ModelRegistryEvent is client side only.

Expand  

Ok, I did the other things, but how do I fix this? I know it might be obvious, but I'm a little out of practice with java. It's been a couple months since I've actually done more than just copy, pasting, and changing a few keywords.

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.