Jump to content

Recommended Posts

Posted (edited)

Hi,

 

I am trying to implement new glass panes, basically identical to the coloured glass panes except that I have a variant attribute instead of a colour one since I'll be putting patterns on mine. I've extended BlockPane and essentially copied the BlockStainedGlassPane code only adjusting for the property difference (for now my variant property has only one possible value, "white").

 

I'm having issues getting the blockstate and/or the models to work. On startup I get this error:

 

[19:33:27] [main/ERROR] [FML]: Exception loading model for variant millenaire:stained_glass#east=true,north=false,south=true,variant=white,west=false for blockstate "millenaire:stained_glass[east=true,north=false,south=true,variant=white,west=false]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model millenaire:stained_glass#east=true,north=false,south=true,variant=white,west=false 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:248) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:236) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:163) ~[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:132) [SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_73]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_73]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_73]
	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_73]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_73]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_73]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_73]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:25) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1189) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]

 

My blockstate looks like this, copied and adjusted from white_stained_glass_pane.json :

 

{
    "multipart": [
        {   "apply": { "model": "millenaire:stained_glass_white_post" }},
        {   "when": { "variant":"white", "north": true },
            "apply": { "model": "millenaire:stained_glass_white_side" }
        },
        {   "when": { "variant":"white", "east": true },
            "apply": { "model": "millenaire:stained_glass_white_side", "y": 90 }
        },
        {   "when": { "variant":"white", "south": true },
            "apply": { "model": "millenaire:stained_glass_white_side_alt" }
        },
        {   "when": { "variant":"white", "west": true },
            "apply": { "model": "millenaire:stained_glass_white_side_alt", "y": 90 }
        },
        {   "when": { "variant":"white", "north": false },
            "apply": { "model": "millenaire:stained_glass_white_noside" }
        },
        {   "when": { "variant":"white", "east": false },
            "apply": { "model": "millenaire:stained_glass_white_noside_alt" }
        },
        {   "when": { "variant":"white", "south": false },
            "apply": { "model": "millenaire:stained_glass_white_noside_alt", "y": 90 }
        },
        {   "when": { "variant":"white", "west": false },
            "apply": { "model": "millenaire:stained_glass_white_noside", "y": 270 }
        }
    ]
}

 

I've created the models referenced, again using vanilla's white stained glass frame as a reference. Here is the post one for example :

 

{
    "parent": "block/pane_post",
    "textures": {
        "edge": "blocks/glass_pane_top_white",
        "pane": "millenaire:blocks/stained_glass_white"
    }
}

 

 

Any idea what is going wrong? I don't understand how in vanilla each colour has its own blockstate with no obvious mapping anywhere, is the issue related to this?

 

Thanks

 

K.

Edited by Kinniken
Solved

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.