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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • that happens every time I enter a new dimension.
    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
  • Topics

×
×
  • Create New...

Important Information

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