Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

BitofTuts.java

package Fatal1tyGC.BitofTuts;

import Fatal1tyGC.BitofTuts.init.ModItems;
import Fatal1tyGC.BitofTuts.proxy.CommonProxy;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)

public class BitofTuts {

@SidedProxy(serverSide = Reference.SERVER_PROXY_CLASS, clientSide = Reference.CLIENT_PROXY_CLASS)
public static CommonProxy proxy;

@Mod.Instance("bot")
public static BitofTuts instance;

@EventHandler()
public static void preInit(FMLPreInitializationEvent event){
	ModItems.init();
	ModItems.register();
}

@EventHandler()	
public static void init(FMLInitializationEvent event){
	//proxy.registerRenders();
}

@EventHandler()
public static void postIn(FMLPostInitializationEvent event){
	System.out.println();
}

}

you noticed that register renders is comment right? xD plz dont tell me that that was it..

Doing stuff n' things

  • Author

Its not it haha, i commented it because it didnt do anything, because CommonProxy is empty

 

>

 

package Fatal1tyGC.BitofTuts.proxy;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;


public class CommonProxy {

public void registerRenders(){

}

public void preInit(FMLPreInitializationEvent event){

    }

    public void init(FMLInitializationEvent event) {

    }


    public void postInit(FMLPostInitializationEvent event) {

    }
}


  • Author

	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));

 

Sameerrors, all about

 

[21:21:40] [Client thread/ERROR] [FML]: Exception loading model for variant bot:copper_ingot#inventory for item "bot:copper_ingot", blockstate location exception:

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model bot:copper_ingot#inventory with loader VariantLoader.INSTANCE, skipping

What is this:

ModelLoader.setCustomModelResourceLocation

i never seen it before..

why arent you using:

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register

that's how i made it register renders..

If you don't know what you are doing please don't help people.

ModelLoader is the correct way, the ItemModelMesher is discouraged.

 

Please dont say "dont help people"... To what I knew, that was how to register renders and I was just trying to help while there was no moderator that came in......  To my knowledge, that's what a forum supposed to be... Sometimes people in forums are trying to help while they may not be right 100%....

Doing stuff n' things

  • Author

It changed 1 thing, the line break with the } Still doesnt work ;)

 

Error: Parse error on line 5:

..._ingot"    },    }

---------------------^

Expecting 'STRING', got '}'

It changed 1 thing, the line break with the } Still doesnt work ;)

 

Error: Parse error on line 5:

..._ingot"    },    }

---------------------^

Expecting 'STRING', got '}'

the ',' after textures end..

 

should look like:

{
"parent": "item/generated",
"textures": {
	"layer0": "bot:items/copper_ingot"
}
}

why didnt i see that idk

Doing stuff n' things

  • Author

Hmm...

  • Path to texture seems fine
  • json is valid
  • json file name equals registryName
  • You are using ModelLoader

You sure that your proxy is being called at all?

 

So,

 

@EventHandler()	
public static void init(FMLInitializationEvent event){
	proxy.registerRenders();
}

This is being called in the main java,

proxy refers to

public static CommonProxy proxy;

CommonProxy.java

only has this:

 

package Fatal1tyGC.BitofTuts.proxy;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;


public class CommonProxy {

public void registerRenders(){

}

public void preInit(FMLPreInitializationEvent event){

    }

    public void init(FMLInitializationEvent event) {

    }


    public void postInit(FMLPostInitializationEvent event) {

    }
}

 

Thats all

Sorry, but ModelLoader.setCustomModelResourceLocation is the Forge-provided method for registering your model for an item/block, and should be initialized in your preInit, not init.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Sorry, but ModelLoader.setCustomModelResourceLocation is the Forge-provided method for registering your model for an item/block, and should be initialized in your preInit, not init.

 

thank you.. just did that in my mod, works perfectly!

Doing stuff n' things

  • Author

Sorry, but ModelLoader.setCustomModelResourceLocation is the Forge-provided method for registering your model for an item/block, and should be initialized in your preInit, not init.

 

Heheheheheheheh

 

That was it! Thanks :D It works

 

Ya'all are legends,

Thanks for the input everyone on making my start better :D

 

d6693235e4474afebcbb9e9db33c5132.png

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.