Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed buildscript and made treasure status configurable #13

Open
wants to merge 3 commits into
base: 1.12
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 43 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,73 +1,76 @@
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
maven { url = "https://maven.minecraftforge.net" }
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:4.+'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'net.minecraftforge.gradle'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "2.3.4"
group = "atm.bloodworkxgaming.oeintegration" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "oeintegration"

sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
}
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

minecraft {
version = "1.12.2-14.23.4.2759"
runDir = "run"

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20180710"
mappings channel: 'snapshot', version: '20171003-1.12'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
runs {
client {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

repositories {
maven { // tic, jei
url "http://dvs1.progwml6.com/files/maven"
}
maven { // crt
url "http://maven.blamejared.com"
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
}

server {

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
}
}
}

dependencies {
// deobfCompile ('CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.0.+') {exclude group: 'org.ow2.asm'}
deobfCompile ('io.sommers:packmode:1.12.2-1.2.0-SNAPSHOT.8')
deobfCompile "mezz.jei:jei_1.12.2:4.9.1.175"
deobfCompile "slimeknights.mantle:Mantle:1.12-1.3.2.25"
deobfCompile ("slimeknights:TConstruct:1.12.2-2.9.1.70") {
exclude group: 'mezz.jei'
}
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2859"
implementation fg.deobf('io.sommers:packmode:1.12.2-1.2.0-SNAPSHOT.8')
implementation fg.deobf("mezz.jei:jei_1.12.2:4.9.1.175")
implementation fg.deobf("slimeknights.mantle:Mantle:1.12-1.3.2.25")
implementation fg.deobf("curse.maven:tconstruct-74072:2563033")
implementation fg.deobf("curse.maven:oreexcavation-250898:2897369")
}

processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.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
repositories {
maven { // tic, jei
url "http://dvs1.progwml6.com/files/maven"
}

// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
maven { // crt
url "http://maven.blamejared.com"
}
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
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-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.3-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ protected boolean canApplyTogether(Enchantment ench) {

@Override
public boolean isTreasureEnchantment() {
return true;
return MainConfig.isTreasureEnchantment;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public class MainConfig {
@Config.Comment("The max level of enchantment needed to full power of the tool.")
public static int maxEnchantmentLevel = 5;

@Config.Comment("true classifies the enchantment as a treasure enchantment")
public static boolean isTreasureEnchantment = true;

@Mod.EventBusSubscriber
static class ConfigurationHolder {
@SubscribeEvent
Expand Down