Jump to content

Recommended Posts

Posted (edited)

Hi,

 

I'm really new to forge modding and I've hit a wall while trying to set up textures.

 

When the client it starting up I get this stack trace:

 

Quote

[18:38:57] [Client thread/ERROR] [FML]: Exception loading model for variant factionmod:factionGrass#normal for blockstate "factionmod:factionGrass"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model factionmod:factionGrass#normal with loader VariantLoader.INSTANCE, skipping
 at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
 at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:252) ~[ModelLoader.class:?]
 at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?]
 at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:240) ~[ModelLoader.class:?]
 at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?]
 at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
 at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?]
 at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?]
 at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?]
 at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
 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_121]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
 at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
 at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
 at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
 at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1195) ~[ModelLoader$VariantLoader.class:?]
 at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
 ... 21 more
[18:38:57] [Client thread/ERROR] [FML]: Exception loading blockstate for the variant factionmod:factionGrass#normal:
java.lang.Exception: Could not load model definition for variant factionmod:factionGrass
 at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:285) ~[ModelLoader.class:?]
 at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?]
 at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:240) ~[ModelLoader.class:?]
 at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?]
 at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
 at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?]
 at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?]
 at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?]
 at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
 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_121]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
 at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
 at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of 'factionmod:factionGrass' from: 'factionmod:blockstates/factionGrass.json' in resourcepack: 'FMLFileResourcePack:factionmod'
 at net.minecraft.client.renderer.block.model.ModelBakery.loadModelBlockDefinition(ModelBakery.java:223) ~[ModelBakery.class:?]
 at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:200) ~[ModelBakery.class:?]
 at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?]
 at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:281) ~[ModelLoader.class:?]
 ... 20 more
Caused by: java.util.NoSuchElementException
 at com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator.nextNode(LinkedTreeMap.java:538) ~[LinkedTreeMap$LinkedTreeMapIterator.class:?]
 at com.google.gson.internal.LinkedTreeMap$EntrySet$1.next(LinkedTreeMap.java:565) ~[LinkedTreeMap$EntrySet$1.class:?]
 at com.google.gson.internal.LinkedTreeMap$EntrySet$1.next(LinkedTreeMap.java:563) ~[LinkedTreeMap$EntrySet$1.class:?]
 at net.minecraftforge.client.model.ForgeBlockStateV1$Deserializer.deserialize(ForgeBlockStateV1.java:101) ~[ForgeBlockStateV1$Deserializer.class:?]
 at net.minecraftforge.client.model.ForgeBlockStateV1$Deserializer.deserialize(ForgeBlockStateV1.java:66) ~[ForgeBlockStateV1$Deserializer.class:?]
 at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[TreeTypeAdapter.class:?]
 at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?]
 at com.google.gson.Gson.fromJson(Gson.java:741) ~[Gson.class:?]
 at net.minecraftforge.client.model.BlockStateLoader.load(BlockStateLoader.java:81) ~[BlockStateLoader.class:?]
 at net.minecraft.client.renderer.block.model.ModelBlockDefinition.parseFromReader(ModelBlockDefinition.java:37) ~[ModelBlockDefinition.class:?]
 at net.minecraft.client.renderer.block.model.ModelBakery.loadModelBlockDefinition(ModelBakery.java:219) ~[ModelBakery.class:?]
 at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:200) ~[ModelBakery.class:?]
 at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?]
 at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:281) ~[ModelLoader.class:?]
 ... 20 more
 

 

My factionGrass.json looks like this:

 

{
	"forge_marker": 1,
	"defaults" : {
		"model": "factionmod: block/grass_normal"
	},
	"variants": {
		"normal":{
		
		},
	}
}

 

I also have the same errors about an inventory variant

Can anyone see where I've gone wrong?

 

thanks,

Jamie

Edited by jamiemac262
Posted (edited)
9 minutes ago, jamiemac262 said:

Hi,

 

I'm really new to forge modding and I've hit a wall while trying to set up textures.

 

When the client it starting up I get this stack trace:

 

 

My factionGrass.json looks like this:

 


{
	"forge_marker": 1,
	"defaults" : {
		"model": "factionmod: block/grass_normal"
	},
	"variants": {
		"normal":{
		
		},
	}
}

 

I also have the same errors about an inventory variant

Can anyone see where I've gone wrong?

 

thanks,

Jamie

In the Forge blockstates format, the normal variant needs to be formatted as an empty array (a pair of curly braces inside a pair of square brackets), like this:

"normal": [{

}]

The inventory variant also needs to be defined explicitly, in exactly the same format as normal.

 

You've also got a comma after your normal variant, which is a JSON syntax error - you should put your files through a validator or use a plugin in your IDE to avoid problems like that.

 

Edit: you also shouldn't have a space after the colon in your model definition string "factionmod: block/grass_normal".

Edited by Jay Avery
  • Like 1

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.