Jump to content

Recommended Posts

Posted

Hey everyone,

I started doing my own crops and having trouble with the jsons.

I get the following exception (8 times, for age from 0 to 7)

 

 

[13:22:28] [Client thread/ERROR] [FML]: Exception loading model for variant survivaloverhaul:garliccrop#age=7

java.lang.Exception: Could not load model definition for variant survivaloverhaul:garliccrop#age=7

at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:219) ~[ModelLoader.class:?]

at net.minecraft.client.resources.model.ModelBakery.loadVariants(ModelBakery.java:109) ~[ModelBakery.class:?]

at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:174) ~[ModelLoader.class:?]

at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:119) ~[ModelLoader.class:?]

at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:130) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:111) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:772) [Minecraft.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:326) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:532) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:360) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_72]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_72]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_72]

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_72]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_72]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_72]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_72]

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 'survivaloverhaul:garliccrop#age=7' from: 'survivaloverhaul:blockstates/garliccrop.json' in resourcepack: 'FMLFileResourcePack:Survival Overhaul'

at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:155) ~[ModelBakery.class:?]

at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:215) ~[ModelLoader.class:?]

... 23 more

Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected ':' at line 3 column 14

at com.google.gson.Gson.fromJson(Gson.java:818) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:768) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:717) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:689) ~[Gson.class:?]

at net.minecraftforge.client.model.BlockStateLoader.load(BlockStateLoader.java:52) ~[blockStateLoader.class:?]

at net.minecraft.client.renderer.block.model.ModelBlockDefinition.parseFromReader(ModelBlockDefinition.java:32) ~[ModelBlockDefinition.class:?]

at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:150) ~[ModelBakery.class:?]

at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:215) ~[ModelLoader.class:?]

... 23 more

Caused by: com.google.gson.stream.MalformedJsonException: Expected ':' at line 3 column 14

at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505) ~[JsonReader.class:?]

at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:519) ~[JsonReader.class:?]

at com.google.gson.stream.JsonReader.skipValue(JsonReader.java:1209) ~[JsonReader.class:?]

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:170) ~[ReflectiveTypeAdapterFactory$Adapter.class:?]

at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:768) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:717) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:689) ~[Gson.class:?]

at net.minecraftforge.client.model.BlockStateLoader.load(BlockStateLoader.java:52) ~[blockStateLoader.class:?]

at net.minecraft.client.renderer.block.model.ModelBlockDefinition.parseFromReader(ModelBlockDefinition.java:32) ~[ModelBlockDefinition.class:?]

at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:150) ~[ModelBakery.class:?]

at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:215) ~[ModelLoader.class:?]

... 23 more

 

 

 

Im a bit confused because I am quite certain that the jsons are correct.

The models/block json (8 times from 0 to 7

 

 

{

    "parent": "block/crop",

    "textures": {

        "crop": "survivaloverhaul:blocks/garliccrop_7"

    }

}

 

 

blockstates

 

 

{

    "variants": {

"age=0:{ "model": "survivaloverhaul:garliccrop_0" },

"age=1:{ "model": "survivaloverhaul:garliccrop_1" },

"age=2:{ "model": "survivaloverhaul:garliccrop_2" },

"age=3:{ "model": "survivaloverhaul:garliccrop_3" },

"age=4:{ "model": "survivaloverhaul:garliccrop_4" },

"age=5:{ "model": "survivaloverhaul:garliccrop_5" },

"age=6:{ "model": "survivaloverhaul:garliccrop_6" },

"age=7:{ "model": "survivaloverhaul:garliccrop_7" }

 

    }

}

 

 

 

Any help would be appreciated.

Greetz Fail

 

 

Posted

Like the error says, your blockstates JSON is malformed. You're missing the closing quotes for the variant keys.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.