Posted November 30, 20195 yr I am trying to create a mod that writes some player data into file. I want the file to be updated only when logical server is starting up. As I can see, @SidedProxy affects physical side only, and the file is not created on local server. I've tried to use this way: public static CommonProxy _proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) _proxy = new ClientProxy(); else _proxy = new ServerProxy(); _proxy.preInit(event); } ... //Other handlers ... There ServerProxy.preInit() is: public void init(FMLInitializationEvent e) { System.out.println("init server!"); ServerRegisterer.init(e); PlayerData.load(); } But now I don't know what to do with registering things: as I understand, I don't have to register anything on logical server when it is physically a client. (Because init methods of ServerProxy aren't called at all on the logical server) So, what should I do? I would be happy if there is a way of programming my mod, with only logical server-client separation.
November 30, 20195 yr Author 18 minutes ago, diesieben07 said: What kind of data are you trying to store? Usually writing your own files is unnecessarily complicated most of the time. Thank you for your reply! Multiplayer class system. I have to save some player lvls somewhere...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.