Résolu Probléme machine, Slot
-
Quel est le problème là dedans ? (À part qu’il manque des textures).
Pour que tu ais le truc en question dans la console, il faut que tu utilises ta machineEnvoyé de mon RAINBOW LITE 4G en utilisant Tapatalk
-
[00:44:16] [main/INFO] [GradleStart]: Extra: [] [00:44:16] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/cruch/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [00:44:16] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [00:44:16] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [00:44:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [00:44:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [00:44:17] [main/INFO] [FML]: Forge Mod Loader version 7.99.36.1558 for Minecraft 1.7.10 loading [00:44:17] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_66, running on Windows 10:x86:10.0, installed at C:\Program Files\Java\jre1.8.0_66 [00:44:17] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [00:44:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [00:44:17] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [00:44:17] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [00:44:17] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [00:44:17] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [00:44:17] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [00:44:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [00:44:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [00:44:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [00:44:18] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [00:44:27] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [00:44:27] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [00:44:27] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [00:44:29] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [00:44:29] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [00:44:29] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [00:44:29] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [00:44:32] [main/INFO]: Setting user: Player972 [00:44:37] [Client thread/INFO]: LWJGL Version: 2.9.1 [00:44:40] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ---- // You're mean. Time: 21/05/16 00:44 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.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 971376088 bytes (926 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 IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' [00:44:40] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [00:44:40] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1558 Initialized [00:44:41] [Client thread/INFO] [FML]: Replaced 183 ore recipies [00:44:41] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [00:44:42] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [00:44:42] [Client thread/INFO] [FML]: Searching C:\Users\cruch\Desktop\$y\eclipse\mods for mods [00:45:29] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [00:45:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, adamitemod] at CLIENT [00:45:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, adamitemod] at SERVER [00:45:32] [Client thread/INFO] [STDOUT]: [com.adamitemod.mod.proxy.CommonProxy:<init>:7]: méthode côté serveur [00:45:32] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamite Mod [00:45:33] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [00:45:33] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [00:45:33] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [00:45:33] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [00:45:33] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [00:45:33] [Client thread/INFO] [FML]: Applying holder lookups [00:45:33] [Client thread/INFO] [FML]: Holder lookups applied [00:45:33] [Client thread/INFO] [FML]: Injecting itemstacks [00:45:33] [Client thread/INFO] [FML]: Itemstack injection complete [00:45:34] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:45:34] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [00:45:34] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [00:45:34] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [00:45:35] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [00:45:35] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:45:35] [Sound Library Loader/INFO]: Sound engine started [00:45:46] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas [00:45:46] [Client thread/INFO]: Created: 16x16 textures/items-atlas [00:45:47] [Client thread/INFO] [FML]: Injecting itemstacks [00:45:47] [Client thread/INFO] [FML]: Itemstack injection complete [00:45:48] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [00:45:48] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamite Mod [00:45:49] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [00:45:50] [Client thread/INFO]: Created: 512x256 textures/items-atlas [00:45:50] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:45:50] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [00:45:50] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [00:45:50] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:45:50] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:45:50] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [00:45:51] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [00:45:51] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [00:45:51] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [00:45:51] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:45:51] [Sound Library Loader/INFO]: Sound engine started [00:47:06] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [00:47:06] [Server thread/INFO]: Generating keypair [00:47:06] [Server thread/INFO]: Converting map! [00:47:06] [Server thread/INFO]: Scanning folders… [00:47:06] [Server thread/INFO]: Total conversion count is 0 [00:47:07] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [00:47:07] [Server thread/INFO] [FML]: Applying holder lookups [00:47:07] [Server thread/INFO] [FML]: Holder lookups applied [00:47:09] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@12f5254) [00:47:09] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@12f5254) [00:47:09] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@12f5254) [00:47:09] [Server thread/INFO]: Preparing start region for level 0 [00:47:10] [Server thread/INFO]: Preparing spawn area: 3% [00:47:11] [Server thread/INFO]: Preparing spawn area: 5% [00:47:12] [Server thread/INFO]: Preparing spawn area: 9% [00:47:13] [Server thread/INFO]: Preparing spawn area: 12% [00:47:14] [Server thread/INFO]: Preparing spawn area: 15% [00:47:15] [Server thread/INFO]: Preparing spawn area: 19% [00:47:16] [Server thread/INFO]: Preparing spawn area: 22% [00:47:17] [Server thread/INFO]: Preparing spawn area: 25% [00:47:18] [Server thread/INFO]: Preparing spawn area: 29% [00:47:19] [Server thread/INFO]: Preparing spawn area: 32% [00:47:20] [Server thread/INFO]: Preparing spawn area: 36% [00:47:21] [Server thread/INFO]: Preparing spawn area: 40% [00:47:22] [Server thread/INFO]: Preparing spawn area: 43% [00:47:23] [Server thread/INFO]: Preparing spawn area: 47% [00:47:24] [Server thread/INFO]: Preparing spawn area: 50% [00:47:25] [Server thread/INFO]: Preparing spawn area: 53% [00:47:26] [Server thread/INFO]: Preparing spawn area: 55% [00:47:27] [Server thread/INFO]: Preparing spawn area: 58% [00:47:28] [Server thread/INFO]: Preparing spawn area: 60% [00:47:29] [Server thread/INFO]: Preparing spawn area: 62% [00:47:30] [Server thread/INFO]: Preparing spawn area: 64% [00:47:32] [Server thread/INFO]: Preparing spawn area: 65% [00:47:33] [Server thread/INFO]: Preparing spawn area: 66% [00:47:34] [Server thread/INFO]: Preparing spawn area: 68% [00:47:35] [Server thread/INFO]: Preparing spawn area: 70% [00:47:36] [Server thread/INFO]: Preparing spawn area: 73% [00:47:37] [Server thread/INFO]: Preparing spawn area: 74% [00:47:38] [Server thread/INFO]: Preparing spawn area: 77% [00:47:39] [Server thread/INFO]: Preparing spawn area: 78% [00:47:40] [Server thread/INFO]: Preparing spawn area: 81% [00:47:41] [Server thread/INFO]: Preparing spawn area: 82% [00:47:43] [Server thread/INFO]: Preparing spawn area: 85% [00:47:44] [Server thread/INFO]: Preparing spawn area: 86% [00:47:45] [Server thread/INFO]: Preparing spawn area: 90% [00:47:46] [Server thread/INFO]: Preparing spawn area: 92% [00:47:47] [Server thread/INFO]: Preparing spawn area: 94% [00:47:48] [Server thread/INFO]: Preparing spawn area: 97% [00:47:49] [Server thread/INFO]: Preparing spawn area: 99% [00:47:50] [Server thread/INFO]: Changing view distance to 3, from 10 [00:47:52] [Netty Client IO #0/INFO] [FML]: Server protocol version 2 [00:47:52] [Netty IO #1/INFO] [FML]: Client protocol version 2 [00:47:52] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : adamitemod@1.0.0,FML@7.10.99.99,Forge@10.13.4.1558,mcp@9.05 [00:47:52] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [00:47:52] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [00:47:52] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [00:47:52] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [00:47:52] [Server thread/INFO]: Player972[local:E:13a517af] logged in with entity id 172 at (246.5, 64.0, 264.5) [00:47:52] [Server thread/INFO]: Player972 joined the game [00:47:55] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 3834ms behind, skipping 76 tick(s) [00:47:57] [Client thread/INFO]: Warning: Clientside chunk ticking took 310 ms [00:47:57] [Client thread/INFO]: Warning: Clientside chunk ticking took 363 ms [00:47:58] [Client thread/INFO]: Warning: Clientside chunk ticking took 257 ms [00:47:58] [Client thread/INFO]: Warning: Clientside chunk ticking took 266 ms [00:47:59] [Client thread/INFO]: Warning: Clientside chunk ticking took 296 ms [00:48:03] [Server thread/INFO]: Player972 has just earned the achievement [Taking Inventory] [00:48:03] [Client thread/INFO]: [CHAT] Player972 has just earned the achievement [Taking Inventory] [00:48:04] [Client thread/INFO]: Warning: Clientside chunk ticking took 262 ms [00:48:04] [Client thread/INFO]: Warning: Clientside chunk ticking took 224 ms [00:48:20] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 8282ms behind, skipping 165 tick(s) [00:48:32] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2750ms behind, skipping 55 tick(s) [00:48:35] [Client thread/WARN]: Failed to load texture: adamitemod:textures/gui/GuiPulveriser.png java.io.FileNotFoundException: adamitemod:textures/gui/GuiPulveriser.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) ~[SimpleTexture.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) [TextureManager.class:?] at com.adamitemod.mod.GuiMachinePulveriser.drawGuiContainerBackgroundLayer(GuiMachinePulveriser.java:34) [GuiMachinePulveriser.class:?] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93) [GuiContainer.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [00:48:50] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2824ms behind, skipping 56 tick(s) [00:49:03] [Client thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2 [00:49:03] [Client thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2 [00:49:03] [Server thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2 [00:49:03] [Server thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2 [00:49:03] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Ticking block entity at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:709) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at com.adamitemod.mod.MachineRecipesPulveriser.isSameKey(MachineRecipesPulveriser.java:75) ~[MachineRecipesPulveriser.class:?] at com.adamitemod.mod.MachineRecipesPulveriser.getSmeltingResult(MachineRecipesPulveriser.java:64) ~[MachineRecipesPulveriser.class:?] at com.adamitemod.mod.TileEntityMachinePulveriser.canSmelt(TileEntityMachinePulveriser.java:177) ~[TileEntityMachinePulveriser.class:?] at com.adamitemod.mod.TileEntityMachinePulveriser.updateEntity(TileEntityMachinePulveriser.java:192) ~[TileEntityMachinePulveriser.class:?] at net.minecraft.world.World.updateEntities(World.java:2160) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) ~[MinecraftServer.class:?] … 4 more [00:49:04] [Server thread/ERROR]: This crash report has been saved to: C:\Users\cruch\Desktop\$y\eclipse\.\crash-reports\crash-2016-05-21_00.49.04-server.txt [00:49:04] [Server thread/INFO]: Stopping server [00:49:04] [Server thread/INFO]: Saving players [00:49:04] [Server thread/INFO]: Saving worlds [00:49:04] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [00:49:04] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [00:49:04] [Server thread/INFO]: Saving chunks for level 'New World'/The End [00:49:05] [Server thread/INFO] [FML]: Unloading dimension 0 [00:49:05] [Server thread/INFO] [FML]: Unloading dimension -1 [00:49:05] [Server thread/INFO] [FML]: Unloading dimension 1 [00:49:06] [Client thread/FATAL]: Reported exception thrown! net.minecraft.util.ReportedException: Ticking block entity at net.minecraft.world.World.updateEntities(World.java:2175) ~[World.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:2097) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at com.adamitemod.mod.MachineRecipesPulveriser.isSameKey(MachineRecipesPulveriser.java:75) ~[MachineRecipesPulveriser.class:?] at com.adamitemod.mod.MachineRecipesPulveriser.getSmeltingResult(MachineRecipesPulveriser.java:64) ~[MachineRecipesPulveriser.class:?] at com.adamitemod.mod.TileEntityMachinePulveriser.canSmelt(TileEntityMachinePulveriser.java:177) ~[TileEntityMachinePulveriser.class:?] at com.adamitemod.mod.TileEntityMachinePulveriser.updateEntity(TileEntityMachinePulveriser.java:192) ~[TileEntityMachinePulveriser.class:?] at net.minecraft.world.World.updateEntities(World.java:2160) ~[World.class:?] … 12 more [00:49:06] [Server thread/INFO] [FML]: Applying holder lookups [00:49:06] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ---- // I feel sad now :( Time: 21/05/16 00:49 Description: Ticking block entity java.lang.ArrayIndexOutOfBoundsException: 1 at com.adamitemod.mod.MachineRecipesPulveriser.isSameKey(MachineRecipesPulveriser.java:75) at com.adamitemod.mod.MachineRecipesPulveriser.getSmeltingResult(MachineRecipesPulveriser.java:64) at com.adamitemod.mod.TileEntityMachinePulveriser.canSmelt(TileEntityMachinePulveriser.java:177) at com.adamitemod.mod.TileEntityMachinePulveriser.updateEntity(TileEntityMachinePulveriser.java:192) at net.minecraft.world.World.updateEntities(World.java:2160) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2097) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) at net.minecraft.client.Minecraft.run(Minecraft.java:962) 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(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.adamitemod.mod.MachineRecipesPulveriser.isSameKey(MachineRecipesPulveriser.java:75) at com.adamitemod.mod.MachineRecipesPulveriser.getSmeltingResult(MachineRecipesPulveriser.java:64) at com.adamitemod.mod.TileEntityMachinePulveriser.canSmelt(TileEntityMachinePulveriser.java:177) at com.adamitemod.mod.TileEntityMachinePulveriser.updateEntity(TileEntityMachinePulveriser.java:192) -- Block entity being ticked -- Details: Name: adamitemod:MachineTileEntityPulveriser // com.adamitemod.mod.TileEntityMachinePulveriser Block type: ID #181 (tile.machinepulveriser // com.adamitemod.mod.MachinePulveriser) Block data value: 0 / 0x0 / 0b0000 Block location: World: (250,64,266), Chunk: (at 10,4,10 in 15,16; contains blocks 240,0,256 to 255,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Actual block type: ID #181 (tile.machinepulveriser // com.adamitemod.mod.MachinePulveriser) Actual block data value: 0 / 0x0 / 0b0000 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:2160) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player972'/172, l='MpServer', x=250,37, y=65,62, z=263,72]] Chunk stats: MultiplayerChunkCache: 49, 49 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (252,64,255), Chunk: (at 12,4,15 in 15,15; contains blocks 240,0,240 to 255,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 1274 game time, 1274 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 73 total; [EntitySheep['Sheep'/2, l='MpServer', x=254,50, y=63,00, z=225,34], EntitySheep['Sheep'/3, l='MpServer', x=246,74, y=63,00, z=261,41], EntitySheep['Sheep'/4, l='MpServer', x=256,56, y=66,00, z=249,50], EntitySheep['Sheep'/5, l='MpServer', x=247,40, y=62,41, z=248,82], EntityItem['item.tile.sapling.oak'/9225, l='MpServer', x=274,81, y=79,13, z=253,66], EntitySheep['Sheep'/10, l='MpServer', x=287,50, y=63,00, z=279,53], EntitySheep['Sheep'/11, l='MpServer', x=285,50, y=63,00, z=279,50], EntitySheep['Sheep'/12, l='MpServer', x=289,50, y=63,00, z=279,50], EntitySheep['Sheep'/13, l='MpServer', x=288,53, y=63,00, z=273,47], EntitySheep['Sheep'/22, l='MpServer', x=296,50, y=76,00, z=290,50], EntitySheep['Sheep'/23, l='MpServer', x=296,50, y=76,00, z=290,50], EntityZombie['Zombie'/11799, l='MpServer', x=214,50, y=20,00, z=241,50], EntitySheep['Sheep'/24, l='MpServer', x=296,50, y=64,00, z=292,50], EntityZombie['Zombie'/11800, l='MpServer', x=216,50, y=20,00, z=241,50], EntitySheep['Sheep'/25, l='MpServer', x=296,50, y=64,00, z=292,50], EntityItem['item.tile.sapling.oak'/6172, l='MpServer', x=269,19, y=75,13, z=252,78], EntityItem['item.tile.sapling.oak'/5160, l='MpServer', x=247,84, y=70,13, z=270,81], EntityItem['item.tile.sapling.oak'/7217, l='MpServer', x=275,13, y=79,13, z=252,06], EntityItem['item.tile.sapling.oak'/3133, l='MpServer', x=247,00, y=72,13, z=269,53], EntityItem['item.tile.sapling.oak'/11364, l='MpServer', x=246,09, y=72,13, z=271,38], EntitySquid['Squid'/623, l='MpServer', x=208,69, y=44,38, z=302,50], EntitySquid['Squid'/625, l='MpServer', x=213,06, y=43,81, z=302,31], EntitySquid['Squid'/628, l='MpServer', x=211,41, y=46,34, z=298,72], EntityItem['item.tile.sapling.oak'/4725, l='MpServer', x=291,78, y=73,13, z=290,72], EntityItem['item.tile.sapling.oak'/9334, l='MpServer', x=286,72, y=80,13, z=304,19], EntitySquid['Squid'/633, l='MpServer', x=202,13, y=44,75, z=299,38], EntityZombie['Zombie'/1665, l='MpServer', x=279,50, y=16,00, z=289,50], EntityZombie['Zombie'/1666, l='MpServer', x=279,50, y=16,00, z=290,50], EntityItem['item.item.apple'/6275, l='MpServer', x=298,72, y=72,13, z=285,81], EntityBat['Bat'/10895, l='MpServer', x=295,00, y=30,10, z=253,53], EntitySkeleton['Skeleton'/1685, l='MpServer', x=235,50, y=52,00, z=214,50], EntityItem['item.item.dyePowder.brown'/2200, l='MpServer', x=267,72, y=67,13, z=269,59], EntityBat['Bat'/10905, l='MpServer', x=301,72, y=15,68, z=225,93], EntityItem['item.tile.sapling.oak'/6814, l='MpServer', x=296,78, y=69,13, z=286,22], EntitySquid['Squid'/684, l='MpServer', x=238,41, y=59,22, z=297,78], EntitySquid['Squid'/687, l='MpServer', x=235,50, y=59,22, z=300,75], EntitySquid['Squid'/688, l='MpServer', x=232,31, y=61,06, z=299,56], EntityBat['Bat'/9392, l='MpServer', x=249,56, y=16,05, z=254,51], EntitySquid['Squid'/689, l='MpServer', x=242,81, y=62,06, z=301,22], EntitySquid['Squid'/690, l='MpServer', x=231,22, y=62,38, z=296,06], EntitySquid['Squid'/691, l='MpServer', x=233,84, y=46,84, z=293,31], EntitySquid['Squid'/698, l='MpServer', x=217,84, y=45,28, z=307,56], EntityItem['item.tile.sapling.oak'/12474, l='MpServer', x=251,55, y=65,13, z=268,96], EntitySquid['Squid'/699, l='MpServer', x=216,66, y=43,38, z=300,38], EntitySquid['Squid'/703, l='MpServer', x=223,06, y=45,38, z=302,41], EntitySquid['Squid'/706, l='MpServer', x=211,66, y=46,38, z=300,75], EntitySpider['Spider'/1261, l='MpServer', x=228,50, y=20,00, z=242,50], EntityItem['item.tile.sapling.oak'/12018, l='MpServer', x=280,91, y=75,13, z=313,78], EntityZombie['Zombie'/1815, l='MpServer', x=294,50, y=18,00, z=219,50], EntityCreeper['Creeper'/10018, l='MpServer', x=278,50, y=37,00, z=245,50], EntitySkeleton['Skeleton'/9519, l='MpServer', x=295,50, y=30,00, z=256,50], EntitySquid['Squid'/826, l='MpServer', x=235,97, y=54,91, z=311,94], EntityClientPlayerMP['Player972'/172, l='MpServer', x=250,37, y=65,62, z=263,72], EntityItem['item.tile.sapling.oak'/11628, l='MpServer', x=252,66, y=78,13, z=274,13], EntityItem['item.tile.sapling.oak'/11126, l='MpServer', x=293,22, y=76,13, z=288,34], EntityZombie['Zombie'/902, l='MpServer', x=289,50, y=38,00, z=260,44], EntitySquid['Squid'/426, l='MpServer', x=205,53, y=61,31, z=215,03], EntitySquid['Squid'/428, l='MpServer', x=199,81, y=59,78, z=218,50], EntitySquid['Squid'/430, l='MpServer', x=206,34, y=61,38, z=218,03], EntitySquid['Squid'/432, l='MpServer', x=209,50, y=61,00, z=208,38], EntityZombie['Zombie'/9143, l='MpServer', x=220,72, y=25,00, z=263,16], EntityCreeper['Creeper'/1977, l='MpServer', x=296,50, y=13,00, z=217,50], EntitySquid['Squid'/463, l='MpServer', x=197,50, y=52,34, z=247,50], EntityZombie['Zombie'/11215, l='MpServer', x=214,50, y=26,00, z=228,50], EntitySquid['Squid'/464, l='MpServer', x=208,25, y=51,38, z=252,63], EntityEnderman['Enderman'/978, l='MpServer', x=252,69, y=15,00, z=254,22], EntitySquid['Squid'/469, l='MpServer', x=197,63, y=54,08, z=264,81], EntitySquid['Squid'/471, l='MpServer', x=203,66, y=52,66, z=244,09], EntitySquid['Squid'/472, l='MpServer', x=194,59, y=54,38, z=239,81], EntityCreeper['Creeper'/1503, l='MpServer', x=230,50, y=52,00, z=223,50], EntitySkeleton['Skeleton'/10207, l='MpServer', x=235,50, y=13,00, z=256,50], EntityCreeper['Creeper'/1522, l='MpServer', x=213,50, y=36,00, z=214,50], EntityCreeper['Creeper'/1523, l='MpServer', x=213,50, y=36,00, z=223,50]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566) at net.minecraft.client.Minecraft.run(Minecraft.java:984) 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(Unknown Source) at GradleStart.main(Unknown Source) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 741895368 bytes (707 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 IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA adamitemod{1.0.0} [Adamite Mod] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4276, 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: [] 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) [00:49:06] [Server thread/INFO] [FML]: Holder lookups applied [00:49:06] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [00:49:06] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\cruch\Desktop\$y\eclipse\.\crash-reports\crash-2016-05-21_00.49.06-client.txt [00:49:06] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [00:49:06] [Client thread/INFO] [FML]: Server terminated. AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
je trouve pas voici mes logs bye</init>
-
ses sa ?
[font=monospace[00:49:03] [Client thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2] [00:49:03 [Client thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2] [00:49:03 [Server thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2] [font=Tahoma, Verdana, Arial, sans-serif[00:49:03] [Server thread/INFO] [STDOUT]: [com.adamitemod.mod.MachineRecipesPulveriser:isSameKey:74]: 1 2]
-
Oui c’est ça
-
ducoups j’en fait quoi ?
-
import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class MachineRecipesPulveriser { private static final MachineRecipesPulveriser smeltingBase = new MachineRecipesPulveriser(); private HashMap <item, itemstack="">smeltingList = new HashMap<item, itemstack="">(); public MachineRecipesPulveriser() { //this.addRecipe(ItemsMod.StrengthStone, new ItemStack(ItemsMod.StickDeForce)); } public void addRecipe(Item recipeKey, ItemStack result) { this.smeltingList.put(recipeKey, result); } public ItemStack getSmeltingResult(ItemStack stackInSlot) { Iterator<entry<item, itemstack="">> iterator = this.smeltingList.entrySet().iterator(); Entry <item, itemstack="">entry; do { if (!iterator.hasNext()) { return null; } entry = (Entry<item, itemstack="">)iterator.next(); } while (!this.isSameKey(stackInSlot, (Item)entry.getKey())); return (ItemStack)entry.getValue(); } private boolean isSameKey(ItemStack stackInSlot, Item recipeKey) { return stackInSlot.getItem() == recipeKey; } public Map <item, itemstack="">getSmeltingList() { return this.smeltingList; } public static MachineRecipesPulveriser smelting() { return smeltingBase; } }
Ne gère pas les métadatas, si tu veux les gérer il faut que ta HashMap deviennent<itemstack, itemstack=“”></itemstack,></item,></item,></item,></entry<item,></item,></item,>
-
oui mais sa marche pas ton truc
-
Donc le premier argument de isSameKey ne fait pas la bonne taille.
Tu cherches bien à faire une machine avec deux entrées et deux sorties ?Ta fonction isSameKey est appelé où ?
-
1entré 1sortie
-
Pourquoi tu as mit une boucle for et des tableaux alors ?
private boolean isSameKey(ItemStack stack, ItemStack stack2) { return stack.getItem() == stack2.getItem() && stack.getMetadata() == stack2.getMetadata(); }
-
je sait pas
-
Je met sa ou ?
1. **private** **boolean** isSameKey(ItemStack stack, ItemStack stack2) 2. { 3. **return** stack.getItem() == stack2.getItem() && stack.getMetadata() == stack2.getMetadata(); 4. }
-
à la place de ta fonction isSameKey actuelle.
Il faut aussi adapter le reste du code, supprimer les tableaux inutiles. -
Tu peux m’aider ? adapter le code
-
ba en faites j’ai pas réussi xD
-
Up toujours pas réussi
-
Renvoies ton code actuelle.
-
D’accord Merci de ton aide car il semble que personnes ne veux plus m’aider
CLASS PRINCIPALE:
package com.adamitemod.mod; import java.awt.Color; import java.io.File; import java.util.Properties; import com.google.common.base.Throwables; import org.apache.logging.log4j.Logger; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.stats.Achievement; import net.minecraft.stats.StatBasic; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.AchievementPage; import net.minecraftforge.common.ChestGenHooks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import com.adamitemod.mod.Dynamite.EntityDynamite; import com.adamitemod.mod.blocks.BlockElevator; import com.adamitemod.mod.blocks.ElevatorEvent; import com.adamitemod.mod.init.BlocksMod; import com.adamitemod.mod.init.CraftsMod; import com.adamitemod.mod.init.ItemsMod; import com.adamitemod.mod.items.ItemDynamite; import com.adamitemod.mod.proxy.CommonProxy; import com.adamitemod.mod.world.WorldRegister; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; 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.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION) public class AdamiteMod { @Instance(References.MOD_ID) public static AdamiteMod instance; public static SimpleNetworkWrapper networkWrapper; public static Item Dynamite, bucketFake; public static Block Machine, BlockFluidFake, MachinePulveriser; public static Fluid fluidFake; @SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.SERVER_PROXY) public static CommonProxy proxy; public static Block Elevator; public static CreativeTabs Ada = new CreativeTabs("Ada") { @SideOnly(Side.CLIENT) public Item getTabIconItem() { return ItemsMod.adamiteChestplate; } }; @EventHandler public void preInit(FMLPreInitializationEvent event) { if (Loader.isModLoaded("cheatingessentials")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("hud")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("XaeroMinimap")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("XaeroBetterPvP")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("EllianMaterialDetector")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("CJB|Cheats")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("DirectionHUD")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("alluwant")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("VoxelMap")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } if (Loader.isModLoaded("thebombzenapi")) { Throwables.propagate(new Exception("java.io.FileNotFoundException.4")); } fluidFake = new Fluid("fake").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fake"); FluidRegistry.registerFluid(fluidFake); fluidFake = FluidRegistry.getFluid("fake"); if(fluidFake.getBlock() == null) { BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName("fluidFake"); GameRegistry.registerBlock(BlockFluidFake, "fluidFake"); fluidFake.setBlock(BlockFluidFake); } else { BlockFluidFake = fluidFake.getBlock(); } bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName("bucketFake").setTextureName("AdamiteMod:Fake"); GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fake", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET); BlocksMod.init(); Elevator = new BlockElevator().setBlockTextureName(References.MOD_ID + ":elevator").setHardness(3.5F).setBlockName("Elevator").setCreativeTab(AdamiteMod.Ada); GameRegistry.registerBlock(Elevator, "Elevator"); BlocksMod.register(); ItemsMod.init(); Machine = new Machine().setBlockName("machine"); MachinePulveriser = new MachinePulveriser().setBlockName("machinepulveriser"); ItemsMod.register(); Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName("Dynamite").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":dynamite"); GameRegistry.registerItem(Dynamite, "Dynamite"); GameRegistry.registerBlock(Machine, "Machine"); GameRegistry.registerBlock(MachinePulveriser, "MachinePulveriser"); CraftsMod.init(); WorldRegister.mainRegsitry(); proxy.registerRenders(); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1)); ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1)); ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1)); MinecraftForge.EVENT_BUS.register(new ElevatorEvent()); FMLCommonHandler.instance().bus().register(new ElevatorEvent()); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + ":MachineTileEntity"); GameRegistry.registerTileEntity(TileEntityMachinePulveriser.class, References.MOD_ID + ":MachineTileEntityPulveriser"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @SideOnly(Side.CLIENT) public void onTick(TickEvent.ClientTickEvent event) { Minecraft mc = FMLClientHandler.instance().getClient(); { } } }
CONTENERE
package com.adamitemod.mod; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class ContainerMachinePulveriser extends Container { public ContainerMachinePulveriser(TileEntityMachinePulveriser tile, InventoryPlayer inventory) { this.tileMachinePulveriser = tile; this.addSlotToContainer(new Slot(tile, 0, 48, 76)); this.addSlotToContainer(new SlotResult(tile, 1, 89, 135)); this.bindPlayerInventory(inventory); } public boolean canInteractWith(EntityPlayer player) { return tileMachinePulveriser.isUseableByPlayer(player); } private void bindPlayerInventory(InventoryPlayer inventory) { for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 17 + j * 18, 171 + i * 18)); } for(int i = 0; i < 9; i++) addSlotToContainer(new Slot(inventory, i, 17 + i * 18, 229)); } public ItemStack transferStackInSlot(EntityPlayer player, int quantity) { ItemStack itemstack = null; Slot slot = (Slot)inventorySlots.get(quantity); if(slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if(quantity < tileMachinePulveriser.getSizeInventory()) { if(!mergeItemStack(itemstack1, tileMachinePulveriser.getSizeInventory(), inventorySlots.size(), true)) return null; } else if(!mergeItemStack(itemstack1, 0, tileMachinePulveriser.getSizeInventory(), false)) return null; if(itemstack1.stackSize == 0) slot.putStack((ItemStack)null); else slot.onSlotChanged(); } return itemstack; } public void onContainerClosed(EntityPlayer player) { super.onContainerClosed(player); tileMachinePulveriser.closeInventory(); } private TileEntityMachinePulveriser tileMachinePulveriser; }
GUI
package com.adamitemod.mod; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class GuiMachinePulveriser extends GuiContainer { private static final ResourceLocation GuiAdamite = new ResourceLocation("adamitemod","textures/gui/GuiPulveriser.png"); @SuppressWarnings("unused") private TileEntityMachinePulveriser tileCompressor; public GuiMachinePulveriser(TileEntityMachinePulveriser tile, InventoryPlayer inventory) { super(new ContainerMachinePulveriser(tile, inventory)); this.tileCompressor = tile; this.allowUserInput = false; this.ySize = 256; this.xSize = 256; } @Override protected void drawGuiContainerBackgroundLayer(float partialRenderTick, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(GuiAdamite); int k = (this.width - this.xSize) / 2; int l = (this.height - this.ySize) / 2; this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); this.drawTexturedModalRect(0, 0, 176, 14, 100 + 1, 16); } }
CLASS DU BLOCK
package com.adamitemod.mod; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class MachinePulveriser extends BlockContainer { public MachinePulveriser() { super(Material.rock); setResistance(8F); setHarvestLevel("pickaxe", 2); setCreativeTab(AdamiteMod.Ada); setHardness(8F); } public TileEntity createNewTileEntity(World world, int metadata) { return new TileEntityMachinePulveriser(); } public boolean hasTileEntity(int metadata) { return true; } public void breakBlock(World world, int x, int y, int z, Block block, int metadata) { TileEntity tileentity = world.getTileEntity(x, y, z); if(tileentity instanceof IInventory) { IInventory inv = (IInventory)tileentity; for(int i1 = 0; i1 < inv.getSizeInventory(); i1++) { ItemStack itemstack = inv.getStackInSlot(i1); if(itemstack == null) continue; float f = world.rand.nextFloat() * 0.8F + 0.1F; float f1 = world.rand.nextFloat() * 0.8F + 0.1F; float f2 = world.rand.nextFloat() * 0.8F + 0.1F; while(itemstack.stackSize > 0) { int j1 = world.rand.nextInt(21) + 10; if(j1 > itemstack.stackSize) j1 = itemstack.stackSize; itemstack.stackSize -= j1; EntityItem entityitem = new EntityItem(world, (float)x + f, (float)y + f1, (float)z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); float f3 = 0.05F; entityitem.motionX = (float)world.rand.nextGaussian() * f3; entityitem.motionY = (float)world.rand.nextGaussian() * f3 + 0.2F; entityitem.motionZ = (float)world.rand.nextGaussian() * f3; if(itemstack.hasTagCompound()) entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); world.spawnEntityInWorld(entityitem); } } world.func_147453_f(x, y, z, block); } super.breakBlock(world, x, y, z, block, metadata); } public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { return true; } else { player.openGui(AdamiteMod.instance, 0, world, x, y, z); return true; } } public void registerBlockIcons(IIconRegister iiconRegister) { blockIcon = iiconRegister.registerIcon(References.MOD_ID + ":2"); top = iiconRegister.registerIcon(References.MOD_ID + ":1"); bottom = iiconRegister.registerIcon(References.MOD_ID + ":3"); } public IIcon getIcon(int side, int metadata) { if(side == 0) { return this.bottom; } else if(side == 1) { return this.top; } return this.blockIcon; } IIcon icontop; private IIcon iconbottom; private IIcon top; private IIcon bottom; }
RECIPES
package com.adamitemod.mod; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import com.adamitemod.mod.init.BlocksMod; import com.adamitemod.mod.init.ItemsMod; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @SuppressWarnings("rawtypes") public class MachineRecipesPulveriser { private static final MachineRecipesPulveriser smeltingBase = new MachineRecipesPulveriser(); private Map smeltingList = new HashMap(); public MachineRecipesPulveriser() { this.addRecipe(ItemsMod.StrengthStone, new ItemStack(ItemsMod.StickDeForce)); } @SuppressWarnings("unchecked") public void addRecipe(ItemStack stack1, ItemStack stack2) { ItemStack[] stackList = new ItemStack[]{stack1, stack2}; this.smeltingList.put(stackList, stack2); } public void addRecipe(Item item1, ItemStack stack) { this.addRecipe(new ItemStack(item1), stack); } public ItemStack getSmeltingResult(ItemStack[] stack) { Iterator iterator = this.smeltingList.entrySet().iterator(); Entry entry; do { if (!iterator.hasNext()) { return null; } entry = (Entry)iterator.next(); } while (!this.isSameKey(stack, (ItemStack[])entry.getKey())); return (ItemStack)entry.getValue(); } private boolean isSameKey(ItemStack[] stackList, ItemStack[] stackList2) { boolean isSame = false; for(int i=0; i<=2; i++) { System.out.println(stackList.length + " " + stackList2.length); if(stackList*.getItem() == stackList2*.getItem()) { isSame = true; } else { return false; } } return isSame; } public Map getSmeltingList() { return this.smeltingList; } public static MachineRecipesPulveriser smelting() { return smeltingBase; } }
SLOT RESULTE
package com.adamitemod.mod; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class SlotResultPulveriser extends Slot { public SlotResultPulveriser(IInventory inventory, int id, int x, int y) { super(inventory, id, x, y); } public boolean isItemValid(ItemStack stack) { return false; } public ItemStack decrStackSize(int amount) { return super.decrStackSize(amount); } public void onPickupFromSlot(EntityPlayer player, ItemStack stack) { super.onCrafting(stack); super.onPickupFromSlot(player, stack); } }
TILE ENTIYMACHINE
package com.adamitemod.mod; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; public class TileEntityMachinePulveriser extends TileEntity implements IInventory { private ItemStack[] contents = new ItemStack[2]; private int workingTime = 0; private int workingTimeNeeded = 200; @Override public void writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < this.contents.length; ++i) { if (this.contents* != null) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setByte("Slot", (byte)i); this.contents*.writeToNBT(nbttagcompound1); nbttaglist.appendTag(nbttagcompound1); } } compound.setTag("Items", nbttaglist); compound.setShort("workingTime",(short)this.workingTime); compound.setShort("workingTimeNeeded", (short)this.workingTimeNeeded); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); NBTTagList nbttaglist = compound.getTagList("Items", 10); this.contents = new ItemStack[this.getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); int j = nbttagcompound1.getByte("Slot") & 255; if (j >= 0 && j < this.contents.length) { this.contents[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1); } } this.workingTime = compound.getShort("workingTime"); this.workingTimeNeeded = compound.getShort("workingTimeNeeded"); } @Override public int getSizeInventory() { return this.contents.length; } @Override public ItemStack getStackInSlot(int slotIndex) { return this.contents[slotIndex]; } @Override public ItemStack decrStackSize(int slotIndex, int amount) { if (this.contents[slotIndex] != null) { ItemStack itemstack; if (this.contents[slotIndex].stackSize <= amount) { itemstack = this.contents[slotIndex]; this.contents[slotIndex] = null; this.markDirty(); return itemstack; } else { itemstack = this.contents[slotIndex].splitStack(amount); if (this.contents[slotIndex].stackSize == 0) { this.contents[slotIndex] = null; } this.markDirty(); return itemstack; } } else { return null; } } @Override public ItemStack getStackInSlotOnClosing(int slotIndex) { if (this.contents[slotIndex] != null) { ItemStack itemstack = this.contents[slotIndex]; this.contents[slotIndex] = null; return itemstack; } else { return null; } } @Override public void setInventorySlotContents(int slotIndex, ItemStack stack) { this.contents[slotIndex] = stack; if (stack != null && stack.stackSize > this.getInventoryStackLimit()) { stack.stackSize = this.getInventoryStackLimit(); } this.markDirty(); } @Override public String getInventoryName() { return "tile.machineTuto"; } @Override public boolean hasCustomInventoryName() { return false; } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer player) { return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : player.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D; } @Override public void openInventory() { } @Override public void closeInventory() { } @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return slot == 1 ? false : true; } public boolean isBurning() { return this.workingTime > 0; } private boolean canSmelt() { if (this.contents[0] == null) //Si les trois premiers slots sont vides { return false; } else { ItemStack itemstack = MachineRecipesPulveriser.smelting().getSmeltingResult(new ItemStack[]{this.contents[0]}); if (itemstack == null) return false; if (this.contents[1] == null) return true; if (!this.contents[1].isItemEqual(itemstack)) return false; int result = contents[1].stackSize + itemstack.stackSize; return result <= getInventoryStackLimit() && result <= this.contents[0].getMaxStackSize(); } } public void updateEntity() { if(this.isBurning() && this.canSmelt()) { ++this.workingTime; } if(this.canSmelt() && !this.isBurning()) { this.workingTime = 1; } if(this.canSmelt() && this.workingTime == this.workingTimeNeeded) { this.smeltItem(); this.workingTime = 0; } if(!this.canSmelt()) { this.workingTime= 0; } } public void smeltItem() { if (this.canSmelt()) { ItemStack itemstack = MachineRecipes.smelting().getSmeltingResult(new ItemStack[]{this.contents[0]}); //On récupère l'output de la recette if (this.contents[1] == null) { this.contents[1] = itemstack.copy(); } else if (this.contents[1].getItem() == itemstack.getItem()) { this.contents[1].stackSize += itemstack.stackSize; } –this.contents[0].stackSize; if (this.contents[0].stackSize <= 0) { this.contents[0] = null; } } } }
-
Envoies-moi plutôt un zip de ton dossier src, ça serait plus simple pour moi.
Car il y a tellement de classe que c’est galère. -
D’accord