-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full Changelog: https://gist.github.com/Jonathing/c3ad28b2a048ac839a7baba5417ee870 The key features are: - ES6 language support - Thoroughly updated ASMAPI, with full documentation - Bug fixes (some optional for backwards-compatibility) - Partial internal code cleanup
- Loading branch information
Showing
22 changed files
with
998 additions
and
467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
# CoreMods | ||
|
||
New JavaScript based system for implementing CoreMods. | ||
CoreMods is a JavaScript-based system that acts as a wrapper around ObjectWeb ASM. | ||
|
||
Why? | ||
## Purpose | ||
|
||
Because it means that it's a lot easier to manage the lifecycle correctly. We can isolate | ||
CoreMod logic to the proper ClassLoading contexts without effort on the part of the Modder. | ||
CoreMods need to be sandboxed, or otherwise isolated, in their own environments so that they are not able to cause early | ||
class-loading. They transform classes as only as they are loaded and do not have access to objects outside of the | ||
sandbox given to them. This helps prevent issues that would otherwise arise from CoreMods written traditionally in Java. | ||
|
||
It hopefully also communicates that CoreMods are strictly arms-length : they operate on | ||
classes as they load _only_ - changing structures and behaviours through that means. | ||
Since CoreMods integrates with ModLauncher's transformation system, it is easier to manage the lifecycle as CoreMods is | ||
only responsible for managing the transformation as ModLauncher is instead the one responsible for providing the class | ||
loading system. | ||
|
||
This is connected to Forge and FML through the CoreMod SPI being implemented in new Forge. | ||
## Usage | ||
|
||
CoreMods are JavaScript files that are sandboxed by the limitations provided within the CoreMod engine. It is only able | ||
to access a limited set of classes and packages. ASMAPI, included within CoreMods, exists to provide several helpful | ||
tools for writing CoreMods. You can view this class yourself to see its usages, or you can find examples of it in other | ||
CoreMods. | ||
|
||
The best way to find examples for CoreMods is to look at Forge itself, since it includes complex examples that utilize | ||
much of the functionality within the sandbox. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
/* | ||
* Copyright (c) Forge Development LLC | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
function moreFunctions() { | ||
print("Poopy from more functions!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...test/src/test/resources/META-INF/services/cpw.mods.modlauncher.api.ITransformationService
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) Forge Development LLC | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
module net.minecraftforge.coremod { | ||
// CoreMods framework | ||
exports net.minecraftforge.coremod; | ||
// ASMAPI | ||
exports net.minecraftforge.coremod.api; | ||
|
||
requires cpw.mods.modlauncher; | ||
requires net.minecraftforge.forgespi; | ||
requires org.apache.logging.log4j; | ||
requires org.jetbrains.annotations; | ||
requires org.openjdk.nashorn; | ||
requires org.objectweb.asm.util; | ||
|
||
provides net.minecraftforge.forgespi.coremod.ICoreModProvider | ||
with net.minecraftforge.coremod.CoreModProvider; | ||
} |
Oops, something went wrong.