Problème texture



  • Bonsoir,

    Je viens de me mettre à Forge, j'ai déjà un bon niveau en Spigot/Bukkit mais je ne connais pas particulièrement le Java, je connais les bases.
    Je suis sous forge 1.8.9, j'ai suivi le tutoriel pour créer un bloc basique, j'ai bien le bloc ingame mais les textures ne chargement pas.

    Mon MOD ID = "newblock"

    Voici le message d'erreur dans la console eclipse:

    [17:44:29] [Thread-11/INFO]: OpenAL initialized.
    [17:44:30] [Sound Library Loader/INFO]: Sound engine started
    [17:44:36] [Client thread/INFO] [FML]: Max texture size: 8192
    [17:44:36] [Client thread/INFO]: Created: 512x512 textures-atlas
    [17:44:37] [Client thread/ERROR] [FML]: Exception loading model for variant newblock:oak_lamp#inventory
    java.lang.Exception: Could not load model definition for variant newblock:oak_lamp#inventory
    at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:219) ~[ModelLoader.class:?]
    at net.minecraftforge.client.model.ModelLoader.loadItems(ModelLoader.java:256) ~[ModelLoader.class:?]
    at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:120) ~[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:778) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:326) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:538) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:364) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_77]
    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_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_77]
    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 model newblock:blockstates/oak_lamp.json
    at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:165) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:215) ~[ModelLoader.class:?]
    … 22 more
    Caused by: java.io.FileNotFoundException: newblock:blockstates/oak_lamp.json
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:82) ~[SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:143) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:215) ~[ModelLoader.class:?]
    … 22 more
    [17:44:37] [Client thread/ERROR] [FML]: Exception loading model for variant newblock:oak_lamp#normal
    java.lang.Exception: Could not load model definition for variant newblock:oak_lamp#normal
    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:778) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:326) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:538) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:364) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_77]
    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_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_77]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_77]
    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 model newblock:blockstates/oak_lamp.json
    at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:165) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:215) ~[ModelLoader.class:?]
    … 23 more
    Caused by: java.io.FileNotFoundException: newblock:blockstates/oak_lamp.json
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:82) ~[SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:143) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:215) ~[ModelLoader.class:?]
    … 23 more
    [17:44:37] [Client thread/ERROR] [FML]: Model definition for location newblock:oak_lamp#inventory not found
    [17:44:37] [Client thread/ERROR] [FML]: Model definition for location newblock:oak_lamp#normal not found
    [17:44:38] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
    

    Mes fichiers .json sont bien dans les dossiers "\NewBlocks\src\main\resources\assets" et après dans "blockstates" "models\block et models\item" et "textures\blocks"



  • "Caused by: java.io.FileNotFoundException: newblock:blockstates/oak_lamp.json" -> il n'y a pas de json à cet endroit



  • Ton fichier est dans "blockstats" (que tu as écris) ou dans "blockstates".



  • @'SCAREX':

    "Caused by: java.io.FileNotFoundException: newblock:blockstates/oak_lamp.json" -> il n'y a pas de json à cet endroit

    Il y a bien un fichier .json avec comme contenu
    {
    "variants": {
    "normal": { "model": "newblock:oak_lamp" }
    }
    }

    @'AymericRed':

    Ton fichier est dans "blockstats" (que tu as écris) ou dans "blockstates".

    J'ai bien créer un dossier blockstates et non blockstats je me suis juste trompée quand j'ai écris sur le forum désolé ^^



  • Okay.
    Alors tu as dis "\NewBlocks\src\main\resources\assets", je sais pas si c'est une erreur mais normalement c'est "\NewBlocks\src\main\resources\assets<ton modid="" donc="" 'newblock'="">".</ton>



  • @'AymericRed':

    Okay.
    Alors tu as dis "\NewBlocks\src\main\resources\assets", je sais pas si c'est une erreur mais normalement c'est "\NewBlocks\src\main\resources\assets<ton modid="" donc="" 'newblock'="">".</ton>

    ça ne marche toujours pas :x

    Voila comment les dossier sont disposé:

    que ça soit resources\assets\newblock ou resources\assets ça ne marche pas



  • Envoi le rapport d'erreur (pas l'ancien, celui que tu as maintenant)



  • @'SCAREX':

    Envoi le rapport d'erreur (pas l'ancien, celui que tu as maintenant)

    Je viens de relancer ça marche…
    Je n'ai peut être pas assez attendu ou pas bien relancer le client, parce que j'avais la même erreur. Merci pour votre aide et désolé ^^



  • Quand tu changes un truc dans les ressources, il faut que tu fasses clic droit > refresh car éclipse ne le remarque pas toujours tout de suite.

    Envoyé de mon RAINBOW LITE 4G en utilisant Tapatalk