Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PhiProven committed Nov 17, 2020
0 parents commit 4cd92c9
Show file tree
Hide file tree
Showing 16 changed files with 585 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# gradle

.gradle/
build/
out/
classes/
logs/

# eclipse

*.launch

# idea

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

# vscode

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

# fabric

run/
21 changes: 21 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[submodule "mc-fix_mc-197524"]
path = dependencies/mc-fix_mc-197524
url = https://github.com/PhiPro95/mc-fixes.git
branch = mc-197524
[submodule "mc-fix_mc-196542"]
path = dependencies/mc-fix_mc-196542
url = https://github.com/PhiPro95/mc-fixes.git
branch = mc-196542
[submodule "mc-fix_mc-170012"]
path = dependencies/mc-fix_mc-170012
url = https://github.com/PhiPro95/mc-fixes.git
branch = mc-170012
[submodule "mc-fix_mc-170010"]
path = dependencies/mc-fix_mc-170010
url = https://github.com/PhiPro95/mc-fixes.git
branch = mc-170010
[submodule "mc-fix_mc-196725"]
path = dependencies/mc-fix_mc-196725
url = https://github.com/PhiPro95/mc-fixes.git
branch = mc-196725_vanilla-compat

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Philipp Provenzano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
128 changes: 128 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
plugins {
id 'fabric-loom'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

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

dependencies {
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modRuntime 'ocd:mc-fix_mc-197524'
include 'ocd:mc-fix_mc-197524'

modRuntime 'ocd:mc-fix_mc-196542'
include 'ocd:mc-fix_mc-196542'

modRuntime 'ocd:mc-fix_mc-170012'
include 'ocd:mc-fix_mc-170012'

modRuntime 'ocd:mc-fix_mc-170010'
include 'ocd:mc-fix_mc-170010'

modRuntime 'ocd:mc-fix_mc-196725'
include 'ocd:mc-fix_mc-196725'
}

task setup {
}

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

from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
}

from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}

def modOutConf(Configuration conf, ConfigurationContainer confContainer = configurations)
{
return confContainer.create("mod${conf.name.capitalize()}") {
attributes {
conf.attributes.keySet().each { a -> attribute(a, conf.attributes.getAttribute(a)) }
}

canBeConsumed = true
canBeResolved = false

conf.canBeConsumed = false
}
}

def copyDependencies(Configuration src, Configuration dst) {
dst.dependencies.addAll src.dependencies
dst.dependencyConstraints.addAll src.dependencyConstraints

src.excludeRules.each {
dst.exclude([group: it.group, module: it.module])
}
}

configurations {
modOutConf(apiElements)
modOutConf(runtimeElements)

modApiElements {
extendsFrom modApi
}

modRuntimeElements {
extendsFrom modApi, modImplementation, modCompile, modRuntime
}

copyDependencies(implementation, modRuntimeElements)
copyDependencies(compile, modRuntimeElements)
copyDependencies(runtime, modRuntimeElements)
copyDependencies(runtimeOnly, modRuntimeElements)
}

artifacts {
modApiElements remapJar
modRuntimeElements remapJar
}

configurations {
modApiElements.outgoing.variants {
sources {
artifact(tasks.sourcesJar.archiveFile.get()) {
builtBy remapSourcesJar
}

attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category, Category.DOCUMENTATION))
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, DocsType.SOURCES))
}
}
}
}

jar {
from "LICENSE"
}
1 change: 1 addition & 0 deletions dependencies/mc-fix_mc-170010
Submodule mc-fix_mc-170010 added at bf07d3
1 change: 1 addition & 0 deletions dependencies/mc-fix_mc-170012
Submodule mc-fix_mc-170012 added at c45b3c
1 change: 1 addition & 0 deletions dependencies/mc-fix_mc-196542
Submodule mc-fix_mc-196542 added at d29412
1 change: 1 addition & 0 deletions dependencies/mc-fix_mc-196725
Submodule mc-fix_mc-196725 added at e90c20
1 change: 1 addition & 0 deletions dependencies/mc-fix_mc-197524
Submodule mc-fix_mc-197524 added at 6bc30d
14 changes: 14 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version = 1.16.2
yarn_mappings = 1.16.2+build.19
loader_version = 0.10.8
loom_version = 0.5-SNAPSHOT

# Mod Properties
mod_version = 1.0.0
maven_group = ocd
archives_base_name = mc-fix_lighting-fixes
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-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 4cd92c9

Please sign in to comment.