Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


Forge Modder
  • Posts

  • Joined

  • Last visited


  • Gender
  • Location
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

pitman-87's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I'd figured out with the help of this tweet: You have to set the Sliderclass when generating the properites: teleportVolume = (float) configuration.get(CATEGORY_SOUND, "teleportVolume", 0.2,"", 0.0, 1.0).setConfigEntryClass(TF2TeleporterMod.proxy.getSliderClass()).getDouble(); spinVolume = (float) configuration.get(CATEGORY_SOUND, "spinVolume", 0.05, "", 0.0, 1.0).setConfigEntryClass(TF2TeleporterMod.proxy.getSliderClass()).getDouble(); @Override public Class<? extends IConfigEntry> getSliderClass() { return NumberSliderEntry.class; } Thats all! Remember to delete old configfiles, that have bugged me for hours.
  2. Hey guys, I love the new GuiConfig-System, but I'm struggling with the sliders. I don't really know how to register them the proper way. That's my code so far: ConfigHandler: GuiFactory: The most important part is this one: @Override protected GuiScreen buildChildScreen() { List<IConfigElement> list = new ConfigElement(ConfigHandler.configuration.getCategory(ConfigHandler.CATEGORY_SOUND)).getChildElements(); List<IConfigElement> sound = new ArrayList<IConfigElement>(); for (IConfigElement ce : list) { sound.add(new DummyConfigElement<Double>(ce.getName(), Double.parseDouble((String) ce.getDefault()), ConfigGuiType.DOUBLE, ce.getName(), 0.0, 1.0).setCustomListEntryClass(NumberSliderEntry.class)); } return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,this.owningScreen.configID, false, false, "Sound"); } The Gui looks right so far, but the new values don't get saved and I couldn't figured out why. How the first Screen looks (general category): How the secound screen looks (that's what I want it to be, but new values don't get saved): The secound screen when I use the "list" instead of "sounds" (gets saved regularly): I appreciate any help, thanks.
  3. Did you managed now to build your mod in dependency of another? Im still failing. Where did you put your .jar exactly? (related to this snipped: classpath 'com.radixshock.radixcore:RadixCore:1.0.0')
  4. The Example works pretty good, but the ServerPacketHandler have to be registered inside load() of the mod-class and not in the commonProxy.
  5. It would be cool when such features comes with forge itself.
  6. Hi guys I made a small API that people may use it, so I'm writing a tutorial, but people will need the source of the API. I don't want to offer my real source for various reasons, but they shall be able to decompile the API. The old (modloader-like) way don't work anymore (just putting the universal forge + the mod into minecraft.jar before decompiling with mcp). I also tried using fernflower, but the code is still obfuscathed: http://www.minecraftforge.net/forum/index.php/topic,2974.msg20255.html#msg20255 So is there a proper way to decompile a forge mod?
  7. I get this error all the time with forge and optifine ( and it was already there in 1.4.4). I'm not sure if this is optifines "fault", if it is so, I am sorry to bother you 2012-11-20 19:25:35 [iNFO] [sTDERR] java.lang.NullPointerException 2012-11-20 19:25:35 [iNFO] [sTDERR] at cf.b(MemoryConnection.java:159) 2012-11-20 19:25:35 [iNFO] [sTDERR] at cf.a(MemoryConnection.java:47) 2012-11-20 19:25:35 [iNFO] [sTDERR] at iv.b(NetServerHandler.java:636) 2012-11-20 19:25:35 [iNFO] [sTDERR] at gm.a(ServerConfigurationManager.java:89) 2012-11-20 19:25:35 [iNFO] [sTDERR] at bdr.b(IntegratedServerListenThread.java:99) 2012-11-20 19:25:35 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:691) 2012-11-20 19:25:35 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:587) 2012-11-20 19:25:35 [iNFO] [sTDERR] at bdo.q(IntegratedServer.java:110) 2012-11-20 19:25:35 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:494) 2012-11-20 19:25:35 [iNFO] [sTDERR] at fy.run(SourceFile:856) 2012-11-20 19:25:35 [iNFO] [ForgeModLoader] Unloading dimension 0 2012-11-20 19:25:35 [iNFO] [ForgeModLoader] Unloading dimension 1 2012-11-20 19:25:36 [iNFO] [sTDERR] t: Ticking screen 2012-11-20 19:25:36 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.l(Minecraft.java:1548) 2012-11-20 19:25:36 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.J(Minecraft.java:858) 2012-11-20 19:25:36 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:783) 2012-11-20 19:25:36 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source) 2012-11-20 19:25:36 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException 2012-11-20 19:25:36 [iNFO] [sTDERR] at aym.c(SourceFile:28) 2012-11-20 19:25:36 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.l(Minecraft.java:1541) 2012-11-20 19:25:36 [iNFO] [sTDERR] ... 3 more 2012-11-20 19:25:46 [iNFO] [sTDOUT] Stopping! 2012-11-20 19:25:46 [iNFO] [sTDOUT] SoundSystem shutting down... 2012-11-20 19:25:46 [iNFO] [sTDOUT] Author: Paul Lamb, www.paulscode.com aym = GuiDownloadTerrain It's the line this.netHandler.addToSendQueue(new Packet0KeepAlive()); in: public void updateScreen() { ++this.updateCounter; if (this.updateCounter % 20 == 0) { this.netHandler.addToSendQueue(new Packet0KeepAlive()); } if (this.netHandler != null) { this.netHandler.processReadPackets(); } } or public void c() { this.b += 1; if (this.b % 20 == 0) { this.a.c(new dr()); } if (this.a != null) this.a.d(); } All mods get loaded proberly before. This happens when I'm loading a new world. But here is the clue, when I'm creating a new world, its loading. Then I go back to the main menu and load my old world, it's loading too, and the bug don't appear.
  8. Hi guys, I'm looking for an event or call like EntityJoinedWorld but for players, because I want to send specific worldinformation to the player when he joins the game or go through portals. All I found are the EntityJoinedWorld-Event (but it don't work with player) and the INetworkhandler (but it only gets called once the player joined the server). For now I save the last world in Client and check every tick if the world has changed, but it seems a bit buggy. Maybe there is a better solution for this
  9. I tried it, but it don't help Even force chunkloading don't help and sometimes it happens with the /tp x y z command too. I quess I figured it out and the force chunkloading itself on startup was a problem. If I remove it, both issues are gone.
  10. Hey guys, I have some issues with my TF2 teleporter mod, and I have no idea why that happens since 1.4.2 ( otherwise I wouldn ask here ) 1. Sometimes (SMP and SSP) when a player gets teleported to a location, the chunks won't load anymore. The player glitches around in the air (in creative mode it's possible to fly around). After that happens, nothing gets loaded anymore (entities stay on their place, squids are floating in midair, no new chunk updates). I know you wanna see some code, but I'm not sure if its relevant and if this is a bug of Forge or Minecraft or I missed something (maybe the server needs a call to pre-load some chunks since MC 1.4.2 or something) Everything I'm doing is sending the server a teleport request (sending a packet with coordinates) and the server sets the new player location with: player.setPositionAndUpdate(tp1.xCoord + 0.5F, tp1.yCoord + 0.3F, tp1.zCoord + 0.5F); My position after teleport: http://www.abload.de/img/2012-11-14_20.39.17xnp0p.png[/img] I still can fly around but no new chunk-updates: http://www.abload.de/img/2012-11-14_20.40.37yro1y.png[/img] 2. I'm not sure if that issue exists since 1.4.2 or before. When I'm using a portal to the nether I spawn sometimes inside some blocks under or beside the nether portal (both ways). I have absolutely no idea why this is related to my teleporter mod, but many users reported that to me (and it happened to me sometimes too). I appreciate your help -pit
  11. Forge: When I'm using config files, all my itemIDs are over 31000, but I didn't give them such high values. This causes that many Items of my mods have the same ID from the config files, while I actually was using different IDs. Code: public static int itemIDSentryRed = 2820; public static int itemIDSentryBlue = 2824; public static int itemIDSentryBase = 2825; public static int itemIDSentryHead = 2826; public static int itemIDMonitor = 2821; public static int itemIDWrench = 2822; public static int itemIDGoldenWrench = 2823; ..... @PreInit public void preInit(FMLPreInitializationEvent event) { proxy.preInit(); Configuration configuration = new Configuration(event.getSuggestedConfigurationFile()); try { configuration.load(); Property prop; prop = configuration.getItem("itemIDSentryRed", 2820); itemIDSentryRed = prop.getInt(2820); prop = configuration.getItem("itemIDSentryBlue", 2824); itemIDSentryBlue = prop.getInt(2824); prop = configuration.getItem("itemIDSentryBase", 2825); itemIDSentryBase = prop.getInt(2825); prop = configuration.getItem("itemIDSentryHead", 2826); itemIDSentryHead = prop.getInt(2826); prop = configuration.getItem("itemIDMonitor", 2821); itemIDMonitor = prop.getInt(2821); prop = configuration.getItem("itemIDWrench", 2822); itemIDWrench = prop.getInt(2822); prop = configuration.getItem("itemIDGoldenWrench", 2823); itemIDGoldenWrench = prop.getInt(2823); prop = configuration.get( configuration.CATEGORY_GENERAL,"shootVolume", "0.2"); prop.comment = "min: 0.0 max 1.0"; shootVolume = Float.valueOf(prop.value).floatValue(); prop = configuration.get(configuration.CATEGORY_GENERAL, "spotVolume", "0.2"); prop.comment = "min: 0.0 max 1.0"; spotVolume = Float.valueOf(prop.value).floatValue(); prop = configuration.get(configuration.CATEGORY_GENERAL, "explosionVolume", "0.5"); prop.comment = "min: 0.0 max 1.0"; explosionVolume = Float.valueOf(prop.value).floatValue(); prop = configuration.get(configuration.CATEGORY_GENERAL,"upgradeVolume", "0.3"); prop.comment = "min: 0.0 max 1.0"; upgradeVolume = Float.valueOf(prop.value).floatValue(); prop = configuration.get(configuration.CATEGORY_GENERAL,"opsOnly", false); prop.comment = "Set to true, if only OPs are allowed to change the targets!"; opsOnly = prop.getBoolean(false); } catch (Exception e) { FMLLog.log(Level.SEVERE, e, "TF2 Sentry has a problem loading it's configuration"); FMLLog.severe(e.getMessage()); } finally { configuration.save(); } } generated config: # Configuration file # Generated on 28.10.12 18:02 #################### # general #################### general { # min: 0.0 max 1.0 explosionVolume=0.5 # Set to true, if only OPs are allowed to change the targets! opsOnly=false # min: 0.0 max 1.0 shootVolume=0.2 # min: 0.0 max 1.0 spotVolume=0.2 # min: 0.0 max 1.0 upgradeVolume=0.3 } #################### # item #################### item { itemIDGoldenWrench=31706 itemIDMonitor=31708 itemIDSentryBase=31710 itemIDSentryBlue=31711 itemIDSentryHead=31709 itemIDSentryRed=31712 itemIDWrench=31707 } Only happens on Items,but Blocks and other values are working fine. I'm not sure if this is a bug or I missed something
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.