Skip to content

Commit

Permalink
Merge remote-tracking branch 'vivecraft/Multiloader-1.18' into Multil…
Browse files Browse the repository at this point in the history
…oader-1.18

# Conflicts:
#	README.md
#	build.gradle
#	common/build.gradle
#	common/src/main/java/org/vivecraft/VRMixinConfig.java
#	common/src/main/java/org/vivecraft/client/Xplat.java
#	common/src/main/java/org/vivecraft/client/gui/settings/GuiMainVRSettings.java
#	common/src/main/java/org/vivecraft/client/gui/settings/GuiVRControls.java
#	common/src/main/java/org/vivecraft/client/utils/Utils.java
#	common/src/main/java/org/vivecraft/client_vr/gameplay/trackers/InteractTracker.java
#	common/src/main/java/org/vivecraft/mixin/client/blaze3d/MainTargetVRMixin.java
#	common/src/main/java/org/vivecraft/mixin/client/blaze3d/RenderTargetVRMixin.java
#	common/src/main/java/org/vivecraft/mixin/client/gui/screens/TitleScreenMixin.java
#	common/src/main/java/org/vivecraft/mixin/client/renderer/LevelRendererVRMixin.java
#	common/src/main/java/org/vivecraft/provider/openvr_jna/MCOpenVR.java
#	common/src/main/java/org/vivecraft/provider/openvr_jna/OpenVRStereoRenderer.java
#	common/src/main/resources/vivecraft.vr.mixins.json
#	fabric/build.gradle
#	fabric/src/main/java/org/vivecraft/fabric/XeventsImpl.java
#	fabric/src/main/java/org/vivecraft/fabric/XplatImpl.java
#	forge/src/main/java/org/vivecraft/client/forge/XplatImpl.java
  • Loading branch information
thejudge156 committed Sep 3, 2023
2 parents 4262285 + e9a9d13 commit d404f32
Show file tree
Hide file tree
Showing 609 changed files with 20,379 additions and 38,231 deletions.
187 changes: 187 additions & 0 deletions .github/workflows/publish-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
name: curseforge-modrinth-publish

run-name: Posting jars on Curseforge and Modrinth

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: fetching asset paths
id: assets
shell: bash
run: |
echo Attachments
fileNames=(${{ github.event.release.assets[0].name }} ${{ github.event.release.assets[1].name }} ${{ github.event.release.assets[2].name }})
filePaths=(${{ github.event.release.assets[0].browser_download_url }} ${{ github.event.release.assets[1].browser_download_url }} ${{ github.event.release.assets[2].browser_download_url }})
for i in 0 1 2
do
echo "${fileNames[i]}"
echo "${filePaths[i]}"
if [ -n "${filePaths[i]}" ]; then
curl -L -o "./${fileNames[i]}" "${filePaths[i]}"
fi
if [[ "${fileNames[i]}" == *"fabric"* ]]; then
echo "FABRIC_FILE_NAME=${fileNames[i]}" >> $GITHUB_OUTPUT
echo "FABRIC_FILE_PATH=./${fileNames[i]}" >> $GITHUB_OUTPUT
fi
if [[ "${fileNames[i]}" == *"forge"* ]]; then
echo "FORGE_FILE_NAME=${fileNames[i]}" >> $GITHUB_OUTPUT
echo "FORGE_FILE_PATH=./${fileNames[i]}" >> $GITHUB_OUTPUT
fi
if [[ "${fileNames[i]}" == *"quilt"* ]]; then
echo "QUILT_FILE_NAME=${fileNames[i]}" >> $GITHUB_OUTPUT
echo "QUILT_FILE_PATH=./${fileNames[i]}" >> $GITHUB_OUTPUT
fi
done
ls -l
- run: echo fabric is ${{ steps.assets.outputs.FABRIC_FILE_NAME }}
- run: echo forge is ${{ steps.assets.outputs.FORGE_FILE_NAME }}
- run: echo quilt is ${{ steps.assets.outputs.QUILT_FILE_NAME }}

- name: getting version info from files
id: version
shell: bash
run: |
file=""
if [ -n "${{ steps.assets.outputs.FABRIC_FILE_NAME }}" ]; then
file="${{ steps.assets.outputs.FABRIC_FILE_NAME }}"
elif [ -n "${{ steps.assets.outputs.FORGE_FILE_NAME }}" ]; then
file="${{ steps.assets.outputs.FORGE_FILE_NAME }}"
else
file="${{ steps.assets.outputs.QUILT_FILE_NAME }}"
fi
echo $file
# save the current IFS value
OLDIFS=$IFS
# set the IFS to the delimiter ("-")
IFS="-"
# split the string into an array, limiting it to a maximum of 3 fields
array=($file)
# restore the IFS value
IFS=$OLDIFS
# alphas or beats should be included in the version
if [ ${array[3]:0:1} = "a" ] || [ ${array[3]:0:1} = "b" ]; then
array[2]=${array[2]}-${array[3]}
fi
release_type="release"
if [ ${array[3]:0:1} = "a" ]; then
release_type="alpha"
elif [ ${array[3]:0:1} = "b" ]; then
release_type="beta"
fi
echo release type: ${release_type}
echo "RELEASE_TYPE=${release_type}" >> $GITHUB_OUTPUT
mc_version=${array[1]}
# mod loaders
loaders_fabric=fabric
# check if there is a quilt specific jar
if [ -z "${{ steps.assets.outputs.QUILT_FILE_NAME }}" ]; then
loaders_fabric="${loaders_fabric} quilt"
else
loaders_quilt="quilt"
fi
loaders_forge="forge"
echo mc version: $mc_version
echo "MC_VERSION=$mc_version" >> $GITHUB_OUTPUT
echo loaders fabric: ${loaders_fabric}
echo "LOADERS_FABRIC=${loaders_fabric}" >> $GITHUB_OUTPUT
echo loaders forge: ${loaders_forge}
echo "LOADERS_FORGE=${loaders_forge}" >> $GITHUB_OUTPUT
echo loaders quilt: ${loaders_quilt}
echo "LOADERS_QUILT=${loaders_quilt}" >> $GITHUB_OUTPUT
mod_name="${array[0]^} $mc_version-${array[2]}"
echo file name fabric: "${mod_name}-fabric"
echo "VERSION_NAME_FABRIC=${mod_name}-fabric" >> $GITHUB_OUTPUT
echo file name forge: "${mod_name}-forge"
echo "VERSION_NAME_FORGE=${mod_name}-forge" >> $GITHUB_OUTPUT
echo file name quilt: "${mod_name}-quilt"
echo "VERSION_NAME_QUILT=${mod_name}-quilt" >> $GITHUB_OUTPUT
# modrinth mod versions
base_version="$mc_version-${array[2]}"
echo md version fabric: "${base_version}-fabric"
echo "MD_VERSION_FABRIC=${base_version}-fabric" >> $GITHUB_OUTPUT
echo md version forge: "${base_version}-forge"
echo "MD_VERSION_FORGE=${base_version}-forge" >> $GITHUB_OUTPUT
echo md version fquilt: "${base_version}-quilt"
echo "MD_VERSION_QUILT=${base_version}-quilt" >> $GITHUB_OUTPUT
- run: echo Minecraft target version is ${{ steps.version.outputs.MC_VERSION }}
- run: echo release type is ${{ steps.version.outputs.RELEASE_TYPE }}

- name: publish fabric
if: steps.assets.outputs.FABRIC_FILE_PATH != ''
uses: Kir-Antipov/[email protected]
with:
modrinth-id: wGoQDPN5
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false

curseforge-id: 667903
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files-primary: ${{ steps.assets.outputs.FABRIC_FILE_PATH }}

name: "${{ steps.version.outputs.VERSION_NAME_FABRIC }}"
version: "${{ steps.version.outputs.MD_VERSION_FABRIC }}"
version-type: "${{ steps.version.outputs.RELEASE_TYPE }}"

loaders: "${{ steps.version.outputs.LOADERS_FABRIC }}"
game-versions: "${{ steps.version.outputs.MC_VERSION }}"

- name: publish forge
if: steps.assets.outputs.FORGE_FILE_PATH != ''
uses: Kir-Antipov/[email protected]
with:
modrinth-id: wGoQDPN5
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false

curseforge-id: 667903
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files-primary: ${{ steps.assets.outputs.FORGE_FILE_PATH }}

name: "${{ steps.version.outputs.VERSION_NAME_FORGE }}"
version: "${{ steps.version.outputs.MD_VERSION_FORGE }}"
version-type: "${{ steps.version.outputs.RELEASE_TYPE }}"

loaders: "${{ steps.version.outputs.LOADERS_FORGE}}"
game-versions: "${{ steps.version.outputs.MC_VERSION }}"

- name: publish quilt
if: steps.assets.outputs.QUILT_FILE_PATH != ''
uses: Kir-Antipov/[email protected]
with:
modrinth-id: wGoQDPN5
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false

curseforge-id: 667903
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files-primary: ${{ steps.assets.outputs.QUILT_FILE_PATH }}

name: "${{ steps.version.outputs.VERSION_NAME_QUILT }}"
version: "${{ steps.version.outputs.MD_VERSION_QUILT}}"
version-type: "${{ steps.version.outputs.RELEASE_TYPE }}"

loaders: "${{ steps.version.outputs.LOADERS_QUILT}}"
game-versions: "${{ steps.version.outputs.MC_VERSION }}"
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Vivecraft Mod (of Vivecraft fabric)
![Lines of code](https://img.shields.io/tokei/lines/github/questcraftplusplus/vivecraftmod?style=flat)
A port of [Vivecraft](https://www.vivecraft.org) to Fabric/Quilt and back to Forge.\
This is an official continuation of the project, using mixin's instead of patches.\
This means we could use a multiloader setup to develop on Fabric, Forge and Quilt at the same time.\
It also removed Optifine as a dependency, so mod compatibility *should* be better as well.

A port of https://github.com/jrbudda/Vivecraft_118 to fabric (and back to forge).
Curseforge: [![DOWNLOAD](https://cf.way2muchnoise.eu/title/667903.svg)](https://www.curseforge.com/minecraft/mc-mods/vivecraft)\
Modrinth: [![Modrinth](https://img.shields.io/modrinth/dt/vivecraft)](https://modrinth.com/mod/vivecraft)

# Current status
Since this version no longer has Optifine, we recommend you use Sodium (and the rest of the family) on Fabric/Quilt (and the unofficial ports on Forge) to maximize performance. For shaders you can use Iris on Fabric/Quilt (and the unofficial ports on Forge).

## Mod compatibility
Mod compatibility is important to us. If you find any issues, don't be afraid to open an issue. Be sure to check if it isn't already known though, so we don't have duplicates.

## Current status
- [x] Loaded in game
- [x] Moving in game
- [x] Playable (with some bugs and missing features)
- [x] Fully playable
- [x] Sodium support
- [ ] Iris support
- [X] Iris support
- [ ] In game VR switching
- [ ] API
- [ ] OpenXR support

[Vivecraft Discord server](https://discord.gg/2x3QCk8qa9)\
[Development Discord server](https://discord.gg/jYyyv7zhSW)
122 changes: 97 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.0-SNAPSHOT" apply false
id 'io.github.juuxel.loom-quiltflower' version '1.8.0' apply false
}

architectury {
minecraft = rootProject.minecraft_version
}

subprojects {
apply plugin: "java"
apply plugin: "dev.architectury.loom"
apply plugin: "io.github.juuxel.loom-quiltflower"

archivesBaseName = rootProject.archives_base_name
version = rootProject.minecraft_version + "-" + rootProject.mod_version
group = rootProject.maven_group

loom {
silentMojangMappingsLicense()
Expand All @@ -20,42 +27,94 @@ subprojects {
mappings loom.officialMojangMappings()
// The following line declares the yarn mappings you may select this one as well.
// mappings "net.fabricmc:yarn:1.18.2+build.4:v2"
implementation("org.lwjgl:lwjgl-openvr:3.2.2")
implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-linux")
implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-macos")
implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-windows")
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}

java {
withSourcesJar()
}

task copyJarToMain(type: Copy) {
duplicatesStrategy = "include"
if (project.name != "common") {
from remapJar
into "../build/libs"
}
}

remapJar {
// after remap, copy the final jsr to the main /build/libs folder
finalizedBy copyJarToMain
}
}

allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"

archivesBaseName = rootProject.archives_base_name
version = rootProject.minecraft_version + "-" + rootProject.mod_version
group = rootProject.maven_group

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {

maven { url = 'https://mvnrepository.com/' }
maven { url 'https://jitpack.io' }
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}

exclusiveContent {
forRepository {
maven {
name = "Ladysnake Mods"
url = "https://maven.ladysnake.org/releases"
}
}
filter {
includeGroup 'io.github.ladysnake'
includeGroup 'org.ladysnake'
includeGroupByRegex 'dev\\.onyxstudios.*'
}
}

exclusiveContent {
forRepository {
maven {
name = "fabricmc"
url = "https://maven.fabricmc.net/"
}
}
filter {
includeGroup "net.fabricmc"
includeGroup "fabric-loom"
}
}

maven { url = "https://hephaestus.dev/release" }
maven { url = "https://api.modrinth.com/maven" }
maven { url = "https://cursemaven.com" }
maven { url = "https://maven.parchmentmc.org" }
maven { url = "https://maven.fabricmc.net/" }
maven { url = "https://maven.tterrag.com/" }
maven { url = "https://storage.googleapis.com/devan-maven/" }
maven { url = "https://maven.shedaniel.me/" }
maven { url = "https://aperlambda.github.io/maven" }
maven { url = "https://ladysnake.jfrog.io/artifactory/mods" }
maven { url = "https://maven.kotlindiscord.com/repository/terraformers/" }
maven { url = "https://mvn.devos.one/releases/" }
maven { url = "https://mvn.devos.one/snapshots/" }
Expand All @@ -64,20 +123,33 @@ allprojects {
maven { url = "https://maven.gegy.dev" }
maven { url = "https://dvs1.progwml6.com/files/maven/" }
maven { url = "https://modmaven.dev" }
maven {
url = "https://maven.jamieswhiteshirt.com/libs-release"
content {
includeGroup("com.jamieswhiteshirt")
exclusiveContent {
forRepository {
maven {
name = "Ladysnake Mods"
url = "https://maven.jamieswhiteshirt.com/libs-release"
}
}
filter {
includeGroup "com.jamieswhiteshirt"
}
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}

java {
withSourcesJar()
exclusiveContent {
forRepository {
ivy {
name = "Discord"
url = "https://cdn.discordapp.com/attachments/"
patternLayout {
artifact '/[organisation]/[module]/[revision].[ext]'
}
metadataSources { artifact() }
}
}
filter {
// discords are always just numbers
includeGroupByRegex "^\\d*\$"
}
}
}
}
Loading

0 comments on commit d404f32

Please sign in to comment.