Résolu Nouveau Répéteur
-
Bonjour, essayant de créer un simple répéteur de Redstone je deviens bloqué.
En effet je ne comprend presque rien au code du répéteur, depuis des jours j’essaye d’en faire. Si quelqu’un a déjà codé des items/blocks en Redstone sa me serait bien utile pour mon mod.Cordialement.
-
les dev de mojang on vraiment galéré avec donc je te conseille de prendre ton temps et de traduire ton code.
-
D’accord ^^
Je vais le voir plus en détail je devrais sûrement trouver la solution. Merci ^^ -
@‘Ramech’:
Merci ^^
Si tu remercie quand on t’aide pas …
-
Je remercie car tu m’as donné une réponse, cela ne veut pas dire que mon problème est fini ^^
C’est juste de la politesse comma ça ^^ -
Sa y’est j’ai enfin réussi à créer le bloc, mais pour l’item du répéteur je ne sais toujours pas comment pourrait-je l’utiliser pour placer le block
-
onItemUse
world.setBlock
Regarde la classe ItemBlock.java ou ItemDoor -
Merci beaucoup Robin, J’ai résolu le problème grâce à la class ItemDoor (avec la fonction onItemUse).
-
J’ai un nouveau problème, mon jeu crash si je lance Minecraft avec mon mod compilait (avec gradlew build).
Voici le crash report :
:::–-- Minecraft Crash Report ---- // Why is it breaking :( Time: 31/07/14 19:27 Description: Initializing game java.lang.IllegalAccessError: tried to access method net.minecraft.block.material.Material.func_76225_o()Lnet/minecraft/block/material/Material; from class fr.redcobble.mod.common.ModRedcobble at fr.redcobble.mod.common.ModRedcobble.<clinit>(ModRedcobble.java:52) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:270) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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.func_71384_a(Minecraft.java:480) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at fr.redcobble.mod.common.ModRedcobble.<clinit>(ModRedcobble.java:52) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:270) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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.func_71384_a(Minecraft.java:480) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 109882480 bytes (104 MB) / 245080064 bytes (233 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M 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.11.1179 Minecraft Forge 10.13.0.1179 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.10.11.1179} [Forge Mod Loader] (forge-1.7.10-10.13.0.1179.jar) Unloaded->Constructed Forge{10.13.0.1179} [Minecraft Forge] (forge-1.7.10-10.13.0.1179.jar) Unloaded->Constructed modredcobble{1.4.0} [Mod Redcobble] (Redcobble Mod 1.4 (for Minecraft 1.7.10).jar) Unloaded Launched Version: 1.7.10-Forge10.13.0.1179 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics Family GL version 3.1.0 - Build 8.15.10.2361, Intel 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: [Faithful] 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)
:::</clinit></clinit>
-
Il essaye d’accéder à une méthode qui est dans la classe ‘ModRedcobble’ à la ligne 52 , envoie ta classe ModRedcobble
-
Voici la ligne 32 :
public static Material waterCircuits = new MaterialWaterCircuits(MapColor.airColor).setImmovableMobility();
Non enfaite je viens de corriger le problème en y regardant dans cette ligne.
Mais merci beaucoup pour l’intention -
Ah bah de rien