Un bloc basique
-
Mais si je veux que la texture dépende de la position du bloc, style prendre la texture du bloc d’en dessous.
-
-
Damn rien ne fonctionne 3eme tuto du site que je suis à la lettre et toujours pas moyen de faire mon 1er mod
BlockTutorial = new BlockTutorial(2000).setHardness(1.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName(“BlockTutorial”).setTextureName(“modtutoriel:BlockTutorial”);
“BlockTutorial cannot be resolved to a type”
Erreur pas moyen de faire quoi que se soit, je ne sais pas si ce tuto est compatible 1.6.4 mais on dirais pas… -
Si si, c’est bien 1.6.4.
Selon l’erreur, tu n’as pas déclaré le bloc.public static Block BlockTutorial
à mettre en haut de la classe. -
Si il est déclaré en-dessous de “instance”, c’est ça que je comprends pas …
-
Envoie toute ta classe principale, il y a un truc pas normal.
-
Laisse tomber c’est pas la peine, je suis vraiment patient et persévérant, j’ai réussit à comprendre d’où venais mon erreur, mais là c’est encore autre chose qui fait tout planter…
Je vais arrêter tous ça et continuer de dev en .net et ou je ne dépend pas de 3 logiciel pour dev quelque chose.
Merci quand même. -
Moi j’ai une erreur quand j’essaye de faire un “RUN” avec eclipse :/```java
–-- Minecraft Crash Report ----
// Daisy, daisy…Time: 14/01/14 16:17
Description: There was a severe problem during mod loading that has caused the game to failcpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: erylia.proxy.eryliaClientProxy
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:519)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:509)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:181)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:471)
at net.minecraft.client.Minecraft.run(Minecraft.java:806)
at net.minecraft.client.main.Main.main(Main.java:93)
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:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.ClassNotFoundException: erylia.proxy.eryliaClientProxy
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:94)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:58)
… 33 moreA detailed walkthrough of the error, its code path and all known details is as follows:
– System Details –
Details:
Minecraft Version: 1.6.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_45, Oracle Corporation
Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 966722112 bytes (921 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
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.04 FML v6.2.62.871 Minecraft Forge 9.10.1.871 5 mods loaded, 5 mods active
mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.2.62.871} [Forge Mod Loader] (bin) Unloaded->Constructed
Forge{9.10.1.871} [Minecraft Forge] (bin) Unloaded->Constructed
eryliablock{1.0.0} [Blocks by EryliaCoders] (bin) Unloaded->Errored
Erylia{1.0.0} [Erylia] (bin) Unloaded->Errored -
Il ne trouve pas erylia.proxy.eryliaClientProxy
Envois ta class principale et tes class proxy common et client.
-
Classe principale ```java
package bdbladx.common;import net.minecraft.block.Block;
import bdbladx.proxy.eryliaCommonProxy;
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.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;@Mod(modid = “eryliablock”, name = “Blocks by EryliaCoders”, version = “1.0.0”)
@NetworkMod(clientSideRequired = true, serverSideRequired = false)public class eryliablocks {
@SidedProxy(clientSide = “erylia.proxy.eryliaClientProxy”, serverSide = “erylia.proxy.eryliaCommonProxy”)
public static eryliaCommonProxy proxy;public static Block BlockTutorial;
@EventHandler
public void PreInit(FMLPreInitializationEvent event)
{
BlockTutorial = new BlockTutorial(2000).setHardness(1.0F).setResistance(5.0F).setStepSound(Block.soundMetalFootstep)
.setUnlocalizedName(“BlockTutorial”).setTextureName(“modtutoriel:BlockTutorial”);
GameRegistry.registerBlock(BlockTutorial, “BlockTutorial”);
}@EventHandler
public void Init(FMLInitializationEvent event)
{
proxy.registerRender();
}@EventHandler
public void PostInit(FMLPostInitializationEvent event)
{}
}
ClientProxy ```java package bdbladx.proxy; import net.minecraftforge.client.MinecraftForgeClient; public class eryliaClientProxy extends eryliaCommonProxy { @Override public void registerRender() { // TODO Auto-generated method stub } }
Common proxy
package bdbladx.proxy; public class eryliaCommonProxy { public void registerRender() { // TODO Auto-generated method stub } } ```___ JE viens de me rendre compte que j'avais mis erylia.proxy au ieu de bdbladx.proxy je teste et je vous dis si ça marche =)___ AH c'est bon ! =)
-
Ok, c’est bien que tu es trouvé ton erreur par toi-même.
-
Salut , quand je RUN mon mod ne ce met pas et il n’y a pas d’erreur ,
Que faire ? -
Quand tu run ? C’est a dire ?
-
Quand je clique sur RUN
-
Hm …
Envoie tes logs peut-être, ainsi que ton code ?
On peux pas vraiment aider sans aucune information vois-tu.
-
Oui bien sur
Classe principale
package sylaentool.common; import net.minecraft.block.Block; import sylaentool.proxy.SyltCommonProxy; 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.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "SylaenTool", name = "Sylaen Tool", version = "1.0.0", acceptedMinecraftVersions = "[1.6.4),)") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class SylaenTool { @SidedProxy(clientSide = "sylaent.proxy.SyltClientProxy", serverSide = "sylaent.proxy.SyltCommonProxy") public static SyltCommonProxy proxy; @Instance("SylaenTool") public static SylaenTool instance; public static Block MineraisAcier; @EventHandler public void PreInit(FMLPreInitializationEvent event) { MineraisAcier = new MineraisAcier(3000).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep) .setUnlocalizedName("MineraisAcier").setTextureName("sylaentool:MineraisAcier"); GameRegistry.registerBlock(MineraisAcier,"MineraisAcier"); } @EventHandler public void Init (FMLInitializationEvent event) { } @EventHandler public void PostInit(FMLPostInitializationEvent event) { } }
Client Proxy
package sylaentool.proxy; import net.minecraftforge.client.MinecraftForgeClient; public class SyltClientProxy extends SyltCommonProxy { @Override public void registerRender() { //futur client registry } }
Common Proxy
package sylaentool.proxy; public class SyltCommonProxy { public void registerRender() { } }
-
acceptedMinecraftVersions = “[1.6.4),)” -> acceptedMinecraftVersions = “[1.6.4,)”
-
Nouveau probleme …
---- Minecraft Crash Report —
// Hey, that tickles! Hehehe!Time: 02/02/14 14:06
Description: There was a severe problem during mod loading that has caused the game to failcpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: sylaent.proxy.SyltClientProxy
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:524)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:473)
at net.minecraft.client.Minecraft.run(Minecraft.java:808)
at net.minecraft.client.main.Main.main(Main.java:93)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: java.lang.ClassNotFoundException: sylaent.proxy.SyltClientProxy
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:186)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:61)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:58)
… 33 more
Caused by: java.lang.NullPointerException
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:178)
… 39 moreA detailed walkthrough of the error, its code path and all known details is as follows:
– System Details –
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8 (x86) version 6.2
Java Version: 1.7.0_45, Oracle Corporation
Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation
Memory: 884623872 bytes (843 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed
Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed
SylaenTool{1.0.0} [Sylaen Tool] (bin) Unloaded->Errored -
@SidedProxy(clientSide = “sylaent.proxy.SyltClientProxy”, serverSide = “sylaent.proxy.SyltCommonProxy”) -> @SidedProxy(clientSide = “sylaentool.proxy.SyltClientProxy”, serverSide = “sylaentool.proxy.SyltCommonProxy”)
-
Autre Erreur au lancement du RUN
–-- Minecraft Crash Report ---- // Shall we play a game? Time: 02/02/14 16:29 Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:524) 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.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181) 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.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112) at cpw.mods.fml.common.Loader.loadMods(Loader.java:511) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183) at net.minecraft.client.Minecraft.startGame(Minecraft.java:473) at net.minecraft.client.Minecraft.run(Minecraft.java:808) at net.minecraft.client.main.Main.main(Main.java:93) 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:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) Caused by: cpw.mods.fml.common.LoaderException at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:68) ... 33 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.6.4 Operating System: Windows 8 (x86) version 6.2 Java Version: 1.7.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 884633840 bytes (843 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Suspicious classes: FML and Forge are installed IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 4 mods loaded, 4 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed SylaenTool{1.0.0} [Sylaen Tool] (bin) Unloaded->Errored
Je ne Comprend toujours pas ce qui ce passe voila la classe principal:
package sylaentool.common; import net.minecraft.block.Block; import sylaentool.proxy.SyltCommonProxy; 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.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "SylaenTool", name = "Sylaen Tool", version = "1.0.0", acceptedMinecraftVersions = "[1.6.4,)") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class SylaenTool { @SidedProxy(clientSide = "sylaentool.proxy.SyltClientProxy", serverSide = "sylaentool.proxy.SyltCommonProxy") @Instance("SylaenTool") public static SylaenTool instance; public static Block MineraisAcier; @EventHandler public void PreInit(FMLPreInitializationEvent event) { MineraisAcier = new MineraisAcier(3000).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep) .setUnlocalizedName("MineraisAcier").setTextureName("sylaentool:MineraisAcier"); GameRegistry.registerBlock(MineraisAcier,"MineraisAcier"); } @EventHandler public void Init (FMLInitializationEvent event) { } @EventHandler public void PostInit(FMLPostInitializationEvent event) { } }
Common proxy :
package sylaentool.proxy; public class SyltCommonProxy { public void registerRender () { } }
Client Proxy :
package sylaentool.proxy; import net.minecraftforge.client.MinecraftForgeClient; public class SyltClientProxy extends SyltCommonProxy { @Override public void registerRender() { } }
Et voila la classe du block que je viens de faire :
package sylaentool.common; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class MineraisAcier extends Block { public MineraisAcier(int id) { super(id, Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); } }