Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified CF-logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 35 additions & 61 deletions build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import org.w3c.dom.Element
String property(String name) {
return project.getProperty(name)
}

buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://maven.parchmentmc.org' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.parchmentmc:librarian:1.+'
}
}

Expand All @@ -22,33 +26,31 @@ repositories {
url "https://www.cursemaven.com"
}
maven {
url "http://harleyoconnor.com/maven"
url "https://harleyoconnor.com/maven"
}
flatDir {
dirs("libs")
}
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven-publish'

ext.configFile = file "gradle.properties"
configFile.withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
String modName = property("modName")
String modVersion = property("modVersion")
String mcVersion = property("mcVersion")

version = "${config.mc_version}-${config.mod_version}"
group = config.package_group
archivesBaseName = config.mod_name
version = "${mcVersion}-${modVersion}"
group = property("group")
archivesBaseName = modName

java.toolchain.languageVersion = JavaLanguageVersion.of(8)

minecraft {
mappings channel: 'official', version: config.mc_version
mappings channel: 'parchment', version: "${property("mappingsVersion")}-${mcVersion}"

runs {
client {
Expand Down Expand Up @@ -90,7 +92,11 @@ minecraft {
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"

args '--mod', 'dtbop', '--all', '--output', file('src/generated/resources/')
args '--mod',
'dtbop',
'--all',
'--output', file('src/generated/resources/'),
'--existing', file('src/main/resources')

mods {
dtbop {
Expand All @@ -101,32 +107,28 @@ minecraft {
}
}

sourceSets.main.resources {
srcDir("src/generated/resources")
}

dependencies {
// Not sure if we need this one, what is a "forge" anyway?
minecraft "net.minecraftforge:forge:${config.mc_version}-${config.forge_version}"
minecraft "net.minecraftforge:forge:${mcVersion}-${forgeVersion}"

// Compile Hwyla API, but don't include in runtime.
compileOnly fg.deobf("mcp.mobius.waila:Hwyla:${config.hwyla_version}:api")
// At runtime, use the full Hwyla mod.
runtimeOnly fg.deobf("mcp.mobius.waila:Hwyla:${config.hwyla_version}")
// Temp as TehNut Maven is down.
implementation(fg.deobf("curse.maven:hwyla-253449:3033593"))
// compileOnly fg.deobf("mcp.mobius.waila:Hwyla:${property("hwylaVersion")}:api")
// runtimeOnly fg.deobf("mcp.mobius.waila:Hwyla:${property("hwylaVersion")}")

// Compile JEI API, but don't include in runtime.
compileOnly fg.deobf("mezz.jei:jei-1.16.5:${config.jei_version}:api")
// At runtime, use the full JEI mod.
runtimeOnly fg.deobf("mezz.jei:jei-1.16.5:${config.jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${mcVersion}:${property("jeiVersion")}:api")
runtimeOnly fg.deobf("mezz.jei:jei-${mcVersion}:${property("jeiVersion")}")

// Compile Dynamic Trees, of course.
implementation fg.deobf("com.ferreusveritas.dynamictrees:DynamicTrees-${config.mc_version}:${config.dynamic_trees_version}")
//implementation fg.deobf("blank:DynamicTrees-1.16.5:0.10.0-Beta17")
// Compile Dynamic Trees Plus
runtimeOnly fg.deobf("com.ferreusveritas.dynamictreesplus:DynamicTreesPlus-${config.mc_version}:${config.dynamic_trees_plus_version}")
implementation fg.deobf("com.ferreusveritas.dynamictrees:DynamicTrees-${mcVersion}:${property("dynamicTreesVersion")}")
runtimeOnly fg.deobf("com.ferreusveritas.dynamictreesplus:DynamicTreesPlus-${mcVersion}:${property("dynamicTreesPlusVersion")}")

implementation fg.deobf("curse.maven:biomes-o-plenty-220318:3544153")
implementation fg.deobf("curse.maven:biomes-o-plenty-220318:3913914")

runtimeOnly fg.deobf("curse.maven:cc-tweaked-282001:3236650")

// At runtime, use suggestion provider fix mod.
runtimeOnly fg.deobf("com.harleyoconnor.suggestionproviderfix:SuggestionProviderFix:${config.mc_version}-${config.suggestion_provider_fix_version}")
runtimeOnly fg.deobf("com.harleyoconnor.suggestionproviderfix:SuggestionProviderFix:${mcVersion}-${property("suggestionProviderFixVersion")}")
}

jar {
Expand Down Expand Up @@ -157,35 +159,7 @@ java {
publishing {
publications {
mavenJava(MavenPublication) {
setArtifactId("${config.mod_name}-${config.mc_version}")
setVersion(config.mod_version)

from components.java

pom {
url = "https://github.com/supermassimo/${config.mod_name}"
licenses {
license {
name = 'MIT'
url = 'https://mit-license.org'
}
}
scm {
connection = "scm:git:git://github.com/supermassimo/${config.mod_name}.git"
developerConnection = "scm:git:ssh://github.com/supermassimo/${config.mod_name}.git"
url = "https://github.com/supermassimo/${config.mod_name}"
}
}

pom.withXml { xmlProvider ->
final Element element = xmlProvider.asElement();

// Clear dependencies.
element.getChildNodes().each { node ->
if (node.getNodeName() == "dependencies")
element.removeChild(node)
}
}
}
}
repositories {
Expand Down
22 changes: 12 additions & 10 deletions gradle.properties
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
mod_name=DynamicTreesBOP
mod_version=2.0.8
package_group=therealeststu.dtbop
modName=DynamicTreesBOP
modId=dtbop
modVersion=2.0.8
group=therealeststu.dtbop

mc_version=1.16.5
forge_version=36.2.22
mcVersion=1.16.5
forgeVersion=36.2.34
mappingsVersion=2022.03.06

dynamic_trees_version=0.10.0-Beta27-Pre5
dynamic_trees_plus_version=0.1.0-Beta11
hwyla_version=1.10.11-B78_1.16.2
jei_version=7.7.1.139
suggestion_provider_fix_version=1.0.0
dynamicTreesVersion=0.10.0-Beta-LR12
dynamicTreesPlusVersion=0.1.0-Beta-LR1
hwylaVersion=1.10.11-B78_1.16.2
jeiVersion=7.7.1.139
suggestionProviderFixVersion=1.0.0

org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
Empty file modified gradlew.bat
100644 → 100755
Empty file.
Empty file modified logs/debug.log
100644 → 100755
Empty file.
Empty file modified logs/latest.log
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:alternative",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"item": "minecraft:shears"
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
]
}
],
"name": "minecraft:acacia_leaves"
},
{
"type": "dynamictrees:seed_item",
"conditions": [
{
"condition": "minecraft:survives_explosion"
},
{
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune",
"chances": [
0.015625,
0.03125,
0.046875,
0.0625
]
},
{
"condition": "dynamictrees:seasonal_seed_drop_chance"
}
]
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune",
"chances": [
0.02,
0.022222223,
0.025,
0.033333335,
0.1
]
}
],
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 2.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "minecraft:stick"
}
],
"conditions": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:alternative",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"item": "minecraft:shears"
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
]
}
}
]
}
]
}
Loading