Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/essentialgg/universalcraft
A Minecraft modding library designed to seamlessly support a single code base branching different Minecraft versions and LWJGL versions
https://github.com/essentialgg/universalcraft
Last synced: about 10 hours ago
JSON representation
A Minecraft modding library designed to seamlessly support a single code base branching different Minecraft versions and LWJGL versions
- Host: GitHub
- URL: https://github.com/essentialgg/universalcraft
- Owner: EssentialGG
- License: lgpl-3.0
- Created: 2020-03-18T17:01:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-15T08:09:50.000Z (3 months ago)
- Last Synced: 2024-08-16T08:52:45.370Z (3 months ago)
- Language: Kotlin
- Homepage:
- Size: 617 KB
- Stars: 51
- Watchers: 6
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UniversalCraft
A full Java interop library that wraps Minecraft classes which allows you to write code for multiple versions at the same time. Built using ReplayMod's [Preprocessor](https://github.com/ReplayMod/preprocessor).
It also features a "standalone" edition, which can run GUIs without Minecraft so long as they only depend on
UniversalCraft and not Minecraft directly.
This can allow for a faster development loop (no need to wait a minute for Minecraft to start),
automated testing without having to bootstrap a full Minecraft environment,
and even development of completely standalone applications using the same toolkit (e.g. [Elementa]) as one is already
familiar with from Minecraft development.
See the `standalone/example/` folder for a fully functional example.## Dependency
It's recommended that you include [Essential](link eventually) instead of adding it yourself.
In your repository block, add:
Groovy
```groovy
maven {
url = "https://repo.essential.gg/repository/maven-public"
}
```
Kotlin
```kotlin
maven(url = "https://repo.essential.gg/repository/maven-public")
```To use the latest builds, use the following dependency format, use the build reference to find the correct replacements:
Forge
```kotlin
implementation("gg.essential:universalcraft-$mcVersion-$mcPlatform:$buildNumber")
```Fabric
Groovy
```groovy
modImplementation(include("gg.essential:universalcraft-$mcVersion-$mcPlatform:$buildNumber"))
```
Kotlin
```kotlin
modImplementation(include("gg.essential:universalcraft-$mcVersion-$mcPlatform:$buildNumber")!!)
```### Build Reference
Build Reference
mcVersion
mcPlatform
buildNumber
standalone
N/A
1.21fabric
1.20.6fabric
1.20.4forge
1.20.4fabric
1.20.2forge
1.20.2fabric
1.20.1forge
1.20.1fabric
1.20fabric
1.19.4forge
1.19.4fabric
1.19.3forge
1.19.3fabric
1.19.2forge
1.19.2fabric
1.19.1fabric
1.19fabric
1.18.1forge
1.18.1fabric
1.17.1forge
1.17.1fabric
1.16.2fabric
1.16.2forge
1.12.2forge
1.8.9forge
IMPORTANT!
If you are using forge, you must also relocate UC to avoid potential crashes with other mods. To do this, you will need to use the Shadow Gradle plugin.
Groovy Version
You can do this by either putting it in your plugins block:
```groovy
plugins {
id "com.github.johnrengelman.shadow" version "$version"
}
```
or by including it in your buildscript's classpath and applying it:
```groovy
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath "gradle.plugin.com.github.jengelman.gradle.plugins:shadow:$version"
}
}apply plugin: "com.github.johnrengelman.shadow"
```
You'll then want to relocate UC to your own package to avoid breaking other mods
```groovy
shadowJar {
archiveClassifier.set(null)
relocate("gg.essential.universal", "your.package.universal")
}
tasks.named("reobfJar").configure { dependsOn(tasks.named("shadowJar")) }
```Kotlin Script Version
You can do this by either putting it in your plugins block:
```kotlin
plugins {
id("com.github.johnrengelman.shadow") version "$version"
}
```
or by including it in your buildscript's classpath and applying it:
```kotlin
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:$version")
}
}apply(plugin = "com.github.johnrengelman.shadow")
```
You'll then want to relocate UC to your own package to avoid breaking other mods
```kotlin
tasks.shadowJar {
archiveClassifier.set(null)
relocate("gg.essential.universal", "your.package.universal")
}
tasks.reobfJar { dependsOn(tasks.shadowJar) }
```[Elementa]: https://github.com/EssentialGG/Elementa