Posted February 1, 20223 yr Specifically, what do I need to do to make my code which works on single-player run on a server? I'm familiar with sidedness, I'm just lost on what boilerplate code/pitfalls I should be aware of. Thanks!
February 1, 20223 yr Author It works great in single player! But don't some operations like Minecraft.getInstance() crash servers, even though they work fine on single player worlds?
February 1, 20223 yr Author According to the docs, EventBusSubscriber only works for classes with static event handlers— do I use level.isClientSide otherwise?
February 1, 20223 yr Author Both are tools used to avoid running client-only code on servers, correct?
February 1, 20223 yr Author Could you elaborate more? Specifically, is "distributions" referring to physical client vs. physical server? And what are the use cases for either method (@EventBusSubscriber vs Level#isClientSide)?
February 1, 20223 yr Author Got it, thanks! And is it correct to assume most operations (say, Snowball#shoot) can be called without worrying about Level#isClientSide ?
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.