Résolu Probléme machine, Slot
-
Je suis sous forge-1.7.10-10.13.4.1558
Est bien salut tous le mondes j’ai un problème ses le même que a chaque fois pour mais machine “les slot” oui car je ne sait pas ajouter ou retirée des slot donc dans le code j’ai vue “//les slot ses expliquer dans le tutoriel de robin” le truc ses que je ne trouve pas de tutoriel appeler slot du coups je me penche vers vous une bonne fois pour toutes pour ne plus vous embêter avec les slot
-
-
Je suis sous forge-1.7.10-10.13.4.1558
(1 input, 1 output )
alors j’ai essayer de mettre que 1 input et 1 output car j’ai suivi le tuto mais quand j’ouvre ma machine mon launcher se ferme et je ne sait pas trop ou je me suit tromper :at: voila la class ou je pense que j’ai eu faux :
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[1]; 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; } } } }
-
Alors ?
-
Petit Up
-
@‘amigo127’:
alors j’ai essayer de mettre que 1 input et 1 output car j’ai suivi le tuto mais quand j’ouvre ma machine mon launcher se ferme
Le launcher se ferme ?!? Le jeu crash ?
-
crash voici le crash report :
–-- Minecraft Crash Report ---- // You should try our sister game, Minceraft! Time: 19/05/16 19:00 Description: Ticking memory connection java.lang.ArrayIndexOutOfBoundsException: 1 at com.adamitemod.mod.TileEntityMachinePulveriser.getStackInSlot(TileEntityMachinePulveriser.java:68) at net.minecraft.inventory.Slot.getStack(Slot.java:88) at net.minecraft.inventory.Container.getInventory(Container.java:67) at net.minecraft.inventory.Container.addCraftingToCrafters(Container.java:53) at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:88) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) at com.adamitemod.mod.MachinePulveriser.onBlockActivated(MachinePulveriser.java:79) at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:409) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.adamitemod.mod.TileEntityMachinePulveriser.getStackInSlot(TileEntityMachinePulveriser.java:68) at net.minecraft.inventory.Slot.getStack(Slot.java:88) at net.minecraft.inventory.Container.getInventory(Container.java:67) at net.minecraft.inventory.Container.addCraftingToCrafters(Container.java:53) at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:88) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) at com.adamitemod.mod.MachinePulveriser.onBlockActivated(MachinePulveriser.java:79) at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:409) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) -- Ticking connection -- Details: Connection: net.minecraft.network.NetworkManager@113bec5 Stacktrace: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- 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: 748741304 bytes (714 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: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player183'/290, l='New World', x=-186,73, y=64,00, z=256,47]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge'
-
private ItemStack[] contents = new ItemStack[1];
->
private ItemStack[] contents = new ItemStack[2]; -
Ok je test
-
Sa crash toujour voici le crash
–-- Minecraft Crash Report ---- // My bad. Time: 19/05/16 23:04 Description: Rendering screen java.lang.ArrayIndexOutOfBoundsException: 2 at com.adamitemod.mod.TileEntityMachinePulveriser.getStackInSlot(TileEntityMachinePulveriser.java:68) at net.minecraft.inventory.Slot.getStack(Slot.java:88) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:219) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) 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.TileEntityMachinePulveriser.getStackInSlot(TileEntityMachinePulveriser.java:68) at net.minecraft.inventory.Slot.getStack(Slot.java:88) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:219) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114) -- Screen render details -- Details: Screen name: com.adamitemod.mod.GuiMachinePulveriser Mouse location: Scaled: (228, 127). Absolute: (683, 384) Screen size: Scaled: (456, 256). Absolute: (1366, 768). Scale factor of 3 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player323'/286, l='MpServer', x=-186,73, y=65,62, z=256,47]] 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: (-188,64,256), Chunk: (at 4,4,0 in -12,16; contains blocks -192,0,256 to -177,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 446330 game time, 309674 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: 35 total; [EntityCreeper['Creeper'/128, l='MpServer', x=-170,41, y=76,00, z=281,00], EntityItem['item.tile.flower2.poppy'/64, l='MpServer', x=-226,13, y=12,13, z=318,78], EntityZombie['Zombie'/512, l='MpServer', x=-156,50, y=72,00, z=227,50], EntityCreeper['Creeper'/129, l='MpServer', x=-164,22, y=14,00, z=304,84], EntityCreeper['Creeper'/131, l='MpServer', x=-154,16, y=71,00, z=231,22], EntityZombie['Zombie'/132, l='MpServer', x=-157,50, y=31,00, z=285,50], EntityCreeper['Creeper'/133, l='MpServer', x=-159,50, y=14,00, z=306,50], EntityBat['Bat'/74, l='MpServer', x=-223,34, y=34,92, z=198,76], EntitySkeleton['Skeleton'/75, l='MpServer', x=-215,16, y=66,00, z=245,50], EntityZombie['Zombie'/76, l='MpServer', x=-209,56, y=46,00, z=293,00], EntityPig['Pig'/149, l='MpServer', x=-129,16, y=84,00, z=270,56], EntityCreeper['Creeper'/150, l='MpServer', x=-131,66, y=32,00, z=315,00], EntitySkeleton['Skeleton'/94, l='MpServer', x=-199,31, y=12,00, z=286,50], EntityClientPlayerMP['Player323'/286, l='MpServer', x=-186,73, y=65,62, z=256,47], EntityZombie['Zombie'/95, l='MpServer', x=-207,94, y=69,00, z=281,69], EntitySkeleton['Skeleton'/96, l='MpServer', x=-195,50, y=72,00, z=293,50], EntityPig['Pig'/102, l='MpServer', x=-181,47, y=60,00, z=243,53], EntityItem['item.item.rubyLeggings'/103, l='MpServer', x=-180,16, y=63,13, z=250,03], EntityItem['item.item.rubyChestplate'/104, l='MpServer', x=-182,75, y=63,13, z=249,53], EntityItem['item.item.FissionLeggings'/105, l='MpServer', x=-184,81, y=63,13, z=249,88], EntityItem['item.item.adamiteBoots'/106, l='MpServer', x=-184,81, y=63,13, z=247,59], EntityItem['item.item.adamiteLeggings'/107, l='MpServer', x=-185,44, y=63,13, z=247,03], EntityItem['item.item.adamiteHelmet'/108, l='MpServer', x=-180,81, y=63,13, z=251,47], EntitySpider['Spider'/428, l='MpServer', x=-164,50, y=85,00, z=303,50], EntityItem['item.item.zectiumHelmet'/109, l='MpServer', x=-182,13, y=63,13, z=247,75], EntityItem['item.item.zectiumBoots'/110, l='MpServer', x=-185,94, y=63,13, z=249,88], EntityItem['item.item.rubyBoots'/111, l='MpServer', x=-184,59, y=64,13, z=245,06], EntityItem['item.item.HealStick'/112, l='MpServer', x=-185,75, y=64,13, z=244,69], EntityItem['item.item.bucketFake'/113, l='MpServer', x=-187,47, y=64,13, z=244,19], EntitySkeleton['Skeleton'/433, l='MpServer', x=-132,50, y=79,00, z=256,50], EntityItem['item.item.FissionBoots'/114, l='MpServer', x=-189,13, y=64,13, z=246,56], EntityItem['item.item.FissionChestplate'/115, l='MpServer', x=-188,81, y=64,13, z=249,81], EntityItem['item.item.zectiumBoots'/116, l='MpServer', x=-188,97, y=64,13, z=250,13], EntityItem['item.item.zectiumLeggings'/117, l='MpServer', x=-189,88, y=64,13, z=246,13], EntityItem['item.item.zectiumChestplate'/118, l='MpServer', x=-189,13, y=64,13, z=249,81]] 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: 837719904 bytes (798 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)
-
Tu as mit combien de slot dans ton container ?
-
ses bon j’ai trouver sa s(ouvre mais quand je commence un craft sa crash voici ma class
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<=1; i++) { if(stackList*.getItem() == stackList2*.getItem()) { isSame = true; } else { return false; } } return isSame; } public Map getSmeltingList() { return this.smeltingList; } public static MachineRecipesPulveriser smelting() { return smeltingBase; } }
-
ça serait bien d’avoir le rapport de crash.
-
Voici le crash report comme tu me l’as demander
–-- Minecraft Crash Report ---- // I let you down. Sorry :( Time: 19/05/16 23:36 Description: Ticking block entity java.lang.ArrayIndexOutOfBoundsException: 1 at com.adamitemod.mod.MachineRecipesPulveriser.isSameKey(MachineRecipesPulveriser.java:74) 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:74) 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 #185 (tile.machinepulveriser // com.adamitemod.mod.MachinePulveriser) Block data value: 0 / 0x0 / 0b0000 Block location: World: (-189,64,257), Chunk: (at 3,4,1 in -12,16; contains blocks -192,0,256 to -177,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Actual block type: ID #185 (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['Player179'/309, l='MpServer', x=-186,73, y=65,62, z=256,47]] 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: (-188,64,256), Chunk: (at 4,4,0 in -12,16; contains blocks -192,0,256 to -177,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 447606 game time, 310950 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: 35 total; [EntitySkeleton['Skeleton'/1217, l='MpServer', x=-210,50, y=43,00, z=220,50], EntitySkeleton['Skeleton'/1090, l='MpServer', x=-211,50, y=46,00, z=307,50], EntityCreeper['Creeper'/134, l='MpServer', x=-158,97, y=77,00, z=273,47], EntityZombie['Zombie'/1094, l='MpServer', x=-204,50, y=12,00, z=210,50], EntityCreeper['Creeper'/140, l='MpServer', x=-154,16, y=71,00, z=231,22], EntitySkeleton['Skeleton'/77, l='MpServer', x=-216,50, y=64,00, z=253,94], EntityCreeper['Creeper'/910, l='MpServer', x=-180,50, y=76,00, z=289,50], EntityCreeper['Creeper'/143, l='MpServer', x=-159,50, y=14,00, z=306,50], EntitySkeleton['Skeleton'/1106, l='MpServer', x=-145,50, y=89,00, z=302,50], EntitySpider['Spider'/791, l='MpServer', x=-151,50, y=67,00, z=254,50], EntitySkeleton['Skeleton'/800, l='MpServer', x=-156,50, y=67,00, z=255,50], EntitySkeleton['Skeleton'/161, l='MpServer', x=-137,94, y=77,00, z=261,50], EntityPig['Pig'/162, l='MpServer', x=-129,16, y=84,00, z=270,56], EntityZombie['Zombie'/99, l='MpServer', x=-198,84, y=71,00, z=289,34], EntityPig['Pig'/108, l='MpServer', x=-181,47, y=60,00, z=243,53], EntityItem['item.item.rubyLeggings'/109, l='MpServer', x=-180,16, y=63,13, z=250,03], EntityCreeper['Creeper'/877, l='MpServer', x=-143,50, y=71,00, z=234,50], EntityItem['item.item.rubyChestplate'/110, l='MpServer', x=-182,75, y=63,13, z=249,53], EntityItem['item.item.FissionLeggings'/111, l='MpServer', x=-184,81, y=63,13, z=249,88], EntityItem['item.item.adamiteBoots'/112, l='MpServer', x=-184,81, y=63,13, z=247,59], EntityItem['item.item.adamiteLeggings'/113, l='MpServer', x=-185,44, y=63,13, z=247,03], EntityItem['item.item.adamiteHelmet'/114, l='MpServer', x=-180,81, y=63,13, z=251,47], EntityItem['item.item.zectiumHelmet'/115, l='MpServer', x=-182,13, y=63,13, z=247,75], EntityItem['item.item.zectiumBoots'/116, l='MpServer', x=-185,94, y=63,13, z=249,88], EntityItem['item.item.rubyBoots'/117, l='MpServer', x=-184,59, y=64,13, z=245,06], EntityClientPlayerMP['Player179'/309, l='MpServer', x=-186,73, y=65,62, z=256,47], EntityItem['item.item.HealStick'/118, l='MpServer', x=-185,75, y=64,13, z=244,69], EntityZombie['Zombie'/1078, l='MpServer', x=-222,50, y=68,00, z=273,50], EntityItem['item.item.bucketFake'/119, l='MpServer', x=-187,47, y=64,13, z=244,19], EntityItem['item.item.FissionBoots'/120, l='MpServer', x=-189,13, y=64,13, z=246,56], EntityItem['item.item.FissionChestplate'/121, l='MpServer', x=-188,81, y=64,13, z=249,81], EntityItem['item.item.zectiumBoots'/122, l='MpServer', x=-188,97, y=64,13, z=250,13], EntityItem['item.item.zectiumLeggings'/123, l='MpServer', x=-189,88, y=64,13, z=246,13], EntityItem['item.item.zectiumChestplate'/124, l='MpServer', x=-189,13, y=64,13, z=249,81], EntityItem['item.tile.flower2.poppy'/63, l='MpServer', x=-226,13, y=12,13, z=318,78]] 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: 833494656 bytes (794 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)
-
Le problème est ici : if(stackList*.getItem() == stackList2*.getItem())
Ajoutes au dessus :
System.out.println(stackList.length + " " + stackList2.length);
Pour voir quel tableau ne fait que 1 de long au lieu de 2. -
Je te donne quoi logs ou crash report
-
Donne juste les lignes ou tu as print la taille des tableaux
-
? ses a dire ?
-
Robin t’a dit de mettre ça dans ton code : “System.out.println(stackList.length + " " + stackList2.length);”, donc dans la console d’eclipse, tu vas trouver das lignes avec seulement deux chiffres, donne-les.
-
Le probléme s’est que sa fait sa quand je lance :
[22:29:34] [main/INFO] [GradleStart]: Extra: [] [22:29:34] [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] [22:29:34] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [22:29:34] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [22:29:34] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [22:29:34] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [22:29:34] [main/INFO] [FML]: Forge Mod Loader version 7.99.36.1558 for Minecraft 1.7.10 loading [22:29:34] [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 [22:29:35] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [22:29:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [22:29:35] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [22:29:35] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [22:29:35] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [22:29:35] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [22:29:35] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [22:29:35] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [22:29:35] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [22:29:35] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [22:29:36] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [22:29:46] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [22:29:46] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [22:29:46] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [22:29:48] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [22:29:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [22:29:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [22:29:48] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [22:29:55] [main/INFO]: Setting user: Player170 [22:30:00] [Client thread/INFO]: LWJGL Version: 2.9.1 [22:30:05] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ---- // Don't be sad, have a hug! <3 Time: 20/05/16 22:30 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: 971198800 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' [22:30:05] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [22:30:05] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1558 Initialized [22:30:05] [Client thread/INFO] [FML]: Replaced 183 ore recipies [22:30:05] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [22:30:06] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [22:30:06] [Client thread/INFO] [FML]: Searching C:\Users\cruch\Desktop\$y\eclipse\mods for mods [22:30:47] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [22:30:50] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, adamitemod] at CLIENT [22:30:50] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, adamitemod] at SERVER [22:30:52] [Client thread/INFO] [STDOUT]: [com.adamitemod.mod.proxy.CommonProxy:<init>:7]: méthode côté serveur [22:30:52] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamite Mod [22:30:52] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [22:30:52] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [22:30:52] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [22:30:52] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [22:30:52] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [22:30:53] [Client thread/INFO] [FML]: Applying holder lookups [22:30:53] [Client thread/INFO] [FML]: Holder lookups applied [22:30:53] [Client thread/INFO] [FML]: Injecting itemstacks [22:30:53] [Client thread/INFO] [FML]: Itemstack injection complete [22:30:53] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [22:30:53] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [22:30:54] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [22:30:54] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [22:30:54] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [22:30:54] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [22:30:54] [Sound Library Loader/INFO]: Sound engine started [22:31:08] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas [22:31:08] [Client thread/INFO]: Created: 16x16 textures/items-atlas [22:31:08] [Client thread/INFO] [FML]: Injecting itemstacks [22:31:08] [Client thread/INFO] [FML]: Itemstack injection complete [22:31:09] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [22:31:09] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamite Mod [22:31:10] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [22:31:12] [Client thread/INFO]: Created: 512x256 textures/items-atlas [22:31:12] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [22:31:12] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [22:31:12] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [22:31:12] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [22:31:12] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [22:31:12] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [22:31:13] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [22:31:13] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [22:31:13] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [22:31:13] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [22:31:13] [Sound Library Loader/INFO]: Sound engine started [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found. [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: DOMAIN adamitemod [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: –------------------------------------------------ [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: domain adamitemod is missing 3 textures [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: domain adamitemod has 1 location: [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: mod adamitemod resources at C:\Users\cruch\Desktop\$y\bin [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: –----------------------- [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: The missing resources for domain adamitemod are: [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: textures/blocks/hautPulPulveriser.png [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: textures/blocks/cotePulPulveriser.png [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: textures/blocks/basPulPulveriser.png [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: –----------------------- [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: No other errors exist for domain adamitemod [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [22:31:23] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= ```</init>