Server side only?
chrisbecke opened this issue ยท 7 comments
Sorry to re-open this issue.
But server side only support would be awesome.
There are other mods that support being installed on only the client or server that are still forge, rather than jar mods. I know that mods like NEI, JEI etc cal all exist only on the client.
In theory no. Roguelike generates structures using vanilla mobs, spawners and blocks so the mod is not needed after generation.
The mod needs to be running in order for mobs to be equipped with armour and weapons when they spawn from spawners. That's all. But otherwise it's fine to remove the mod. Your other option if you just want to stop more dungeons from generating is set natural spawning to false in the config file.
I was just curious for modpacks. If i use this on the server to install it and that way i can get the dungeons without having to add it to the modpack or someone else modpack. If i choose to run a server with someone elses modpack. Maybe we can add support to not kick players for not having the mod if the server has it installed.
I pulled this mod from github and it is quite easy to modify to run as a server only mod.
In "Roguelike.java" amend the mod markup with a 'clientSideOnly = true'.
@Mod(modid="Roguelike", name="Roguelike Dungeons", version=Roguelike.version, acceptableRemoteVersions="*",clientSideOnly = true)
public class Roguelike {
Add a new class to the project, called "RoguelikeServer.java" and create a class that extends Roguelike and re-implements the core mod methods.
@Mod(modid="RoguelikeServer", name="Roguelike Dungeons", version=Roguelike.version, acceptableRemoteVersions="*",serverSideOnly = true)
public class RoguelikeServer extends Roguelike {
@EventHandler
public void preInit(FMLPreInitializationEvent event) { super.preInit(event); }
@EventHandler
public void modInit(FMLInitializationEvent event) { super.modInit(event); }
@EventHandler
public void serverStart(FMLServerStartingEvent event){ super.serverStart(event); }
}
The resulting mod will supported being used on a dedicated server with optional / no client side installation, but will also be used normally in SSP / LAN games.
ps. Why does a comment section on a coding site have the WORST code insertion formatting ever!?
I don't understand why this is an issue. I tested this the other day. Not only was i able to log in with a plain forge client without the mod, but i was able to log in with a vanilla client as well.