Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forge support #49

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Forge support #49

wants to merge 21 commits into from

Conversation

nairol
Copy link
Collaborator

@nairol nairol commented Jul 7, 2014

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 😐). 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...

@nairol nairol self-assigned this Jul 7, 2014
@nairol
Copy link
Collaborator Author

nairol commented Jul 14, 2014

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.

@KartikChugh
Copy link

@nairol where is the download

@nairol
Copy link
Collaborator Author

nairol commented Jul 17, 2014

@en7 There are still bugs. I don't want to release the unfinished version.

@KartikChugh
Copy link

Ok

@Lunatrius
Copy link

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.

@nairol
Copy link
Collaborator Author

nairol commented Jul 18, 2014

@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).

@Lunatrius
Copy link

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.

@nairol
Copy link
Collaborator Author

nairol commented Jul 19, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants