https://github.com/minecraftforge/coremods
CoreMods
https://github.com/minecraftforge/coremods
Last synced: 9 months ago
JSON representation
CoreMods
- Host: GitHub
- URL: https://github.com/minecraftforge/coremods
- Owner: MinecraftForge
- License: lgpl-2.1
- Created: 2017-12-09T05:06:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-14T23:55:19.000Z (12 months ago)
- Last Synced: 2025-04-03T01:13:30.298Z (9 months ago)
- Language: Java
- Size: 464 KB
- Stars: 38
- Watchers: 17
- Forks: 23
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-header.txt
Awesome Lists containing this project
README
# CoreMods
CoreMods is a JavaScript-based system that acts as a wrapper around ObjectWeb ASM.
## Purpose
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.
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.
## 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.