Résolu Problème de texture ( Eclipse, .png n'est pas un format texte ! )
-
Bon, un souci assez… Etrange
Je vais aller assez rapidement
Eclipse pense que .png est un fromat texte…
Ma texture est donc incorrecte
Je n’arrive pas a faire comprendre à Eclipse que .png est un format d’image !Quelque peut m’aider plz
-
Window -> Preferences -> general -> editors -> File Associations.
Tu cherches .png (tu l’ajoutes si non présent) et dans la partie associated editor tu choisis ton éditeur d’image. -
Nice !
Merci Robin !
Mais ma texture ne se load pas Oo
Etrange, je vais chercher ça de mon coté, et si je trouve pas, je demanderais de l’aide ( pour un problème de débutant, mais bon… ) -
Ça n’a rien a voir avec Eclipse.
Ton image est au format PNG point barre. Ce n’est pas parce que l’éditeur d’Eclipse l’ouvre en tant que texte que ce n’est plus une image.
Si tu as des erreurs de texture, l’erreur est ailleurs. -
Du-coup j’ai retiré le résolu de cette discussion et supprimé l’autre.
Tu peux envoyer l’image en question ? -
BlocModèle :
:::
Class Bloc Modèle :```java
package eryah.MoreBuildingBlocks.blocks;import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
import eryah.MoreBuildingBlocks.MainClass;
import eryah.MoreBuildingBlocks.Reference;public class BlocModèle extends Block {
protected BlocModèle(Material mat) {
super(Material.rock);
this.setHarvestLevel(“pickaxe”, 1);
this.setHardness(15.0f);
this.setResistance(30.0f);
}public static Block bloc;
public static void init()
{
bloc = new BlocModèle(Material.rock).setUnlocalizedName(“bloc”).setCreativeTab(MainClass.MBBTab);
}public static void register()
{
GameRegistry.registerBlock(bloc, bloc.getUnlocalizedName().substring(5));
}public static void registerRenders()
{
registerRender(bloc);
}public static void registerRender(Block block)
{
Item item = Item.getItemFromBlock(block);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + “:” + item.getUnlocalizedName().substring(5), “inventory”));
}}
Blockstates ```java { "variants": { "normal": [ { "model": "mbb.bloc" } ] } }
Model :
{ "parent": "block/cube_all", "textures": { "all": "mbb:blocks/bloc" } }
:::
Creative Tab
:::
Class :package eryah.MoreBuildingBlocks; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.item.Item; public class CreativeTabMBB extends CreativeTabs { public CreativeTabMBB(String label) { super(label); //Tres important de ne pas ecrire "tab_" this.setBackgroundImageName("eryah.png"); } @Override public Item getTabIconItem() { return Item.getItemFromBlock(Blocks.stonebrick); } }
:::
MainClass : :::
package eryah.MoreBuildingBlocks; import eryah.MoreBuildingBlocks.blocks.BlocModèle; import eryah.MoreBuildingBlocks.proxy.CommonProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION) public class MainClass { @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; public static final CreativeTabMBB MBBTab = new CreativeTabMBB("MBBTab"); @Mod.Instance(Reference.MOD_ID) public static MainClass instance; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Register BlocModèle.init(); BlocModèle.register(); } @EventHandler public void init(FMLInitializationEvent event) { } @EventHandler public void PostInit(FMLPostInitializationEvent event) { } }
:::
Voila voila
Bon, désolé si l’erreur vous saute aux yeux, mais je n’ai pas codé depuis plusieurs mois, j’ai perdu mon œil repéreur d’erreur de code -
Les accents dans les noms de classe ce n’est pas du tout bon. NE JAMAIS FAIRE ÇA. Uniquement [A-Z][a-z][0-9]. Rien d’autres.
Les textures ça me semble bon, étrange qu’elles ne s’affichent pas.
Si tu les ouvres depuis l’explorateur de fichier c’est bon ? -
J’avais oublier la règle des accents :S ( J’ai enlevé l’accent, et ça ne fonctionne toujours pas )
Et ouis, les fichier s’ouvres normalement, il ne se load juste pas -
Logs ?
-
Logs :
[17:23:52] [main/INFO] [GradleStart]: Extra: [] [17:23:52] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/utilisateur/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken, {REDACTED}, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [17:23:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [17:23:52] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [17:23:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [17:23:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [17:23:52] [main/INFO] [FML]: Forge Mod Loader version 8.99.124.1450 for Minecraft 1.8 loading [17:23:52] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_91, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_91 [17:23:53] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [17:23:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [17:23:53] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [17:23:53] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [17:23:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:23:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [17:23:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [17:23:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:23:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:23:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [17:23:53] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [17:23:55] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [17:23:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [17:23:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [17:23:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [17:23:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [17:23:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [17:23:56] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [17:23:56] [Client thread/INFO]: Setting user: Player281 [17:23:59] [Client thread/INFO]: LWJGL Version: 2.9.1 [17:23:59] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:235]: –-- Minecraft Crash Report ---- // Ooh. Shiny. Time: 05/06/16 17:23 Description: Loading screen debug info This 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.8 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 729446280 bytes (695 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 10.18.15.4256' Renderer: 'Intel(R) HD Graphics 4600' [17:23:59] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [17:23:59] [Client thread/INFO] [FML]: MinecraftForge v11.14.3.1450 Initialized [17:23:59] [Client thread/INFO] [FML]: Replaced 204 ore recipies [17:23:59] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [17:23:59] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [17:23:59] [Client thread/INFO] [FML]: Searching C:\Users\utilisateur\Desktop\Mods\1.8 MBB\eclipse\mods for mods [17:24:01] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [17:24:01] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, mbb] at CLIENT [17:24:01] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, mbb] at SERVER [17:24:02] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:More Building Blocks [17:24:02] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [17:24:02] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations [17:24:02] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [17:24:02] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [17:24:02] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [17:24:02] [Client thread/INFO] [FML]: Applying holder lookups [17:24:02] [Client thread/INFO] [FML]: Holder lookups applied [17:24:02] [Client thread/INFO] [FML]: Injecting itemstacks [17:24:02] [Client thread/INFO] [FML]: Itemstack injection complete [17:24:02] [Client thread/INFO] [STDOUT]: [tv.twitch.StandardCoreAPI:<init>:16]: If on Windows, make sure to provide all of the necessary dll's as specified in the twitchsdk README. Also, make sure to set the PATH environment variable to point to the directory containing the dll's. [17:24:02] [Client thread/ERROR]: Couldn't initialize twitch stream [17:24:02] [Sound Library Loader/INFO]: Starting up SoundSystem… [17:24:02] [Thread-9/INFO]: Initializing LWJGL OpenAL [17:24:02] [Thread-9/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:24:02] [Thread-9/INFO]: OpenAL initialized. [17:24:02] [Sound Library Loader/INFO]: Sound engine started [17:24:06] [Client thread/INFO]: Created: 512x512 textures-atlas [17:24:06] [Client thread/ERROR] [FML]: Model definition for location mbb:bloc#inventory not found [17:24:06] [Client thread/INFO] [FML]: Injecting itemstacks [17:24:06] [Client thread/INFO] [FML]: Itemstack injection complete [17:24:07] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [17:24:07] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:More Building Blocks [17:24:07] [Client thread/INFO]: SoundSystem shutting down… [17:24:07] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [17:24:07] [Sound Library Loader/INFO]: Starting up SoundSystem… [17:24:07] [Thread-11/INFO]: Initializing LWJGL OpenAL [17:24:07] [Thread-11/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:24:07] [Thread-11/INFO]: OpenAL initialized. [17:24:07] [Sound Library Loader/INFO]: Sound engine started [17:24:10] [Client thread/INFO]: Created: 512x512 textures-atlas [17:24:10] [Client thread/ERROR] [FML]: Model definition for location mbb:bloc#inventory not found [17:24:14] [Server thread/INFO]: Starting integrated minecraft server version 1.8 [17:24:14] [Server thread/INFO]: Generating keypair [17:24:14] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [17:24:14] [Server thread/INFO] [FML]: Applying holder lookups [17:24:14] [Server thread/INFO] [FML]: Holder lookups applied [17:24:14] [Server thread/INFO] [FML]: Loading dimension 0 (MoreBuildingBlock - Beta 1.0) (net.minecraft.server.integrated.IntegratedServer@20b1740d) [17:24:14] [Server thread/INFO] [FML]: Loading dimension 1 (MoreBuildingBlock - Beta 1.0) (net.minecraft.server.integrated.IntegratedServer@20b1740d) [17:24:14] [Server thread/INFO] [FML]: Loading dimension -1 (MoreBuildingBlock - Beta 1.0) (net.minecraft.server.integrated.IntegratedServer@20b1740d) [17:24:14] [Server thread/INFO]: Preparing start region for level 0 [17:24:15] [Server thread/INFO]: Changing view distance to 12, from 10 [17:24:17] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2 [17:24:17] [Netty Server IO #1/INFO] [FML]: Client protocol version 2 [17:24:17] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@8.0.99.99,Forge@11.14.3.1450,mcp@9.05,mbb@Beta 1.0 [17:24:17] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [17:24:17] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [17:24:17] [Server thread/INFO]: Player281[local:E:e7b4875d] logged in with entity id 20 at (-135.80723929120427, 64.0, 244.0354392967457) [17:24:17] [Server thread/INFO]: Player281 joined the game [17:24:18] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@bb6bf68[id=b743052f-5855-37e7-a97b-fd551acafef4,name=Player281,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:158) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:53) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:50) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:148) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_91] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_91] at java.lang.Thread.run(Unknown Source) [?:1.8.0_91] [17:24:20] [Server thread/INFO]: Saving and pausing game… [17:24:20] [Server thread/INFO]: Saving chunks for level 'MoreBuildingBlock - Beta 1.0'/Overworld [17:24:20] [Server thread/INFO]: Saving chunks for level 'MoreBuildingBlock - Beta 1.0'/Nether [17:24:20] [Server thread/INFO]: Saving chunks for level 'MoreBuildingBlock - Beta 1.0'/The End [17:24:22] [Client thread/INFO]: Stopping! [17:24:22] [Client thread/INFO]: SoundSystem shutting down… [17:24:22] [Server thread/INFO]: Stopping server [17:24:22] [Server thread/INFO]: Saving players [17:24:22] [Server thread/INFO]: Saving worlds [17:24:22] [Server thread/INFO]: Saving chunks for level 'MoreBuildingBlock - Beta 1.0'/Overworld [17:24:22] [Server thread/INFO]: Saving chunks for level 'MoreBuildingBlock - Beta 1.0'/Nether [17:24:22] [Server thread/INFO]: Saving chunks for level 'MoreBuildingBlock - Beta 1.0'/The End [17:24:22] [Server thread/INFO] [FML]: Unloading dimension 0 [17:24:22] [Server thread/INFO] [FML]: Unloading dimension -1 [17:24:22] [Server thread/INFO] [FML]: Unloading dimension 1 [17:24:22] [Server thread/INFO] [FML]: Applying holder lookups [17:24:22] [Server thread/INFO] [FML]: Holder lookups applied [17:24:22] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release ```</init>
-
Pour les logs -> balise code et non balise java dans une balise spoiler.
[17:24:10] [Client thread/ERROR] [FML]: Model definition for location mbb:bloc#inventory not found
Il te manque le json. -
Le json ? Pourtant j’ai bien mis tous les json, blockstates, et models
A moins qu’il y en a un autre que j’ai oublié ? -
Sinon envoies-moi un zip du dossier src. Ça sera plus simple et plus rapide x)
-
[size=smallhttps://mega.nz/#!8o9VXJJT dossier source]
[size=smallPour une raison étrange, le lien nécesite une clé, la voici : !USI7VNT-GX2X77X_zWslsASPjEjg-C_63DBSC7GW5LY] -
Personne a trouvé de solution ?
-
Je n’ai plus pensé à regarder, désolé. Je regardes ça dans la soiré.
Ton json dans le dossier blockstate n’est pas bon, tu as un . au lieu d’un :
-
la texture ne s’applique toujours pas
-
il manque le json pour l’item bloc :
{ "parent": "mbb:block/bloc", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } }
dans assets.mbb.models.item
Et pour finir ton .png s’appelle concrete, donc soit tu le renommes “bloc” soit tu changes dans le json du bloc.
-
Je suis tellement con –’
Je suis sincèrement désolé pour ce post ridicule…
On a qu’a dire que c’est le retour, j’ai plus l’habitude de modifier les noms quand je copie-coller des chose de mes autres mods hein ?
BTW, j’ai un petit souci eclipse, mon disuqe principal étant plein, j’ia fait un CCleaner qui a gentillement supprimé des fichiers du système D’après ce que j’ai compris du crash report, il y a un problème avec java
( Si vous voulez m’éclairer un peu plus sur ce souci ( qui est devenu réccurant, c’est la 3e fois que ça m’arrive…) pour que je le règle plus vite, voici le screen du crash)
-
Regarde si java est toujours dans les variables d’environnement