Jump to content

pitman-87

Forge Modder
  • Posts

    44
  • Joined

  • Last visited

Everything posted by pitman-87

  1. I added some custom armor and they are working perfectly and get showed up on client. But when I'm joining the server and seeing a player they don't have the armor equipped. So is there a way to show up custom armor at sevrers at all? Maybe I have to register them in a different way? (if you want to see code I gonna post it, but I think it's not imported beacause it's a general question )
  2. It's working now, thx! @PostInit public void modsLoaded(FMLPostInitializationEvent evt) { updateMods(); } private static void updateMods() { try { for(ModContainer mod : Loader.instance().getModList()){ if(mod.getMod() == null){ continue; } Class<?> c = mod.getMod().getClass(); String s = c.toString(); if(s.equals("class TF2.Sentry.common.TF2SentryMod")){ c.getDeclaredField("teamsEnabled").setBoolean(null, true); }else if(s.equals("class TF2.Dispenser.common.TF2DispenserMod")){ c.getDeclaredField("teamsEnabled").setBoolean(null, true); }else if(s.equals("class TF2.Teleporter.common.TF2TeleporterMod")){ c.getDeclaredField("teamsEnabled").setBoolean(null, true); } } }catch (Exception e){ e.printStackTrace(); } }
  3. I have tried it without instanceof at first, but with same error: try { TF2.Sentry.common.TF2SentryMod.teamsEnabled = teamsEnabled; TF2.Dispenser.common.TF2DispenserMod.teamsEnabled = teamsEnabled; TF2.Teleporter.common.TF2TeleporterMod.teamsEnabled = teamsEnabled; }catch (Exception e){ }
  4. Hey, My TF2 Teleporter, Sentry and Dispenser are done, and I'm on the TeamAddon now. I use this addon to change fields in the other mod-classes, it worked fine with 1.2.5. But if I'm using this code: @PostInit public void modsLoaded(FMLPostInitializationEvent evt) { updateMods(); } private static void updateMods() { List<ModContainer> mods = Loader.instance().getActiveModList(); try { for(ModContainer mod : mods){ if(mod.getMod() instanceof TF2.Sentry.common.TF2SentryMod){ TF2.Sentry.common.TF2SentryMod.teamsEnabled = teamsEnabled; }else if(mod.getMod() instanceof TF2.Dispenser.common.TF2DispenserMod){ TF2.Dispenser.common.TF2DispenserMod.teamsEnabled = teamsEnabled; }else if(mod.getMod() instanceof TF2.Teleporter.common.TF2TeleporterMod){ TF2.Teleporter.common.TF2TeleporterMod.teamsEnabled = teamsEnabled; } } }catch (Exception e){ } } I get that error everytime, if I start minecraft without telporter and so on: In generall catching an Exception would work, but I still get this LoaderException Any ideas how I can get rid of that problem?
  5. Go through every class in your common-package and remove every client-package-import. Then fix all the issues and use YourModClass.proxy to get clientside-only files.
  6. So when I'm using the soundmanager, I can just put my soundfiles into my mod.zip? Awesome
  7. For example, my TF2 dispenser mod uses a byte "options" 1. bit = heal player 2. bit = feed player 3. bit = repair players tool 4. bit = neutralize effects In my TileEntity I'm using custom packets, but in your Entity you can use datawatcher instead
  8. You should use Bitflags for all the booleans. 1 Byte = 8 bits = 00000000 1. bit = if it has gravel 2. bit = if it has snowballs 3 bit = if it has firecharges 4. bit = if it has a shield 5. bit = if it has a bone and how many uses it has 6. bit = if it has a studded shield 7. bit = if it's camouflaged 8. bit = if it has blaze powder How to set and get single bits: http://www.vipan.com/htdocs/bitwisehelp.html (couldn't find a better tutorial and it looks harder than it really is) Just use bitwiseOperaters.
  9. For some reason I didn't need to register my sounds, the only thing I noticed is, that world.playSoundEffect() do not work, but world.playSound() works fine so far. And I just have put my sound into the ressource/mod folder (like audiomod).
  10. Of course they get called in client world. @OP Do not register your entities and just spawn them in your clientworld, and no one would see them except of you.
  11. Sorry for doublepost, but I have removed every clientside connected classes, but still get the error. I assume it have something todo with @NetworkMod(clientSideRequired = true, serverSideRequired = true, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"TF2_Teleporter_C"}, packetHandler = ClientPacketHandler.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = {"TF2_Teleporter_S"}, packetHandler = ServerPacketHandler.class)) because "ClientPacketHandler" is the last class I'm using in a common package, but I'm not sure about it. Nevermind, notice to myself: Do not put ClientPackageHandler into client-package...
  12. Hey, my mod is ready to publish, in client and LAN works fine so far, but if I want to install it in minecraftserver, I get an crash report. Class atd is ClientWorld, but im not using it in my ServerTickHandler. I've looked for hours and couldn't find the reason. Build #200 MCversion 1.3.2 crash report: ServerTickHandler: TF2TeleporterDBServer: My Mod-file:
  13. Here ya go: https://gist.github.com/f876fb64b62074d7791c it is HUGE and it's messy (I've cleaned that up since I overtook the mod from KodaichiZero a bit). There are 3 lines where I called worldObj.getEntitiesWithinAABBExcludingEntity at line 643, 1210 and 1627. Even when I outcomment the code which uses this method and it crashes anyway. Remember, everything is called twice (server and client) check if it's called in client world and don't execute the code in this method: on top of the code: if(world.isRemote){ return; }
  14. I had this issue with modloader and it was caused when I got an entitylist and iterated over it. The reason is, that you somewhere in your server-tick called a entitylist (or something) from the clientworld (or vice versa). Serverticks and clientticks are running in different threads (FIY).
  15. The main-reasons I'm using Forge are: modloader isn't working properly (yet) instead of modloader, modloaderMP, audiomod and PlayerAPI, I just need Forge (I'm not sure about PlayerAPI, I'll take a look on events later) all from the posts above
  16. I quess this have nothing todo with the 503-error (it appears everytime on startup), the actual error is this: 2012-08-17 01:57:30 [sEVERE] [ForgeModLoader] A critical server error occured handling a packet, kicking net.minecraft.src.NetServerHandler@6ee7e2ec But I could figured out, after I started client and server seperatly, there was a "real" error-code (NPE). (I was opening the gui on server too (forgot world.isRemote)). For your length-of-stream-problem I'm sending the length too 1. type-id 2. length 3. actual data It's a great help, if you are sending arrays with different lengths.
  17. Hi guys, I have some issues with sending packets from client to server, it crashes every time and I couldn't find out why. I looked up the Ironchest code and this one: https://github.com/DarkGuardsman/GSM-Guardsman/blob/master/1.3.1/common/GSM/Network/PacketManager.java my code (client): public static void sendAddFrequency(int frequency, int x, int y, int z) { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); DataOutputStream data = new DataOutputStream(bytes); int[] dataInt = { 0, frequency, x, y, z }; try { for (int i = 0; i < 5; i++) { data.writeInt(dataInt[i]); } } catch (IOException e) { } Packet250CustomPayload pkt = new Packet250CustomPayload(); pkt.channel = "TF2_Teleporter_Chan"; pkt.data = bytes.toByteArray(); pkt.length = bytes.size(); pkt.isChunkDataPacket = true; PacketDispatcher.sendPacketToServer(pkt); } But all I got is this error: 2012-08-17 01:57:19 [iNFO] [ForgeModLoader] Forge Mod Loader version 3.0.68.286 for Minecraft client:1.3.2, server:1.3.2 loading 2012-08-17 01:57:21 [iNFO] [sTDOUT] 27 achievements 2012-08-17 01:57:21 [iNFO] [sTDOUT] 195 recipes 2012-08-17 01:57:21 [iNFO] [sTDOUT] Setting user: Player13, - 2012-08-17 01:57:21 [iNFO] [sTDERR] Client asked for parameter: server 2012-08-17 01:57:21 [iNFO] [sTDOUT] LWJGL Version: 2.4.2 2012-08-17 01:57:21 [iNFO] [ForgeModLoader] Attempting early MinecraftForge initialization 2012-08-17 01:57:21 [iNFO] [ForgeModLoader] Completed early MinecraftForge initialization 2012-08-17 01:57:22 [iNFO] [ForgeModLoader] Searching D:\workspace\MC 1.3.2\jars\mods for mods 2012-08-17 01:57:22 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 3 mods to load 2012-08-17 01:57:22 [iNFO] [sTDOUT] Starting up SoundSystem... 2012-08-17 01:57:23 [iNFO] [sTDOUT] Initializing LWJGL OpenAL 2012-08-17 01:57:23 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2012-08-17 01:57:23 [iNFO] [sTDOUT] OpenAL initialized. 2012-08-17 01:57:23 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 3 mods 2012-08-17 01:57:27 [iNFO] [sTDERR] java.io.IOException: Server returned HTTP response code: 503 for URL: http://skins.minecraft.net/MinecraftCloaks/Player13.png 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at java.lang.reflect.Constructor.newInstance(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at java.security.AccessController.doPrivileged(Native Method) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at net.minecraft.src.ThreadDownloadImage.run(ThreadDownloadImage.java:48) 2012-08-17 01:57:27 [iNFO] [sTDERR] Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://skins.minecraft.net/MinecraftCloaks/Player13.png 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at java.net.HttpURLConnection.getResponseCode(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at net.minecraft.src.ThreadDownloadImage.run(ThreadDownloadImage.java:37) 2012-08-17 01:57:27 [iNFO] [sTDERR] java.io.IOException: Server returned HTTP response code: 503 for URL: http://skins.minecraft.net/MinecraftSkins/Player13.png 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at java.lang.reflect.Constructor.newInstance(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at java.security.AccessController.doPrivileged(Native Method) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at net.minecraft.src.ThreadDownloadImage.run(ThreadDownloadImage.java:48) 2012-08-17 01:57:27 [iNFO] [sTDERR] Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://skins.minecraft.net/MinecraftSkins/Player13.png 2012-08-17 01:57:27 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at java.net.HttpURLConnection.getResponseCode(Unknown Source) 2012-08-17 01:57:27 [iNFO] [sTDERR] at net.minecraft.src.ThreadDownloadImage.run(ThreadDownloadImage.java:37) 2012-08-17 01:57:30 [sEVERE] [ForgeModLoader] A critical server error occured handling a packet, kicking net.minecraft.src.NetServerHandler@6ee7e2ec 2012-08-17 01:57:33 [iNFO] [sTDERR] Someone is closing me! build is #199
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.