Résolu [Erreur Textures]
-
Bonjour,
Je débute en modding et je rencontre un problème avec mes textures qui ne sont pas chargés par minecraft quand je run le jeu avec Eclipse.
(Ceci est mon premier mod)
ma version de forge [SRC] : forge-1.7.10-10.13.4.1452-1.7.10-src
Voici mon code :
package com.google.SpyMan.Mechanicalcraft.common; import java.util.ArrayList; import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy; import com.google.SpyMan.Mechanicalcraft.proxy.CommonProxy; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "modmechanicalcraft", name = "MechanicalCraft_beta", version = "1.0.0") public class mod_mechanicalcraft { @Instance("modmechanicalcraft") public static mod_mechanicalcraft instance; @SidedProxy(clientSide = "com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy", serverSide = "com.google.SpyMan.Mechanicalcraft.proxy.CommonProxy") public static CommonProxy proxy; //Item –--------------------------------------------- public static Item Wrench; public static Item Hammer; public static Item steelIngot; public static Item coalDust; public static Item ironPlate; public static Item steelPlate; public static Item ironGear; public static Item redstoneCrystal; //Blocks –-------------------------------------------- public static Block Crusher; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Item –------------------------------------------- Wrench = new Wrench().setUnlocalizedName("Wrench").setCreativeTab(CreativeTabs.tabTools).setTextureName("Wrench"); Hammer = new Hammer().setUnlocalizedName("Hammer").setCreativeTab(CreativeTabs.tabTools).setTextureName("Hammer"); steelIngot = new steelIngot().setUnlocalizedName("steelIngot").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("steelingot"); coalDust = new coalDust().setUnlocalizedName("coalDust").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("coaldust"); ironPlate = new ironPlate().setUnlocalizedName("ironPlate").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("ironplate"); steelPlate = new steelPlate().setUnlocalizedName("steelPlate").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("steelplate"); ironGear = new ironGear().setUnlocalizedName("ironGear").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("irongear"); redstoneCrystal = new redstoneCrystal().setUnlocalizedName("redstoneCrystal").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("redstonecrystal"); //Blocks –---------------------------------------------- Crusher = new Crusher(Material.iron).setBlockName("Crusher").setCreativeTab(CreativeTabs.tabRedstone).setBlockTextureName("crusher"); //Item –------------------------------------------------ GameRegistry.registerItem(Wrench, "Wrench"); GameRegistry.registerItem(Hammer, "Hammer"); GameRegistry.registerItem(steelIngot, "steelIngot"); GameRegistry.registerItem(coalDust, "coalDust"); GameRegistry.registerItem(ironPlate, "ironPlate"); GameRegistry.registerItem(steelPlate, "steelPlate"); GameRegistry.registerItem(ironGear, "ironGear"); //Blocks –------------------------------------------- GameRegistry.registerBlock(Crusher, "Crusher"); } @EventHandler public void init(FMLInitializationEvent event) {proxy.registerRender();} @EventHandler public void postInit(FMLPostInitializationEvent event) {} public static final String MODID = "modmechanicalcraft"; }
Merci de bien vouloir me répondre. :shy:
Cordialement
-
1. Quel formatter utilises-tu ? Car là pour moi c’est illisible
2. respecte la convention java, sinon on ne pourra pas comprendre : les classes commencent par une majuscule
3. Pour les textures : il faut penser à inclure le modid dans le setTextureName ainsi que le setBlocktextureName -
Merci de m’avoir répondu. :shy:
je formate en UTF-8, et pour les majuscules aux classes (Je ne suis pas un expert en java ).
J’ai déjà essayé : setTextureName(MODID + “texture”) qui ne fonctionnait pas non plus. -
C’est :
setTextureName(MODID + “**[size=large:]**texture”)
la bonne syntaxe.Tu confonds le formatage et l’encodage, utf-8 c’est l’encodage. Le formatage c’est la façon de présenter le code. Utilises le racourci ctrl + shift + f pour formater ton code.
-
Merci de votre aide,
mais le .setTextureName(MODID + “:texture”)
ne fonctionne pas non plus :sCela peut être du à ma version de forge [SRC] ???
-
Je ne pense pas.
Tu as placé ou tes images (chemin complet) ?
Envoies-nous également les logs du lancement du jeu. -
Voici le chemin complet des textures :
C:\Users\Family\Desktop\forge-1.7.10-10.13.4.1452-1.7.10src\src\main\resources\assets\modmechanicalcraft\textures\items
ainci que les logs :
[23:39:04] [main/INFO] [GradleStart]: Extra: []
[23:39:04] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Family/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[23:39:04] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[23:39:05] [main/INFO] [FML]: Forge Mod Loader version 7.99.18.1452 for Minecraft 1.7.10 loading
[23:39:05] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_45, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_45
[23:39:05] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[23:39:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[23:39:05] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
[23:39:05] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[23:39:05] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[23:39:05] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[23:39:05] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[23:39:12] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[23:39:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[23:39:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[23:39:13] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[23:39:13] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[23:39:13] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[23:39:13] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[23:39:16] [main/INFO]: Setting user: Player752
[23:39:23] [Client thread/INFO]: LWJGL Version: 2.9.1
[23:39:27] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----
// I’m sorry, Dave.Time: 20/06/15 23:39
Description: Loading screen debug infoThis is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
A detailed walkthrough of the error, its code path and all known details is as follows:
– System Details –
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 939751560 bytes (896 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML:
GL info: ’ Vendor: ‘Intel’ Version: ‘2.1.0 - Build 8.15.10.2302’ Renderer: ‘Mobile Intel 4 Series Express Chipset Family’
[23:39:27] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[23:39:27] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1452 Initialized
[23:39:28] [Client thread/INFO] [FML]: Replaced 183 ore recipies
[23:39:28] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[23:39:31] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[23:39:31] [Client thread/INFO] [FML]: Searching C:\Users\Family\Desktop\forge-1.7.10-10.13.4.1452-1.7.10-src\eclipse\mods for mods
[23:39:31] [Client thread/INFO] [FML]: Attempting to reparse the mod container bin
[23:39:52] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[23:39:52] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modmechanicalcraft] at CLIENT
[23:39:52] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modmechanicalcraft] at SERVER
[23:39:53] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:MechanicalCraft
[23:39:53] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[23:39:53] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
[23:39:54] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[23:39:54] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[23:39:54] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[23:39:54] [Client thread/INFO] [FML]: Applying holder lookups
[23:39:54] [Client thread/INFO] [FML]: Holder lookups applied
[23:39:54] [Client thread/INFO] [FML]: Injecting itemstacks
[23:39:54] [Client thread/INFO] [FML]: Itemstack injection complete
[23:39:54] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[23:39:54] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
[23:39:54] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[23:39:54] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[23:39:55] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[23:39:55] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[23:39:55] [Sound Library Loader/INFO]: Sound engine started
[23:40:07] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[23:40:08] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[23:40:08] [Client thread/INFO] [STDOUT]: [com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy:registerRender:10]: [SpyMan]: Welcome
[23:40:08] [Client thread/INFO] [FML]: Injecting itemstacks
[23:40:08] [Client thread/INFO] [FML]: Itemstack injection complete
[23:40:08] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[23:40:08] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:MechanicalCraft
[23:40:09] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[23:40:09] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[23:40:09] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[23:40:09] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down…
[23:40:09] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com
[23:40:09] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[23:40:09] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[23:40:09] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
[23:40:10] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[23:40:10] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[23:40:10] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[23:40:10] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[23:40:10] [Sound Library Loader/INFO]: Sound engine started
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: DOMAIN minecraft
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: –------------------------------------------------
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: domain minecraft is missing 8 textures
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: domain minecraft has 3 locations:
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: unknown resourcepack type net.minecraft.client.resources.DefaultResourcePack : Default
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: mod FML resources at C:\Users\Family.gradle\caches\minecraft\net\minecraftforge\forge\1.7.10-10.13.4.1452-1.7.10\forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: mod Forge resources at C:\Users\Family.gradle\caches\minecraft\net\minecraftforge\forge\1.7.10-10.13.4.1452-1.7.10\forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: –-----------------------
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: The missing resources for domain minecraft are:
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/steelplate.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/Hammer.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/Wrench.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/coaldust.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/irongear.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/ironplate.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/blocks/crusher.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/steelingot.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: –-----------------------
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: No other errors exist for domain minecraft
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= -
Quand je demande avec quoi tu formate, c’est pas l’encodage de ton fichier… C’est la façon dont les choses sont organisés, normalement celui de base fonctionne correctement, c’est étrange.
Pour ta texture, c’est setTextureName (ou setBlockTextureName pour les blocks) comme ceci :
setTextureName(“modid:tonItem”) ce qui fera que ton fichier devra être dans src/main/resources/assets/modid/textures/items/tonItem.png
avec modid pour ton modid et tonItem pour le nom de ton item. oublie pas de changer aussi l’unlocalizedName en y rajoutant ton modid, sinon tu risques de prendre le nom d’autres items en jeu. -
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: The missing resources for domain minecraft are:
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/steelplate.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/Hammer.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/Wrench.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/coaldust.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/irongear.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/ironplate.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/blocks/crusher.png
[23:40:13] [Client thread/ERROR] [TEXTURE ERRORS]: textures/items/steelingot.pngTu n’as pas mit setTextureName(“modmechanicalcraft:nom”), il cherche toujours les textures sur le domaine minecraft au lieu de chercher sur le domaine modmechanicalcraft ….
-
Merci de m’avoir aidé résoudre ce problème.:rolleyes: