Jump to content

calclavia

Forge Modder
  • Posts

    2281
  • Joined

  • Last visited

Posts posted by calclavia

  1. You can easily do that with a new configuration.

     

    String translated = config.get("language", "myblock1", "My Block").value;

     

    So you can switch beetwen different configuration files depending on Language you choose.

     

     

    If you want to get current language:

     

    FMLClientHandler.instance().getClient().gameSettings.language

     

    That's not what I mean. I want to set up something like a language file which I can switch my mod to using. Like this: https://github.com/CovertJaguar/Railcraft-Localization

     

    How would I, from that file apply all those language settings into my blocks and items?

  2. How would I create language files and use them so my mod can be used in multiple languages?

     

    My Manager Pack can do this. I just have to put the source up.

    I'm looking for a native way to do it with just Forge. Railcraft seems to be able to achieve this.
  3. I recently saw that Forge added awesome chunk loading functions, though I am not sure how to use it. I saw the commit CPW did to BC for its quarry, but my purpose is slightly different. I'm trying to make a specific entity that will always load the chunk it is in. How would I do that?

  4. I just discovered world.addBlockEvent and it seems to be a neat and simple way of transferring packets without sending too much data (in comparison to Forge's packet managers). However, I keep getting these weird unsolvable errors...

     

    2012-09-19 22:36:51 [iNFO] [sTDERR] java.util.ConcurrentModificationException

    2012-09-19 22:36:51 [iNFO] [sTDERR] at java.util.ArrayList$Itr.checkForComodification(Unknown Source)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at java.util.ArrayList$Itr.next(Unknown Source)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at net.minecraft.src.WorldServer.sendAndApplyBlockEvents(WorldServer.java:880)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at net.minecraft.src.WorldServer.tick(WorldServer.java:122)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:607)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:547)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at net.minecraft.src.IntegratedServer.tick(IntegratedServer.java:105)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453)

    2012-09-19 22:36:51 [iNFO] [sTDERR] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:17)

  5. I've been having the same issue with TC3 and haven't yet found much help.

     

    CPW told me it's something to do with my mod not packaging properly. It says in the Forge log my zip file is ignored.

     

    EDIT: It's all because of the mcmod.info file. Azanor try copying the new format of the mcmod.info file because if the info file is wrong, the mod won't be loaded. My mod is working nicely now!

  6. The forgemodloader-client-0.log file will tell you what it does and doesn't find in the mods dir. EVERYTHING is there.

     

    When the log says "mod.zip failed to load properly" does it mean the packaging is bad or the code inside is bad? Or does it mean it can't identify the mod in the zip hence it ignored the zip?

  7. I don't understand why my mod, Universal Electricity with Forge properly installed (tested with IronChest mod) doesn't load up when I put my mod zip file in the mods folder. Iron chest loads no problem, I did it as a test but my mod doesn't load and doesn't even show up in the mod list (in the Minecraft menu). I included a mcmod.info file for it. The mod works perfectly in MCP with no bugs and tested to be working pretty good. The only problem is that in the "real Minecraft" it doesn't get loaded up...

     

    No logs and error reports show up since the mod isn't even loaded yet.

  8. Try using PacketManager.sendTileEntityPacket from UE...

     

    Also, you can read doubles and then cast the read doubles into int after reading so it doesn't mess the stream data up.

    i am using a recoded version of your code for my packetHandler. only issue is i can't figure out how to send the settings packet to the server to be saved. I've got sending to the player done just fine and gui gets the old settings. However if i go into the gui and change all the vars in the textboxes, it only keep the new setting as long as game stays on. Which means i need to update the server's TileEntity with the new settings.

     

    I'll look into it and tell you if I got any insight on it.

  9. Just to say to you guys, for those people who got the block proxy cast errors, it's FML's bug. To fix it, go to src/common/fml_marker.cfg and change net/src/minecraft/Block into net.minecraft.src.Block

  10. How do I access Minecraft.java then?

     

    I want to add an effectrenderer like this:

     

    AC_EntityBlueSparkle entitybluesparkle = new AC_EntityBlueSparkle(world, d, d1, d2, d3, d4, d5);

    ModLoader.getMinecraftInstance().addEffect(entitybluesparkle);

     

    but it doesnt work anymore

     

    Import it. You can directly import it no problem.

     

    But for the files that need to be separated client and server, you can't use the common folder (e.g the one that needs Minecraft.java).

  11. I didnt 'miss' anything.

    You're just lazy and expect side to directly correlate to your index.

    You can always use .ordinal() to get the same exact values as what they used to be.

    But you're better of doing it properly, and returning a valid index directly, not returning the side.

    Ahh yes thanks. Ordinal() was what I was looking for.

  12. I was wondering the same thing. With the 1.3.1 patch combining SSP and SMP, and the totally new forge , and the fact that we will have a modding API in 1.4, this was probably a really bad time to start modding :(

     

     

    However,  I've found a relatively decent tutorial for ModLoader at http://www.minecraftforum.net/topic/960286-techguys-modding-tutorials/ that is almost fully updated to 1.3, I'd say about 90% updated. This should keep me going until the flames in the forge have settled down (see what I did there? :D)

     

    I actually (now that I messed around with Forge 1.3.1 a bit), know a brief idea on how things are going to work. The new system is a lot cleaner than the old one. No more mod_XXX classes. Everything works via annotations.

  13. It seems like GUIs are handled differently now in the 1.3.1 update. Anyone have any idea on how to register a IGuiHandler?

     

    I did the following but it didn't work.

    NetworkRegistry.instance().registerConnectionHandler(this);
    NetworkRegistry.instance().registerGuiHandler(this, this);
    

     

    I'm assuming this is wrong...

  14. I dislike the new enum "Orientation"... Why not just use 0-5? It was so much easier to loop over those numbers rather than dealing with these enums.

     

    For example:

     

    @Override
        public int getStartInventorySide(Orientation side)
        {
            if(side == side.DOWN || side == side.UP)
            {
                return side;
            }
    
            return 2;
        }
    

     

    I can't return "side" because it's an enum and not an int... How would I convert that enum back into an orientation int without checking it manually?

     

    EDIT: I tried using side.ordinal(). Not sure if this will work...

×
×
  • Create New...

Important Information

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