Jump to content

Recommended Posts

Posted

I'm a bit confused on syncing annotated config files. Guidance on this forum has generally been to send a packet to the client on PlayerLoggedIn and update a "client" config file.

 

So let's say I have a ServerConfig class and a Config class, where the latter is the client's config that gets updated. If I want to register a dimension using an ID based on the config, I have to register it on both the client and server, right? Using DimensionType.register()? If I put this in my CommonProxy, it'll get called on both. Assuming Config is only updated when a player logs in, I can't use Config on the server. But I also can't use ServerConfig on the client cause the client could have the wrong thing in their config file. Anyone know the right way to do this?

Posted (edited)

Perhaps a better question is - is there an event for when the config gets loaded from the file?Does ConfigChangedEvent.OnConfigChangedEvent cover that? If so I could just update the Config class when the file initially loads? But does dimension registering happen before or after the config is loaded?

Edited by stepsword
Posted
1 minute ago, Animefan8888 said:

The better question is why is your dimension ID configurable?

I was hoping to avoid conflicts with other mods by allowing modpack creators to set this. Is that something I don't have to worry about?

Posted
7 minutes ago, stepsword said:

Is that something I don't have to worry about?

I dont believe so. I believe there is a method to provide you with an ID that hasn't been used in 1.12 and in 1.14 I dont think it uses integer ids for anything other than saving to disk.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

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