Posted September 30, 20196 yr 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?
September 30, 20196 yr Author 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 September 30, 20196 yr by stepsword
September 30, 20196 yr 13 minutes ago, stepsword said: Perhaps a better question is The better question is why is your dimension ID configurable? 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.
September 30, 20196 yr Author 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?
September 30, 20196 yr 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. 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.
September 30, 20196 yr Author Huh so there is. DimensionManager.getNextFreeDimId() Thanks!! Edited September 30, 20196 yr by stepsword
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.