Rendu d'item avec un model techne
-
Elle est dans :
:::
“forge-1.7.10-10.13.2.1230-src\src\main\resources\assets\modharrypotter\textures\models\items”
:::
et elle s’appelle:
:::
model_items_sureau
:::
et elle fait 64*32, c’est Whathefrench974 a fait le model et la texture. -
Ça m’a l’air bon pourtant
Tu peux envoyé les logs complet après avoir lancé le jeu et prit l’item en main ? -
Voila:
[11:46:04] [main/INFO] [GradleStart]: Extra: [] [11:46:04] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.7.10, --assetsDir, C:/Users/Hugo/.gradle/caches/minecraft/assets, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker] [11:46:04] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [11:46:04] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [11:46:04] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [11:46:04] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [11:46:05] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1230 for Minecraft 1.7.10 loading [11:46:05] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_67, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre7 [11:46:05] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [11:46:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [11:46:05] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [11:46:05] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [11:46:05] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [11:46:05] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [11:46:05] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [11:46:05] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [11:46:05] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [11:46:05] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [11:46:09] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [11:46:09] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [11:46:09] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [11:46:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [11:46:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [11:46:11] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [11:46:15] [main/INFO]: Setting user: Player879 [11:46:22] [Client thread/INFO]: LWJGL Version: 2.9.1 [11:46:40] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [11:46:40] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1230 Initialized [11:46:40] [Client thread/INFO] [FML]: Replaced 182 ore recipies [11:46:40] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [11:46:41] [Client thread/INFO] [FML]: Searching C:\Users\Hugo\Desktop\Mod Harry Potter\forge-1.7.10-10.13.2.1230-src\eclipse\mods for mods [11:46:52] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [11:46:53] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modharrypotter] at CLIENT [11:46:53] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modharrypotter] at SERVER [11:46:54] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Harry Potter Mod [11:46:55] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [11:46:55] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [11:46:55] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [11:46:55] [Client thread/INFO] [FML]: Applying holder lookups [11:46:55] [Client thread/INFO] [FML]: Holder lookups applied [11:46:56] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [11:46:56] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [11:46:56] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [11:46:56] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [11:46:57] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [11:46:57] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [11:46:57] [Sound Library Loader/INFO]: Sound engine started [11:47:03] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.png java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:582) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [11:47:04] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [11:47:05] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.png java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:583) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [11:47:05] [Client thread/INFO]: Created: 512x256 textures/items-atlas [11:47:05] [Client thread/INFO] [STDOUT]: [com.harrypotter.sosoh.proxy.ClientProxy:registerRender:22]: Methodes Client loaded [11:47:06] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [11:47:06] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Harry Potter Mod [11:47:06] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.png java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [11:47:06] [Client thread/INFO]: Created: 512x256 textures/items-atlas [11:47:06] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.png java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [11:47:07] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [11:47:07] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [11:47:07] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [11:47:07] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [11:47:07] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [11:47:07] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [11:47:07] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [11:47:07] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [11:47:07] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [11:47:07] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [11:47:08] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [11:47:08] [Sound Library Loader/INFO]: Sound engine started [11:47:25] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [11:47:25] [Server thread/INFO]: Generating keypair [11:47:26] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [11:47:26] [Server thread/INFO] [FML]: Applying holder lookups [11:47:26] [Server thread/INFO] [FML]: Holder lookups applied [11:47:27] [Server thread/INFO] [FML]: Loading dimension 0 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@171b6dfb) [11:47:27] [Server thread/INFO] [FML]: Loading dimension 1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@171b6dfb) [11:47:27] [Server thread/INFO] [FML]: Loading dimension -1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@171b6dfb) [11:47:27] [Server thread/INFO]: Preparing start region for level 0 [11:47:28] [Server thread/INFO]: Preparing spawn area: 0% [11:47:29] [Server thread/INFO]: Preparing spawn area: 29% [11:47:30] [Server thread/INFO]: Preparing spawn area: 81% [11:47:32] [Server thread/INFO]: Changing view distance to 5, from 10 [11:47:33] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [11:47:33] [Netty IO #1/INFO] [FML]: Client protocol version 1 [11:47:33] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : mcp@9.05,FML@7.10.85.1230,modharrypotter@1.0.0,Forge@10.13.2.1230 [11:47:33] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [11:47:33] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [11:47:33] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [11:47:33] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [11:47:33] [Server thread/INFO]: Player879[local:E:635fc49a] logged in with entity id 298 at (-119.52461731424478, 64.0, 249.28896610467763) [11:47:33] [Server thread/INFO]: Player879 a rejoint la partie [11:47:36] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 4245ms behind, skipping 84 tick(s) [11:47:39] [Server thread/INFO]: Saving and pausing game… [11:47:39] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Overworld [11:47:39] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Nether [11:47:39] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/The End [11:47:48] [Server thread/INFO]: Saving and pausing game… [11:47:48] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Overworld [11:47:49] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Nether [11:47:49] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/The End [11:47:59] [Server thread/INFO]: Saving and pausing game… [11:47:59] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Overworld [11:47:59] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Nether [11:47:59] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/The End [11:48:03] [Client thread/INFO]: Stopping! [11:48:03] [Server thread/INFO]: Stopping server [11:48:03] [Server thread/INFO]: Saving players [11:48:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [11:48:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [11:48:03] [Server thread/INFO]: Saving worlds [11:48:03] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Overworld [11:48:03] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Nether [11:48:03] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/The End [11:48:03] [Server thread/INFO] [FML]: Unloading dimension 0 [11:48:03] [Server thread/INFO] [FML]: Unloading dimension -1 [11:48:03] [Server thread/INFO] [FML]: Unloading dimension 1 [11:48:03] [Server thread/INFO] [FML]: Applying holder lookups [11:48:03] [Server thread/INFO] [FML]: Holder lookups applied [11:48:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [11:48:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
-
Ton problème actuel est le rendu lorsque le joueur à l’item en main ou le rendu dans l’inventaire ? Car je ne vois pas d’erreur concernant l’item en main.
-
-
Oui donc le problème c’est bien le rendu dans l’inventaire.
Et c’est normal, le code que tu as fait actuellement ne permet que de faire le rendu en main. Pour le rendu dans l’inventaire il faut ajouter dans la fonction handleRenderTypecase INVENTORY: return true;
(au dessus de default et en dessous de case EQUIPPED)
Et dans la fonction renderItem, ajouter :case EQUIPPED: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; }
(il existe aussi ENTITY pour lorsque l’item est au sol)
-
J’ai deja mis EQUIPPED, j’ai remplacé par INVENTORY c’est ca non ?
Edit: Mon item est invisible dans l’inventaire et il y a toujours le truc violet et noir quand je le tiens dans ma main… Tu veux que je t’envoies mon dossier src ?
-
Non juste la classe
-
Non, il ne faut pas remplacer, il faut mettre en plus.
-
Mais j’ai deja un EQUIPPED alors ca me fait une erreur… Je fais comment ?
-
Envoie toute ta classe.
-
Je te mp mon dossier src.
Edit:
Regarde tes mp Robin -
Bon, normal que ça ne fonctionne pas si tu as retiré tous les sharpe.render dans le code du modèle –’
Sérieusement, fait attention a ce que tu fais, tu fait les trucs complètement par hasard ou tu comprends ce que tu fais ?Voila la classe du modèle corrigé :
package com.harrypotter.sosoh.client; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelBaguetteSureau extends ModelBase { // fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape6; ModelRenderer Shape7; ModelRenderer Shape8; ModelRenderer Shape9; public ModelBaguetteSureau() { textureWidth = 64; textureHeight = 32; Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 1, 1, 14); Shape1.setRotationPoint(0F, 20.36667F, -8F); Shape1.setTextureSize(64, 32); setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 36, 0); Shape2.addBox(0F, 0F, 0F, 2, 2, 1); Shape2.setRotationPoint(-0.5F, 19.86667F, 6F); Shape2.setTextureSize(64, 32); setRotation(Shape2, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 36, 0); Shape3.addBox(0F, 0F, 0F, 2, 2, 1); Shape3.setRotationPoint(-0.5F, 19.9F, 3F); Shape3.setTextureSize(64, 32); setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 43, 0); Shape4.addBox(0F, 0F, 0F, 3, 3, 1); Shape4.setRotationPoint(-1F, 19.5F, 0F); Shape4.setTextureSize(64, 32); setRotation(Shape4, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 36, 0); Shape5.addBox(0F, 0F, 0F, 2, 2, 1); Shape5.setRotationPoint(-0.5F, 19.9F, -2.5F); Shape5.setTextureSize(64, 32); setRotation(Shape5, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 31, 0); Shape6.addBox(0F, 0F, 0F, 1, 1, 1); Shape6.setRotationPoint(0F, 20.1F, -6F); Shape6.setTextureSize(64, 32); setRotation(Shape6, 0F, 0F, 0F); Shape7 = new ModelRenderer(this, 31, 0); Shape7.addBox(0F, 0F, 0F, 1, 1, 1); Shape7.setRotationPoint(0F, 20.6F, -6F); Shape7.setTextureSize(64, 32); setRotation(Shape7, 0F, 0F, 0F); Shape8 = new ModelRenderer(this, 31, 0); Shape8.addBox(0F, 0F, 0F, 1, 1, 1); Shape8.setRotationPoint(0.3F, 20.35F, -6F); Shape8.setTextureSize(64, 32); setRotation(Shape8, 0F, 0F, 0F); Shape9 = new ModelRenderer(this, 31, 0); Shape9.addBox(0F, 0F, 0F, 1, 1, 1); Shape9.setRotationPoint(-0.3F, 20.4F, -6F); Shape9.setTextureSize(64, 32); setRotation(Shape9, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); Shape5.render(f5); Shape6.render(f5); Shape7.render(f5); Shape8.render(f5); Shape9.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } }
Et celle du rendu :
package com.harrypotter.sosoh.client; import org.lwjgl.opengl.GL11; import com.harrypotter.sosoh.common.ModHarryPotter; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; public class ItemBaguetteSureauTechneRender implements IItemRenderer { protected ModelBaguetteSureau model; protected static final ResourceLocation texture = new ResourceLocation(ModHarryPotter.MODID, "textures/models/items/model_items_sureau.png"); public ItemBaguetteSureauTechneRender() { model = new ModelBaguetteSureau(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch(type) { case EQUIPPED: return true; case EQUIPPED_FIRST_PERSON: return true; case INVENTORY: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch(type) { case EQUIPPED: { GL11.glPushMatrix(); GL11.glRotatef(-90.F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.5F, -1.2F, 0.5F); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } case EQUIPPED_FIRST_PERSON: { GL11.glPushMatrix(); GL11.glRotatef(-90.F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.5F, -1.2F, 0.5F); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } case INVENTORY: { GL11.glPushMatrix(); GL11.glTranslatef(-8F, -8F, 0.0F); GL11.glRotatef(-45.F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(90.F, 0.0F, 1.0F, 0.0F); GL11.glScalef(17F, 17F, 17F); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } default: break; } } }
-
J’avais enlevé pour tester si ca marcher… Merci en tout cas
-
Bonjour j’ai essayé de faire sa en forge 1.7.2 et je ne comprend l’argument “Angle” dans les rotation car en 1.7.2 sa me demande de mettre un float que doit je faire? S’il vous plait repondez le plus vite possible.
-
Bonjour voilà j’aimerais mettre un render sur un item en version 1.8 seulement j’ai quelques problèmes à ces niveaux :
@Override public void renderItem(ItemRenderType type, ItemStack item, Object… data) { switch(type) { case EQUIPPED: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.func_110577_a(texture); //func_110577_a n'est plus dispo alors j'utilise : getTexture model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } default: break; } }
et dans le ClientProxy, .itemID n’est plus dispo non plus alors j’utilise .getItemById(0). Mais rien ne marche, j’espère que quelqu’un pourra m’aider et verras mon message, n’hésitez pas a me le signaler si une méthode ou si la méthode au complet n’est plus valide en 1.8. Merci d’avance
-
P.s : Mes classes :
L’item simple :
package mods.emotion.items; import mods.emotion.creativeTabs.EmotionTab; import net.minecraft.item.Item; public class BaseButterflyNet extends Item { public BaseButterflyNet() { this.setCreativeTab(EmotionTab.EmotionCreativeTab2); } }
Le render :
package mods.emotion.items; import mods.emotion.lib.Infos; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; public class RenderNet implements IItemRenderer { protected ModelNet model; protected static final ResourceLocation texture = new ResourceLocation(Infos.MODID + ":textures/entity/net.png"); public RenderNet() { model = new ModelNet(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch(type) { case EQUIPPED: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object… data) { switch(type) { case EQUIPPED: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } default: break; } } }
et le model :
package mods.emotion.items; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelNet extends ModelBase { // fields ModelRenderer handle; ModelRenderer par1; ModelRenderer par2; ModelRenderer par3; ModelRenderer par4; ModelRenderer net; public ModelNet() { textureWidth = 32; textureHeight = 32; handle = new ModelRenderer(this, 0, 0); handle.addBox(0F, 0F, 0F, 1, 1, 8); handle.setRotationPoint(0F, 23F, 0F); handle.setTextureSize(32, 32); handle.mirror = true; setRotation(handle, 0F, 0F, 0F); par1 = new ModelRenderer(this, 0, 10); par1.addBox(0F, 0F, 0F, 7, 1, 1); par1.setRotationPoint(-3F, 23F, -1F); par1.setTextureSize(32, 32); par1.mirror = true; setRotation(par1, 0F, 0F, 0F); par2 = new ModelRenderer(this, 0, 12); par2.addBox(0F, 0F, 0F, 1, 1, 5); par2.setRotationPoint(-3F, 23F, -6F); par2.setTextureSize(32, 32); par2.mirror = true; setRotation(par2, 0F, 0F, 0F); par3 = new ModelRenderer(this, 16, 10); par3.addBox(0F, 0F, 0F, 7, 1, 1); par3.setRotationPoint(-3F, 23F, -7F); par3.setTextureSize(32, 32); par3.mirror = true; setRotation(par3, 0F, 0F, 0F); par4 = new ModelRenderer(this, 12, 12); par4.addBox(0F, 0F, 0F, 1, 1, 5); par4.setRotationPoint(3F, 23F, -6F); par4.setTextureSize(32, 32); par4.mirror = true; setRotation(par4, 0F, 0F, 0F); net = new ModelRenderer(this, 0, 19); net.addBox(0F, 0F, 0F, 7, 5, 7); net.setRotationPoint(-3F, 18F, -7F); net.setTextureSize(32, 32); net.mirror = true; setRotation(net, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); handle.render(f5); par1.render(f5); par2.render(f5); par3.render(f5); par4.render(f5); net.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } }
-
En 1.7 il faut juste mettre l’item, pas de .itemID. En 1.8, je crois que cette fonctionnalité n’est plus du tout opérationnel à vérifier.
-
Robin ce tuto ne parle pas d’item de model comme la crée en elle-même parce que je n’ai pas l’impression qu’on en parle et j’ai juste une erreur du coup c’est :
MinecraftForgeClient.registerItemRenderer(ModAltisCraft.BlocPanneauInterdit, (IItemRenderer)new ItemPanneauInterditRender());
J’ai enlevé le .ItemID comme tu le dis en 1.7.X il n’y en a pas besoin mais du coup mon eclipse n’est pas très content et me propose pour le registerItemRenderer :
- Change to ‘getItemRenderer(…)’ : qui fait que ce n’est pas une item et il ne kiff pas
- Change type of ‘BlocPanneauInterdit’ to ‘Item’ : change dans ma classe principale le bloc en item et c’est le dawa comme c’est censé être un bloc…
-
Item.getItemFromBlock(ModAltisCraft.BlocPanneauInterdit) au lieu de ModAltisCraft.BlocPanneauInterdit