Botania

Botania

133M Downloads

Full serversiding

williewillus opened this issue · 5 comments

commented

I've been getting more clientside crashes than I can count on my fingers and toes in the 1.8 port, and it's 100% of the time because something on the client is trying to run logic that should really only be on the server (e.g. the pure daisy, on every client near the flower, checks the recipe and goes through full ticking logic when only the server should ever need to be responsible. Same for pretty much everything in the mod: if you can see it, it's running all of its logic on your client)

I'm thinking of taking the mana network and as much of the entire mod's logic as possible and shoving it back onto the server side like it should be. I don't know what implications this might immediately have, so posting this here in case there's a big huge reason contributors see why it shouldn't happen.

Some things immediately off the bat that would need handling:

  • Cannot spawn botania particles from server (rectify with packet?)
  • Removing Mana Network from clientside might affect some unknown things (wand of the forest fake bursts are one) - are there any other unknown factors?
  • Block break particle config would only be effective on the server, where blocks would actually be broken. Or we could switch to world.destroyBlock, which will respect clients' vanilla particles setting I believe

Thoughts?

commented

From what I remember Vaz original decided not to use packets for some reason I can't remember but then made it into a challenge to not use then as much as possible.

Now if she's ok with it I guess you could go through converting things to use the Message code she wrote for Psi (Here) and implement a full server/client relationship. Like you mention the implications are as yet mostly unknown, but I think it might be worth looking into as the investment might solve some problems that keep coming up and ones that are likely to come up in future.

That's my thoughts but the main opinion will come from Vaz.

commented

The only packet i would need would be to spawn the two particles Botania has.

@Vazkii thoughts?

commented

If I remember correctly V originally decided no packets because they were really annoying to use. The Psi message circumvents that problem. (My one beef with it is you can't map you own values without editing Message.java)

commented

@yrsegal it might be an opportunity to open it up abit, from looking it maps them using an internal method called map which is given the objects class, a reader and a writer function. Open that up to being used and you might be able to map new types to the message.

commented

Yeah, I just edited message.java to map my own classes. ¯_(ツ)_/¯