Créer un item simple
-
ça marche toujours pas ? Selon le log tu n’as pas testé en lançant un monde et le log n’indique aucune erreur.
-
Oui j’ai bien regarder car en fait j’ai relancer mon jeu et pris les logs que au menu principal bouge pas je t’envoie les logs quand je me co au monde.
Log:
[12:31:02] [main/INFO] [GradleStart]: Extra: [] [12:31:02] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.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] [12:31:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [12:31:02] [main/INFO] [FML]: Forge Mod Loader version 8.0.37.1334 for Minecraft 1.8 loading [12:31:02] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_45, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jdk1.8.0_45\jre [12:31:02] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [12:31:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [12:31:02] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [12:31:02] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [12:31:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [12:31:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [12:31:02] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [12:31:03] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [12:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [12:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [12:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [12:31:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [12:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [12:31:03] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [12:31:03] [Client thread/INFO]: Setting user: Player482 [12:31:04] [Client thread/INFO]: LWJGL Version: 2.9.1 [12:31:05] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [12:31:05] [Client thread/INFO] [FML]: MinecraftForge v11.14.1.1334 Initialized [12:31:05] [Client thread/INFO] [FML]: Replaced 204 ore recipies [12:31:05] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [12:31:05] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Desktop\WasteLandMod V1.0\eclipse\mods for mods [12:31:05] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [12:31:05] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, wl] at CLIENT [12:31:05] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, wl] at SERVER [12:31:06] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:WasteLand [12:31:06] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [12:31:06] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations [12:31:06] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [12:31:06] [Client thread/INFO] [FML]: Applying holder lookups [12:31:06] [Client thread/INFO] [FML]: Holder lookups applied [12:31:06] [Sound Library Loader/INFO]: Starting up SoundSystem… [12:31:06] [Thread-7/INFO]: Initializing LWJGL OpenAL [12:31:06] [Thread-7/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [12:31:06] [Thread-7/INFO]: OpenAL initialized. [12:31:06] [Sound Library Loader/INFO]: Sound engine started [12:31:07] [Client thread/INFO]: Created: 512x512 textures-atlas [12:31:07] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [12:31:07] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:WasteLand [12:31:07] [Client thread/INFO]: SoundSystem shutting down… [12:31:08] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [12:31:08] [Sound Library Loader/INFO]: Starting up SoundSystem… [12:31:08] [Thread-9/INFO]: Initializing LWJGL OpenAL [12:31:08] [Thread-9/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [12:31:08] [Thread-9/INFO]: OpenAL initialized. [12:31:08] [Sound Library Loader/INFO]: Sound engine started [12:31:09] [Client thread/INFO]: Created: 512x512 textures-atlas [12:31:11] [Server thread/INFO]: Starting integrated minecraft server version 1.8 [12:31:11] [Server thread/INFO]: Generating keypair [12:31:11] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [12:31:11] [Server thread/INFO] [FML]: Applying holder lookups [12:31:11] [Server thread/INFO] [FML]: Holder lookups applied [12:31:12] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@63751a) [12:31:12] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@63751a) [12:31:12] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@63751a) [12:31:12] [Server thread/INFO]: Preparing start region for level 0 [12:31:13] [Server thread/INFO]: Changing view distance to 8, from 10 [12:31:13] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 1 [12:31:13] [Netty Server IO #1/INFO] [FML]: Client protocol version 1 [12:31:13] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@8.0.37.1334,wl@1.0,Forge@11.14.1.1334,mcp@9.05 [12:31:13] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [12:31:13] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [12:31:13] [Server thread/INFO]: Player482[local:E:9840680d] logged in with entity id 317 at (251.28415405935402, 83.15197203551676, -215.93098705934898) [12:31:13] [Server thread/INFO]: Player482 joined the game
-
Et tu n’as pas la texture sur ton item ? Bizarre, je vois aucune erreur dans la console, vérifies que la fonction où tu enregistres ta texture est bien appelée.
-
Tu parle de cette fonction? :
@Override
public void registerRender() {
RenderItem registerMesher = Minecraft.getMinecraft().getRenderItem();
registerMesher.getItemModelMesher().register(WasteLandMod.INSTANCE.wastelandmoditems.itemwater, 0, new ModelResourceLocation(WasteLandMod.MODID + “:itemwater”, “inventory”));
registerMesher.getItemModelMesher().register(WasteLandMod.INSTANCE.wastelandmoditems.trousseaoutils, 0, new ModelResourceLocation(WasteLandMod.MODID + “:trousseaoutils”, “inventory”));
} -
Oui c’est ça.
-
Il y a un problème dans le tuto: "(assets/modid/textures/item%(red)
/nomdelatexture.png)" -
Oui je sais j’ai ajouter le s c’est pareil…
Sinon aymeric oui ma fonction est appelée:
[14:00:28] [Client thread/INFO] [STDOUT]: [net.armacraft.Items.WasteLandModItems:registerItemsModels:26]: AAAAAAAAAAAAAAAAAAAAAAAAAAAAA -
@‘minantcraft2’:
Il y a un problème dans le tuto: “(assets/modid/textures/item%(red)~~/nomdelatexture.png)”
Non, ça dépend de ce que l’on met ici : “layer0”: "tutorial:item%(#ff3333)
/tutorial_item"~~
Et de toute façon, le “s” est bien marqué dans le chemin dans le tuto. -
@‘floriangabet’:
Tu parle de cette fonction? :
@Override
public void registerRender() {
RenderItem registerMesher = Minecraft.getMinecraft().getRenderItem();
registerMesher.getItemModelMesher().register(WasteLandMod.INSTANCE.wastelandmoditems.itemwater, 0, new ModelResourceLocation(WasteLandMod.MODID + “:itemwater”, “inventory”));
registerMesher.getItemModelMesher().register(WasteLandMod.INSTANCE.wastelandmoditems.trousseaoutils, 0, new ModelResourceLocation(WasteLandMod.MODID + “:trousseaoutils”, “inventory”));
}Utilises plutôt cette fonction :
ModelLoader.setCustomModelResourceLocation(NOM, 0, new ModelResourceLocation(ClassePrincipale.MODID + “:nom_dans_le_registre”, “inventory”));@‘minantcraft2’:
Il y a un problème dans le tuto: “(assets/modid/textures/item%(red)~~/nomdelatexture.png)”
C’est corrigé.~~
-
C’est pareil robin…
-
@‘AymericRed’:
@‘minantcraft2’:
Il y a un problème dans le tuto: “(assets/modid/textures/item%(red)~~/nomdelatexture.png)”
Non, ça dépend de ce que l’on met ici : “layer0”: “tutorial:item%(#ff3333)~~/tutorial_item”
Et de toute façon, le “s” est bien marqué dans le chemin dans le tuto.oui mais dans le tuto c’est “layer0”: item%(red) ~~et juste en dessous c’est ecris en rouge: (assets/modid/textures/item/nomdelatexture.png)" sans le s
PS: tu peut utiliser color=red pas obligé de le faire en html et en plus en html le rouge fonctionne aussi comme ça: #ff0000 (je fait de l’html)___@‘robin4002’:@‘minantcraft2’:
Il y a un problème dans le tuto: “(assets/modid/textures/item%(red)~~/nomdelatexture.png)”
C’est corrigé.
OK ps aymeric c’est pour ça que tu as cru qu’il y était~~~~~~~~
-
Ah ok ^^
Et j’ai pas utilisé le html, j’ai utilisé le bouton du forum (mais après il reforme tout en html pour qu’on le voit tel quel). -
@‘floriangabet’:
C’est pareil robin…
Oui et non, normalement les mods ne devrait pas utiliser directement l’ItemModelMesher. Cette fonction de forge n’existe pas pour rien.
-
Je fais quoi du coup? ça marche toujours pas.
-
Renvoies ton code.
-
Alors,
Classe principale:
@EventHandler public void preInit(FMLPreInitializationEvent event){ proxy.preInit(event.getSuggestedConfigurationFile()); } @EventHandler public void init(FMLInitializationEvent event) { proxy.init(); }
WasteLandModItems:
public class WasteLandModItems { public static final Item TUTORIAL = new ItemWater().setUnlocalizedName("tutorial").setCreativeTab(CreativeTabs.tabMisc); public static void registerItems() { GameRegistry.registerItem(TUTORIAL, "tutorial_item"); } @SideOnly(Side.CLIENT) public static void registerItemsModels() { System.out.println("AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); ModelLoader.setCustomModelResourceLocation(TUTORIAL, 0, new ModelResourceLocation(WasteLandMod.MODID + ":tutorial_item", "inventory")); } }
ClientProxy:
@Override public void preInit(File configFile) { super.preInit(configFile); WasteLandModItems.registerItemsModels(); } @Override public void init() { super.init(); }
CommonProxy:
public void postInit(FMLPostInitializationEvent e) { } public void preInit(File configFile) { WasteLandModItems.registerItems(); } public void init() { }
ItemWater.json qui se situe dans: assets/wl/models/item
{ "parent": "builtin/generated", "textures": { "layer0": "wl:items/itemwater" }, "display": { "thirdperson": { "rotation": [ 0, 90, -35 ], "translation": [ 0, 1.25, -3.5 ], "scale": [ 0.85, 0.85, 0.85 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } }
Texture en 128*128 qui se situe dans: assets/wl/textures/items
-
Je ne vois aucune erreur. Les fichiers sont bien visible depuis eclipse ?
-
Oui ils sont bien visible.
http://puu.sh/pASR8/e18178ad3d.PNG -
@‘floriangabet’:
WasteLandModItems:
public class WasteLandModItems { public static final Item TUTORIAL = new ItemWater().setUnlocalizedName("tutorial").setCreativeTab(CreativeTabs.tabMisc); public static void registerItems() { GameRegistry.registerItem(TUTORIAL, "tutorial_item"); } @SideOnly(Side.CLIENT) public static void registerItemsModels() { System.out.println("AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); ModelLoader.setCustomModelResourceLocation(TUTORIAL, 0, new ModelResourceLocation(WasteLandMod.MODID + ":tutorial_item", "inventory")); } }
Il faudrait peut-être remplacer tutorial_item par itemwater non ?
-
Naaaaaaaaaaaaaaaaaaaaan c’était juste pour ça a merde.
Bon bah merci x) .