mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-14 17:24:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2f1dd1195 | ||
|
|
c70a3448e5 | ||
|
|
65c6f2b591 | ||
|
|
350c7ed1af | ||
|
|
8b07f1ff4f | ||
|
|
09b631faee | ||
|
|
d1d09c3bfb | ||
|
|
1189f1ccb2 |
No files matched your search
+90
-59
@@ -1,8 +1,8 @@
|
||||
//version: 1664372158
|
||||
//version: 1674409054
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates.
|
||||
Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/master/build.gradle for updates.
|
||||
*/
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ buildscript {
|
||||
url 'https://maven.minecraftforge.net'
|
||||
}
|
||||
maven {
|
||||
// GTNH ForgeGradle Fork
|
||||
// GTNH ForgeGradle and ASM Fork
|
||||
name = "GTNH Maven"
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
}
|
||||
@@ -45,7 +45,9 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.9'
|
||||
//Overwrite the current ASM version to fix shading newer than java 8 applicatations.
|
||||
classpath 'org.ow2.asm:asm-debug-all-custom:5.0.3'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.13'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
@@ -142,22 +144,27 @@ propertyDefaultIfUnset("modrinthProjectId", "")
|
||||
propertyDefaultIfUnset("modrinthRelations", "")
|
||||
propertyDefaultIfUnset("curseForgeProjectId", "")
|
||||
propertyDefaultIfUnset("curseForgeRelations", "")
|
||||
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
|
||||
|
||||
String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
String kotlinSourceDir = "src/main/kotlin/"
|
||||
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
|
||||
final String modGroupPath = modGroup.toString().replaceAll("\\.", "/")
|
||||
final String apiPackagePath = apiPackage.toString().replaceAll("\\.", "/")
|
||||
|
||||
String targetPackageJava = javaSourceDir + modGroupPath
|
||||
String targetPackageScala = scalaSourceDir + modGroupPath
|
||||
String targetPackageKotlin = kotlinSourceDir + modGroupPath
|
||||
if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
|
||||
if (apiPackage) {
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageJava = javaSourceDir + modGroupPath + "/" + apiPackagePath
|
||||
targetPackageScala = scalaSourceDir + modGroupPath + "/" + apiPackagePath
|
||||
targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + apiPackagePath
|
||||
if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
@@ -171,31 +178,36 @@ if (accessTransformersFile) {
|
||||
}
|
||||
|
||||
if (usesMixins.toBoolean()) {
|
||||
if (mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) {
|
||||
throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!")
|
||||
if (mixinsPackage.isEmpty()) {
|
||||
throw new GradleException("\"usesMixins\" requires \"mixinsPackage\" to be set!")
|
||||
}
|
||||
final String mixinPackagePath = mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
final String mixinPluginPath = mixinPlugin.toString().replaceAll("\\.", "/")
|
||||
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageJava = javaSourceDir + modGroupPath + "/" + mixinPackagePath
|
||||
targetPackageScala = scalaSourceDir + modGroupPath + "/" + mixinPackagePath
|
||||
targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPackagePath
|
||||
if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
|
||||
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".kt"
|
||||
if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
|
||||
if (!mixinPlugin.isEmpty()) {
|
||||
String targetFileJava = javaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPluginPath + ".kt"
|
||||
if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (coreModClass) {
|
||||
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".kt"
|
||||
final String coreModPath = coreModClass.toString().replaceAll("\\.", "/")
|
||||
String targetFileJava = javaSourceDir + modGroupPath + "/" + coreModPath + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroupPath + "/" + coreModPath + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + coreModPath + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + coreModPath + ".kt"
|
||||
if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
|
||||
}
|
||||
@@ -251,7 +263,7 @@ if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
|
||||
def arguments = []
|
||||
def jvmArguments = []
|
||||
|
||||
if (usesMixins.toBoolean() || forceEnableMixins) {
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
arguments += [
|
||||
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
|
||||
]
|
||||
@@ -269,7 +281,9 @@ minecraft {
|
||||
runDir = 'run'
|
||||
|
||||
if (replaceGradleTokenInFile) {
|
||||
replaceIn replaceGradleTokenInFile
|
||||
for (f in replaceGradleTokenInFile.split(',')) {
|
||||
replaceIn f
|
||||
}
|
||||
if (gradleTokenModId) {
|
||||
replace gradleTokenModId, modId
|
||||
}
|
||||
@@ -306,9 +320,13 @@ if (file('addon.gradle').exists()) {
|
||||
apply from: 'repositories.gradle'
|
||||
|
||||
configurations {
|
||||
implementation.extendsFrom(shadowImplementation) // TODO: remove after all uses are refactored
|
||||
implementation.extendsFrom(shadowCompile)
|
||||
implementation.extendsFrom(shadeCompile)
|
||||
// TODO: remove Compile after all uses are refactored to Implementation
|
||||
for (config in [shadowImplementation, shadowCompile, shadeCompile]) {
|
||||
compileClasspath.extendsFrom(config)
|
||||
runtimeClasspath.extendsFrom(config)
|
||||
testCompileClasspath.extendsFrom(config)
|
||||
testRuntimeClasspath.extendsFrom(config)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -316,13 +334,16 @@ repositories {
|
||||
name 'Overmind forge repo mirror'
|
||||
url 'https://gregtech.overminddl1.com/'
|
||||
}
|
||||
if (usesMixins.toBoolean() || forceEnableMixins) {
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
maven {
|
||||
name 'sponge'
|
||||
url 'https://repo.spongepowered.org/repository/maven-public'
|
||||
name = "GTNH Maven"
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
}
|
||||
maven {
|
||||
url 'https://jitpack.io'
|
||||
if (usesMixinDebug.toBoolean()) {
|
||||
maven {
|
||||
name = "Fabric Maven"
|
||||
url = "https://maven.fabricmc.net/"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,19 +353,14 @@ dependencies {
|
||||
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
|
||||
annotationProcessor('com.google.guava:guava:24.1.1-jre')
|
||||
annotationProcessor('com.google.code.gson:gson:2.8.6')
|
||||
annotationProcessor('org.spongepowered:mixin:0.8-SNAPSHOT')
|
||||
}
|
||||
if (usesMixins.toBoolean() || forceEnableMixins) {
|
||||
// using 0.8 to workaround a issue in 0.7 which fails mixin application
|
||||
compile('com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH') {
|
||||
// Mixin includes a lot of dependencies that are too up-to-date
|
||||
exclude module: 'launchwrapper'
|
||||
exclude module: 'guava'
|
||||
exclude module: 'gson'
|
||||
exclude module: 'commons-io'
|
||||
exclude module: 'log4j-core'
|
||||
annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.3:processor')
|
||||
if (usesMixinDebug.toBoolean()) {
|
||||
runtimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
|
||||
testRuntimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
|
||||
}
|
||||
compile('com.github.GTNewHorizons:SpongeMixins:1.5.0')
|
||||
}
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
compile('com.gtnewhorizon:gtnhmixins:2.1.3')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,13 +372,18 @@ def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
|
||||
|
||||
task generateAssets {
|
||||
if (usesMixins.toBoolean()) {
|
||||
def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json");
|
||||
def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json")
|
||||
if (!mixinConfigFile.exists()) {
|
||||
def mixinPluginLine = ""
|
||||
if(!mixinPlugin.isEmpty()) {
|
||||
// We might not have a mixin plugin if we're using early/late mixins
|
||||
mixinPluginLine += """\n "plugin": "${modGroup}.${mixinPlugin}", """
|
||||
}
|
||||
|
||||
mixinConfigFile.text = """{
|
||||
"required": true,
|
||||
"minVersion": "0.7.11",
|
||||
"package": "${modGroup}.${mixinsPackage}",
|
||||
"plugin": "${modGroup}.${mixinPlugin}",
|
||||
"minVersion": "0.8.5-GTNH",
|
||||
"package": "${modGroup}.${mixinsPackage}",${mixinPluginLine}
|
||||
"refmap": "${mixingConfigRefMap}",
|
||||
"target": "@env(DEFAULT)",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
@@ -391,7 +412,9 @@ shadowJar {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
if (minimizeShadowedDependencies.toBoolean()) {
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
}
|
||||
configurations = [
|
||||
project.configurations.shadowImplementation,
|
||||
project.configurations.shadowCompile
|
||||
@@ -534,7 +557,9 @@ task shadowDevJar(type: ShadowJar) {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
if (minimizeShadowedDependencies.toBoolean()) {
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
}
|
||||
configurations = [
|
||||
project.configurations.shadowImplementation,
|
||||
project.configurations.shadowCompile
|
||||
@@ -574,11 +599,11 @@ task devJar(type: Jar) {
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from(sourceSets.main.allSource) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
include modGroupPath + "/" + apiPackagePath + '/**'
|
||||
}
|
||||
|
||||
from(sourceSets.main.output) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
include modGroupPath + "/" + apiPackagePath + '/**'
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
@@ -662,10 +687,10 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
if (modrinthProjectId.size() != 0) {
|
||||
if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) {
|
||||
apply plugin: 'com.modrinth.minotaur'
|
||||
|
||||
File changelogFile = new File("CHANGELOG.md")
|
||||
File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md")
|
||||
|
||||
modrinth {
|
||||
token = System.getenv("MODRINTH_TOKEN")
|
||||
@@ -691,14 +716,17 @@ if (modrinthProjectId.size() != 0) {
|
||||
addModrinthDep(qual[0], qual[1], parts[1])
|
||||
}
|
||||
}
|
||||
if (usesMixins.toBoolean()) {
|
||||
addModrinthDep("required", "project", "gtnhmixins")
|
||||
}
|
||||
tasks.modrinth.dependsOn(build)
|
||||
tasks.publish.dependsOn(tasks.modrinth)
|
||||
}
|
||||
|
||||
if (curseForgeProjectId.size() != 0) {
|
||||
if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null) {
|
||||
apply plugin: 'com.matthewprenger.cursegradle'
|
||||
|
||||
File changelogFile = new File("CHANGELOG.md")
|
||||
File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md")
|
||||
|
||||
curseforge {
|
||||
apiKey = System.getenv("CURSEFORGE_TOKEN")
|
||||
@@ -732,6 +760,9 @@ if (curseForgeProjectId.size() != 0) {
|
||||
addCurseForgeRelation(parts[0], parts[1])
|
||||
}
|
||||
}
|
||||
if (usesMixins.toBoolean()) {
|
||||
addCurseForgeRelation("requiredDependency", "gtnhmixins")
|
||||
}
|
||||
tasks.curseforge.dependsOn(build)
|
||||
tasks.publish.dependsOn(tasks.curseforge)
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,11 +1,12 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile('com.github.GTNewHorizons:ForestryMC:4.4.6:dev')
|
||||
compile('com.github.GTNewHorizons:NotEnoughItems:2.2.17-GTNH:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.0.10:dev')
|
||||
compile('com.github.GTNewHorizons:ForestryMC:4.5.6:dev')
|
||||
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.21-GTNH:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.27:api')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.28:api')
|
||||
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly('curse.maven:cofh-lib-220333:2388748')
|
||||
}
|
||||
}
|
||||
+53
-1
@@ -15,6 +15,13 @@ autoUpdateBuildScript = false
|
||||
minecraftVersion = 1.7.10
|
||||
forgeVersion = 10.13.4.1614
|
||||
|
||||
# Specify a MCP channel and mappings version for dependency deobfuscation and the deobfParams task.
|
||||
channel = stable
|
||||
mappingsVersion = 12
|
||||
|
||||
# Define other MCP mappings for dependency deobfuscation
|
||||
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||
|
||||
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
|
||||
# restart Minecraft in development. Choose this dependent on your mod:
|
||||
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
|
||||
@@ -43,6 +50,8 @@ accessTransformersFile =
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
# Adds some debug arguments like verbose output and export
|
||||
usesMixinDebug = false
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
@@ -55,10 +64,53 @@ coreModClass =
|
||||
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||
containsMixinsAndOrCoreModOnly = false
|
||||
|
||||
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
|
||||
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
|
||||
forceEnableMixins = false
|
||||
|
||||
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
|
||||
# responsibility check the licence and request permission for distribution, if required.
|
||||
usesShadowedDependencies = false
|
||||
|
||||
|
||||
# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
|
||||
|
||||
# The project's ID on Modrinth. Can be either the slug or the ID.
|
||||
# Leave this empty if you don't want to publish on Modrinth.
|
||||
modrinthProjectId =
|
||||
|
||||
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
|
||||
# Syntax: scope1-type1:name1;scope2-type2:name2;...
|
||||
# Where scope can be one of [required, optional, incompatible, embedded],
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
modrinthRelations =
|
||||
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
|
||||
# The project's numeric ID on CurseForge. You can find this in the About Project box.
|
||||
# Leave this empty if you don't want to publish on CurseForge.
|
||||
curseForgeProjectId =
|
||||
|
||||
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||
# Syntax: type1:name1;type2:name2;...
|
||||
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
|
||||
# and the name is the CurseForge project slug of the other mod.
|
||||
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
curseForgeRelations =
|
||||
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
|
||||
# projects. New projects should not use this parameter.
|
||||
customArchiveBaseName = binnie-mods
|
||||
|
||||
# Optional parameter to prevent the source code from being published
|
||||
# noPublishedSources =
|
||||
|
||||
# Uncomment this to disable spotless checks
|
||||
# This should only be uncommented to keep it easier to sync with upstream/other forks.
|
||||
# That is, if there is no other active fork/upstream, NEVER change this.
|
||||
# disableSpotless = true
|
||||
@@ -51,7 +51,7 @@ import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
name = "Binnie Core",
|
||||
version = BinnieCore.VERSION,
|
||||
useMetadata = true,
|
||||
dependencies = "after:Forestry@[4.2,)")
|
||||
dependencies = "after:Forestry@[4.2,),required-after:gtnhlib@[0.0.10,)")
|
||||
public class BinnieCore extends AbstractMod {
|
||||
@Mod.Instance("BinnieCore")
|
||||
public static BinnieCore instance;
|
||||
|
||||
@@ -80,7 +80,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
public void loadUsageRecipes(FluidStack ingredient) {}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe guiRecipe, List<String> currenttip, int recipe) {
|
||||
public List<String> handleTooltip(GuiRecipe<?> guiRecipe, List<String> currenttip, int recipe) {
|
||||
super.handleTooltip(guiRecipe, currenttip, recipe);
|
||||
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
|
||||
if (GuiContainerManager.shouldShowTooltip(guiRecipe)) {
|
||||
@@ -98,7 +98,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
public List<String> provideTooltip(
|
||||
GuiRecipe guiRecipe, List<String> currenttip, CachedBaseRecipe crecipe, Point relMouse) {
|
||||
GuiRecipe<?> guiRecipe, List<String> currenttip, CachedBaseRecipe crecipe, Point relMouse) {
|
||||
if (crecipe.getFluidTanks() != null) {
|
||||
for (PositionedFluidTank tank : crecipe.getFluidTanks()) {
|
||||
if (tank.position.contains(relMouse)) {
|
||||
@@ -111,7 +111,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public List<String> handleItemTooltip(
|
||||
GuiRecipe guiRecipe, ItemStack itemStack, List<String> currenttip, int recipe) {
|
||||
GuiRecipe<?> guiRecipe, ItemStack itemStack, List<String> currenttip, int recipe) {
|
||||
super.handleItemTooltip(guiRecipe, itemStack, currenttip, recipe);
|
||||
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
|
||||
Point mouse = GuiDraw.getMousePosition();
|
||||
@@ -125,7 +125,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
public List<String> provideItemTooltip(
|
||||
GuiRecipe guiRecipe,
|
||||
GuiRecipe<?> guiRecipe,
|
||||
ItemStack itemStack,
|
||||
List<String> currenttip,
|
||||
CachedBaseRecipe crecipe,
|
||||
@@ -151,7 +151,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe) {
|
||||
public boolean keyTyped(GuiRecipe<?> gui, char keyChar, int keyCode, int recipe) {
|
||||
if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe")) {
|
||||
if (this.transferFluidTank(gui, recipe, false)) {
|
||||
return true;
|
||||
@@ -165,7 +165,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseClicked(GuiRecipe gui, int button, int recipe) {
|
||||
public boolean mouseClicked(GuiRecipe<?> gui, int button, int recipe) {
|
||||
if (button == 0) {
|
||||
if (this.transferFluidTank(gui, recipe, false)) {
|
||||
return true;
|
||||
@@ -178,7 +178,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
return super.mouseClicked(gui, button, recipe);
|
||||
}
|
||||
|
||||
protected boolean transferFluidTank(GuiRecipe guiRecipe, int recipe, boolean usage) {
|
||||
protected boolean transferFluidTank(GuiRecipe<?> guiRecipe, int recipe, boolean usage) {
|
||||
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
|
||||
|
||||
if (crecipe.getFluidTanks() != null) {
|
||||
|
||||
@@ -1686,11 +1686,14 @@ public enum ExtraBeeDefinition implements IBeeDefinition {
|
||||
"BlueWeabo",
|
||||
"Lewis_Saber",
|
||||
"True_Aurastorm",
|
||||
"minecraft7771",
|
||||
"mitchej123",
|
||||
"minecraft7771",
|
||||
"_Timbo",
|
||||
"kuba6000",
|
||||
"DreamMasterXXL"));
|
||||
"Alrightsc",
|
||||
"YeetYeetDatBoi",
|
||||
"DreamMasterXXL",
|
||||
"Colen"));
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package binnie.extratrees;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import forestry.api.arboriculture.EnumWoodType;
|
||||
import forestry.arboriculture.tiles.TileWood;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -14,9 +14,21 @@ import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.WorldSettings.GameType;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import sun.reflect.ReflectionFactory;
|
||||
import sun.misc.Unsafe;
|
||||
|
||||
public class FakeWorld extends World {
|
||||
private static Unsafe unsafe;
|
||||
|
||||
static {
|
||||
try {
|
||||
Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
|
||||
theUnsafe.setAccessible(true);
|
||||
unsafe = (Unsafe) theUnsafe.get(null);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static FakeWorld instance = SilentObjectCreator.create(FakeWorld.class);
|
||||
|
||||
protected Block block;
|
||||
@@ -106,22 +118,10 @@ public class FakeWorld extends World {
|
||||
* Creating objects without calling constructors.
|
||||
*/
|
||||
public static <T> T create(Class<T> clazz) {
|
||||
return create(clazz, Object.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creating objects without calling constructors.
|
||||
*/
|
||||
public static <T> T create(Class<T> clazz, Class<? super T> parent) {
|
||||
try {
|
||||
ReflectionFactory rf = ReflectionFactory.getReflectionFactory();
|
||||
Constructor objDef = parent.getDeclaredConstructor();
|
||||
Constructor intConstr = rf.newConstructorForSerialization(clazz, objDef);
|
||||
return clazz.cast(intConstr.newInstance());
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new IllegalStateException("Cannot create object", e);
|
||||
return clazz.cast(unsafe.allocateInstance(clazz));
|
||||
} catch (InstantiationException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.FruitPod;
|
||||
import binnie.extratrees.config.ConfigurationMain;
|
||||
import binnie.extratrees.item.Food;
|
||||
import com.gtnewhorizon.gtnhlib.reflect.Fields;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
@@ -18,7 +19,6 @@ import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.arboriculture.FruitProviderNone;
|
||||
import forestry.arboriculture.genetics.alleles.AlleleTreeSpecies;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -254,12 +254,9 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
try {
|
||||
IAlleleFruit lemon = (IAlleleFruit) AlleleManager.alleleRegistry.getAllele("forestry.fruitLemon");
|
||||
FruitProviderNone prov = (FruitProviderNone) lemon.getProvider();
|
||||
Field f = FruitProviderNone.class.getDeclaredField("family");
|
||||
Field modifiersField = Field.class.getDeclaredField("modifiers");
|
||||
f.setAccessible(true);
|
||||
modifiersField.setAccessible(true);
|
||||
modifiersField.setInt(f, f.getModifiers() & 0xFFFFFFEF);
|
||||
f.set(prov, familyCitrus);
|
||||
Fields.ofClass(FruitProviderNone.class)
|
||||
.getField(Fields.LookupType.DECLARED, "family", IFruitFamily.class)
|
||||
.setValue(prov, familyCitrus);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
|
||||
"logoFile": "/assets/binniecore/logo.png",
|
||||
"parent": "",
|
||||
"requiredMods": [ "Forestry" ],
|
||||
"dependencies": [ "Forestry" ],
|
||||
"requiredMods": [ "Forestry", "gtnhlib@[0.0.10,)" ],
|
||||
"dependencies": [ "Forestry", "gtnhlib@[0.0.10,)" ],
|
||||
"dependants" : [ ],
|
||||
"useDependencyInformation" : true
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
"authorList": [ "Binnie" ],
|
||||
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
|
||||
"logoFile": "/assets/extrabees/logo.png",
|
||||
"parent": "",
|
||||
"parent": "${modId}",
|
||||
"dependencies": [ "BinnieCore" ]
|
||||
},
|
||||
{
|
||||
@@ -41,7 +41,7 @@
|
||||
"authorList": [ "Binnie" ],
|
||||
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
|
||||
"logoFile": "/assets/extratrees/logo.png",
|
||||
"parent": "",
|
||||
"parent": "${modId}",
|
||||
"dependencies": [ "BinnieCore" ]
|
||||
},
|
||||
{
|
||||
@@ -55,7 +55,7 @@
|
||||
"authorList": [ "Binnie" ],
|
||||
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
|
||||
"logoFile": "/assets/botany/logo.png",
|
||||
"parent": "",
|
||||
"parent": "${modId}",
|
||||
"dependencies": [ "BinnieCore" ]
|
||||
},
|
||||
{
|
||||
@@ -69,7 +69,7 @@
|
||||
"authorList": [ "Binnie" ],
|
||||
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
|
||||
"logoFile": "/assets/genetics/logo.png",
|
||||
"parent": "",
|
||||
"parent": "${modId}",
|
||||
"dependencies": [ "BinnieCore" ]
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user