#How can i have a sourceSet for Dedicated Server code (Physical Server)

9 messages · Page 1 of 1 (latest)

distant fog
#

the split source set allow to separate physical client code from the rest of the code
but is there a way for me to isolate the dedicated server code (net.minecraft.server.dedicated.*) so that the client source set only has physical client code, the server sourceset only has physical server code and the main sourceset is left for the common code

signal root
#

I don’t think this is possible since the client always has server code for single player and lan, that’s just how mc is built

wraith shard
distant fog
#

my goal is to in one mod, do some modifications common to the common server code, do some modifications exclusive to the integrated server code such as adding some of the dedicated server behavior and do some modifications exclusive to the dedicated server code

#

i'm actually reading loom rn to try and understand how it works under the hood so that if i need to modify it, i can

wraith shard
#

Or at least explain

distant fog
#

ok wait i get it
so the dedicated package is present in the client despite being unused since the integrated server classes are used instead, meaning that technically you can ship dedicated server code in the common code which makes no sense, but due to the architecture, does