Skip to content

Commit

Permalink
Merge branch 'experiments/unimined' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
Nolij committed Jan 15, 2024
2 parents 3d7de67 + 7563ecc commit b21ea4f
Show file tree
Hide file tree
Showing 80 changed files with 1,865 additions and 560 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: build
on: [ push, pull_request ]

jobs:
Expand All @@ -12,8 +12,6 @@ jobs:
java-version: '17'
- name: Adjust Gradle permission
run: chmod +x ./gradlew
- name: :setupCIWorkspace
run: ./gradlew setupCIWorkspace
- name: :build
run: ./gradlew build
- name: Upload artifacts
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: publish
on: [ workflow_dispatch ]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Adjust Gradle permission
run: chmod +x ./gradlew
- name: :build
run: ./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: zume
path: "**/zume-*.jar"
- name: :publishMods
run: ./gradlew publishMods
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- migrate to Kotlin buildscript (I hate Kotlin but I hate Groovy more)
- migrate to Unimined (adding new platforms should be way easier now)
- add support for LexForge 14.4+ (this required 3 separate implementations :harold:)
- add support for NeoForge 20.1+
- remove hard dependency on MixinBooter in Vintage Forge; Zume just verifies that mixins get loaded now, it doesn't
care how
55 changes: 42 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,70 @@
# IMPORTANT LICENSE NOTICE

By using this project in any form, you hereby give your "express assent" for the terms of the license of this project (see [License](#license)), and acknowledge that I (the author of this project) have fulfilled my obligation under the license to "make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License".
By using this project in any form, you hereby give your "express assent" for the terms of the license of this
project (see [License](#license)), and acknowledge that I (the author of this project) have fulfilled my obligation
under the license to "make a reasonable effort under the circumstances to obtain the express assent of recipients to
the terms of this License".

# Zume

An ~~over-engineered~~ simple zoom mod.

This mod adds a keybind which zooms in your FOV while it's held down, allowing you to see further away, and keybinds for increasing and decreasing the zoom level.
This mod adds a keybind which zooms in your FOV while it's held down, allowing you to see further away, and keybinds
for increasing and decreasing the zoom level.

# FAQ

#### Q: Where is the config?

A: You'll find the config at `.minecraft/config/zume.json5`. You can modify the file while the game is running, and
the config will be automatically reloaded.

#### Q: discord where
A: https://discord.gg/6ZjX4mvCMR

#### Q: What version is this for?

A: Zume supports the following platforms:

- Fabric: Any version supported by Fabric Keybinding API v1 (currently 14.4+)
- NeoForge: 20.1+
- LexForge: 14.4+ (requires MixinBootstrap before 16.1)
- Legacy Fabric: Any version supported by Legacy Fabric Keybinding API v1 (currently 7.10 - 12.2)
- Babric (Fabric for Minecraft Beta): Any version supported by Station API (currently b7.3)
- Forge: 7.10 - 12.2 (requires UniMixins in 7.10 and MixinBooter in 8.9 - 12.2)
- Vintage Forge: 8.9 - 12.2 (requires MixinBooter or UniMixins)
- Archaic Forge: 7.10 (requires UniMixins)

#### Q: Can you add support for \<insert platform here>?

A: I intend to add support for Archaic Forge (Forge 7.10) and Vintage Forge (Forge 12.2) eventually (no promises). Outside of those two, PRs are welcome.

#### Q: Where is the config?

A: You'll find the config at `.minecraft/config/zume.json5`. You can modify the file while the game is running, and the config will be automatically reloaded.
A: Every platform I intend to add support for myself is already supported. PRs are welcome for other platforms **if
the following conditions are met**:

- Must not break single-jar compatibility with any already supported platform (obviously).
- Must not be for a platform that has a 1st-party compatibility layer for an already supported platform - explicit
Quilt support will not be accepted so long as Quilt maintains a Fabric compatibility layer; it'd be a waste of CI
time. [Sinytra Connector](https://github.com/Sinytra/Connector) is a 3rd-party compatibility layer, so explicit
Forge support will be provided.
- Must not manually maintain overridden game options; implementations that look like
https://github.com/embeddedt/Mooz will not be accepted - no offense [embeddedt](https://github.com/embeddedt).
Direct ASM is fine as long as functionality is similar enough.
- Must make a reasonable effort to be maximize compatibility with existing mods on target platforms - see use of
Neo/LexForge API over mixins in Neo/LexForge implementations, and use of `@WrapWithCondition` and
`@ModifyExpressionValue` and such from MixinExtras over `@Redirect` in most implementations.
- Must follow existing format - add a Unimined subproject for each newly supported platform.
- Must not have exclusive features without significant justification - if you're adding a feature, add it to every
version.

#### Q: What kind of weird license is this?

A: OSL-3.0 is the closest equivalent to a LAGPL I could find. AGPL and GPL are incompatible with Minecraft, and LGPL doesn't protect network use. OSL-3.0 protects network use and is compatible with Minecraft.
A: OSL-3.0 is the closest equivalent to a LAGPL I could find. AGPL and GPL are incompatible with Minecraft, and LGPL
doesn't protect network use. OSL-3.0 protects network use and is compatible with Minecraft.

#### Q: Why though? It's so strict!!!!

A: This is, and will remain, free, copyleft software. Any requests to change the license other than to make it even stronger will be denied immediately (unfortunately GPL and AGPL aren't compatible with Minecraft due to linking restrictions, as much as I'd like to use them). Even in situations where I use parts of other projects with more "permissive" licenses, I will treat them as copyleft, free software.

#### Q: discord where
A: https://discord.gg/6ZjX4mvCMR
A: This is, and will remain, free, copyleft software. Any requests to change the license other than to make it even
stronger will be denied immediately (unfortunately GPL and AGPL aren't compatible with Minecraft due to linking
restrictions, as much as I'd like to use them). Even in situations where I use parts of other projects with more
"permissive" licenses, I will treat them as copyleft, free software.

## License

Expand Down
49 changes: 0 additions & 49 deletions archaic/build.gradle

This file was deleted.

49 changes: 49 additions & 0 deletions archaic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import xyz.wagyourtail.unimined.api.minecraft.task.RemapJarTask

operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}

unimined.minecraft {
version("archaic_minecraft_version"())

runs {
config("server") {
disabled = true
}
}

minecraftForge {
loader("archaic_forge_version"())
mixinConfig("zume-${project.name}.mixins.json")
}

mappings {
searge()
mcp("stable", "archaic_mappings_version"())
}

defaultRemapJar = true
}

tasks.withType<RemapJarTask> {
mixinRemap {
enableMixinExtra()
}
}

dependencies {
"modImplementation"("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:${"unimixins_version"()}:dev")

implementation(project(":common"))
}

tasks.processResources {
from("common/src/main/resources")

filteringCharset = "UTF-8"

// filesMatching("mcmod.info") {
// expand(rootProject.properties)
// }
}
7 changes: 4 additions & 3 deletions archaic/src/main/java/dev/nolij/zume/archaic/ArchaicZume.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import dev.nolij.zume.archaic.mixin.EntityRendererAccessor;
import dev.nolij.zume.common.Constants;
import dev.nolij.zume.common.IZumeProvider;
import dev.nolij.zume.common.Zume;
import cpw.mods.fml.client.registry.ClientRegistry;
Expand All @@ -18,9 +19,9 @@

@Mod(
modid = Zume.MOD_ID,
name = Tags.MOD_NAME,
version = Tags.MOD_VERSION,
acceptedMinecraftVersions = Tags.VERSION_RANGE,
name = Constants.MOD_NAME,
version = Constants.MOD_VERSION,
acceptedMinecraftVersions = Constants.ARCHAIC_VERSION_RANGE,
guiFactory = "dev.nolij.zume.archaic.ArchaicConfigProvider",
dependencies = "required-after:unimixins@[0.1.15,)")
public class ArchaicZume implements IZumeProvider {
Expand Down
Loading

0 comments on commit b21ea4f

Please sign in to comment.