Skip to content

Commit

Permalink
0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xCollateral committed May 14, 2023
0 parents commit 75f2393
Show file tree
Hide file tree
Showing 335 changed files with 27,757 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
on: [pull_request, push]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: build/libs/
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# gradle

.gradle/
/build/
out/
classes/

# eclipse

*.launch

# idea

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/
bin/
.classpath
.project

# macos

*.DS_Store

# fabric

run/
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div align='center'>

[![Logo](https://media.discordapp.net/attachments/963349566839738369/969920960373334076/Vlogo.png?width=300&height=300)](#)

# VulkanMod

This is a fabric mod that rewrites Minecraft OpenGL renderer to use Vulkan API.

Demostration Video:

[![Demostration Video](http://img.youtube.com/vi/sbr7UxcAmOE/0.jpg)](https://youtu.be/sbr7UxcAmOE)

![Download](https://img.shields.io/github/downloads/xCollateral/VulkanMod/total?color=red&logo=github&style=for-the-badge)

[![Discord](https://img.shields.io/badge/Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/FVXg7AYR2Q)

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/V7V7CHHJV)

## Installation

### Download
[![CurseForge](https://cf.way2muchnoise.eu/title/635429_Get_Mod.svg?badge_style=flat)](https://www.curseforge.com/minecraft/mc-mods/vulkanmod)

[![CurseForge](https://cf.way2muchnoise.eu/full_635429_downloads.svg?badge_style=flat)](https://www.curseforge.com/minecraft/mc-mods/vulkanmod)

- Fabric mod loader is needed.
- Move `VulkanMod.jar` to `mods` folder of your Minecraft Instance.

## Known Issues

- Linux and macOS may not work.

## Notes
This is still a pre-alpha mod. Bugs are to be expected.

</div>
118 changes: 118 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

project.ext.lwjglVersion = "3.3.1"
project.ext.jomlVersion = "1.10.4"
project.ext.winNatives = "natives-windows"
project.ext.linuxNatives = "natives-linux"
project.ext.macosNatives = "natives-macos"
project.ext.macosArmNatives = "natives-macos-arm64"

dependencies {
// include(implementation("org.lwjgl:lwjgl:$lwjglVersion"))
// include(implementation("org.lwjgl:lwjgl-glfw:$lwjglVersion"))
// include(runtimeOnly("org.lwjgl:lwjgl-glfw:$lwjglVersion:$winNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-glfw:$lwjglVersion:$linuxNatives"))
// include(implementation("org.lwjgl:lwjgl-stb:$lwjglVersion"))
// include(runtimeOnly("org.lwjgl:lwjgl-stb:$lwjglVersion:$winNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-stb:$lwjglVersion:$linuxNatives"))
// include(implementation("org.lwjgl:lwjgl-openal:$lwjglVersion"))
// include(runtimeOnly("org.lwjgl:lwjgl-openal:$lwjglVersion:$winNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-openal:$lwjglVersion:$linuxNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl:$lwjglVersion:$winNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl:$lwjglVersion:$linuxNatives"))

include(implementation("org.lwjgl:lwjgl-vulkan:$lwjglVersion"))
include(implementation("org.lwjgl:lwjgl-vma:$lwjglVersion"))
// include(implementation("org.joml:joml:${jomlVersion}"))
include(runtimeOnly("org.lwjgl:lwjgl-vma:$lwjglVersion:$winNatives"))
include(runtimeOnly("org.lwjgl:lwjgl-vma:$lwjglVersion:$linuxNatives"))

include(implementation("org.lwjgl:lwjgl-shaderc:$lwjglVersion"))
include(runtimeOnly("org.lwjgl:lwjgl-shaderc:$lwjglVersion:$winNatives"))
include(runtimeOnly("org.lwjgl:lwjgl-shaderc:$lwjglVersion:$linuxNatives"))

//MacOS
// include(runtimeOnly("org.lwjgl:lwjgl-vulkan:$lwjglVersion:$macosNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-vulkan:$lwjglVersion:$macosArmNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-vma:$lwjglVersion:$macosNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-vma:$lwjglVersion:$macosArmNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-shaderc:$lwjglVersion:$macosNatives"))
// include(runtimeOnly("org.lwjgl:lwjgl-shaderc:$lwjglVersion:$macosArmNatives"))

// implementation("org.openjdk.jol:jol-core:0.17")
}

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.
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

loom {
accessWidenerPath = file("src/main/resources/vulkanmod.accesswidener")
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
16 changes: 16 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17

# Mod Properties
mod_version = 0.3.0_exp3
maven_group = net.vulkanmod
archives_base_name = VulkanMod_1.19.4

# Dependencies
fabric_version=0.76.0+1.19.4
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 75f2393

Please sign in to comment.