Jump to content

Recommended Posts

Posted

Hi there,

 

I am making a block that has the BlockStates PropertyDirection and a PropertyEnum. I now have these errors and it has no texture in game:

 

Error:

[14:51:56] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=west,type=clean for blockstate "pm:chair[facing=west,type=clean]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=west,type=clean 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 21 more
[14:51:56] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=east,type=dirty for blockstate "pm:chair[facing=east,type=dirty]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=east,type=dirty 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 21 more
[14:51:56] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=west,type=dirty for blockstate "pm:chair[facing=west,type=dirty]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=west,type=dirty 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 21 more
[14:51:56] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=north,type=dirty for blockstate "pm:chair[facing=north,type=dirty]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=north,type=dirty 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 21 more
[14:51:56] [Client thread/ERROR] [FML]: Suppressed additional 4 model loading errors for domain pm
[14:51:57] [Client thread/INFO] [sTDOUT]: [com.julesmaster7.pishmod.PishMod:init:43]: Init
[14:51:57] [Client thread/INFO] [FML]: Injecting itemstacks
[14:51:57] [Client thread/INFO] [FML]: Itemstack injection complete
[14:51:57] [Client thread/INFO] [sTDOUT]: [com.julesmaster7.pishmod.PishMod:postInit:49]: Post Init
[14:51:57] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[14:51:57] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Pish Mod
[14:52:02] [Client thread/INFO]: SoundSystem shutting down...
[14:52:02] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[14:52:02] [sound Library Loader/INFO]: Starting up SoundSystem...
[14:52:02] [Thread-10/INFO]: Initializing LWJGL OpenAL
[14:52:02] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[14:52:02] [Thread-10/INFO]: OpenAL initialized.
[14:52:03] [sound Library Loader/INFO]: Sound engine started
[14:52:09] [Client thread/INFO] [FML]: Max texture size: 16384
[14:52:09] [Client thread/INFO]: Created: 1024x512 textures-atlas
[14:52:11] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=west,type=clean for blockstate "pm:chair[facing=west,type=clean]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=west,type=clean 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 24 more
[14:52:11] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=east,type=dirty for blockstate "pm:chair[facing=east,type=dirty]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=east,type=dirty 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 24 more
[14:52:11] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=west,type=dirty for blockstate "pm:chair[facing=west,type=dirty]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=west,type=dirty 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 24 more
[14:52:11] [Client thread/ERROR] [FML]: Exception loading model for variant pm:chair#facing=north,type=dirty for blockstate "pm:chair[facing=north,type=dirty]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model pm:chair#facing=north,type=dirty 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:241) ~[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:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 24 more

 

Block file:

package com.julesmaster7.pishmod.block;

import java.util.List;

import org.lwjgl.input.Keyboard;

import com.julesmaster7.pishmod.PishMod;
import com.julesmaster7.pishmod.Reference;
import com.julesmaster7.pishmod.Reference.ChairTypes;
import com.julesmaster7.pishmod.block.item.IMetaBlockName;
import com.julesmaster7.pishmod.init.PishBlocks;

import net.minecraft.block.Block;
import net.minecraft.block.BlockPistonBase;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class BlockChair extends Block implements IMetaBlockName {

public static final PropertyEnum TYPE = PropertyEnum.create("type", ChairTypes.class);
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
public static final AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, 2.0, 1.0);
public static final AxisAlignedBB COLLISION_BOX = new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, 2.0, 1.0);

public BlockChair() {
	super(Material.WOOD);
	this.setUnlocalizedName(Reference.PishBlocks.CHAIR.getUnlocalizedName());
	this.setRegistryName(Reference.PishBlocks.CHAIR.getRegistryName());
	this.setCreativeTab(PishMod.tabPish);
	this.setDefaultState(this.blockState.getBaseState().withProperty(TYPE, ChairTypes.CLEAN).withProperty(FACING, EnumFacing.NORTH));
	this.setHardness(1.0F);
}

@Override
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
	return super.onBlockPlaced(worldIn, pos, BlockPistonBase.getFacingFromEntity(pos, placer), hitX, hitY, hitZ, meta, placer);
}

@Override
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
	worldIn.setBlockState(pos, state.withProperty(FACING, BlockPistonBase.getFacingFromEntity(pos, placer)), 2);
}

@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
	if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
		if (!world.isRemote) {
			this.breakBlock(world, pos, state);
			world.setBlockState(pos, this.getStateFromMeta(1));
			return true;
		}
		return false;
	}
	return false;
}

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

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

@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
	return BOUNDING_BOX;
}

@Override
protected BlockStateContainer createBlockState() {
	return new BlockStateContainer(this, new IProperty[] {TYPE, FACING});
}

@Override
public IBlockState getStateFromMeta(int meta) {
	return getDefaultState().withProperty(TYPE, ChairTypes.values()[meta]);
}

@Override
public int getMetaFromState(IBlockState state) {
	ChairTypes type = (ChairTypes) state.getValue(TYPE);
	return type.getID();
}

@Override
public int damageDropped(IBlockState state) {
	return getMetaFromState(state);
}

@Override
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
	for (int i = 0; i < ChairTypes.values().length; i++) {
		list.add(new ItemStack(item, 1, i));
	}
}

@Override
public String getSpecialName(ItemStack stack) {
	return ChairTypes.values()[stack.getItemDamage()].getName();
}

@Override
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
	return new ItemStack(Item.getItemFromBlock(this), 1, this.getMetaFromState(world.getBlockState(pos)));
}

}

 

Block init file:

 

package com.julesmaster7.pishmod.init;

import com.julesmaster7.pishmod.Reference;
import com.julesmaster7.pishmod.Reference.ChairTypes;
import com.julesmaster7.pishmod.block.BlockChair;
import com.julesmaster7.pishmod.block.BlockPoo;
import com.julesmaster7.pishmod.block.item.ItemBlockEnumProperty;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class PishBlocks {

public static Block poo;
public static Block chair;

public static void init() {
	poo = new BlockPoo();
	chair = new BlockChair();
}

public static void register() {
	registerBlock(poo);
	registerBlock(chair, new ItemBlockEnumProperty(chair));
}

public static void registerRenders() {
	registerRender(poo);
	for (int i = 0; i < ChairTypes.values().length; i++) {
		registerRender(chair, i, "chair_" + ChairTypes.values()[i].getName());
	}
}

private static void registerBlock(Block block) {
	GameRegistry.register(block);
	ItemBlock item = new ItemBlock(block);
	item.setRegistryName(block.getRegistryName());
	GameRegistry.register(item);
}

private static void registerBlock(Block block, ItemBlock itemBlock) {
	GameRegistry.register(block);
	itemBlock.setRegistryName(block.getRegistryName());
	GameRegistry.register(itemBlock);
}

private static void registerRender(Block block) {
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
	ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
}

private static void registerRender(Block block, int meta, String fileName) {
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
	ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(new ResourceLocation(Reference.MOD_ID, fileName), "inventory"));
}
}

 

Blockstate file:

{
    "variants": {
        "facing=north, type=clean": {"model": "pm:chair_clean", "y": 180},
        "facing=south, type=clean": {"model": "pm:chair_clean"},
        "facing=east, type=clean": {"model": "pm:chair_clean", "y": 270},
        "facing=west, type=clean": {"model": "pm:chair_clean", "y": 90},
        "facing=north, type=dirty": {"model": "pm:chair_dirty", "y": 180},
        "facing=south, type=dirty": {"model": "pm:chair_dirty"},
        "facing=east, type=dirty": {"model": "pm:chair_dirty", "y": 270},
        "facing=west, type=dirty": {"model": "pm:chair_dirty", "y": 90}
    }
}

 

Model file for type=clean:

{
    "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
    "textures": {
        "particle": "blocks/planks_oak",
        "0": "blocks/planks_oak",
        "1": "blocks/log_oak_top",
        "2": "blocks/cake_top"
    },
    "elements": [
        {
            "name": "leg1",
            "from": [ 4.0, 0.0, 4.0 ], 
            "to": [ 5.0, 5.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, 4.0, 5.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "leg2",
            "from": [ 4.0, 0.0, 11.0 ], 
            "to": [ 5.0, 5.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, 4.0, 5.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "leg3",
            "from": [ 11.0, 0.0, 11.0 ], 
            "to": [ 12.0, 5.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, 4.0, 5.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "leg4",
            "from": [ 11.0, 0.0, 4.0 ], 
            "to": [ 12.0, 5.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, 4.0, 5.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "seat",
            "from": [ 4.0, 5.0, 4.0 ], 
            "to": [ 12.0, 7.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 1.0, 1.0, 9.0, 3.0 ] },
                "east": { "texture": "#1", "uv": [ 1.0, 3.0, 9.0, 5.0 ] },
                "south": { "texture": "#1", "uv": [ 1.0, 5.0, 9.0, 7.0 ] },
                "west": { "texture": "#1", "uv": [ 1.0, 7.0, 9.0, 9.0 ] },
                "up": { "texture": "#1", "uv": [ 4.0, 4.0, 12.0, 12.0 ] },
                "down": { "texture": "#1", "uv": [ 4.0, 4.0, 12.0, 12.0 ] }
            }
        },
        {
            "name": "back",
            "from": [ 4.0, 7.0, 4.0 ], 
            "to": [ 12.0, 16.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 3.0, 4.0, 11.0, 13.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 4.0, 1.0, 13.0 ] },
                "south": { "texture": "#0", "uv": [ 3.0, 4.0, 11.0, 13.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 4.0, 1.0, 13.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 3.0, 11.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 3.0, 11.0, 4.0 ] }
            }
        },
        {
            "name": "cushion",
            "from": [ 5.0, 7.0, 5.0 ], 
            "to": [ 11.0, 8.0, 11.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 6.0, 1.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 6.0, 1.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 6.0, 1.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 6.0, 1.0 ] },
                "up": { "texture": "#2", "uv": [ 1.0, 1.0, 15.0, 15.0 ] },
                "down": { "texture": "#2", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }
            }
        }
    ]
}

 

Model for dirty:

{
    "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
    "textures": {
        "particle": "blocks/planks_big_oak",
        "0": "blocks/planks_big_oak",
        "1": "blocks/log_big_oak_top"
    },
    "elements": [
        {
            "name": "leg1",
            "from": [ 4.0, 0.0, 4.0 ], 
            "to": [ 5.0, 5.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, 4.0, 5.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "leg2",
            "from": [ 4.0, 0.0, 11.0 ], 
            "to": [ 5.0, 5.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, 4.0, 5.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "leg3",
            "from": [ 11.0, 0.0, 11.0 ], 
            "to": [ 12.0, 5.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, 4.0, 5.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "leg4",
            "from": [ 11.0, 0.0, 4.0 ], 
            "to": [ 12.0, 5.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 5.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 0.0, 2.0, 5.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 5.0 ] },
                "west": { "texture": "#0", "uv": [ 3.0, 0.0, -14.0, 4.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 3.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "seat",
            "from": [ 4.0, 5.0, 4.0 ], 
            "to": [ 12.0, 7.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 1.0, 1.0, 9.0, 3.0 ] },
                "east": { "texture": "#1", "uv": [ 1.0, 7.0, 9.0, 9.0 ] },
                "south": { "texture": "#1", "uv": [ 1.0, 1.0, 9.0, 3.0 ] },
                "west": { "texture": "#1", "uv": [ 1.0, 7.0, 9.0, 9.0 ] },
                "up": { "texture": "#1", "uv": [ 4.0, 4.0, 12.0, 12.0 ] },
                "down": { "texture": "#1", "uv": [ 4.0, 4.0, 12.0, 12.0 ] }
            }
        },
        {
            "name": "back",
            "from": [ 4.0, 7.0, 4.0 ], 
            "to": [ 12.0, 16.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 3.0, 4.0, 11.0, 13.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 4.0, 1.0, 13.0 ] },
                "south": { "texture": "#0", "uv": [ 3.0, 4.0, 11.0, 13.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 4.0, 1.0, 13.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 3.0, 11.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 3.0, 11.0, 4.0 ] }
            }
        }
    ]
}

 

 

Thanks!

 

Posted

"facing=west, type=clean" != "facing=west,type=clean"

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Wow, white space is significant. That is SO fragile. Who gave us such a paradigm?

 

Anyway, your blockstates json is only defining n, s, e, w. You left out UP and DOWN. I think you should change your BlockChair class to extend class BlockHorizontal (which leaves out the UP and DOWN for you).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

Wow, white space is significant. That is SO fragile. Who gave us such a paradigm?

 

Mojang.

The Forge team supplied the Forege blockstate system that lets you break up the cardinality map.

 

"facing": { ... },
"type": { ... }

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Wow, white space is significant. That is SO fragile. Who gave us such a paradigm?

 

Mojang.

The Forge team supplied the Forge blockstate system that lets you break up the cardinality map.

 

I still suspect Microsoft  ;)

 

I like Forge's format better, but all json formats fail my "let the compiler do as much work as possible" paradigm. Even if models need to be baked during loading, I'd prefer to code one or more methods to translate my properties into model pointers rather than needing to trust my spelling and spacing.

 

Reminds me of Hollerith fields on punch cards back in my early Fortran days.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted
I like Forge's format better, but all json formats fail my "let the compiler do as much work as possible" paradigm.

 

Not to mention being stringly typed and immune to refactoring.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I like Forge's format better, but all json formats fail my "let the compiler do as much work as possible" paradigm.

 

Not to mention being stringly typed and immune to refactoring.

 

For a minute I thought you had misspelled "strongly", but I now see the pun. The linked definition sums up my feelings nicely.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

Mhm.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

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