Open nairol opened 10 years ago
OK, after reading some comments in the WDL forum thread I think we must offer a way to hide the mod from Forge so that it won't be reported to the server. Banning people who have the mod installed is pretty cruel. A kick would be enough.
I might have an idea how to tackle this.
@nairol where is the download
@EN7 There are still bugs. I don't want to release the unfinished version.
Ok
Why would you even need 2 codebases? From what I can see the only difference between the forge and non-forge version is how you hook into things. With forge you subscribe to an event, without it insert the call directly into the base class. You could most likely ship them both in a single jar.
@Lunatrius I have seperated the Forge specific stuff from the main WDL files in a local repo. The shared source code will be symlinked into the Forge folder. It's just not pushed yet.
Maybe we can put it all in a single jar, don't know yet. Zip files are easier to open and extract than jar files (for the average computer user).
Actually no, I was wrong. The code base can be the same, but the jar/zip have to be separate. Forge compiles classes using srg names while WDL (non forge version) compiles using notch names.
I don't use git's symlinks because they don't work on Windows. Instead I've added two scripts (one for Windows and one for Mac/Linux/BSD) that add the symbolic links manually. This needs to be done only once so it shouldn't be a problem.
People have been asking for this since January 2012 and I didn't really like the idea of depending on some community-made modding API when Mojang's API was just around the corner (yeah, right :neutral_face:). I did change my mind when more information about the official API became available, e.g. that it would only support server mods.
The advantages of Forge are easy mod installation, good compatibility with other Forge mods, less work for mod developers. Disadvantages are e.g. that WDL users would need to have Forge installed and that the list of installed mods is sent to the server.
Offering two versions of the mod - one Forge compatible, one standalone - would only work if the code is almost completely shared among them. Doubling the work required to update the mod is not a wise move...
I recently started reading the Forge documentation (which is somewhere between sparse and non-existing imho) and it seems like they offer all hooks ("events") that WDL needs to work without additional base class modifications.
I managed to get it working without big changes to our existing codebase. The few changes I needed to make will have no impact on the standalone version. I basically just moved some code around or rewrote a few lines.
At the moment this pretty much is a proof of concept. There are still problems with disappearing entities and I'm generally not very happy with the code.
@dslake: Any thoughts on Forge support?
Oh and please don't merge this PR/branch yet...