Jump to content

[1.12] What changed with the Model Loader?


GooberGunter

Recommended Posts

I recently updated my mod from 1.11.2 to 1.12 only to find that, after redoing all registry, all my items except for one (which is baffling) don't have textures. Plus my blocks aren't registering in the game even though the FML log isn't giving me any errors except for one, which is for some reason registered under the minecraft domain DESPITE me distinctly stating the mod id as the domain

 

Link to comment
Share on other sites

Just now, GooberGunter said:

I recently updated my mod from 1.11.2 to 1.12 only to find that, after redoing all registry, all my items except for one (which is baffling) don't have textures. Plus my blocks aren't registering in the game even though the FML log isn't giving me any errors except for one, which is for some reason registered under the minecraft domain DESPITE me distinctly stating the mod id as the domain

Code and ModelLoader.setCustomModelResourceLocation needs to be called from ModelRegistryEvent.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

3 minutes ago, GooberGunter said:

Thanks, Is this somewhere in the forge doc?

I do not believe so but you register your models the same way you did before, it just needs to be in the event.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Alright, all the textures for the tools and items work. On another note, the blocks are still not being registered in the game even though i have the handler set up:

Spoiler


	@Mod.EventBusSubscriber(modid = Reference.MOD_ID)
	public static class BlockRegisterHandler{
		@SubscribeEvent
		public static void registerBlock(final RegistryEvent.Register<Block> event) {
			final IForgeRegistry<Block> reg = event.getRegistry();
			for(int i=0; i < blocklist.size(); i++) {
				reg.register(blocklist.get(i));
				blocklist.get(i).setCreativeTab(blocks);
				ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(blocklist.get(i)), 0, new ModelResourceLocation(new ResourceLocation(Reference.MOD_ID, blocklist.get(i).getUnlocalizedName().substring(5)), "inventory"));
				Utils.getLogger().info("Registered Block: " + blocklist.get(i).getUnlocalizedName().substring(5));
			}
			
			
		}
	}

 

 

Link to comment
Share on other sites

new ModelResourceLocation(new ResourceLocation(Reference.MOD_ID, blocklist.get(i).getUnlocalizedName().substring(5)), "inventory")

Should be

new ModelResourceLocation(blocklist.get(i).getRegistryName(), "inventory")


Please do not follow old crappy tutorials.

Edited by MrBendelScrolls
Link to comment
Share on other sites

Just now, GooberGunter said:

Got it, thanks

Also are you calling ModelLoader.setCustomModelResourceLocation in the Block Registry event? If so it has its own event ModelRegistryEvent. 

9 minutes ago, GooberGunter said:

On another note, the blocks are still not being registered in the game even though i have the handler set up:

You are not registering the ItemBlock for them.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Also, again... MY COMPLAINS ABOUT THE CODE! Feel free to call me a bad person with all of the synonyms.

This is unnecessary to use fori loop and list.get(i). This code is very hard to read.
Simplier and cleaner is to use foreach.
Example:

for (Block block : blocklist) {
    event.getRegistry().register(block);
}
Edited by MrBendelScrolls
I can't think
  • Like 1
Link to comment
Share on other sites

2 minutes ago, MrBendelScrolls said:

Also, again... MY COMPLAINS ABOUT THE CODE! Feel free to call me a bad person with all of the synonyms.

This is unnecessary to use fori loop and list.get(i). This code is very hard to read.
Simplier and cleaner is to use foreach.
Example:


for (Block block : blocklist) {
    event.getRegistry().register(block);
}

Not at all, I'm happy to receive any information on how to improve my code and java practices. Thanks for the tip

Link to comment
Share on other sites

4 minutes ago, GooberGunter said:

I

What method do I call?

I think you will also need a Item Registry event to register the ItemBlocks, but I am not really sure. I haven't started updating to 1.12 just yet.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Fun, when I tried the item block registry, I got:

Spoiler

[11:46:57] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@7e3f3a34:
java.lang.NullPointerException: Can't use a null-name for the registry, object net.minecraft.item.ItemBlock@3cb8b037.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864) ~[guava-21.0.jar:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110) ~[ForgeRegistry.class:?]
    at com.ninja3659.explorationexpansion.init.ModBlocks$BlockRegisterHandler.registerItemBlock(ModBlocks.java:79) ~[ModBlocks$BlockRegisterHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlockRegisterHandler_registerItemBlock_Register.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143) ~[EventBus$1.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) [EventBus.class:?]
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:728) [GameData.class:?]
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605) [Loader.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:508) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:416) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]
[11:46:57] [main/ERROR] [FML]: Index: 3 Listeners:
[11:46:57] [main/ERROR] [FML]: 0: NORMAL
[11:46:57] [main/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@26a8e303
[11:46:57] [main/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@18365e98
[11:46:57] [main/ERROR] [FML]: 3: net.minecraftforge.fml.common.eventhandler.EventBus$1@4c8c3285
[11:46:57] [main/ERROR] [FML]: 4: net.minecraftforge.fml.common.eventhandler.EventBus$1@74b57299
[11:46:57] [main/ERROR] [FML]: 5: net.minecraftforge.fml.common.eventhandler.EventBus$1@156437f7
[11:46:57] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:630]: ---- Minecraft Crash Report ----
// Oh - I know what I did wrong!

Time: 7/20/17 11:46 AM
Description: Initializing game

java.lang.NullPointerException: Can't use a null-name for the registry, object net.minecraft.item.ItemBlock@3cb8b037.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110)
    at com.ninja3659.explorationexpansion.init.ModBlocks$BlockRegisterHandler.registerItemBlock(ModBlocks.java:79)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlockRegisterHandler_registerItemBlock_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:728)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266)
    at net.minecraft.client.Minecraft.init(Minecraft.java:508)
    at net.minecraft.client.Minecraft.run(Minecraft.java:416)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110)
    at com.ninja3659.explorationexpansion.init.ModBlocks$BlockRegisterHandler.registerItemBlock(ModBlocks.java:79)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlockRegisterHandler_registerItemBlock_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:728)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266)
    at net.minecraft.client.Minecraft.init(Minecraft.java:508)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:416)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_131, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 769691016 bytes (734 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.40 Powered by Forge 14.21.1.2415 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH    minecraft{1.12} [Minecraft] (minecraft.jar) 
    UCH    mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCH    FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2415.jar) 
    UCH    forge{14.21.1.2415} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2415.jar) 
    UCH    neem{1.0-alpha} [Exploration Expansion] (bin) 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 21.20.16.4550' Renderer: 'Intel(R) HD Graphics 520'
    Launched Version: 1.12
    LWJGL: 2.9.4
    OpenGL: Intel(R) HD Graphics 520 GL version 4.4.0 - Build 21.20.16.4550, Intel
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: 
    Current Language: English (US)
    Profiler Position: N/A (disabled)
    CPU: 4x Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
[11:46:57] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:630]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\JEHan\Desktop\Exploration Expanded\run\.\crash-reports\crash-2017-07-20_11.46.57-client.txt
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
 

 

I can't see what the problem is since the first block I added is not null, unless you can't cast, but it's not telling me that I can't cast a block to ItemBlock

 

ModBlocks:

Spoiler

package com.ninja3659.explorationexpansion.init;


import java.awt.List;
import java.util.ArrayList;

import com.ninja3659.explorationexpansion.Reference;
import com.ninja3659.explorationexpansion.blocks.BlockDiamondiliumBlock;
import com.ninja3659.explorationexpansion.blocks.BlockDiamondilliumOre;
import com.ninja3659.explorationexpansion.creativetabs.TabNEEMBlocks;
import com.ninja3659.explorationexpansion.creativetabs.TabNEEMItems;
import com.ninja3659.explorationexpansion.util.Utils;

import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ResourceLocation;
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;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.registries.IForgeRegistry;

public class ModBlocks {
	
	public static Block Dblock;
	public static Block dOre;
	public static final CreativeTabs blocks = new TabNEEMBlocks();
	public static ArrayList<Block> blocklist = new ArrayList();
	public static ArrayList<ItemBlock> itemblocklist = new ArrayList();

	
	public static void init() {
		Dblock = new BlockDiamondiliumBlock("Dblock", "Dblock");
		dOre = new BlockDiamondilliumOre("dore");
		blocklist.add(Dblock);
		blocklist.add(dOre);
		itemblocklist.add(new ItemBlock(Dblock));
		itemblocklist.add(new ItemBlock(dOre));
	}
	
	
	
	public static void registerRenders() {
		registerRender(Dblock);
		registerRender(dOre);
	}
	
	
	
	public static void registerRender(Block block) {
		//try{
			Utils.getLogger().info("Registered render for: " + block.getUnlocalizedName().substring(5));
		//} catch (in)
	}
	
	@Mod.EventBusSubscriber(modid = Reference.MOD_ID)
	public static class BlockRegisterHandler{
		@SubscribeEvent
		public static void registerBlock(final RegistryEvent.Register<Block> event) {
			final IForgeRegistry<Block> reg = event.getRegistry();
			for(Block block : blocklist) {
				reg.register(block);
				block.setCreativeTab(blocks);
				Utils.getLogger().info("Registered Block: " + block.getUnlocalizedName());
			}			
			
		}
		
		@SubscribeEvent
		public static void registerItemBlock(final RegistryEvent.Register<Item> event) {
			Utils.getLogger().info("Start ItemBlock");
			final IForgeRegistry<Item> reg = event.getRegistry();
			for (ItemBlock block : itemblocklist) {
				reg.register(block);
				Utils.getLogger().info("Registered item block " + block);
			}
		}
		
		
		public static void registerRender(final ModelRegistryEvent event) {
			for (Block block : blocklist) {
				ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation(Reference.MOD_ID, block.getUnlocalizedName()), "inventory"));
			}
		}
	}
}

 

 

Link to comment
Share on other sites

1 minute ago, GooberGunter said:

but it's not telling me that I can't cast a block to ItemBlock

That is not true, what it says is 

2 minutes ago, GooberGunter said:

java.lang.NullPointerException: Can't use a null-name for the registry, object net.minecraft.item.ItemBlock@3cb8b037.

You never set the registry name for the ItemBlock.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

22 minutes ago, GooberGunter said:

registry name? OH, right. Now it rings a bell. But how do I do that?

new ItemBlock(block).setRegistryName(block.getRegistryName);

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

8 minutes ago, GooberGunter said:

If you don't mind me asking, I know the code is necessary, but why is it necessary? I don't fully understand what the line does.

It is necessary because we need some form of id that will not change. Numerical ids will change and are not mod specific, while using a ResourceLocation allows a Block, Item, etc to be traced easily back to its mod, and they are also mod specific because of the modid. So in other words a register name is just an id.

11 minutes ago, GooberGunter said:

Also where would I put this line?

You make two new ItemBlock instances in your ModBlocks class. Every time you make a new instance of any Item, Block, etc you need to set it's registry name.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Just now, GooberGunter said:

But I set the registry name when I initialized the block:


		Dblock = new BlockDiamondiliumBlock("Dblock", "Dblock");

 

You didn't do it for the ItemBlock though.

57 minutes ago, GooberGunter said:

itemblocklist.add(new ItemBlock(Dblock));

 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Forge isn't reading the domain for the resource location of my blocks

ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation("neem: " + block.getRegistryName()), "inventory"));

I never really learned this part right

Edited by GooberGunter
Link to comment
Share on other sites

3 minutes ago, GooberGunter said:

Forge isn't reading the domain for the resource location of my blocks

Don't do new ResourceLocation(String, String)

Block#getRegistryName() returns a ResourceLocation.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Then should there be something specific that I set the registry name to? Actually, in each of their block classes, the registry name is a new ResourceLocation(String, String). Is this right?

Apparently that doesn't matter because forge is still looking for the textures in minecraft:

I'm going to check my json files

 

EDIT: Yup, that was the problem. In the json files, the texture location didn't specify my mod id

Edited by GooberGunter
Link to comment
Share on other sites

1 minute ago, GooberGunter said:

Then should there be something specific that I set the registry name to?

The registry name should follow these two rules

  1. It should contain the modid as the domainName.
  2. It should be unique.

Though i need to clear something up and it will be easier done through this modding video I made for 1.10.2, which doesn't use the events so ignore that part, but what it does do correctly is how to call the ModelLoader.setCustomModelResourceLocation method. At the bottom you will see how it is called, you may need to pause the video.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.



×
×
  • Create New...

Important Information

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