Créer la base de votre mod
-
c’est lorsque tu met ton compte que sa crash?
-
-
robin ? normale que je vois plus de bonus ?
-
Car il n’y en a pas dans ce tutoriel.
-
A oui xD. J’ai crue que c’étais un autre tuto ^^.
-
Bonjour, voila le mod marche bien appart le render le mob et rose est noir il me semble bien avoir mit mon image .png au bonne endroit ainsi de suite c’est poour cela que je demande a vous mon image ce trouve C:\Users\Baptiste\Documents\java\forge\src\main\resources\assets\baba\textures\entity
et elle et nomer baba.pngVoici ma class render:
package fr.baba.protocraft.client; import fr.baba.protocraft.common.EntityBaba; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.entity.RenderBiped; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderBaba extends RenderBiped { public final ResourceLocation texture = new ResourceLocation ("textures/entity/baba.png"); public RenderBaba(ModelBiped par1ModelBiped) { super(par1ModelBiped, 0.5F); // TODO Auto-generated constructor stub } public ResourceLocation TextureBaba(EntityBaba baba) { return texture; } protected ResourceLocation getEntityTexture(EntityLiving entity) { return TextureBaba((EntityBaba)entity); } }
Ma class principale:
package fr.baba.protocraft.common; import net.minecraft.entity.Entity; 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.EntityRegistry; import fr.baba.protocraft.proxy.CommonProxy; @Mod(modid = "baba", name= "ProtoMob", version = "2.0") public class Main { @Instance("baba") public static Main instance; @SidedProxy(clientSide = "fr.baba.protocraft.proxy.ClientProxy", serverSide = "fr.baba.protocraft.proxy.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { } @EventHandler public void Init(FMLInitializationEvent event) { addEntity(EntityBaba.class, "baba", 420, 0,0); proxy.RegisterRender(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } public void addEntity(Class entityClass, String name, int id, int backgroundColor, int foregroundColor) { EntityRegistry.registerGlobalEntityID(entityClass, name, EntityRegistry.findGlobalUniqueEntityId(), backgroundColor, foregroundColor); EntityRegistry.registerModEntity(entityClass, name, id, this, 40, 1, true); } }
Entity:
package fr.baba.protocraft.common; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.monster.EntityMob; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.world.World; public class EntityBaba extends EntityMob { public EntityBaba(World p_i1738_1_) { super(p_i1738_1_); // TODO Auto-generated constructor stub } public void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(2D); } public Item getDropItem() { return Items.apple; } }
Proxy:
package fr.baba.protocraft.proxy; import net.minecraft.client.model.ModelBiped; import cpw.mods.fml.client.registry.RenderingRegistry; import fr.baba.protocraft.client.RenderBaba; import fr.baba.protocraft.common.EntityBaba; import fr.baba.protocraft.proxy.CommonProxy; public class ClientProxy extends CommonProxy { @Override public void RegisterRender() { RenderingRegistry.registerEntityRenderingHandler(EntityBaba.class, new RenderBaba(new ModelBiped())); } }
Common:
package fr.baba.protocraft.proxy; public class CommonProxy { public void RegisterRender() { } }
-
Bonsoir , j’ai un problème quand je fais mon RUN j’ai un message en rouge qui s’affiche
" [00:21:45] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\forge\eclipse.\crash-reports\crash-2014-12-02_00.21.45-client.txt
%(#ff3333)[Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release]Quelqu’un a une idée de ou sa peu venir ? Merci d’avance
-
Le message rouge, c’est juste un avertissement. Rien de grave.
-
Bah si car Minecraft crash je peu pas le lancer
-
Crash report saved to: #@!@# C:\forge\eclipse.\crash-reports\crash-2014-12-02_00.21.45-client.txt
Il faut le contenu de ce fichier texte. -
–-- Minecraft Crash Report ---- // Daisy, daisy... Time: 02/12/14 00:21 Description: Initializing game java.lang.IllegalArgumentException: Can not set static org.apache.logging.log4j.core.config.plugins.ResolverUtil$Test field fr.premiermod.test.common.PremierMod.instance to fr.premiermod.test.common.PremierMod at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source) at java.lang.reflect.Field.set(Unknown Source) at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:407) at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:338) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:493) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.loadMods(Loader.java:492) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source) at java.lang.reflect.Field.set(Unknown Source) at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:407) at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:338) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:493) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.loadMods(Loader.java:492) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 893312504 bytes (851 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 5 mods loaded, 5 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed examplemod{1.0} [examplemod] (bin) Unloaded->Constructed premiermod{1.0.0} [Test] (bin) Unloaded->Errored Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: AMD Radeon HD 7800 Series GL version 4.4.12874 Compatibility Profile Context 14.100.0.0, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
Donne le code de ta class principale.
-
Balise !!!
Ta classe principale est erroné au niveau du @Instance -
Bonjour j’ai fini le tuto pour la base du mod , au debut minecraft démarrais bien mais une fois le tuto fini impossible de lancer le jeu , j’ai se message :
[22:03:01] [main/ERROR] [LaunchWrapper]: Unable to launch
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]
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/:?]
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) ~[?:1.8.0_25]
at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[?:1.8.0_25]
at java.lang.System.loadLibrary(System.java:1119) ~[?:1.8.0_25]
at org.lwjgl.Sys$1.run(Sys.java:73) ~[lwjgl-2.9.1.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_25]
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) ~[lwjgl-2.9.1.jar:?]
at org.lwjgl.Sys.loadLibrary(Sys.java:95) ~[lwjgl-2.9.1.jar:?]
at org.lwjgl.Sys.<clinit>(Sys.java:112) ~[lwjgl-2.9.1.jar:?]
at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:2807) ~[Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:79) ~[Main.class:?]
… 8 more
Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release</clinit> -
Salut, je te redirige sur cette demande d’aide : http://www.minecraftforgefrance.fr/showthread.php?tid=1659&pid=19484#pid19484
-
merci ca marche !
-
Bonsoir , j’ai un petit problème quand je renomme le fichier texte il ne se met pas en .lang il reste en " Fichier TXT " !
-
Bonjour,
Alors voila j’ai une erreur sur mon code apres de long recherche je ne trouve pas je pense a une erreur bete mais je le trouve pas
EclysiaBlocks
package fr.eclysia.EclysiaBlocks.common;
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 fr.eclysia.EclysiaBlocks.proxy.CommonProxy;@Mod(modid = “eclysiablocks”, name = “Eclysia Blocks”, version = “0.0.1”)
public class EclysiaBlocks
{
@Instance(“eclysiablocks”)
public static EclysiaBlocks instance;
public static final String MODID = “eclysiablocks”;
@SidedProxy(clientSide = “fr.eclysia.EclysiaBlocks.proxy”, serverSide = “fr.eclysia.EclysiaBlocks.proxy”)
public static CommonProxy proxy;@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
}@EventHandler
public void init(FMLInitializationEvent event)
{
proxy.registerRender();
}@EventHandler
public void init(FMLPostInitializationEvent event)
{}
}ClientProxy
package fr.eclysia.EclysiaBlocks.proxy;
public class ClientProxy
{
public void registerRender()
{
}
}CommonProxy
package fr.eclysia.EclysiaBlocks.proxy;
public class CommonProxy
{
public void registerRender()
{
}
}Erreur sur la console
[23:03:24] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[23:03:24] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1558 Initialized
[23:03:25] [Client thread/INFO] [FML]: Replaced 183 ore recipies
[23:03:25] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[23:03:25] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[23:03:25] [Client thread/INFO] [FML]: Searching C:\Users\Erwan\Desktop\Eclysia\forge\eclipse\mods for mods
[23:03:30] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[23:03:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, eclysiablocks] at CLIENT
[23:03:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, eclysiablocks] at SERVER
[23:03:30] [Client thread/ERROR] [FML]: An error occured trying to load a proxy into {serverSide=fr.eclysia.EclysiaBlocks.proxy, clientSide=fr.eclysia.EclysiaBlocks.proxy}.fr.eclysia.EclysiaBlocks.common.EclysiaBlocks
java.lang.ClassNotFoundException: fr.eclysia.EclysiaBlocks.proxy
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_60]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_60]
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58) ~[ModClassLoader.class:?]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_60]
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_60]
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:59) [ProxyInjector.class:?]
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512) [FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]C’est qu’une partie du code de l’erreur le principal est la
Merci,
TheAzylium
-
Dans ta class ClientProxy ta a oublié la SuperClass CommonProxy
et l’annotation @Override[size=small```java
]
[size=smallpackage fr.eclysia.EclysiaBlocks.proxy;][size=smallpublic class ClientProxy extends CommonProxy]
[size=small{]
[size=small @Override]
[size=small public void registerRender()]
[size=small {]
[size=small ]
[size=small }]
}
%(#333333)[et dans ta class principale l'annotation @SidedProxy devrait ressembler a ça: %(#333333)[```java ] @SidedProxy(clientSide = "[color=#333333fr.eclysia.EclysiaBlocks.proxy].ClientProxy", serverSide = "[size=smallfr.eclysia.EclysiaBlocks.proxy].CommonProxy") %(#333333)[ ```]
-
Le @Override ce n’est pas grave. Le problème vient uniquement des valeurs de son @SidedProxy qui ne pointe pas sur une classe valide.