-
Posts
878 -
Joined
-
Last visited
Everything posted by Elix_x
-
Yes, they're handled by @EventHandler methods in your @Mod class like the preInit, init and postInit events. I just tested this using this code and I can confirm that it works for dedicated and integrated servers. [spoiler=Dedicated server] [23:32:04] [server thread/INFO]: Stopping the server [23:32:04] [server thread/INFO]: Server stopping. Dedicated? true [23:32:04] [server thread/INFO]: Stopping server [23:32:04] [server thread/INFO]: Saving players [23:32:04] [server thread/INFO]: Saving worlds [23:32:04] [server thread/INFO]: Saving chunks for level 'world'/Overworld [23:32:04] [server thread/INFO]: Saving chunks for level 'world'/Nether [23:32:04] [server thread/INFO]: Saving chunks for level 'world'/The End [23:32:04] [server thread/INFO]: Unloading dimension 0 [23:32:04] [server thread/INFO]: Unloading dimension -1 [23:32:04] [server thread/INFO]: Unloading dimension 1 [23:32:04] [server thread/INFO]: Remapping stats for 0 blocks/items [23:32:05] [server thread/INFO]: Applying holder lookups [23:32:05] [server thread/INFO]: Holder lookups applied [23:32:05] [server thread/INFO]: Server stopped. Dedicated? true [spoiler=Integrated Server] [23:40:14] [server thread/INFO]: Server stopping. Dedicated? false [23:40:14] [server thread/INFO]: Stopping server [23:40:14] [server thread/INFO]: Saving players [23:40:15] [server thread/INFO]: Saving worlds [23:40:15] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [23:40:15] [server thread/INFO]: Saving chunks for level 'New World'/Nether [23:40:15] [server thread/INFO]: Saving chunks for level 'New World'/The End [23:40:15] [server thread/INFO]: Unloading dimension 0 [23:40:15] [server thread/INFO]: Unloading dimension -1 [23:40:15] [server thread/INFO]: Unloading dimension 1 [23:40:15] [server thread/INFO]: Remapping stats for 0 blocks/items [23:40:15] [server thread/INFO]: Applying holder lookups [23:40:15] [server thread/INFO]: Holder lookups applied [23:40:15] [server thread/INFO]: Server stopped. Dedicated? false Ok. I just tried in different workspace too and it worked. I updated forge for main one and now it works. That was weird. Anyways, it's fixed now.
-
[1.8] Giving an item to the player after a delay
Elix_x replied to JimiIT92's topic in Modder Support
To make a delay, use tick countdown. Whenever gun shot, on filled gun itemstack add nbt int with value of countdown in ticks. Then, each tick, filled gun dicreases countdown by 1 and when it reaches 0, it replaces itself with gun ready to shoot. For ticking, use Item.onUpdate[code]. -
Yes. I checked using console out. EDIT: Also, it is catched in main mod class same way as init events, right?
-
Good day everybody. Today i'm having problems with onItemRightClick. Whenever player clicks on my item, it should disappear. But returning null causes these errors: [12:43:52] [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.NullPointerException at net.minecraft.server.management.ItemInWorldManager.tryUseItem(ItemInWorldManager.java:357) ~[itemInWorldManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:576) ~[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 [12:43:53] [server thread/ERROR]: This crash report has been saved to: C:\my\mcmodding\mods\armor sets\eclipse\.\crash-reports\crash-2015-12-20_12.43.52-server.txt [12:43:53] [server thread/INFO]: Stopping server [12:43:53] [server thread/INFO]: Saving players [12:43:53] [server thread/INFO]: Saving worlds [12:43:53] [server thread/INFO]: Saving chunks for level 'Test'/Overworld [12:43:53] [server thread/INFO]: Saving chunks for level 'Test'/Nether [12:43:53] [server thread/INFO]: Saving chunks for level 'Test'/The End [12:43:53] [server thread/INFO] [FML]: Unloading dimension 0 [12:43:53] [server thread/INFO] [FML]: Unloading dimension -1 [12:43:53] [server thread/INFO] [FML]: Unloading dimension 1 [12:43:53] [server thread/INFO] [FML]: Applying holder lookups [12:43:53] [server thread/INFO] [FML]: Holder lookups applied [12:43:53] [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:43:54] [Client thread/FATAL]: Unreported exception thrown! java.lang.NullPointerException at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:440) ~[PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:2044) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_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.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [12:43:54] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ---- // Why is it breaking Time: 20.12.15 12:43 Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:440) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2044) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) at net.minecraft.client.Minecraft.run(Minecraft.java:962) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:440) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player716'/613, l='MpServer', x=-1090,79, y=68,62, z=-177,77]] Chunk stats: MultiplayerChunkCache: 605, 605 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (-1082,64,-193), Chunk: (at 6,4,15 in -68,-13; contains blocks -1088,0,-208 to -1073,255,-193), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1) Level time: 55862 game time, 85249 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 237 total; [EntityCreeper['Creeper'/49, l='MpServer', x=-1170,03, y=18,00, z=-232,50], EntityCreeper['Creeper'/83, l='MpServer', x=-1158,50, y=20,00, z=-247,00], EntityCreeper['Creeper'/84, l='MpServer', x=-1160,44, y=22,00, z=-243,97], EntitySquid['Squid'/90, l='MpServer', x=-1151,88, y=47,19, z=-237,34], EntityClientPlayerMP['Player716'/613, l='MpServer', x=-1090,79, y=68,62, z=-177,77], EntityZombie['Zombie'/109, l='MpServer', x=-1167,50, y=12,00, z=-135,50], EntityCreeper['Creeper'/110, l='MpServer', x=-1162,00, y=14,00, z=-136,44], EntitySquid['Squid'/112, l='MpServer', x=-1151,13, y=39,31, z=-117,03], EntitySquid['Squid'/113, l='MpServer', x=-1152,47, y=36,00, z=-118,34], EntitySquid['Squid'/131, l='MpServer', x=-1144,94, y=44,34, z=-236,63], EntitySquid['Squid'/132, l='MpServer', x=-1136,03, y=43,78, z=-213,09], EntitySquid['Squid'/133, l='MpServer', x=-1145,22, y=37,00, z=-211,88], EntitySquid['Squid'/134, l='MpServer', x=-1144,16, y=46,34, z=-219,88], EntitySquid['Squid'/135, l='MpServer', x=-1141,03, y=45,34, z=-217,16], EntitySquid['Squid'/136, l='MpServer', x=-1143,31, y=43,88, z=-226,72], EntitySquid['Squid'/137, l='MpServer', x=-1135,81, y=39,03, z=-207,63], EntitySquid['Squid'/138, l='MpServer', x=-1136,66, y=47,34, z=-207,66], EntitySquid['Squid'/139, l='MpServer', x=-1140,31, y=47,34, z=-207,75], EntitySquid['Squid'/140, l='MpServer', x=-1141,38, y=47,34, z=-180,50], EntitySquid['Squid'/141, l='MpServer', x=-1150,69, y=55,97, z=-183,22], EntitySquid['Squid'/142, l='MpServer', x=-1149,19, y=42,19, z=-165,59], EntitySquid['Squid'/143, l='MpServer', x=-1142,94, y=45,91, z=-165,06], EntitySquid['Squid'/144, l='MpServer', x=-1132,88, y=41,34, z=-174,75], EntitySquid['Squid'/145, l='MpServer', x=-1151,66, y=49,28, z=-176,03], EntitySquid['Squid'/146, l='MpServer', x=-1154,38, y=45,03, z=-153,88], EntitySquid['Squid'/147, l='MpServer', x=-1148,72, y=49,34, z=-150,78], EntitySquid['Squid'/148, l='MpServer', x=-1141,41, y=43,25, z=-115,97], EntitySquid['Squid'/149, l='MpServer', x=-1144,16, y=40,94, z=-124,69], EntitySquid['Squid'/154, l='MpServer', x=-1129,16, y=44,91, z=-234,34], EntitySquid['Squid'/155, l='MpServer', x=-1128,69, y=48,16, z=-233,81], EntitySquid['Squid'/156, l='MpServer', x=-1124,41, y=44,34, z=-215,09], EntitySquid['Squid'/157, l='MpServer', x=-1132,66, y=48,38, z=-219,97], EntitySquid['Squid'/158, l='MpServer', x=-1136,88, y=52,78, z=-209,50], EntitySquid['Squid'/159, l='MpServer', x=-1132,63, y=56,88, z=-214,94], EntitySquid['Squid'/160, l='MpServer', x=-1119,25, y=59,34, z=-206,75], EntitySquid['Squid'/161, l='MpServer', x=-1117,91, y=43,81, z=-197,09], EntitySquid['Squid'/162, l='MpServer', x=-1125,72, y=52,34, z=-203,50], EntitySquid['Squid'/163, l='MpServer', x=-1116,69, y=54,06, z=-198,94], EntitySquid['Squid'/164, l='MpServer', x=-1137,94, y=62,16, z=-209,09], EntitySquid['Squid'/165, l='MpServer', x=-1134,75, y=57,34, z=-204,66], EntitySquid['Squid'/166, l='MpServer', x=-1131,31, y=60,19, z=-211,03], EntitySquid['Squid'/167, l='MpServer', x=-1126,19, y=50,38, z=-194,44], EntitySquid['Squid'/168, l='MpServer', x=-1127,38, y=48,31, z=-205,53], EntitySquid['Squid'/169, l='MpServer', x=-1120,66, y=46,38, z=-172,31], EntitySquid['Squid'/170, l='MpServer', x=-1120,63, y=48,31, z=-173,13], EntitySquid['Squid'/171, l='MpServer', x=-1119,16, y=41,91, z=-182,41], EntitySquid['Squid'/172, l='MpServer', x=-1124,97, y=47,38, z=-176,84], EntitySquid['Squid'/173, l='MpServer', x=-1123,28, y=48,72, z=-191,34], EntitySquid['Squid'/174, l='MpServer', x=-1116,16, y=41,78, z=-169,56], EntitySquid['Squid'/175, l='MpServer', x=-1126,41, y=42,91, z=-174,31], EntitySquid['Squid'/176, l='MpServer', x=-1121,53, y=51,38, z=-157,66], EntitySquid['Squid'/177, l='MpServer', x=-1126,41, y=48,22, z=-173,84], EntitySquid['Squid'/189, l='MpServer', x=-1104,22, y=54,34, z=-223,44], EntityEnderman['Enderman'/190, l='MpServer', x=-1109,38, y=20,00, z=-208,50], EntitySquid['Squid'/191, l='MpServer', x=-1099,41, y=47,38, z=-219,59], EntitySquid['Squid'/192, l='MpServer', x=-1102,88, y=49,25, z=-218,50], EntitySquid['Squid'/193, l='MpServer', x=-1110,72, y=57,81, z=-216,28], EntitySquid['Squid'/194, l='MpServer', x=-1113,97, y=50,28, z=-212,84], EntitySquid['Squid'/195, l='MpServer', x=-1110,34, y=47,03, z=-215,31], EntitySquid['Squid'/196, l='MpServer', x=-1117,53, y=51,88, z=-219,47], EntitySquid['Squid'/197, l='MpServer', x=-1114,69, y=60,13, z=-213,09], EntitySquid['Squid'/198, l='MpServer', x=-1109,03, y=54,09, z=-211,31], EntitySquid['Squid'/199, l='MpServer', x=-1119,31, y=52,28, z=-212,38], EntitySquid['Squid'/200, l='MpServer', x=-1114,44, y=54,25, z=-201,16], EntitySquid['Squid'/201, l='MpServer', x=-1116,03, y=55,16, z=-206,72], EntitySquid['Squid'/202, l='MpServer', x=-1113,18, y=47,41, z=-185,45], EntitySquid['Squid'/203, l='MpServer', x=-1107,48, y=47,21, z=-186,53], EntitySquid['Squid'/204, l='MpServer', x=-1124,47, y=44,94, z=-185,50], EntitySquid['Squid'/205, l='MpServer', x=-1116,22, y=42,91, z=-174,94], EntitySquid['Squid'/206, l='MpServer', x=-1119,59, y=46,34, z=-166,69], EntitySquid['Squid'/207, l='MpServer', x=-1114,94, y=43,84, z=-165,09], EntitySquid['Squid'/208, l='MpServer', x=-1118,50, y=45,28, z=-171,66], EntitySquid['Squid'/209, l='MpServer', x=-1116,31, y=47,34, z=-171,75], EntitySquid['Squid'/210, l='MpServer', x=-1124,28, y=46,31, z=-166,41], EntitySquid['Squid'/211, l='MpServer', x=-1119,16, y=47,34, z=-171,03], EntitySquid['Squid'/212, l='MpServer', x=-1113,50, y=43,25, z=-172,09], EntitySquid['Squid'/213, l='MpServer', x=-1112,84, y=44,84, z=-151,81], EntitySquid['Squid'/214, l='MpServer', x=-1106,19, y=47,34, z=-152,34], EntitySquid['Squid'/215, l='MpServer', x=-1108,03, y=46,72, z=-154,56], EntitySquid['Squid'/216, l='MpServer', x=-1118,50, y=46,38, z=-132,19], EntitySquid['Squid'/217, l='MpServer', x=-1107,13, y=44,28, z=-128,78], EntitySquid['Squid'/218, l='MpServer', x=-1104,16, y=43,38, z=-138,72], EntitySquid['Squid'/219, l='MpServer', x=-1102,69, y=40,00, z=-139,91], EntitySquid['Squid'/220, l='MpServer', x=-1100,75, y=37,91, z=-128,91], EntitySquid['Squid'/221, l='MpServer', x=-1110,69, y=40,34, z=-130,63], EntitySquid['Squid'/222, l='MpServer', x=-1105,13, y=46,25, z=-118,19], EntitySquid['Squid'/251, l='MpServer', x=-1100,72, y=51,31, z=-239,94], EntityCreeper['Creeper'/252, l='MpServer', x=-1102,50, y=31,00, z=-185,00], EntitySpider['Spider'/253, l='MpServer', x=-1101,19, y=32,00, z=-184,22], EntityCreeper['Creeper'/254, l='MpServer', x=-1094,50, y=31,00, z=-165,50], EntityCreeper['Creeper'/255, l='MpServer', x=-1090,50, y=31,00, z=-166,50], EntitySpider['Spider'/256, l='MpServer', x=-1087,53, y=25,00, z=-164,00], EntityBat['Bat'/257, l='MpServer', x=-1097,31, y=33,10, z=-170,31], EntityCreeper['Creeper'/258, l='MpServer', x=-1089,03, y=28,00, z=-151,63], EntitySquid['Squid'/259, l='MpServer', x=-1084,75, y=42,34, z=-150,06], EntitySquid['Squid'/260, l='MpServer', x=-1096,89, y=45,36, z=-159,50], EntityCreeper['Creeper'/261, l='MpServer', x=-1088,53, y=27,00, z=-138,69], EntityCreeper['Creeper'/262, l='MpServer', x=-1088,56, y=26,00, z=-133,00], EntityZombie['Zombie'/263, l='MpServer', x=-1088,47, y=26,00, z=-134,97], EntitySquid['Squid'/264, l='MpServer', x=-1091,28, y=41,34, z=-125,44], EntitySquid['Squid'/265, l='MpServer', x=-1098,69, y=46,34, z=-136,50], EntitySquid['Squid'/266, l='MpServer', x=-1088,72, y=40,09, z=-129,53], EntitySquid['Squid'/267, l='MpServer', x=-1099,91, y=51,13, z=-138,47], EntitySquid['Squid'/268, l='MpServer', x=-1082,13, y=49,34, z=-137,50], EntitySquid['Squid'/269, l='MpServer', x=-1106,84, y=47,88, z=-132,03], EntitySquid['Squid'/270, l='MpServer', x=-1103,63, y=37,25, z=-119,53], EntitySquid['Squid'/271, l='MpServer', x=-1099,06, y=43,16, z=-121,50], EntitySquid['Squid'/272, l='MpServer', x=-1093,41, y=46,94, z=-122,97], EntitySquid['Squid'/273, l='MpServer', x=-1089,94, y=49,34, z=-124,91], EntitySquid['Squid'/302, l='MpServer', x=-1081,75, y=52,34, z=-235,47], EntityBat['Bat'/307, l='MpServer', x=-1083,47, y=22,43, z=-226,40], EntityWitch['Witch'/308, l='MpServer', x=-1074,91, y=19,00, z=-206,50], EntityWitch['Witch'/309, l='MpServer', x=-1084,37, y=18,00, z=-205,91], EntityEnderman['Enderman'/310, l='MpServer', x=-1085,72, y=26,00, z=-156,75], EntityZombie['Zombie'/311, l='MpServer', x=-1080,25, y=24,00, z=-145,41], EntitySkeleton['Skeleton'/312, l='MpServer', x=-1082,44, y=26,00, z=-146,06], EntityBat['Bat'/313, l='MpServer', x=-1086,33, y=26,53, z=-157,39], EntitySquid['Squid'/314, l='MpServer', x=-1084,94, y=41,19, z=-155,50], EntitySquid['Squid'/315, l='MpServer', x=-1071,66, y=47,25, z=-155,50], EntitySquid['Squid'/316, l='MpServer', x=-1080,84, y=43,19, z=-151,94], EntitySquid['Squid'/317, l='MpServer', x=-1085,25, y=46,28, z=-156,99], EntitySquid['Squid'/318, l='MpServer', x=-1072,99, y=47,35, z=-158,96], EntitySquid['Squid'/319, l='MpServer', x=-1083,13, y=40,00, z=-143,47], EntitySquid['Squid'/320, l='MpServer', x=-1082,47, y=49,97, z=-142,06], EntityZombie['Zombie'/321, l='MpServer', x=-1073,91, y=24,00, z=-141,66], EntitySkeleton['Skeleton'/322, l='MpServer', x=-1072,53, y=25,00, z=-143,09], EntityCreeper['Creeper'/323, l='MpServer', x=-1087,44, y=26,00, z=-134,88], EntitySquid['Squid'/324, l='MpServer', x=-1075,09, y=44,34, z=-132,78], EntitySquid['Squid'/325, l='MpServer', x=-1086,34, y=44,31, z=-137,97], EntitySquid['Squid'/326, l='MpServer', x=-1090,06, y=46,28, z=-138,50], EntitySquid['Squid'/327, l='MpServer', x=-1088,91, y=34,34, z=-127,50], EntitySquid['Squid'/328, l='MpServer', x=-1089,53, y=41,34, z=-144,16], EntitySquid['Squid'/329, l='MpServer', x=-1090,88, y=48,34, z=-145,56], EntityZombie['Zombie'/330, l='MpServer', x=-1086,44, y=23,00, z=-126,22], EntitySquid['Squid'/331, l='MpServer', x=-1078,03, y=40,34, z=-117,16], EntitySquid['Squid'/332, l='MpServer', x=-1075,78, y=42,31, z=-119,22], EntitySquid['Squid'/333, l='MpServer', x=-1076,66, y=43,09, z=-126,59], EntitySquid['Squid'/334, l='MpServer', x=-1076,56, y=40,38, z=-118,63], EntitySquid['Squid'/335, l='MpServer', x=-1083,66, y=51,31, z=-123,28], EntitySquid['Squid'/336, l='MpServer', x=-1082,91, y=48,13, z=-127,19], EntitySquid['Squid'/337, l='MpServer', x=-1081,38, y=51,34, z=-118,53], EntitySquid['Squid'/338, l='MpServer', x=-1086,75, y=43,78, z=-112,16], EntitySquid['Squid'/339, l='MpServer', x=-1078,97, y=48,38, z=-116,44], EntityZombie['Zombie'/340, l='MpServer', x=-1072,38, y=11,00, z=-104,09], EntitySquid['Squid'/358, l='MpServer', x=-1060,75, y=46,78, z=-238,81], EntitySquid['Squid'/360, l='MpServer', x=-1063,38, y=38,06, z=-237,56], EntitySquid['Squid'/361, l='MpServer', x=-1063,25, y=44,34, z=-233,06], EntitySquid['Squid'/362, l='MpServer', x=-1063,94, y=43,06, z=-242,50], EntitySquid['Squid'/363, l='MpServer', x=-1052,66, y=45,69, z=-240,69], EntitySquid['Squid'/364, l='MpServer', x=-1058,56, y=49,38, z=-237,72], EntityBat['Bat'/365, l='MpServer', x=-1068,54, y=38,30, z=-189,75], EntityBat['Bat'/366, l='MpServer', x=-1067,65, y=37,62, z=-185,26], EntityBat['Bat'/367, l='MpServer', x=-1068,18, y=37,92, z=-188,31], EntitySquid['Squid'/368, l='MpServer', x=-1060,59, y=48,13, z=-187,38], EntityBat['Bat'/369, l='MpServer', x=-1071,44, y=33,12, z=-169,14], EntitySquid['Squid'/370, l='MpServer', x=-1063,44, y=42,16, z=-163,03], EntitySquid['Squid'/371, l='MpServer', x=-1071,50, y=41,78, z=-159,56], EntitySquid['Squid'/372, l='MpServer', x=-1067,50, y=43,16, z=-174,03], EntitySquid['Squid'/373, l='MpServer', x=-1052,81, y=46,00, z=-159,72], EntitySquid['Squid'/374, l='MpServer', x=-1059,56, y=46,34, z=-167,56], EntitySquid['Squid'/375, l='MpServer', x=-1069,64, y=44,91, z=-163,35], EntitySkeleton['Skeleton'/376, l='MpServer', x=-1069,41, y=25,00, z=-156,31], EntitySkeleton['Skeleton'/377, l='MpServer', x=-1067,69, y=24,00, z=-144,69], EntitySquid['Squid'/378, l='MpServer', x=-1066,56, y=52,31, z=-147,97], EntitySquid['Squid'/379, l='MpServer', x=-1064,97, y=49,31, z=-127,53], EntitySquid['Squid'/381, l='MpServer', x=-1067,63, y=45,31, z=-130,50], EntitySquid['Squid'/382, l='MpServer', x=-1054,63, y=37,88, z=-119,50], EntitySquid['Squid'/383, l='MpServer', x=-1066,47, y=51,34, z=-118,84], EntitySquid['Squid'/384, l='MpServer', x=-1053,31, y=48,31, z=-126,25], EntityZombie['Zombie'/386, l='MpServer', x=-1064,50, y=11,00, z=-103,50], EntityCreeper['Creeper'/387, l='MpServer', x=-1063,03, y=11,00, z=-106,56], EntityCreeper['Creeper'/388, l='MpServer', x=-1071,13, y=11,00, z=-100,78], EntityBat['Bat'/389, l='MpServer', x=-1060,47, y=13,10, z=-101,34], EntitySquid['Squid'/403, l='MpServer', x=-1050,69, y=42,84, z=-239,13], EntitySquid['Squid'/406, l='MpServer', x=-1045,13, y=42,34, z=-239,91], EntitySquid['Squid'/409, l='MpServer', x=-1046,50, y=53,31, z=-237,28], EntitySquid['Squid'/410, l='MpServer', x=-1042,63, y=39,34, z=-233,09], EntitySquid['Squid'/411, l='MpServer', x=-1057,44, y=44,16, z=-232,63], EntitySquid['Squid'/413, l='MpServer', x=-1050,81, y=36,34, z=-182,44], EntitySquid['Squid'/414, l='MpServer', x=-1050,06, y=41,34, z=-184,50], EntitySquid['Squid'/415, l='MpServer', x=-1053,59, y=38,94, z=-179,94], EntitySquid['Squid'/416, l='MpServer', x=-1056,50, y=40,72, z=-185,28], EntitySquid['Squid'/417, l='MpServer', x=-1049,28, y=41,06, z=-185,78], EntitySquid['Squid'/418, l='MpServer', x=-1044,97, y=45,34, z=-184,31], EntitySquid['Squid'/419, l='MpServer', x=-1050,25, y=51,28, z=-174,97], EntitySquid['Squid'/420, l='MpServer', x=-1047,50, y=31,72, z=-163,03], EntitySquid['Squid'/421, l='MpServer', x=-1052,94, y=42,75, z=-166,47], EntitySquid['Squid'/422, l='MpServer', x=-1047,34, y=50,38, z=-165,31], EntitySquid['Squid'/423, l='MpServer', x=-1055,03, y=51,31, z=-156,88], EntitySquid['Squid'/424, l='MpServer', x=-1055,34, y=55,31, z=-174,25], EntitySquid['Squid'/425, l='MpServer', x=-1058,06, y=50,31, z=-151,19], EntitySquid['Squid'/426, l='MpServer', x=-1046,34, y=45,03, z=-134,88], EntitySquid['Squid'/427, l='MpServer', x=-1050,78, y=40,06, z=-142,50], EntitySquid['Squid'/428, l='MpServer', x=-1053,53, y=43,13, z=-132,16], EntitySquid['Squid'/429, l='MpServer', x=-1055,59, y=42,38, z=-132,34], EntitySquid['Squid'/430, l='MpServer', x=-1048,56, y=39,38, z=-138,63], EntitySquid['Squid'/431, l='MpServer', x=-1050,84, y=42,16, z=-139,75], EntitySquid['Squid'/432, l='MpServer', x=-1053,50, y=48,88, z=-146,59], EntitySquid['Squid'/433, l='MpServer', x=-1044,09, y=53,34, z=-134,31], EntityZombie['Zombie'/434, l='MpServer', x=-1053,06, y=12,00, z=-119,31], EntityCreeper['Creeper'/435, l='MpServer', x=-1054,59, y=11,00, z=-119,06], EntityCreeper['Creeper'/436, l='MpServer', x=-1042,47, y=13,00, z=-114,06], EntitySquid['Squid'/437, l='MpServer', x=-1044,63, y=39,88, z=-116,22], EntitySquid['Squid'/438, l='MpServer', x=-1051,09, y=41,81, z=-121,25], EntitySquid['Squid'/440, l='MpServer', x=-1049,50, y=40,38, z=-129,88], EntitySquid['Squid'/441, l='MpServer', x=-1038,53, y=51,38, z=-123,50], EntitySquid['Squid'/442, l='MpServer', x=-1045,38, y=49,34, z=-114,56], EntitySquid['Squid'/443, l='MpServer', x=-1050,72, y=48,34, z=-123,97], EntityZombie['Zombie'/444, l='MpServer', x=-1051,47, y=12,00, z=-107,06], EntitySpider['Spider'/445, l='MpServer', x=-1043,28, y=14,00, z=-110,94], EntityCreeper['Creeper'/453, l='MpServer', x=-1035,50, y=20,00, z=-256,50], EntitySquid['Squid'/456, l='MpServer', x=-1025,50, y=43,13, z=-238,81], EntitySquid['Squid'/457, l='MpServer', x=-1026,34, y=51,31, z=-232,88], EntitySquid['Squid'/458, l='MpServer', x=-1032,56, y=54,38, z=-230,31], EntitySquid['Squid'/461, l='MpServer', x=-1029,50, y=54,13, z=-198,47], EntitySquid['Squid'/462, l='MpServer', x=-1030,38, y=57,22, z=-194,78], EntityBat['Bat'/463, l='MpServer', x=-1033,11, y=22,78, z=-174,64], EntitySquid['Squid'/464, l='MpServer', x=-1029,31, y=35,03, z=-176,50], EntitySpider['Spider'/465, l='MpServer', x=-1030,81, y=20,00, z=-153,53], EntitySquid['Squid'/466, l='MpServer', x=-1033,75, y=42,91, z=-136,41], EntitySquid['Squid'/467, l='MpServer', x=-1033,69, y=41,34, z=-134,31], EntitySquid['Squid'/468, l='MpServer', x=-1032,72, y=49,38, z=-140,50], EntitySquid['Squid'/469, l='MpServer', x=-1039,47, y=36,28, z=-129,03], EntitySquid['Squid'/470, l='MpServer', x=-1038,63, y=40,03, z=-119,19], EntitySquid['Squid'/471, l='MpServer', x=-1033,19, y=52,03, z=-120,25], EntitySquid['Squid'/472, l='MpServer', x=-1041,88, y=47,09, z=-124,88], EntitySquid['Squid'/473, l='MpServer', x=-1035,19, y=46,19, z=-115,06], EntitySquid['Squid'/474, l='MpServer', x=-1035,50, y=46,34, z=-111,78], EntitySquid['Squid'/477, l='MpServer', x=-1036,03, y=52,31, z=-131,22], EntityCreeper['Creeper'/497, l='MpServer', x=-1012,50, y=12,00, z=-199,63], EntitySkeleton['Skeleton'/503, l='MpServer', x=-1023,47, y=23,00, z=-185,13], EntitySkeleton['Skeleton'/505, l='MpServer', x=-1023,99, y=14,51, z=-167,48], EntityCreeper['Creeper'/507, l='MpServer', x=-1022,69, y=17,00, z=-148,74], EntityCreeper['Creeper'/508, l='MpServer', x=-1012,31, y=14,00, z=-157,56], EntitySkeleton['Skeleton'/509, l='MpServer', x=-1013,25, y=14,00, z=-157,50], EntitySkeleton['Skeleton'/510, l='MpServer', x=-1012,53, y=19,00, z=-148,06], EntityCreeper['Creeper'/511, l='MpServer', x=-1021,06, y=17,00, z=-153,53]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566) at net.minecraft.client.Minecraft.run(Minecraft.java:991) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 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: 698013096 bytes (665 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: 12, tallocated: 94 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1492 8 mods loaded, 8 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1492-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1492} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1492-1.7.10.jar) UCHIJAAAA CodeChickenCore{1.0.6.43} [CodeChicken Core] (minecraft.jar) UCHIJAAAA NotEnoughItems{1.0.4.105} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.4.105-universal.jar) UCHIJAAAA Baubles{1.0.1.10} [baubles] (Baubles-deobf-1.7.10-1.0.1.10.jar) UCHIJAAAA excore{1.3.1} [EXCore] (bin) UCHIJAAAA armorsets{2.0} [Armor Sets] (bin) GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.4.13084 Compatibility Profile Context 14.301.1001.0' Renderer: 'AMD Radeon HD 8570D' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: AMD Radeon HD 8570D GL version 4.4.13084 Compatibility Profile Context 14.301.1001.0, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) [12:43:54] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\my\mcmodding\mods\armor sets\eclipse\.\crash-reports\crash-2015-12-20_12.43.54-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release So i tried using player.setCurrentItemOrArmor(0, null); and returing old item stack But it works one time in two. Sometimes it disappears, sometimes it stays. Here's my code: @Override public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { if(hasPlayerItems(player)){ ItemStack newItemstack = new ItemStack(this); ItemStack[] playerItems = getPlayerItems(player); setItems(newItemstack, playerItems); ItemStack[] items = getItems(itemstack); for(int i = 0; i < Math.min(items.length, playerItems.length); i++){ playerItems[i] = items[i]; } setPlayerItems(player, playerItems); return newItemstack; } else { ItemStack[] items = getItems(itemstack); ItemStack[] playerItems = getPlayerItems(player); for(int i = 0; i < Math.min(items.length, playerItems.length); i++){ playerItems[i] = items[i]; } setPlayerItems(player, playerItems); player.setCurrentItemOrArmor(0, null); return itemstack; } } Why for others returning null works (i read some topics and for them null works)? Why second way glitches? What am i missing? Any help is appreciated. Thanks for help! If you have any questions - just ask!
-
Good day everybody. My mod has data that is same between dimensions and that does not need saving. There for when server is topped, data should be cleaned. But, i cannot find event when server stops that is fired on both dedicated and integrated servers. FMLServerStopping/Stopped events are fired only for dedicated servers. World.Unload and check if dimension is 0 is neither a good idea, as anybody can make overworld not being always loaded. Am i missing something? Thanks for help! If you have any questions - just ask!
-
[1.7.10] [SOLVED] Linked source does not work with gradlew build?
Elix_x replied to Elix_x's topic in Modder Support
Bit of a bump here, but you you mind providing an example of this? I'm working with sqlite-jdbc and I've tried a few ways to compile it with a mod unsuccessfully so far, it downloads from maven repos if I include it in the buildscript dependencies but beyond that I'm not sure where it downloads to; I've no issue with Java but Gradle is a new one for me. I do also have the sqlite-jdbc jar file but again, gradle is alien right now. Using the above from Elix compiles and runs but the server crashes as soon as it hits the code requiring JDBC with a classNotFound exception, as expected really.. And of course the mod works if I include JDBC in the Mods directory on the server but I'm trying to avoid that. What i was doing is compiling required dependency which was developed in separate folder. What you is trying to do is to compile optional dependency. Independently of how you compile it, you either make it required or use reflection and @Optional annotations everywhere where referencing it. -
[1.7.10][SOLVED] Weird world saved data loading bug
Elix_x replied to Elix_x's topic in Modder Support
Yes, of course. If i didn;t have it, it would throw MethodNotFoundException. But, anyways: class ChunkedClimateData extends WorldSavedData { public static final String NAME = WCSWWorldSavedDataHelper.ChunkedClimateDataFolder + "%d_%d"; private static final MBT mbt = new MBT(); private Map<ChunkPosition, ClimateData> climate = new HashMap<ChunkPosition, ClimateData>(); public Map<ChunkPosition, Double> heights = new HashMap<ChunkPosition, Double>(); public ChunkedClimateData(String name) { super(name); } public ChunkedClimateData(int x, int z) { super(String.format(NAME, x, z)); } public ChunkedClimateData(ChunkPosition pos) { this(pos.getX(), pos.getZ()); } public ClimateData getClimatDataAt(ChunkPosition pos) { // return climate.get(pos); ClimateData data = climate.get(pos); if(data == null){ if(-100 <= pos.getX() && pos.getX() <= 100 && -100 <= pos.getZ() && pos.getZ() <= 100){ data = new ClimateData((100 - Math.abs(pos.getX())) / 100f, (100 - Math.abs(pos.getZ())) / 100f, /*Math.abs(pos.getX()) / 100*/ 0, /*Math.abs(pos.getZ()) / 100*/ 0, 0, 0, 0, 0, 0, 0, 0); } else { data = null; } climate.put(pos, data); } return data; } public double getHeightAt(ChunkPosition pos) { return heights.get(pos); } @Override public void readFromNBT(NBTTagCompound nbt) { DataCopier.copyData(mbt.fromNBT(nbt.getTag("data"), ChunkedClimateData.class), this); } @Override public void writeToNBT(NBTTagCompound nbt) { nbt.setTag("data", mbt.toNBT(this)); } } EDIT: Oops. Just found it. Eclipse created class without public modifier. That's weird. But issue is now fixed. -
Good day everybody. Today i met very strange bug with my world saved data: [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.RuntimeException: Failed to instantiate class code.elix_x.mods.wcsw.world.climat.ChunkedClimateData [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.storage.MapStorage.loadData(MapStorage.java:64) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at code.elix_x.mods.wcsw.world.climat.ClimateHelper.getChunkedClimateData(ClimateHelper.java:38) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at code.elix_x.mods.wcsw.world.climat.ClimateHelper.getClimateDataAt(ClimateHelper.java:28) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at code.elix_x.mods.wcsw.rtg.world.biome.realistic.RealisticBiomePool.chooseBiome(RealisticBiomePool.java:36) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at code.elix_x.mods.wcsw.world.WCSWChunkManager.getBiomeDataAt(WCSWChunkManager.java:60) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at code.elix_x.mods.wcsw.world.WCSWChunkManager.getBiomeGenAt(WCSWChunkManager.java:161) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.gen.structure.MapGenScatteredFeature.canSpawnStructureAtCoords(MapGenScatteredFeature.java:80) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.gen.structure.MapGenStructure.func_151538_a(MapGenStructure.java:43) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.gen.MapGenBase.func_151539_a(MapGenBase.java:33) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at code.elix_x.mods.wcsw.world.WCSWChunkProvider.recreateStructures(WCSWChunkProvider.java:675) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:49) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:12) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:344) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:144) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.IllegalAccessException: Class net.minecraft.world.storage.MapStorage can not access a member of class code.elix_x.mods.wcsw.world.climat.ChunkedClimateData with modifiers "public" [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.Reflection.ensureMemberAccess(Unknown Source) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(Unknown Source) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.AccessibleObject.checkAccess(Unknown Source) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Constructor.newInstance(Unknown Source) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.storage.MapStorage.loadData(MapStorage.java:60) [16:23:52] [server thread/INFO] [sTDERR/]: [java.lang.Throwable$WrappedPrintStream:println:-1]: ... 21 more This is the weird line: Caused by: java.lang.IllegalAccessException: Class net.minecraft.world.storage.MapStorage can not access a member of class code.elix_x.mods.wcsw.world.climat.ChunkedClimateData with modifiers [b]"public"[/b] WHAT? How can this happen? I don't think you need any code here, but if you do, please tell me. Thanks for help! If you have any questions - just ask!
-
Alright, i have some more advancements: -All this huge obfuscated GenLayer mess is just to determine biomes. -So i found where biomes are generated! Yay! -And i managed to force override them per chunk. I also looked at some world gen mods, mainly realistic terrain ones. And i'm afraid. Because what my final goal for mod is, i haven't found it being implemented by anybody. At looking at code required for vanilla and world gen mods to work... And complexity of concept... It seems like what i'm working on is harder than bytecode stackmap frames.
-
[1.7.10] Two mods fighting over which chunk manager to use?
Elix_x replied to WhichOnesPink's topic in Modder Support
World Types also have ids. I may be happenning because willdycraft loads before and takes id that your world type has before. So now all old worlds with your world type will have wildycraft world type. This may also happen with other mods and other types though. -
That is impossible™. Yeah. Just tried reinstalling workspace and "reassembling" argument. Put it in both VM and program arguments... And it worked. Something very very very weird just happened.
-
Never mind, just took a closer look at your code and I see why. It looks like you have tried it with the equals sign but showed us the log of a run without the equals sign, given that they're shown as two separate arguments. Try with the equals sign in the JVM arguemtns FML handles item an block ids. But not biomes for example. I tried putting this argument everywhere where i can put it. Still no luck.
-
I tried both. I even tried putting it in program arguments and in VM arguments. Still not working.
-
No. Also, i know that it's not loaded because none of 2 info statements is present in the log.
-
Good day everybody. I was working on my coremod and when i launched mc, changes didn't get applied. After i discovered that my coremod is not even called. Now, i found this in log: [21:06:45] [main/INFO] [sTDOUT]: [net.minecraft.client.main.Main:main:160]: Completely ignored arguments: [-Dfml.coreMods.load, code.elix_x.coremods.antiidconflict.AntiIdConflictCore] Here's my program argument: -Dfml.coreMods.load=code.elix_x.coremods.antiidconflict.AntiIdConflictCore And my coremod: package code.elix_x.coremods.antiidconflict; import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import cpw.mods.fml.relauncher.IFMLLoadingPlugin; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions; @Name(AntiIdConflictBase.MODID) @TransformerExclusions("code.elix_x.coremods.antiidconflict.core") @MCVersion("1.7.10") @SortingIndex(1001) public class AntiIdConflictCore implements IFMLLoadingPlugin { public static final Logger logger = LogManager.getLogger("AIC Core"); public static final String BiomesInitTransformer = "code.elix_x.coremods.antiidconflict.core.transformers.BiomesInitTransformer"; public static final String[] transformers = new String[]{BiomesInitTransformer}; @Override public String[] getASMTransformerClass() { logger.info("Getting transformers"); return transformers; } @Override public String getModContainerClass() { return null; } @Override public String getSetupClass() { return null; } @Override public void injectData(Map<String, Object> data) { logger.info("Loading"); } @Override public String getAccessTransformerClass() { return null; } } Can anybody explain what has changed? Did i miss something in update logs? Should i re-update forge? Thanks for help! If you have any questions - just ask!
-
Are you sure that you are calling common proxy's init methods from client proxy? That's only thing i can think of for textures.
-
[1.7.10] Different behavior in deobf and obf versions
Elix_x replied to Elix_x's topic in Modder Support
I think i figured it out: for some reasons, in obf version, vanilla system is not disabled. I disable it by setting key code to 0 and resetting key binding array and hash during post initialisation. For some reasons this does not disable vanilla system in obf version. But why??? EDIT: Oh, i see: it is called second time after post initalisation. On top of that, i can't force save it in post init unless i modify FMLClientHandler.isLoading to false using reflection before saving moment and then back to true right after... Are there any other solutions??? -
Forgot to say, you should know that yes, rendering happens on different thread, but lwjgl renders things from buffer of vertexes which is filled/changed by mincraft whenever there are new blocks to render or some blocks changed. This happens on main thread. Also, few months ago i was working on mod that also requires having multiple worlds on clients. Haven't finished it yet though. What i want to say by this is that different modders may want to make multiple worlds on client. If ASM is used, mods will probabaly be incompatible as they change same parts of code. So the question appears: is there a need for multi-client-worlds-api?
-
[1.7.10] Different behavior in deobf and obf versions
Elix_x replied to Elix_x's topic in Modder Support
Note: I am using reflection for some fields, but if it was problem with this, it would crash right away, as i don't have any try-catches. -
Good day everybody. Currently, i'm working on mod that overhauls vanilla key bindings. It does not apply any bytecode edits. And for some reasons, in deobfuscated environment everything behaves fine, but in obfuscated, "double right clicking" bug appears. To understand what i mean, here's video showing it (on the left - obfuscated minecraft, on the right - deobfuscated) : Why and how this is hapening? Here's all mod's code: https://gist.github.com/elix-x/4a17ecda55c0bc7fbcfe Thanks for help! If you have any questions - just ask!
-
Because it was not working... And i fixed it .
-
It does.
-
Why???
-
No. It would only be empty if there is no KeyBinding registered. You have to fill the Map with the key-bindings you load from a configuration when the game starts up. Or you could just go through whatever is in the map... I have no idea what these "scripts" are that you are talking about. But it sounds to me like they should be completely separate from key handling. In the key input event update the state of each key. Then in ClientTick Post (after everything) you first run these "scripts", which can potentially further modify the key state. Then you do whatever needs to happen based on the keys. I don't see a problem here... Let's look into everything one by one: -Keys - ints representing key on keyboard, mouse or gamepad. -Key Bindings - Objects represnting key bindings, which are activated when all keys that depend on them are pressed. -Scripts - user programmable java scripts that are run between each update. They can emulate keys states and key bindings states. Running order, each tick: -Update key states (read key states in to keyboard from map). -Run pre script (can change keys states by accessing map, but can also interact with other code). -Update key bindings states (key bindings update their state based on their requirements (API), but default ones update it based on pressing of all keys they are bound to). -Run post script (can change key bindings states, but can also interact with other code). -Update key bindings action (key bindings perform their action based on their state, which could be modified by post script). Why modify key states and keybinding states. Why not just one of them? -Because key bindings are modular, cases where one is R+L and other alt+R can happen. In this case, modifying R key state via script, will affect both first and second key binding. What's the problem with using fml input events? -As there's no code after input events and before world update, all i can use is post tick event. This will produce delay in actions to user presses. And post tick event? -"This will produce delay in actions to user presses".