Jump to content

Recommended Posts

Posted

I have successfully created a normal block with a texture. I then tried to replace the model with a custom .json file:

{
    "textures": {
        "particle": "blocks/obsidian"
        "0": "blocks/obsidian",
        "1": "blocks/end_stone",
        "2": "blocks/glass"
    },
    "elements": [
        {
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 2.0, 16.0 ], 
            "faces": {
                "north": { "uv": [ 0.0, 4.0, 16.0, 6.0 ], "texture": "#0" },
                "east": { "uv": [ 0.0, 3.0, 16.0, 5.0 ], "texture": "#0" },
                "south": { "uv": [ 0.0, 3.0, 16.0, 5.0 ], "texture": "#0" },
                "west": { "uv": [ 0.0, 4.0, 16.0, 6.0 ], "texture": "#0" },
                "up": { "uv": [ 0.0, 0.0, 16.0, 16.0 ], "texture": "#0" },
                "down": { "uv": [ 0.0, 0.0, 16.0, 16.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 1.0, 2.0, 1.0 ], 
            "to": [ 14.999999985098839, 3.0, 15.0 ], 
            "faces": {
                "north": { "uv": [ 0.0, 0.0, 13.999999985098839, 1.0 ], "texture": "#1" },
                "east": { "uv": [ 0.0, 0.0, 14.0, 1.0 ], "texture": "#1" },
                "south": { "uv": [ 0.0, 0.0, 13.999999985098839, 1.0 ], "texture": "#1" },
                "west": { "uv": [ 0.0, 0.0, 14.0, 1.0 ], "texture": "#1" },
                "up": { "uv": [ 0.0, 0.0, 13.999999985098839, 14.0 ], "texture": "#1" },
                "down": { "uv": [ 0.0, 0.0, 13.999999985098839, 14.0 ], "texture": "#1" }
            }
        },
        {
            "from": [ 6.0, 7.0, 6.0 ], 
            "to": [ 10.0, 16.0, 10.0 ], 
            "faces": {
                "north": { "uv": [ 6.0, 4.0, 10.0, 13.0 ], "texture": "#2" },
                "east": { "uv": [ 6.0, 4.0, 10.0, 13.0 ], "texture": "#2" },
                "south": { "uv": [ 6.0, 4.0, 10.0, 13.0 ], "texture": "#2" },
                "west": { "uv": [ 6.0, 4.0, 10.0, 13.0 ], "texture": "#2" },
                "up": { "uv": [ 10.0, 10.0, 14.0, 14.0 ], "texture": "#2" },
                "down": { "uv": [ 10.0, 10.0, 14.0, 14.0 ], "texture": "#2" }
            }
        },
        {
            "from": [ 5.500000007450581, 6.499999992549419, 5.499999992549419 ], 
            "to": [ 6.500000007450581, 16.49999999254942, 6.499999992549419 ], 
            "faces": {
                "north": { "uv": [ 6.0, 5.0, 7.0, 15.0 ], "texture": "#0" },
                "east": { "uv": [ 7.0, 0.0, 8.0, 10.0 ], "texture": "#0" },
                "south": { "uv": [ 10.0, 2.0, 11.0, 12.0 ], "texture": "#0" },
                "west": { "uv": [ 4.0, 2.0, 5.0, 12.0 ], "texture": "#0" },
                "up": { "uv": [ 12.0, 4.0, 13.0, 5.0 ], "texture": "#0" },
                "down": { "uv": [ 4.0, 6.0, 5.0, 7.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 9.50000000745058, 6.499999992549419, 5.499999992549419 ], 
            "to": [ 10.50000000745058, 16.49999999254942, 6.499999992549419 ], 
            "faces": {
                "north": { "uv": [ 13.0, 1.0, 14.0, 11.0 ], "texture": "#0" },
                "east": { "uv": [ 9.0, 5.0, 10.0, 15.0 ], "texture": "#0" },
                "south": { "uv": [ 2.0, 4.0, 3.0, 14.0 ], "texture": "#0" },
                "west": { "uv": [ 7.0, 0.0, 8.0, 10.0 ], "texture": "#0" },
                "up": { "uv": [ 10.0, 7.0, 11.0, 8.0 ], "texture": "#0" },
                "down": { "uv": [ 2.0, 8.0, 3.0, 9.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 9.50000000745058, 6.499999992549419, 9.49999999254942 ], 
            "to": [ 10.50000000745058, 16.49999999254942, 10.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 12.0, 4.0, 13.0, 14.0 ], "texture": "#0" },
                "east": { "uv": [ 8.0, 4.0, 9.0, 14.0 ], "texture": "#0" },
                "south": { "uv": [ 7.0, 1.0, 8.0, 11.0 ], "texture": "#0" },
                "west": { "uv": [ 2.0, 5.0, 3.0, 15.0 ], "texture": "#0" },
                "up": { "uv": [ 2.0, 4.0, 3.0, 5.0 ], "texture": "#0" },
                "down": { "uv": [ 12.0, 4.0, 13.0, 5.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 5.500000007450581, 6.499999992549419, 9.49999999254942 ], 
            "to": [ 6.500000007450581, 16.49999999254942, 10.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 5.0, 4.0, 6.0, 14.0 ], "texture": "#0" },
                "east": { "uv": [ 4.0, 1.0, 5.0, 11.0 ], "texture": "#0" },
                "south": { "uv": [ 6.0, 3.0, 7.0, 13.0 ], "texture": "#0" },
                "west": { "uv": [ 7.0, 3.0, 8.0, 13.0 ], "texture": "#0" },
                "up": { "uv": [ 8.0, 3.0, 9.0, 4.0 ], "texture": "#0" },
                "down": { "uv": [ 7.0, 3.0, 8.0, 4.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 6.500000007450581, 15.49999999254942, 5.499999992549419 ], 
            "to": [ 9.50000000745058, 16.49999999254942, 6.499999992549419 ], 
            "faces": {
                "north": { "uv": [ 2.0, 8.0, 5.0, 9.0 ], "texture": "#0" },
                "east": { "uv": [ 6.0, 6.0, 7.0, 7.0 ], "texture": "#0" },
                "south": { "uv": [ 7.0, 6.0, 10.0, 7.0 ], "texture": "#0" },
                "west": { "uv": [ 9.0, 11.0, 10.0, 12.0 ], "texture": "#0" },
                "up": { "uv": [ 12.0, 7.0, 15.0, 8.0 ], "texture": "#0" },
                "down": { "uv": [ 8.0, 6.0, 11.0, 7.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 6.500000007450581, 15.49999999254942, 9.49999999254942 ], 
            "to": [ 9.50000000745058, 16.49999999254942, 10.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 7.0, 2.0, 10.0, 3.0 ], "texture": "#0" },
                "east": { "uv": [ 7.0, 6.0, 8.0, 7.0 ], "texture": "#0" },
                "south": { "uv": [ 12.0, 2.0, 15.0, 3.0 ], "texture": "#0" },
                "west": { "uv": [ 6.0, 7.0, 7.0, 8.0 ], "texture": "#0" },
                "up": { "uv": [ 7.0, 6.0, 10.0, 7.0 ], "texture": "#0" },
                "down": { "uv": [ 2.0, 8.0, 5.0, 9.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 5.500000007450581, 15.49999999254942, 6.499999992549419 ], 
            "to": [ 6.500000007450581, 16.49999999254942, 9.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 6.0, 6.0, 7.0, 7.0 ], "texture": "#0" },
                "east": { "uv": [ 11.0, 7.0, 14.0, 8.0 ], "texture": "#0" },
                "south": { "uv": [ 10.0, 6.0, 11.0, 7.0 ], "texture": "#0" },
                "west": { "uv": [ 7.0, 3.0, 10.0, 4.0 ], "texture": "#0" },
                "up": { "uv": [ 7.0, 3.0, 8.0, 6.0 ], "texture": "#0" },
                "down": { "uv": [ 9.0, 1.0, 10.0, 4.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 9.50000000745058, 15.49999999254942, 6.499999992549419 ], 
            "to": [ 10.50000000745058, 16.49999999254942, 9.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 7.0, 3.0, 8.0, 4.0 ], "texture": "#0" },
                "east": { "uv": [ 7.0, 3.0, 10.0, 4.0 ], "texture": "#0" },
                "south": { "uv": [ 4.0, 2.0, 5.0, 3.0 ], "texture": "#0" },
                "west": { "uv": [ 5.0, 7.0, 8.0, 8.0 ], "texture": "#0" },
                "up": { "uv": [ 6.0, 6.0, 7.0, 9.0 ], "texture": "#0" },
                "down": { "uv": [ 6.0, 6.0, 7.0, 9.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 6.500000007450581, 6.499999992549419, 5.499999992549419 ], 
            "to": [ 9.50000000745058, 7.499999992549419, 6.499999992549419 ], 
            "faces": {
                "north": { "uv": [ 7.0, 2.0, 10.0, 3.0 ], "texture": "#0" },
                "east": { "uv": [ 12.0, 4.0, 13.0, 5.0 ], "texture": "#0" },
                "south": { "uv": [ 7.0, 3.0, 10.0, 4.0 ], "texture": "#0" },
                "west": { "uv": [ 2.0, 2.0, 3.0, 3.0 ], "texture": "#0" },
                "up": { "uv": [ 5.0, 8.0, 8.0, 9.0 ], "texture": "#0" },
                "down": { "uv": [ 6.0, 3.0, 9.0, 4.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 6.500000007450581, 6.499999992549419, 9.49999999254942 ], 
            "to": [ 9.50000000745058, 7.499999992549419, 10.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 3.0, 4.0, 6.0, 5.0 ], "texture": "#0" },
                "east": { "uv": [ 3.0, 7.0, 4.0, 8.0 ], "texture": "#0" },
                "south": { "uv": [ 6.0, 5.0, 9.0, 6.0 ], "texture": "#0" },
                "west": { "uv": [ 6.0, 3.0, 7.0, 4.0 ], "texture": "#0" },
                "up": { "uv": [ 12.0, 7.0, 15.0, 8.0 ], "texture": "#0" },
                "down": { "uv": [ 4.0, 6.0, 7.0, 7.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 5.500000007450581, 6.499999992549419, 6.499999992549419 ], 
            "to": [ 6.500000007450581, 7.499999992549419, 9.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 6.0, 4.0, 7.0, 5.0 ], "texture": "#0" },
                "east": { "uv": [ 4.0, 5.0, 7.0, 6.0 ], "texture": "#0" },
                "south": { "uv": [ 7.0, 8.0, 8.0, 9.0 ], "texture": "#0" },
                "west": { "uv": [ 7.0, 3.0, 10.0, 4.0 ], "texture": "#0" },
                "up": { "uv": [ 7.0, 4.0, 8.0, 7.0 ], "texture": "#0" },
                "down": { "uv": [ 6.0, 4.0, 7.0, 7.0 ], "texture": "#0" }
            }
        },
        {
            "from": [ 9.50000000745058, 6.499999992549419, 6.499999992549419 ], 
            "to": [ 10.50000000745058, 7.499999992549419, 9.49999999254942 ], 
            "faces": {
                "north": { "uv": [ 2.0, 2.0, 3.0, 3.0 ], "texture": "#0" },
                "east": { "uv": [ 4.0, 8.0, 7.0, 9.0 ], "texture": "#0" },
                "south": { "uv": [ 2.0, 2.0, 3.0, 3.0 ], "texture": "#0" },
                "west": { "uv": [ 4.0, 6.0, 7.0, 7.0 ], "texture": "#0" },
                "up": { "uv": [ 2.0, 2.0, 3.0, 5.0 ], "texture": "#0" },
                "down": { "uv": [ 2.0, 2.0, 3.0, 5.0 ], "texture": "#0" }
            }
        }
    ]
}

Considering it is not rendering in hand either, I think the problem is with the model json but here is my blockstate anyways:

{
    "forge_marker": 1,
    "defaults": {
        "model": "<mod_id here>:<unlocalized name of my block here>"
    },
    "variants": {
        "normal": [{}],
        "inventory": [{}]
    }
}

Posted

Here are the console errors:

[Client thread/ERROR] [FML]: Could not load vanilla model parent '<mod-id here>:block/<block unlocalized name here>' for 'net.minecraft.client.renderer.block.model.ModelBlock@3ec616af
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model <mod-id here>:block/<block unlocalized name here> with loader VanillaLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:134) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModelOrLogError(ModelLoaderRegistry.java:184) [ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.getTextures(ModelLoader.java:458) [ModelLoader$VanillaModelWrapper.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:144) [ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:298) [ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:169) [ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:128) [ModelLoader.class:?]
at net.minecraft.client.renderer.block.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:792) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:332) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:554) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:381) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
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_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 4 column 10
at com.google.gson.internal.Streams.parse(Streams.java:56) ~[streams.class:?]
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?]
at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:464) ~[JsonUtils.class:?]
at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:45) ~[ModelBlock.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:314) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:99) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:844) ~[ModelLoader$VanillaLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
... 26 more
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated object at line 4 column 10
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505) ~[JsonReader.class:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:480) ~[JsonReader.class:?]
at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:403) ~[JsonReader.class:?]
at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:666) ~[TypeAdapters$25.class:?]
at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:667) ~[TypeAdapters$25.class:?]
at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:642) ~[TypeAdapters$25.class:?]
at com.google.gson.internal.Streams.parse(Streams.java:44) ~[streams.class:?]
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?]
at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:464) ~[JsonUtils.class:?]
at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:45) ~[ModelBlock.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:314) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:99) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:844) ~[ModelLoader$VanillaLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
... 26 more
[13:00:15] [Client thread/INFO] [FML]: Max texture size: 16384
[13:00:15] [Client thread/INFO]: Created: 1024x512 textures-atlas
[13:00:17] [Client thread/ERROR] [FML]: Exception loading model for variant <mod-id here>:<block unlocalized name here>#normal for blockstate "<mod-id here>:<block unlocalized name here>"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model <mod-id here>:<block unlocalized name here>#normal with loader VariantLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:134) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:222) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:144) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:210) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:127) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.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:792) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:332) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:554) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:381) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
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_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model <mod-id here>:block/<block unlocalized name here> with loader VanillaLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:134) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.<init>(ModelLoader.java:728) ~[ModelLoader$WeightedRandomModel.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1160) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
... 24 more
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 4 column 10
at com.google.gson.internal.Streams.parse(Streams.java:56) ~[streams.class:?]
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?]
at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:464) ~[JsonUtils.class:?]
at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:45) ~[ModelBlock.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:314) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:99) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:844) ~[ModelLoader$VanillaLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.<init>(ModelLoader.java:728) ~[ModelLoader$WeightedRandomModel.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1160) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
... 24 more
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated object at line 4 column 10
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505) ~[JsonReader.class:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:480) ~[JsonReader.class:?]
at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:403) ~[JsonReader.class:?]
at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:666) ~[TypeAdapters$25.class:?]
at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:667) ~[TypeAdapters$25.class:?]
at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:642) ~[TypeAdapters$25.class:?]
at com.google.gson.internal.Streams.parse(Streams.java:44) ~[streams.class:?]
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?]
at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:464) ~[JsonUtils.class:?]
at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:45) ~[ModelBlock.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:314) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:99) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:844) ~[ModelLoader$VanillaLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.<init>(ModelLoader.java:728) ~[ModelLoader$WeightedRandomModel.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1160) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
... 24 more

Again, I was able to successfully create a normal block that renders correctly ingame and does not give errors on initialization. When I replace the default block model for that block with the custom model above without modifying anything else I get these errors and the block renders as a pink and black cube in hand and in world. This would lead me to believe that the problem is with the block model json.

I also use the following methods in my block class:

@Override
public boolean isFullCube(IBlockState state)
{
	return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{
	return false;
}

Posted

That's what I figured, but I can't figure out exactly what is wrong with the model. I thought maybe someone else may see something wrong with it that I didn't see.

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.