-
Posts
878 -
Joined
-
Last visited
Everything posted by Elix_x
-
Okay, so: My mod is changing BiomeGenBase class and it crashes with different mods like Biomes O Plenty, Twilight forest... (also because they set up biomes registration in pre init and also becuse biomes registration class is instanceof BiomeGenBase): ---- Minecraft Crash Report ---- // There are four lights! Time: 14.02.15 17:22 Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/world/biome/BiomeGenBase at cpw.mods.fml.common.LoadController.transition(LoadController.java:162) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(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) Caused by: java.lang.NoClassDefFoundError: net/minecraft/world/biome/BiomeGenBase at biomesoplenty.common.items.ItemBiomeFinder.<init>(ItemBiomeFinder.java:31) at biomesoplenty.common.core.BOPItems.registerItems(BOPItems.java:85) at biomesoplenty.common.core.BOPItems.init(BOPItems.java:46) at biomesoplenty.BiomesOPlenty.preInit(BiomesOPlenty.java:58) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) ... 10 more Caused by: java.lang.ClassNotFoundException: net.minecraft.world.biome.BiomeGenBase at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 41 more Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: ard at org.objectweb.asm.ClassWriter.getCommonSuperClass(Unknown Source) at org.objectweb.asm.ClassWriter.a(Unknown Source) at org.objectweb.asm.Frame.a(Unknown Source) at org.objectweb.asm.Frame.a(Unknown Source) at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source) at org.objectweb.asm.tree.MethodNode.accept(Unknown Source) at org.objectweb.asm.tree.MethodNode.accept(Unknown Source) at org.objectweb.asm.tree.ClassNode.accept(Unknown Source) at code.elix_x.coremods.antiidconflict.AntiIdConflictTransformer.patchBiomeGenBase(AntiIdConflictTransformer.java:285) at code.elix_x.coremods.antiidconflict.AntiIdConflictTransformer.transform(AntiIdConflictTransformer.java:52) at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ... 43 more 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 7 (amd64) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 99285720 bytes (94 MB) / 972685312 bytes (927 MB) up to 5261361152 bytes (5017 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx5G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn1G AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.10.85.1291} [Forge Mod Loader] (forge-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized Forge{10.13.2.1291} [Minecraft Forge] (forge-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized BiomesOPlenty{2.1.0} [biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.1004-universal.jar) Unloaded->Constructed->Errored
-
Sorry for that maybe simple question, but i couldn't find anything on the web. How to export coremods? If i export it as normal mod (gradlew build), i doesn't work when i put it in mods folder. It works fine in eclipse, but i just can not export it out side. Thanks for answering this (maybe easy) question!
-
HINT: To sand multiple data between server an client you can use NBT system, that is ready to work, example: Goal: transfer using 1 packet, EntityPlayer, int, int and boolean First: let's convert player in string using UUID system (for recovery afterwards we will also need id of dimension he's in, that's first int): player.func_146094_a(player.getGameProfile()).toString() Now we need to transfer String, int, int and boolean. How to do that? - Using NBT! NBTTagCompound data = new NBTTagCompound(); data.setString("player", player.func_146094_a(player.getGameProfile()).toString()); data.setBoolean("fixed", fixed); data.setInteger("mode", mode); data.setInteger("dim", player.worldObj.provider.dimensionId); Now a general question: how to convert it in bytes? - FML did all for you: using cpw.mods.fml.common.network.ByteBufUtils.writeTag you can convert NBT into bytes: ByteBufUtils.writeTag(buf, data); Now how to read it? - I'll say only one thing about it: NBTTagCompound data = ByteBufUtils.readTag(buf); What did you learn: Using NBT, you can transfer multiple data in 1 packet. Data that you can transfer using NBT: String, byte, short, long, int, boolean, double, float, int[]... And others if you create new types of NBTTags!
-
Hi, i have some problems with NBTs: For some reasons they are not transfered properly in between my Item. You will see what i mean in a second: Here's my class (not all, all takes 2000 lines, so i just put here code that isn't working), with 3 methods we're interested in: setItems: public static ItemStack setItems(Map<Integer, ItemStack> map, ItemStack itemstack){ fixTags(itemstack); for(int metadata = 1; metadata < 10; metadata++){ itemstack = setToolForMeta(itemstack, map.get(metadata), metadata); } /*for(ItemStack i : map.values()){ System.out.println(i.getDisplayName()); }*/ System.out.println("Are stacks equal: " + ItemStack.areItemStacksEqual(itemstack, ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound())))); NBTTagCompound tag = itemstack.writeToNBT(new NBTTagCompound()); System.out.println("Has tag: " + tag.hasKey("tag")); System.out.println("Has ctd: " + tag.getCompoundTag("tag").hasKey("compressedtooldata")); System.out.println("Has sword tag: " + tag.getCompoundTag("tag").getCompoundTag("compressedtooldata").hasKey("sword")); System.out.println("Sword nbt: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword"))); System.out.println("Sword for meta: " + getToolFromMeta(itemstack, 1)); System.out.println("Sword name: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); return itemstack; } setToolForMeta: public static ItemStack setToolForMeta(ItemStack itemstack, ItemStack tool, int metadata){ if(metadata == 1){ ItemStack ret = setSword(itemstack, tool); System.out.println("Are stacks equal: " + ItemStack.areItemStacksEqual(itemstack, ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound())))); NBTTagCompound tag = itemstack.writeToNBT(new NBTTagCompound()); System.out.println("Has tag: " + tag.hasKey("tag")); System.out.println("Has ctd: " + tag.getCompoundTag("tag").hasKey("compressedtooldata")); System.out.println("Has sword tag: " + tag.getCompoundTag("tag").getCompoundTag("compressedtooldata").hasKey("sword")); System.out.println("Sword: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword"))); System.out.println("Sword for meta: " + getToolFromMeta(itemstack, 1)); System.out.println("Sword name: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); return ret; } if(metadata == 2) return setPickaxe(itemstack, tool); if(metadata == 3) return setShovel(itemstack, tool); if(metadata == 4) return setAxe(itemstack, tool); if(metadata == 5) return setHoe(itemstack, tool); if(metadata == 6) return set6thItem(itemstack, tool); if(metadata == 7) return set7thItem(itemstack, tool); if(metadata == return set8thItem(itemstack, tool); if(metadata == 9) return set9thItem(itemstack, tool); return itemstack; } And finally setSword: public static ItemStack setSword(ItemStack itemstack, ItemStack tool){ fixTags(itemstack); if(tool == null) return nullifieSword(itemstack); NBTTagCompound nbt = itemstack.writeToNBT(new NBTTagCompound()); tool.writeToNBT(nbt.getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")); itemstack.readFromNBT(nbt); itemstack.setTagCompound(nbt.getCompoundTag("tag")); // System.out.println(tool.getDisplayName()); // System.out.println("Set sword: " + ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); System.out.println("Are stacks equal: " + ItemStack.areItemStacksEqual(itemstack, ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound())))); NBTTagCompound tag = itemstack.writeToNBT(new NBTTagCompound()); System.out.println("Has tag: " + tag.hasKey("tag")); System.out.println("Has ctd: " + tag.getCompoundTag("tag").hasKey("compressedtooldata")); System.out.println("Has sword tag: " + tag.getCompoundTag("tag").getCompoundTag("compressedtooldata").hasKey("sword")); System.out.println("Sword: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword"))); System.out.println("Sword name: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); return itemstack; } The problem is: the "sword" (AND ONLY THE SWORD!!!) isn't saved proper;y, how ever all others are saved: When i call setItems, with defined map, that's what i get in console: [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:224]: Are stacks equal: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:226]: Has tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:227]: Has ctd: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:228]: Has sword tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:229]: Sword: 1xitem.swordDiamond@0 [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:230]: Sword name: Diamond Sword [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:484]: Are stacks equal: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:486]: Has tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:487]: Has ctd: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:488]: Has sword tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:489]: Sword: 1xitem.swordDiamond@0 [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:490]: Sword for meta: 1xitem.swordDiamond@0 [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:491]: Sword name: Diamond Sword [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:671]: Are stacks equal: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:673]: Has tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:674]: Has ctd: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:675]: Has sword tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:676]: Sword nbt: null [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:677]: Sword for meta: null [19:51:52] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Exception while updating neighbours at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[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.NullPointerException at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.setItems(ItemCompressedTools.java:678) ~[itemCompressedTools.class:?] at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.createNewToolAndSetItems(ItemCompressedTools.java:653) ~[itemCompressedTools.class:?] at code.elix_x.mods.toolscompressor.tileentities.TileEntityToolsCompressor.start(TileEntityToolsCompressor.java:158) ~[TileEntityToolsCompressor.class:?] at code.elix_x.mods.toolscompressor.blocks.ToolsCompressor.onNeighborBlockChange(ToolsCompressor.java:96) ~[ToolsCompressor.class:?] at net.minecraft.world.World.notifyBlockOfNeighborChange(World.java:787) ~[World.class:?] at net.minecraft.world.World.notifyBlocksOfNeighborChange(World.java:737) ~[World.class:?] at net.minecraft.world.World.notifyBlockChange(World.java:697) ~[World.class:?] at net.minecraft.world.World.setBlockMetadataWithNotify(World.java:628) ~[World.class:?] at net.minecraft.block.BlockButton.onBlockActivated(BlockButton.java:248) ~[blockButton.class:?] at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:409) ~[itemInWorldManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) ~[C08PacketPlayerBlockPlacement.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) ~[C08PacketPlayerBlockPlacement.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?] ... 5 more [19:51:52] [server thread/ERROR]: This crash report has been saved to: C:\my\mcmodding\mods\toolscompressor\eclipse\.\crash-reports\crash-2015-02-05_19.51.52-server.txt [19:51:52] [server thread/INFO]: Stopping server [19:51:52] [server thread/INFO]: Saving players [19:51:52] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ---- // I'm sorry, Dave. Time: 05.02.15 19:51 Description: Exception while updating neighbours java.lang.NullPointerException: Exception while updating neighbours at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.setItems(ItemCompressedTools.java:678) at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.createNewToolAndSetItems(ItemCompressedTools.java:653) at code.elix_x.mods.toolscompressor.tileentities.TileEntityToolsCompressor.start(TileEntityToolsCompressor.java:158) at code.elix_x.mods.toolscompressor.blocks.ToolsCompressor.onNeighborBlockChange(ToolsCompressor.java:96) at net.minecraft.world.World.notifyBlockOfNeighborChange(World.java:787) at net.minecraft.world.World.notifyBlocksOfNeighborChange(World.java:737) at net.minecraft.world.World.notifyBlockChange(World.java:697) at net.minecraft.world.World.setBlockMetadataWithNotify(World.java:628) at net.minecraft.block.BlockButton.onBlockActivated(BlockButton.java:248) 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) ... Let's take a look at it comparing code and output: setSword: Code: public static ItemStack setSword(ItemStack itemstack, ItemStack tool){ fixTags(itemstack); if(tool == null) return nullifieSword(itemstack); NBTTagCompound nbt = itemstack.writeToNBT(new NBTTagCompound()); tool.writeToNBT(nbt.getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")); itemstack.readFromNBT(nbt); itemstack.setTagCompound(nbt.getCompoundTag("tag")); // System.out.println(tool.getDisplayName()); // System.out.println("Set sword: " + ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); System.out.println("Are stacks equal: " + ItemStack.areItemStacksEqual(itemstack, ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound())))); NBTTagCompound tag = itemstack.writeToNBT(new NBTTagCompound()); System.out.println("Has tag: " + tag.hasKey("tag")); System.out.println("Has ctd: " + tag.getCompoundTag("tag").hasKey("compressedtooldata")); System.out.println("Has sword tag: " + tag.getCompoundTag("tag").getCompoundTag("compressedtooldata").hasKey("sword")); System.out.println("Sword: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword"))); System.out.println("Sword name: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); return itemstack; } Output: [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:224]: Are stacks equal: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:226]: Has tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:227]: Has ctd: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:228]: Has sword tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:229]: Sword: 1xitem.swordDiamond@0 [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setSword:230]: Sword name: Diamond Sword setToolForMeta: Code: public static ItemStack setToolForMeta(ItemStack itemstack, ItemStack tool, int metadata){ if(metadata == 1){ ItemStack ret = setSword(itemstack, tool); System.out.println("Are stacks equal: " + ItemStack.areItemStacksEqual(itemstack, ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound())))); NBTTagCompound tag = itemstack.writeToNBT(new NBTTagCompound()); System.out.println("Has tag: " + tag.hasKey("tag")); System.out.println("Has ctd: " + tag.getCompoundTag("tag").hasKey("compressedtooldata")); System.out.println("Has sword tag: " + tag.getCompoundTag("tag").getCompoundTag("compressedtooldata").hasKey("sword")); System.out.println("Sword: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword"))); System.out.println("Sword for meta: " + getToolFromMeta(itemstack, 1)); System.out.println("Sword name: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); return ret; } if(metadata == 2) return setPickaxe(itemstack, tool); if(metadata == 3) return setShovel(itemstack, tool); if(metadata == 4) return setAxe(itemstack, tool); if(metadata == 5) return setHoe(itemstack, tool); if(metadata == 6) return set6thItem(itemstack, tool); if(metadata == 7) return set7thItem(itemstack, tool); if(metadata == return set8thItem(itemstack, tool); if(metadata == 9) return set9thItem(itemstack, tool); return itemstack; } Output: [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:484]: Are stacks equal: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:486]: Has tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:487]: Has ctd: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:488]: Has sword tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:489]: Sword: 1xitem.swordDiamond@0 [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:490]: Sword for meta: 1xitem.swordDiamond@0 [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setToolForMeta:491]: Sword name: Diamond Sword And setItems: Code: public static ItemStack setItems(Map<Integer, ItemStack> map, ItemStack itemstack){ fixTags(itemstack); for(int metadata = 1; metadata < 10; metadata++){ itemstack = setToolForMeta(itemstack, map.get(metadata), metadata); } /*for(ItemStack i : map.values()){ System.out.println(i.getDisplayName()); }*/ System.out.println("Are stacks equal: " + ItemStack.areItemStacksEqual(itemstack, ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound())))); NBTTagCompound tag = itemstack.writeToNBT(new NBTTagCompound()); System.out.println("Has tag: " + tag.hasKey("tag")); System.out.println("Has ctd: " + tag.getCompoundTag("tag").hasKey("compressedtooldata")); System.out.println("Has sword tag: " + tag.getCompoundTag("tag").getCompoundTag("compressedtooldata").hasKey("sword")); System.out.println("Sword nbt: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword"))); System.out.println("Sword for meta: " + getToolFromMeta(itemstack, 1)); System.out.println("Sword name: " + ItemStack.loadItemStackFromNBT(itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getCompoundTag("sword")).getDisplayName()); return itemstack; } Output: [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:671]: Are stacks equal: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:673]: Has tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:674]: Has ctd: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:675]: Has sword tag: true [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:676]: Sword nbt: null [19:51:52] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.items.ItemCompressedTools:setItems:677]: Sword for meta: null [19:51:52] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Exception while updating neighbours at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[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.NullPointerException at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.setItems(ItemCompressedTools.java:678) ~[itemCompressedTools.class:?] at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.createNewToolAndSetItems(ItemCompressedTools.java:653) ~[itemCompressedTools.class:?] at code.elix_x.mods.toolscompressor.tileentities.TileEntityToolsCompressor.start(TileEntityToolsCompressor.java:158) ~[TileEntityToolsCompressor.class:?] at code.elix_x.mods.toolscompressor.blocks.ToolsCompressor.onNeighborBlockChange(ToolsCompressor.java:96) ~[ToolsCompressor.class:?] at net.minecraft.world.World.notifyBlockOfNeighborChange(World.java:787) ~[World.class:?] at net.minecraft.world.World.notifyBlocksOfNeighborChange(World.java:737) ~[World.class:?] at net.minecraft.world.World.notifyBlockChange(World.java:697) ~[World.class:?] at net.minecraft.world.World.setBlockMetadataWithNotify(World.java:628) ~[World.class:?] at net.minecraft.block.BlockButton.onBlockActivated(BlockButton.java:248) ~[blockButton.class:?] at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:409) ~[itemInWorldManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) ~[C08PacketPlayerBlockPlacement.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) ~[C08PacketPlayerBlockPlacement.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?] ... 5 more [19:51:52] [server thread/ERROR]: This crash report has been saved to: C:\my\mcmodding\mods\toolscompressor\eclipse\.\crash-reports\crash-2015-02-05_19.51.52-server.txt [19:51:52] [server thread/INFO]: Stopping server [19:51:52] [server thread/INFO]: Saving players [19:51:52] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ---- // I'm sorry, Dave. Time: 05.02.15 19:51 Description: Exception while updating neighbours java.lang.NullPointerException: Exception while updating neighbours at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.setItems(ItemCompressedTools.java:678) at code.elix_x.mods.toolscompressor.items.ItemCompressedTools.createNewToolAndSetItems(ItemCompressedTools.java:653) at code.elix_x.mods.toolscompressor.tileentities.TileEntityToolsCompressor.start(TileEntityToolsCompressor.java:158) at code.elix_x.mods.toolscompressor.blocks.ToolsCompressor.onNeighborBlockChange(ToolsCompressor.java:96) at net.minecraft.world.World.notifyBlockOfNeighborChange(World.java:787) at net.minecraft.world.World.notifyBlocksOfNeighborChange(World.java:737) at net.minecraft.world.World.notifyBlockChange(World.java:697) at net.minecraft.world.World.setBlockMetadataWithNotify(World.java:628) at net.minecraft.block.BlockButton.onBlockActivated(BlockButton.java:248) 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) ... As you can see, or some reasons transmited ItemStack somehow changed his NBT in setItems? WHY?? HOW?? Can you help me please?
-
[1.7.10] [COREMOD] Coremod launched simulatenously with MC, causes crash.
Elix_x replied to Elix_x's topic in Modder Support
Making another coremod I ENCOUNTERED THE SAME PROBLEM: COREMOD LOADS SIMULATENOUSLY TO MC, AND THAT'S VERY PROBLEMATIC IF YOU WANT TO OVERHANDLE BIOME REGISTRATION FOR EXAMPLE!!!!!! -
[1.7.10] [COREMOD] Coremod launched simulatenously with MC, causes crash.
Elix_x replied to Elix_x's topic in Modder Support
Finding ways, i know, that i can extend class, remap everything in post init, but there are still some things to patch Some that have not the best solution: loadOptions and saveOtions, but i can still save to world, but then gui will not be acessible outside of world... One that needs to be patched: runTick in MC, because MC uses "wrong" keyupdate system isKeyDown, just needs to be patched, just because it uses int PS: way to make this possible: by saving keys in int[] instead of int allows to store more keys for one Key Binding -
[1.7.10] [COREMOD] Coremod launched simulatenously with MC, causes crash.
Elix_x replied to Elix_x's topic in Modder Support
Why do you think so? I'll have to patch at least GUIControls for that... or use events to overhandle Gui opening... But there's still some methods that will be needed to be patched. -
[1.7.10] [COREMOD] Coremod launched simulatenously with MC, causes crash.
Elix_x replied to Elix_x's topic in Modder Support
I'm trying to rewrite vanilla key system, to make it possible to bind few keys for one action. (shift + alt + i for example) -
I'm making coremod, that patches few things in GameSettings, how ever doesn't finish patching it before MC asks this class... Transformer's code: package code.elix_x.coremods.keysoverhaul; import java.io.IOException; import java.util.Iterator; import net.minecraft.launchwrapper.IClassTransformer; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.InsnList; import org.objectweb.asm.tree.LocalVariableNode; import org.objectweb.asm.tree.MethodInsnNode; import org.objectweb.asm.tree.MethodNode; public class Transformer implements IClassTransformer{ @Override public byte[] transform(String className, String transformedName, byte[] bytes) { // System.out.println(className); if(className.equals(KeysOverhaulTranslator.getMapedClassName("client.settings.GameSettings"))){ System.out.println("*************** Patching GameSettings ***************"); byte[] b = patchGameSettings(className, bytes); System.out.println("*************** Patching GameSettings Complete ***************"); return b; } return bytes; } private byte[] patchGameSettings(String className, byte[] bytes) { String loadOptions = KeysOverhaulTranslator.getMapedMethodName("GameSettings", "func_74300_a", "loadOptions"); String saveOptions = KeysOverhaulTranslator.getMapedMethodName("GameSettings", "func_74303_b", "saveOptions"); String isKeyDown = KeysOverhaulTranslator.getMapedMethodName("GameSettings", "func_100015_a", "isKeyDown"); String setOptionKeyBinding = KeysOverhaulTranslator.getMapedMethodName("GameSettings", "setOptionKeyBinding", "setOptionKeyBinding"); ClassNode classNode = new ClassNode(); ClassReader classReader = new ClassReader(bytes); classReader.accept(classNode, 0); Iterator<MethodNode> methods = classNode.methods.iterator(); while(methods.hasNext()){ MethodNode m = methods.next(); if(m.name.equals(loadOptions) && m.desc.equals("()V")){ System.out.println("*************** Patching loadOptions ***************"); AbstractInsnNode currentNode = null; AbstractInsnNode targetNode = null; int place = -1; int index = -1; Iterator<AbstractInsnNode> iter = m.instructions.iterator(); while (iter.hasNext()) { index++; currentNode = iter.next(); if (currentNode.getOpcode() == Opcodes.INVOKEVIRTUAL) { MethodInsnNode currentMethod = (MethodInsnNode) currentNode; if(doesMethodEqual(currentMethod, "net/minecraft/client/settings/KeyBinding", ".setKeyCode", "(I)V")){ targetNode = currentNode; place = index; break; } } } // INVOKESTATIC java/lang/Integer.parseInt (Ljava/lang/String;)I AbstractInsnNode remNode = m.instructions.get(place - 1); m.instructions.remove(remNode); replace(m.instructions, place, createNewListAndFillWith(createMethodNode(Opcodes.INVOKEVIRTUAL, "net/minecraft/client/settings/KeyBinding", ".setKeyCode", "(Ljava/lang/String)V"))); System.out.println("*************** Patching loadOptions complete ***************"); } if(m.name.equals(saveOptions) && m.desc.equals("()V")){ System.out.println("*************** Patching saveOptions ***************"); AbstractInsnNode currentNode = null; AbstractInsnNode targetNode = null; int place = -1; int index = -1; Iterator<AbstractInsnNode> iter = m.instructions.iterator(); while (iter.hasNext()) { index++; currentNode = iter.next(); if (currentNode.getOpcode() == Opcodes.INVOKEVIRTUAL) { MethodInsnNode currentMethod = (MethodInsnNode) currentNode; if(doesMethodEqual(currentMethod, "net/minecraft/client/settings/KeyBinding", ".getKeyCode", "()I")){ targetNode = currentNode; place = index; break; } } } replace(m.instructions, place, createMethodNode(Opcodes.INVOKEVIRTUAL, "net/minecraft/client/settings/KeyBinding", ".getKeyCodeS", "()Ljava/lang/String")); System.out.println("*************** Patching saveOptions complete ***************"); } if(m.name.equals(isKeyDown) && m.desc.equals("(Lnet/minecraft/client/settings/KeyBinding;)Z")){ System.out.println("*************** Patching isKeyDown ***************"); /*InsnList fields = m.instructions; fields.clear();*/ try { ClassNode methodsNode = new ClassNode(); ClassReader methodsReader = new ClassReader(Methods.class.getName()); methodsReader.accept(classNode, 0); for(MethodNode method : methodsNode.methods){ if(method.name == "isKeyDown" && method.desc == "(Lcode/elix_x/coremods/keysoverhaul/replace/KeyBinding;)Z"){ // classNode.methods.add(classNode.methods.indexOf(m), method); method.desc = "(Lnet/minecraft/client/settings/KeyBinding;)Z"; AbstractInsnNode currentNode = null; AbstractInsnNode targetNode = null; AbstractInsnNode targetNode2 = null; int place = -1; int index = -1; Iterator<AbstractInsnNode> iter = method.instructions.iterator(); while (iter.hasNext()) { index++; currentNode = iter.next(); if (currentNode.getOpcode() == Opcodes.INVOKESTATIC) { MethodInsnNode currentMethod = (MethodInsnNode) currentNode; if(doesMethodEqual(currentMethod, "code/elix_x/coremods/keysoverhaul/replace/KeyBinding", ".isKeyDown", "(Lcode/elix_x/coremods/keysoverhaul/replace/KeyBinding;)Z")){ targetNode = currentNode; } } // if(currentNode.getOpcode() == Opcodes.LOc) } /*for(LocalVariableNode var : method.localVariables){ System.out.println("node: " + var.name + " desc: " + var.desc + " index: " + var.index + " signature: " + var.signature); }*/ method.instructions.insert(targetNode, createMethodNode(Opcodes.INVOKESTATIC, "net/minecraft/client/settings/KeyBinding", ".isKeyDown", "(Lnet/minecraft/client/settings/KeyBinding;)Z")); classNode.methods.add(classNode.methods.indexOf(m), method); } } } catch (IOException e) { e.printStackTrace(); } System.out.println("*************** Patching isKeyDown complete ***************"); } if(m.name.equals(isKeyDown) && m.desc.equals("(Lnet/minecraft/client/settings/KeyBinding;)Z")){ System.out.println("*************** Patching setOptionKeyBinding ***************"); m.desc = "(Lnet/minecraft/client/settings/KeyBinding;[i)V"; AbstractInsnNode currentNode = null; AbstractInsnNode targetNode = null; int place = -1; int index = -1; Iterator<AbstractInsnNode> iter = m.instructions.iterator(); while (iter.hasNext()) { index++; currentNode = iter.next(); if (currentNode.getOpcode() == Opcodes.INVOKEVIRTUAL) { MethodInsnNode currentMethod = (MethodInsnNode) currentNode; if(doesMethodEqual(currentMethod, "net/minecraft/client/settings/KeyBinding", ".setKeyCode", "()I")){ targetNode = currentNode; place = index; break; } } } m.instructions.insert(currentNode, createMethodNode(Opcodes.INVOKEVIRTUAL, "net/minecraft/client/settings/KeyBinding", ".setKeyCode", "([i)V")); System.out.println("*************** Patching setOptionKeyBinding complete ***************"); } } ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES); classNode.accept(writer); return writer.toByteArray(); } private AbstractInsnNode findNode(InsnList list, AbstractInsnNode node) { AbstractInsnNode currentNode = null; AbstractInsnNode targetNode = null; int place = -1; int index = -1; Iterator<AbstractInsnNode> iter = list.iterator(); while (iter.hasNext()) { index++; currentNode = iter.next(); if(areNodesEqual(node, currentNode)){ targetNode = currentNode; place = index; break; } } return targetNode; } private int findNodePos(InsnList list, AbstractInsnNode node) { AbstractInsnNode currentNode = null; AbstractInsnNode targetNode = null; int place = -1; int index = -1; Iterator<AbstractInsnNode> iter = list.iterator(); while (iter.hasNext()) { index++; currentNode = iter.next(); if(areNodesEqual(node, currentNode)){ targetNode = currentNode; place = index; break; } } return place; } private boolean areNodesEqual(AbstractInsnNode node, AbstractInsnNode node1) { if(node.getOpcode() == node1.getOpcode()){ if(node.getType() == node1.getType()){ return true; } } return false; } private InsnList createNewListAndFillWith(Object... nodes) { InsnList list = new InsnList(); for(Object node : nodes){ if(node instanceof AbstractInsnNode){ list.add((AbstractInsnNode) node); } if(node instanceof InsnList){ list.add(list); } } return list; } private void replace(InsnList instructions, int index, AbstractInsnNode node) { instructions.insert(instructions.get(index), node); } private void replace(InsnList instructions, int index, InsnList node) { instructions.insert(instructions.get(index), node); } private MethodInsnNode createMethodNode(int opcode, String owner, String name, String desc) { return new MethodInsnNode(opcode, owner, name, desc); } private boolean doesMethodEqual(MethodInsnNode method, String owner, String name, String desc) { return method.owner == owner && method.name == name && method.desc == desc; } } And console output: ... [18:39:11] [main/INFO]: Setting user: Player458 [18:39:13] [Client thread/INFO] [sTDOUT]: [code.elix_x.coremods.keysoverhaul.Transformer:transform:41]: *************** Patching GameSettings *************** [18:39:13] [Client thread/INFO] [sTDOUT]: [code.elix_x.coremods.keysoverhaul.Transformer:patchGameSettings:132]: *************** Patching isKeyDown *************** [18:39:13] [Client thread/INFO] [sTDOUT]: [code.elix_x.coremods.keysoverhaul.Transformer:patchGameSettings:178]: *************** Patching isKeyDown complete *************** [18:39:13] [Client thread/INFO] [sTDOUT]: [code.elix_x.coremods.keysoverhaul.Transformer:patchGameSettings:182]: *************** Patching setOptionKeyBinding *************** [18:39:13] [Client thread/INFO] [sTDOUT]: [code.elix_x.coremods.keysoverhaul.Transformer:patchGameSettings:210]: *************** Patching setOptionKeyBinding complete *************** [18:39:13] [Client thread/INFO] [sTDOUT]: [code.elix_x.coremods.keysoverhaul.Transformer:patchGameSettings:69]: *************** Patching loadOptions *************** [18:39:13] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ---- // Don't be sad. I'll do better next time, I promise! Time: 02.02.15 18:39 Description: Initializing game java.lang.NoClassDefFoundError: net/minecraft/client/settings/GameSettings at net.minecraft.client.Minecraft.startGame(Minecraft.java:420) at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) Caused by: java.lang.ClassNotFoundException: net.minecraft.client.settings.GameSettings at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 11 more Caused by: java.lang.IndexOutOfBoundsException at org.objectweb.asm.tree.InsnList.get(InsnList.java:107) at code.elix_x.coremods.keysoverhaul.Transformer.patchGameSettings(Transformer.java:94) at code.elix_x.coremods.keysoverhaul.Transformer.transform(Transformer.java:42) at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ... 13 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.Minecraft.startGame(Minecraft.java:420) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 857592600 bytes (817 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. GL Caps: Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: ~~ERROR~~ NoClassDefFoundError: net/minecraft/client/settings/GameSettings Current Language: ~~ERROR~~ NullPointerException: null Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: ~~ERROR~~ NoClassDefFoundError: net/minecraft/client/settings/GameSettings [18:39:13] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\my\mcmodding\mods\toolscompressor\eclipse\.\crash-reports\crash-2015-02-02_18.39.13-client.txt Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release ANY HELP, PLEASE???
-
[1.7.10] drawTexturedModalRect problems and questions?
Elix_x replied to Elix_x's topic in Modder Support
Ok. Now i have another problem: TileEntity isn't get properly for GUIand with wrong data: GUI: public GUIToolsCompressor(InventoryPlayer inventory, TileEntityToolsCompressor tileentity) { super(new ContainerToolsCompressor(inventory, tileentity)); toolsCompressor = tileentity; System.out.println(toolsCompressor + " " + toolsCompressor.isWorking()); this.xSize = 247; this.ySize = 248; } onBlockActivated: 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 if(!player.isSneaking()) { TileEntityToolsCompressor te = (TileEntityToolsCompressor) world.getTileEntity(x, y, z); System.out.println(te + " " + te.isWorking()); if(te != null){ FMLNetworkHandler.openGui(player, MainToolsCompressor.instance, MainToolsCompressor.guiIdToolsCompressor, world, x, y, z); } return true; } else { return false; } } Console: [16:20:05] [server thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.blocks.ToolsCompressor:onBlockActivated:61]: code.elix_x.mods.toolscompressor.blocks.TileEntityToolsCompressor@43c0a9cb true [16:20:05] [Client thread/INFO] [sTDOUT]: [code.elix_x.mods.toolscompressor.gui.GUIToolsCompressor:<init>:24]: code.elix_x.mods.toolscompressor.blocks.TileEntityToolsCompressor@75f2a654 false Why tile entity's data is different in gui??? -
[1.7.10] drawTexturedModalRect problems and questions?
Elix_x replied to Elix_x's topic in Modder Support
Thanks! I know that i can fit in 256*256, but gui it self draws fine, like expected (drawTexturedModalRect(guiLeft, guiTop, 0, 0, 247, 248, 288, 288); ) EDIT: i think i figured it out: drawTexturedModalRect(x, y, u, v, width, height); x and y being coordinates of top left corner of place to place image. Must always begin with guiLeft + and guiTop + u and v being place of top left corner of image to take. MUST NEVER USE guiLeft and guiTop width and height being size of image to draw... Pretty simple. FAIL. -
First of all, my gui uses more then 256*256 texture, so i needed to rewrite drawTexturedModalRect(). It's done, but now i'm having a lot of problems: None of methods are not working properly to draw texture above old place (ex: burning progress in furnace, etc), because 1) i don't unedrstand properly what does x, y, u, v, width, height means and i can't figure it out. 2) i have too big texture Also i found that if change screen size of mc, position and square changes...? I'm not sure if it must happen. Modified drawTexturedModalRect: public void drawTexturedModalRect(int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight) { float f = 1F / (float)textureWidth; float f1 = 1F / (float)textureHeight; Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.addVertexWithUV((double)(x), (double)(y + height), 0, (double)((float)(u) * f), (double)((float)(v + height) * f1)); tessellator.addVertexWithUV((double)(x + width), (double)(y + height), 0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1)); tessellator.addVertexWithUV((double)(x + width), (double)(y), 0, (double)((float)(u + width) * f), (double)((float)(v) * f1)); tessellator.addVertexWithUV((double)(x), (double)(y), 0, (double)((float)(u) * f), (double)((float)(v) * f1)); tessellator.draw(); } and it calling code in drawGuiContainerBackgroundLayer drawTexturedModalRect(guiLeft + 154, guiTop + 83, 13, 13, guiLeft + 248, guiTop + 0, 288, 288); My texture: Help me please!
-
[1.7.10] Problems with Attributes, collections and arrays
Elix_x replied to Elix_x's topic in Modder Support
I found an error that's fine now: one of items was hoe, that doesn't have attack damage value... -
[1.7.10] Problems with Attributes, collections and arrays
Elix_x replied to Elix_x's topic in Modder Support
I have this thing repeated 9 the same way times and it crashes randomly on one of blocks. -
[1.7.10] Crash When Removing Item With onItemRightClcik()
Elix_x replied to PlasmaBlazer's topic in Modder Support
Crash report please. I'm sure it crashes not on stack.stacksize--; -
So the problem is: When i hit entity with my item, before hurt is performed (using AttackEntityEvent) if player is holding my item, it scans 9 items "inside"n this item and chooses one with the biggest amount of damage. The problem is: AttributeModifier attribute = (AttributeModifier) i.getItem().getAttributeModifiers(i).get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName()).toArray()[0]; Crashes minecraft on: java.lang.ArrayIndexOutOfBoundsException: 0 What i did in my class: ItemStack i = item.getSword(); System.out.println("collection: " + i.getItem().getAttributeModifiers(i).get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName())); System.out.println("array of attributes: " + i.getItem().getAttributeModifiers(i).get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName()).toArray()); System.out.println("attribute: " + i.getItem().getAttributeModifiers(i).get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName()).toArray()[0]); Object[] array = i.getItem().getAttributeModifiers(i).get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName()).toArray(); System.out.println("lenght of array: " + array.length); Object object = i.getItem().getAttributeModifiers(i).get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName()).toArray()[array.length-1]; System.out.println("is object attribute: " + (object instanceof AttributeModifier)); AttributeModifier attribute = (AttributeModifier) object; meta = attribute.getAmount() > damage ? 1 : meta; damage = attribute.getAmount() > damage ? attribute.getAmount() : damage; What i get in console: [12:31:30] [Client thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:32]: collection: [AttributeModifier{amount=6.0, operation=0, name='Weapon modifier', id=cb3f55d3-645c-4f38-a497-9c13a33db5cf, serialize=true}] [12:31:30] [Client thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:33]: array of attributes: [Ljava.lang.Object;@5411a529 [12:31:30] [Client thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:34]: attribute: AttributeModifier{amount=6.0, operation=0, name='Weapon modifier', id=cb3f55d3-645c-4f38-a497-9c13a33db5cf, serialize=true} [12:31:30] [Client thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:36]: lenght of array: 1 [12:31:30] [Client thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:40]: is object attribute: true [12:31:30] [Client thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.entity.player.AttackEntityEvent@20e43235: java.lang.ArrayIndexOutOfBoundsException: 0 at code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent.onAttack(AttackWithCompressedToolEvent.java:72) ~[AttackWithCompressedToolEvent.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_AttackWithCompressedToolEvent_onAttack_AttackEntityEvent.invoke(.dynamic) ~[?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?] at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1339) [EntityPlayer.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.attackEntity(PlayerControllerMP.java:462) [PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1464) [Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:2028) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [12:31:30] [Client thread/ERROR] [FML]: Index: 1 Listeners: [12:31:30] [Client thread/ERROR] [FML]: 0: NORMAL [12:31:30] [Client thread/ERROR] [FML]: 1: ASM: code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent@5cd5e1b6 onAttack(Lnet/minecraftforge/event/entity/player/AttackEntityEvent;)V [12:31:31] [server thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:32]: collection: [AttributeModifier{amount=6.0, operation=0, name='Weapon modifier', id=cb3f55d3-645c-4f38-a497-9c13a33db5cf, serialize=true}] [12:31:31] [server thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:33]: array of attributes: [Ljava.lang.Object;@78b9bfbd [12:31:31] [server thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:34]: attribute: AttributeModifier{amount=6.0, operation=0, name='Weapon modifier', id=cb3f55d3-645c-4f38-a497-9c13a33db5cf, serialize=true} [12:31:31] [server thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:36]: lenght of array: 1 [12:31:31] [server thread/INFO] [sTDOUT]: [code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent:onAttack:40]: is object attribute: true [12:31:31] [server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.entity.player.AttackEntityEvent@26b5a0d7: java.lang.ArrayIndexOutOfBoundsException: 0 at code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent.onAttack(AttackWithCompressedToolEvent.java:72) ~[AttackWithCompressedToolEvent.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_AttackWithCompressedToolEvent_onAttack_AttackEntityEvent.invoke(.dynamic) ~[?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?] at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1339) [EntityPlayer.class:?] at net.minecraft.network.NetHandlerPlayServer.processUseEntity(NetHandlerPlayServer.java:881) [NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:51) [C02PacketUseEntity.class:?] at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:69) [C02PacketUseEntity.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [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:?] [12:31:31] [server thread/ERROR] [FML]: Index: 1 Listeners: [12:31:31] [server thread/ERROR] [FML]: 0: NORMAL [12:31:31] [server thread/ERROR] [FML]: 1: ASM: code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent@5cd5e1b6 onAttack(Lnet/minecraftforge/event/entity/player/AttackEntityEvent;)V [12:31:31] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Ticking memory connection at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[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: 0 at code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent.onAttack(AttackWithCompressedToolEvent.java:72) ~[AttackWithCompressedToolEvent.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_AttackWithCompressedToolEvent_onAttack_AttackEntityEvent.invoke(.dynamic) ~[?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?] at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1339) ~[EntityPlayer.class:?] at net.minecraft.network.NetHandlerPlayServer.processUseEntity(NetHandlerPlayServer.java:881) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:51) ~[C02PacketUseEntity.class:?] at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:69) ~[C02PacketUseEntity.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?] ... 5 more [12:31:31] [server thread/ERROR]: This crash report has been saved to: C:\my\mcmodding\mods\tool_compresser\eclipse\.\crash-reports\crash-2014-12-27_12.31.31-server.txt [12:31:31] [server thread/INFO]: Stopping server [12:31:31] [server thread/INFO]: Saving players [12:31:31] [server thread/INFO]: Saving worlds [12:31:31] [server thread/INFO]: Saving chunks for level 'Test2'/Overworld [12:31:31] [server thread/INFO]: Saving chunks for level 'Test2'/Nether [12:31:31] [server thread/INFO]: Saving chunks for level 'Test2'/The End [12:31:31] [server thread/INFO] [FML]: Unloading dimension 0 [12:31:31] [server thread/INFO] [FML]: Unloading dimension -1 [12:31:31] [server thread/INFO] [FML]: Unloading dimension 1 [12:31:31] [server thread/INFO] [FML]: Applying holder lookups [12:31:31] [server thread/INFO] [FML]: Holder lookups applied [12:31:31] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [12:31:32] [Client thread/FATAL]: Unreported exception thrown! java.lang.ArrayIndexOutOfBoundsException: 0 at code.elix_x.toolscompressor.events.AttackWithCompressedToolEvent.onAttack(AttackWithCompressedToolEvent.java:72) ~[AttackWithCompressedToolEvent.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_AttackWithCompressedToolEvent_onAttack_AttackEntityEvent.invoke(.dynamic) ~[?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?] at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1339) ~[EntityPlayer.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.attackEntity(PlayerControllerMP.java:462) ~[PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1464) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:2028) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] ... Problem is that in console it succesfully obtains array and value of array and processes it: How ever, when action starts it crashes on same thing: Can somebody explain me what is going on?
-
[SOLVED] Modded server crashes: not referenced class not found exception
Elix_x replied to Elix_x's topic in Modder Support
Not exactly, i made it different way, i just changed this: if(event.getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new BTAMKeyRegistry()); And now it works fine... MORE THEN THAT: Code in BTAMKeyRegistry still works without packets... -
[SOLVED] Modded server crashes: not referenced class not found exception
Elix_x replied to Elix_x's topic in Modder Support
How ever if remove this code that i need packets for, it still crashes on same thing. -
[SOLVED] Modded server crashes: not referenced class not found exception
Elix_x replied to Elix_x's topic in Modder Support
BTAMKeyRegistry doesn't contain EntityPlayerMP too. How ever i'll try to register key bindings only on client side. package code.blocktoolsarmormod.registry; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatStyle; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import org.lwjgl.input.Keyboard; import code.blocktoolsarmormod.explosives.entities.EntityCTNTPrimed; import code.blocktoolsarmormod.items.tools.Axes; import code.blocktoolsarmormod.items.tools.Hoes; import code.blocktoolsarmormod.items.tools.Pickaxes; import code.blocktoolsarmormod.items.tools.Shovels; import code.blocktoolsarmormod.items.tools.Swords; import code.blocktoolsarmormod.items.tools.UltimateTools; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent; public class BTAMKeyRegistry { private static final String desc = "BTAM universal key"; private static final int keyValues = Keyboard.KEY_B ; public static KeyBinding keys; public BTAMKeyRegistry() { keys = new KeyBinding(desc, keyValues, "BTAM"); ClientRegistry.registerKeyBinding(keys); } @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { if (!FMLClientHandler.instance().isGUIOpen(GuiChat.class)) { if (keys.isPressed()) { EntityPlayer entity = Minecraft.getMinecraft().thePlayer; World world = entity.worldObj; boolean field_14256_a = true; if(entity.getHeldItem().getItem() == ItemBlockRegistry.ultimateunstablestar || entity.getHeldItem().getItem() == ItemBlockRegistry.bigultimateunstablestar){ if(((UltimateTools) entity.getHeldItem().getItem()).mode == 0){ ((UltimateTools) entity.getHeldItem().getItem()).mode = 1; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)){ ((UltimateTools) entity.getHeldItem().getItem()).mode = 1; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)){ ((UltimateTools) entity.getHeldItem().getItem()).mode = 2; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)){ ((UltimateTools) entity.getHeldItem().getItem()).mode = 3; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)){ ((UltimateTools) entity.getHeldItem().getItem()).mode = 4; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)){ ((UltimateTools) entity.getHeldItem().getItem()).mode = 5; } } else if(entity.getHeldItem().getItem() == ItemBlockRegistry.unstablestaraxe || entity.getHeldItem().getItem() == ItemBlockRegistry.bigunstablestaraxe){ if(((Axes) entity.getHeldItem().getItem()).mode == 0){ ((Axes) entity.getHeldItem().getItem()).mode = 1; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)){ ((Axes) entity.getHeldItem().getItem()).mode = 1; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)){ ((Axes) entity.getHeldItem().getItem()).mode = 2; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)){ ((Axes) entity.getHeldItem().getItem()).mode = 3; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)){ ((Axes) entity.getHeldItem().getItem()).mode = 4; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)){ ((Axes) entity.getHeldItem().getItem()).mode = 5; } }else if(entity.getHeldItem().getItem() == ItemBlockRegistry.unstablestarpickaxe || entity.getHeldItem().getItem() == ItemBlockRegistry.bigunstablestarpickaxe){ if(((Pickaxes) entity.getHeldItem().getItem()).mode == 0){ ((Pickaxes) entity.getHeldItem().getItem()).mode = 1; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)){ ((Pickaxes) entity.getHeldItem().getItem()).mode = 1; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)){ ((Pickaxes) entity.getHeldItem().getItem()).mode = 2; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)){ ((Pickaxes) entity.getHeldItem().getItem()).mode = 3; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)){ ((Pickaxes) entity.getHeldItem().getItem()).mode = 4; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)){ ((Pickaxes) entity.getHeldItem().getItem()).mode = 5; } }else if(entity.getHeldItem().getItem() == ItemBlockRegistry.unstablestarshovel || entity.getHeldItem().getItem() == ItemBlockRegistry.bigunstablestarshovel){ if(((Shovels) entity.getHeldItem().getItem()).mode == 0){ ((Shovels) entity.getHeldItem().getItem()).mode = 1; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)){ ((Shovels) entity.getHeldItem().getItem()).mode = 1; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)){ ((Shovels) entity.getHeldItem().getItem()).mode = 2; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)){ ((Shovels) entity.getHeldItem().getItem()).mode = 3; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)){ ((Shovels) entity.getHeldItem().getItem()).mode = 4; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)){ ((Shovels) entity.getHeldItem().getItem()).mode = 5; } }else if(entity.getHeldItem().getItem() == ItemBlockRegistry.unstablestarsword || entity.getHeldItem().getItem() == ItemBlockRegistry.bigunstablestarsword){ if(((Swords) entity.getHeldItem().getItem()).mode == 0){ ((Swords) entity.getHeldItem().getItem()).mode = 1; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)){ ((Swords) entity.getHeldItem().getItem()).mode = 1; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)){ ((Swords) entity.getHeldItem().getItem()).mode = 2; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)){ ((Swords) entity.getHeldItem().getItem()).mode = 3; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)){ ((Swords) entity.getHeldItem().getItem()).mode = 4; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)){ ((Swords) entity.getHeldItem().getItem()).mode = 5; } }else if(entity.getHeldItem().getItem() == ItemBlockRegistry.unstablestarhoe || entity.getHeldItem().getItem() == ItemBlockRegistry.bigunstablestarhoe){ if(((Hoes) entity.getHeldItem().getItem()).mode == 0){ ((Hoes) entity.getHeldItem().getItem()).mode = 1; } if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)){ ((Hoes) entity.getHeldItem().getItem()).mode = 1; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)){ ((Hoes) entity.getHeldItem().getItem()).mode = 2; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)){ ((Hoes) entity.getHeldItem().getItem()).mode = 3; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)){ ((Hoes) entity.getHeldItem().getItem()).mode = 4; } else if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)){ ((Hoes) entity.getHeldItem().getItem()).mode = 5; } }else if(entity.getHeldItem().getItem() == ItemBlockRegistry.lightsaber){ world.playSound(entity.posX, entity.posY, entity.posZ, "blocktoolsarmormod:lightsaber_off", 1.0f, 1.0f, true); NBTTagCompound tag = new NBTTagCompound(); entity.getHeldItem().writeToNBT(tag); tag.setShort("id", (short) Item.getIdFromItem(ItemBlockRegistry.lightsaberoff)); entity.getHeldItem().readFromNBT(tag); } else if(entity.getHeldItem().getItem() == ItemBlockRegistry.lightsaberoff){ world.playSound(entity.posX, entity.posY, entity.posZ, "blocktoolsarmormod:lightsaber_on", 1.0f, 1.0f, true); NBTTagCompound tag = new NBTTagCompound(); entity.getHeldItem().writeToNBT(tag); tag.setShort("id", (short) Item.getIdFromItem(ItemBlockRegistry.lightsaber)); entity.getHeldItem().readFromNBT(tag); } else { } } } } } -
[SOLVED] Modded server crashes: not referenced class not found exception
Elix_x replied to Elix_x's topic in Modder Support
EntityPlayerMP is client class, i know. But in RegistryHandler there is no any reference at all to it. package code.blocktoolsarmormod.registry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import code.blocktoolsarmormod.world.worldgen.BlockToolsArmorModWorldGen; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; public class RegistryHandler { //worldgen static BlockToolsArmorModWorldGen eventWorldGen = new BlockToolsArmorModWorldGen(); //creative tabs public static CreativeTabs blocktoolsarmortab; public static void preinit(FMLPreInitializationEvent event) { //tabs blocktoolsarmortab = new CreativeTabs("blocktoolsarmortabtab"){ public Item getTabIconItem() { return ItemBlockRegistry.bedrockpickaxe; } }; //worldgen GameRegistry.registerWorldGenerator(eventWorldGen, 1); ItemBlockRegistry.preinit(event); ExplosivesRegistry.preinit(event); RecipesRegistry.preinit(event); BiomesRegistry.preinit(event); DimensionRegistry.preinit(event); FMLCommonHandler.instance().bus().register(new BTAMKeyRegistry()); } public static void init(FMLInitializationEvent event) { ItemBlockRegistry.init(event); ExplosivesRegistry.init(event); RecipesRegistry.init(event); BiomesRegistry.init(event); DimensionRegistry.init(event); } public static void postinit(FMLPostInitializationEvent event) { ItemBlockRegistry.postinit(event); ExplosivesRegistry.postinit(event); RecipesRegistry.postinit(event); BiomesRegistry.postinit(event); DimensionRegistry.postinit(event); } } -
When i launch my mod on server, it crashes and i get this error: al.jar) Unloaded->Constructed->Pre-initialized blocktoolsarmormod{alpha 1.1.2} [block Tools Armor Mod] (BTAM-1.1.2.jar) Unloaded->Constructed->Errored InstantStructuresMod{1.0} [instant Structures Mod] (IS.jar) Unloaded->Co nstructed->Pre-initialized [12:38:41] [server thread/ERROR] [FML]: The following problems were captured dur ing this phase [12:38:41] [server thread/ERROR] [FML]: Caught exception from blocktoolsarmormod java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP at code.blocktoolsarmormod.registry.RegistryHandler.preinit(RegistryHand ler.java:32) ~[RegistryHandler.class:?] at code.blocktoolsarmormod.BaseBlockToolsArmorMod.preinit(BaseBlockTools ArmorMod.java:30) ~[baseBlockToolsArmorMod.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContain er.java:513) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadContro ller.java:208) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadControll er.java:187) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadControl ler.java:118) [LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) [Loader .class:?] at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHand ler.java:88) [FMLServerHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.j ava:314) [FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(Dedicated Server.java:117) [lt.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387) [M inecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityC lientPlayerMP at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLo ader.java:191) ~[launchwrapper-1.11.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] ... 34 more Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLo ader.java:182) ~[launchwrapper-1.11.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] ... 34 more [12:38:41] [server thread/ERROR]: Encountered an unexpected exception cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecra ft/client/entity/EntityClientPlayerMP at cpw.mods.fml.common.LoadController.transition(LoadController.java:162 ) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515) ~[Loade r.class:?] at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHand ler.java:88) ~[FMLServerHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.j ava:314) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(Dedicated Server.java:117) ~[lt.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387) [M inecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?] Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityCli entPlayerMP at code.blocktoolsarmormod.registry.RegistryHandler.preinit(RegistryHand ler.java:32) ~[RegistryHandler.class:?] at code.blocktoolsarmormod.BaseBlockToolsArmorMod.preinit(BaseBlockTools ArmorMod.java:30) ~[baseBlockToolsArmorMod.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContain er.java:513) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadContro ller.java:208) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadControll er.java:187) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadControl ler.java:118) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) ~[Loade r.class:?] ... 5 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityC lientPlayerMP at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLo ader.java:191) ~[launchwrapper-1.11.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at code.blocktoolsarmormod.registry.RegistryHandler.preinit(RegistryHand ler.java:32) ~[RegistryHandler.class:?] at code.blocktoolsarmormod.BaseBlockToolsArmorMod.preinit(BaseBlockTools ArmorMod.java:30) ~[baseBlockToolsArmorMod.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContain er.java:513) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadContro ller.java:208) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadControll er.java:187) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadControl ler.java:118) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) ~[Loade r.class:?] ... 5 more Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLo ader.java:182) ~[launchwrapper-1.11.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at code.blocktoolsarmormod.registry.RegistryHandler.preinit(RegistryHand ler.java:32) ~[RegistryHandler.class:?] at code.blocktoolsarmormod.BaseBlockToolsArmorMod.preinit(BaseBlockTools ArmorMod.java:30) ~[baseBlockToolsArmorMod.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContain er.java:513) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadContro ller.java:208) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadControll er.java:187) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscribe r.java:74) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(Sy nchronizedEventSubscriber.java:47) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[min ecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.jav a:304) ~[minecraft_server.1.7.10.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecra ft_server.1.7.10.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadControl ler.java:118) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) ~[Loade r.class:?] ... 5 more [12:38:41] [server thread/ERROR]: This crash report has been saved to: C:\my\pro grams\minecraft\server-1.7-mods\.\crash-reports\crash-2014-11-09_12.38.41-server .txt [12:38:41] [server thread/WARN] [FML]: Can't revert to frozen GameData state wit hout freezing first. [12:38:41] [server thread/INFO] [FML]: Applying holder lookups [12:38:41] [server thread/INFO] [FML]: Holder lookups applied [12:38:41] [server thread/INFO] [FML]: The state engine was in incorrect state E RRORED and forced into state SERVER_STOPPED. Errors may have been discarded. [12:38:41] [server thread/INFO] [FML]: The state engine was in incorrect state E RRORED and forced into state AVAILABLE. Errors may have been discarded. C:\my\programs\minecraft\server-1.7-mods> It says that class RegistryHandler is errored on EntityPlayerMP, but RegistryHandler has no any reference to EntityPlayerMP. RegistryHandler.java: package code.blocktoolsarmormod.registry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import code.blocktoolsarmormod.world.worldgen.BlockToolsArmorModWorldGen; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; public class RegistryHandler { //worldgen static BlockToolsArmorModWorldGen eventWorldGen = new BlockToolsArmorModWorldGen(); //creative tabs public static CreativeTabs blocktoolsarmortab; public static void preinit(FMLPreInitializationEvent event) { //tabs blocktoolsarmortab = new CreativeTabs("blocktoolsarmortabtab"){ public Item getTabIconItem() { return ItemBlockRegistry.bedrockpickaxe; } }; //worldgen GameRegistry.registerWorldGenerator(eventWorldGen, 1); ItemBlockRegistry.preinit(event); ExplosivesRegistry.preinit(event); RecipesRegistry.preinit(event); BiomesRegistry.preinit(event); DimensionRegistry.preinit(event); FMLCommonHandler.instance().bus().register(new BTAMKeyRegistry()); } public static void init(FMLInitializationEvent event) { ItemBlockRegistry.init(event); ExplosivesRegistry.init(event); RecipesRegistry.init(event); BiomesRegistry.init(event); DimensionRegistry.init(event); } public static void postinit(FMLPostInitializationEvent event) { ItemBlockRegistry.postinit(event); ExplosivesRegistry.postinit(event); RecipesRegistry.postinit(event); BiomesRegistry.postinit(event); DimensionRegistry.postinit(event); } }
-
[1.7.10] [SOLVED]Liquids in the Dimension problem
Elix_x replied to Elix_x's topic in Modder Support
Also i found out this: Liquid automatically turns in another block even when placed by me and updated? Reading through BlockDynamicLiquid and BlockStaticLiquid, if found methods, that are responsible for making in flow, where to detect another state of liquid, getIdFromBlock(this) - 1 is used, its private method, and it cannot be overrided... STUPID MINECRAFT!!!!! JUST BY REGISTERING STILL LIQUID AFTER FLOWING MAKES IT WORK PROPERLY!!! FACEPALM -
[1.7.10] [SOLVED]Liquids in the Dimension problem
Elix_x replied to Elix_x's topic in Modder Support
Yes: Injecting existing block and item data into this server instance [10:32:31] [server thread/INFO]: Injecting new block and item data into this server instance. [10:32:31] [server thread/INFO]: Injected new block/item blocktoolsarmormod:blockA: 184 (init) -> 185 (map). [10:32:31] [server thread/INFO]: Injected new block/item blocktoolsarmormod:blockA: 184 (init) -> 185 (map). [10:32:31] [server thread/INFO]: Injected new block/item blocktoolsarmormod:itemB: 4458 (init) -> 4459 (map). -
[1.7.10] [SOLVED]Liquids in the Dimension problem
Elix_x replied to Elix_x's topic in Modder Support
Registering during pre-init didn't helped, i wrote there: