Skip to content

Commit

Permalink
- TFC+ Port
Browse files Browse the repository at this point in the history
- Minor refactoring
- Removed leftover CarpentersBlock code bits
  • Loading branch information
nuckable committed Jan 29, 2021
1 parent eb9f855 commit 0573fe5
Show file tree
Hide file tree
Showing 27 changed files with 111 additions and 1,410 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
build
libs
TFC-Additions.iml
TFC-Additions.ipr
TFC-Additions.iws
*.iml
*.ipr
*.iws
.gradle
run
out
eclipse
1 change: 0 additions & 1 deletion Setup.bat

This file was deleted.

1 change: 0 additions & 1 deletion build.bat

This file was deleted.

154 changes: 59 additions & 95 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
buildscript {
repositories {
mavenCentral()
maven {
name = "Minecraft Forge"
url = "https://repo1.maven.org/maven2/"
}
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
Expand All @@ -15,122 +17,84 @@ buildscript {
}
}

// define the properties file
ext.configFile = file "build.prop"

configFile.withReader {
// read config. it shall from now on be referenced as simply config or as project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
apply plugin: 'forge'

allprojects {
apply plugin: 'java'
apply plugin: 'forge'
apply plugin: 'maven'
group = config.group_name
version = config.mod_version_maj + "." + config.mod_version_min + "." + config.mod_version_rev
archivesBaseName = "[${config.minecraft_version}]${config.mod_id}"
version = "1.0.5"
group= "org.rbh.tfcadditions"
archivesBaseName = "[1.7.10]TFC-Additions"

minecraft {
version = config.minecraft_version + "-" + config.forge_version

replaceIn "Reference/Reference.java"
replace "@MOD_VERSION@", config.mod_version_maj + "." + config.mod_version_min + "." + config.mod_version_rev

if(file('../run').exists()){
runDir = "../run"
} else {
runDir = ""
}
}

configurations {
shade
compile.extendsFrom shade
compile.extendsFrom exportedCompile
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}

repositories {
maven { // The repo from which to get waila
maven {
// The repo from which to get waila
name "Mobius Repo"
url "http://mobiusstrip.eu/maven"
}
maven { // the repo from which to get NEI and stuff
maven {
// the repo from which to get NEI and stuff
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
maven {
name 'Chisel Repo'
url "http://maven.tterrag.com/"
}
}

dependencies {
// Forcing version numbers for everything and using NO-NEI WAILA since the "transitive dependency resolution (gradle magic)" is currently borked.
compile "codechicken:CodeChickenCore:1.7.10-1.0.4.35:dev"
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.127:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.4.95:dev"
compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10"
shade ("team.chisel.ctmlib:CTMLib:${config.ctmlib_version}") {
transitive = false}
}
}

sourceSets {
main {
java {
srcDirs = [ 'src/main/java' ]
exclude '**/resources/'
}
resources {
srcDirs = [ 'src/main/resources' ]
exclude '**/java'
}
}
}

//Creates a compiled de-obfuscated jar
task deobfJar(type: Jar) {
from sourceSets.main.output
appendix = 'deobf'
}
//creates a jar containing only the src
task sourceJar(type: Jar) {
from sourceSets.main.allSource
appendix = 'src'
dependencies {
// Forcing version numbers for everything and using NO-NEI WAILA since the "transitive dependency resolution (gradle magic)" is currently borked.
compile "codechicken:CodeChickenCore:1.7.10-1.0.4.35:dev"
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.127:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.4.95:dev"
compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10"
//compile fileTree(dir:'libs',include:'*.jar')
}

tasks.build.dependsOn('sourceJar', 'deobfJar')

processResources {
//First we just copy in the mcmod.info file
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
include '**/*.prop'
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replaces
expand ([
'mod_version': version,
'minecraft_version': project.config.minecraft_version,
])
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats we didnt do before

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
exclude '**/*.prop'
exclude 'mcmod.info'
}
}

jar {
configurations.shade.each { dep ->
from(project.zipTree(dep)){
exclude 'META-INF', 'META-INF/**', '*.info'
}
tasks.build.dependsOn('sourcesJar', 'deobfJar')

task sourcesJar(type: Jar) {
from "LICENSE.txt"
from sourceSets.main.allSource
classifier = 'src'
appendix = project.minecraft.version
}

task deobfJar(type: Jar) {
from "LICENSE.txt"
from sourceSets.main.output
from (sourceSets.main.allSource.srcDirs) {
include '**/*.java'
}
classifier = 'deobf'
appendix = project.minecraft.version
}

task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
jar {
from "LICENSE.txt"
appendix = project.minecraft.version
}

artifacts {
archives jar
archives sourcesJar
archives deobfJar
}
9 changes: 0 additions & 9 deletions build.prop

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 08 11:23:24 PST 2014
#Tue Dec 09 22:00:00 GMT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
6 changes: 3 additions & 3 deletions src/main/java/org/rbh/tfcadditions/Blocks/BlockChisel.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.rbh.tfcadditions.Blocks;

import com.bioxx.tfc.Blocks.BlockTerra;
import com.bioxx.tfc.Items.Tools.ItemHammer;
import com.bioxx.tfc.api.Tools.IToolChisel;
import com.dunk.tfc.Blocks.BlockTerra;
import com.dunk.tfc.Items.Tools.ItemHammer;
import com.dunk.tfc.api.Tools.IToolChisel;
import team.chisel.ctmlib.ICTMBlock;
import team.chisel.ctmlib.ISubmapManager;
import cpw.mods.fml.relauncher.Side;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/rbh/tfcadditions/Blocks/BlockPlanks.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.rbh.tfcadditions.Blocks;

import com.bioxx.tfc.Blocks.BlockTerra;
import com.bioxx.tfc.Items.Tools.ItemHammer;
import com.bioxx.tfc.api.Tools.IToolChisel;
import com.dunk.tfc.Blocks.BlockTerra;
import com.dunk.tfc.Items.Tools.ItemHammer;
import com.dunk.tfc.api.Tools.IToolChisel;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
Expand Down
Loading

0 comments on commit 0573fe5

Please sign in to comment.