Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • Possible to create config file on client and server?
Sign in to follow this  
Followers 0
happyPenguin

Possible to create config file on client and server?

By happyPenguin, November 8, 2012 in General Discussion

  • Reply to this topic
  • Start new topic

Recommended Posts

happyPenguin    1

happyPenguin

happyPenguin    1

  • Tree Puncher
  • happyPenguin
  • Members
  • 1
  • 17 posts
Posted November 8, 2012

Hi I've just finished porting my mod to ssp/smp 1.4.2 and just got left to port the configuration code to 1.4.2.

 

I've managed to get the config to work with forge universal but I've noticed the config only gets created on the server side and I'm wondering if their was a way to create the config file on the client? so if people were not using this mod for server they can edit block ids still.

 

My plan was to create two versions of my mod one for client and server which would create the config on the server using this code:

/**For server version*/

static Configuration configuration = new Configuration(new File("config/CampCraftEditor.cfg"));

 

And the other version would be for client only using this code:

/**For Single Player version*/

static Configuration configuration = new Configuration(new File(Minecraft.getMinecraftDir(), "config/CampCraftEditor.cfg"));

 

Or am i going about this the wrong way and the server version reads the config file thats in the server folder

   

  • Quote

Share this post


Link to post
Share on other sites

LexManos    1519

LexManos

LexManos    1519

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1519
  • 8571 posts
Posted November 9, 2012

Why not use the pre-init event and use the config file it suggests?

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Rohman
      [1.12.2 Build 2847] Server Crash on startup

      By Rohman · Posted 32 minutes ago

      Here you go. Thanks for having a look. debug(1).log
    • diesieben07
      Server Cannot Start

      By diesieben07 · Posted 53 minutes ago

      You installed a client-only mod (Controllable) on the server. Mods have the ability to indicate their client-only-ness to Forge and it will not load the mod on a server. This mod has not done so, please report this bug to the mod author.
    • diesieben07
      [1.12.2] How do i make it so my sword renders in my mobs hand?.

      By diesieben07 · Posted 59 minutes ago

      Why would you replace them?! This is a simple method override and you are calling super. There is no need to replace anything. Again: Please learn Java basics before making a mod.
    • diesieben07
      [1.12.2 Build 2847] Server Crash on startup

      By diesieben07 · Posted 1 hour ago

      Post the debug.log file.
    • diesieben07
      Need your help pls

      By diesieben07 · Posted 1 hour ago

      1.8.9 is no longer supported on this forum due to it's age. Update to a modern version of Minecraft to receive support.
  • Topics

    • Rohman
      2
      [1.12.2 Build 2847] Server Crash on startup

      By Rohman
      Started 2 hours ago

    • The_Unkown675
      1
      Server Cannot Start

      By The_Unkown675
      Started 4 hours ago

    • J0WAY
      17
      [1.12.2] How do i make it so my sword renders in my mobs hand?.

      By J0WAY
      Started Thursday at 09:10 PM

    • _jiriik_
      1
      Need your help pls

      By _jiriik_
      Started 3 hours ago

    • Kuaka
      0
      My Forge 1.12 and 1.12.2 Keep Crashing when i start it up

      By Kuaka
      Started 1 hour ago

  • Who's Online (See full list)

    • Ugdhar
    • Gnaux
    • plugsmustard
    • vaartis
    • HussNuss
    • AkosM
    • Ollie_Bear
    • Kuaka
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • Possible to create config file on client and server?
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community