Skip to content

Commit

Permalink
Added support for Fishing Rods refill (fixes #216)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackd committed Oct 14, 2022
1 parent e0e2ce3 commit ded63e7
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ allprojects {
version = versionObj.toString()
group = "org.anti-ad.mc"
ext.set("mod_artefact_version", versionObj.toCleanString())
ext.set("libIPN_version", "1.0.0")
ext.set("libIPN_version", "1.0.2")

tasks.withType<JavaCompile>().configureEach {
options.isFork = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ fun Project.fabricCommonDependency(minecraft_version: Any,
}

libIPN_version?.let {
"modApi"("org.anti_ad.mc:libIPN-$libIPN_version")?.let {
//"include"(it)
}
"modApi"("org.anti_ad.mc:libIPN-$libIPN_version")
}

"modRuntimeOnly"("net.fabricmc:fabric-language-kotlin:1.8.2+kotlin.1.7.10")
Expand Down
2 changes: 1 addition & 1 deletion libIPN
Submodule libIPN updated 351 files
1 change: 1 addition & 0 deletions platforms/fabric-1.14/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}

repositories {
Expand Down
1 change: 1 addition & 0 deletions platforms/fabric-1.15/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}

repositories {
Expand Down
2 changes: 2 additions & 0 deletions platforms/fabric-1.16/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}

repositories {
Expand All @@ -104,6 +105,7 @@ fabricCommonDependency(minecraft_version,
libIPN_version = libIPN_version)

dependencies {
modRuntimeOnly("curse.maven:carpet-349239:3388185")
}

tasks.named("compileKotlin") {
Expand Down
1 change: 1 addition & 0 deletions platforms/fabric-1.17/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "16"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}

repositories {
Expand Down
1 change: 1 addition & 0 deletions platforms/fabric-1.18.2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}

repositories {
Expand Down
1 change: 1 addition & 0 deletions platforms/fabric-1.18/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}

repositories {
Expand Down
8 changes: 7 additions & 1 deletion platforms/fabric-1.19/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}

repositories {

maven {
name = "Ladysnake Libs"
url = uri("https://ladysnake.jfrog.io/artifactory/mods")
}
}

fabricCommonDependency(minecraft_version,
Expand All @@ -106,6 +110,8 @@ fabricCommonDependency(minecraft_version,
libIPN_version = libIPN_version)

dependencies {
//modRuntimeOnly("dev.emi:trinkets:3.4.0")
//modRuntimeOnly("curse.maven:scout-631922:3947029")
}

tasks.named("compileKotlin") {
Expand Down
1 change: 1 addition & 0 deletions platforms/forge-1.14/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}


Expand Down
1 change: 1 addition & 0 deletions platforms/forge-1.15/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}


Expand Down
4 changes: 3 additions & 1 deletion platforms/forge-1.16/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}


Expand Down Expand Up @@ -157,7 +158,8 @@ configurations {
}

dependencies {

//modRuntimeOnly("dev.emi:trinkets:3.4.0")
runtimeOnly( fg.deobf("curse.maven:sophisticated-backpacks-422301:3910948"))
}

tasks.named("compileKotlin") {
Expand Down
1 change: 1 addition & 0 deletions platforms/forge-1.17/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "16"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}


Expand Down
1 change: 1 addition & 0 deletions platforms/forge-1.18.2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}


Expand Down
1 change: 1 addition & 0 deletions platforms/forge-1.18/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}


Expand Down
1 change: 1 addition & 0 deletions platforms/forge-1.19/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
languageVersion = "1.5"
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.anti_ad.mc.common.vanilla.alias.items.ToolItem
import org.anti_ad.mc.common.vanilla.glue.VanillaUtil
import org.anti_ad.mc.common.vanilla.showSubTitle
import org.anti_ad.mc.common.vanilla.*
import org.anti_ad.mc.common.vanilla.alias.items.FishingRodItem
import org.anti_ad.mc.common.vanilla.alias.items.MilkBucketItem
import org.anti_ad.mc.ipnext.config.AutoRefillNbtMatchType
import org.anti_ad.mc.ipnext.config.AutoRefillSettings
Expand Down Expand Up @@ -469,6 +470,9 @@ object AutoRefillHandler {
is ToolItem -> {
filtered = filtered.filter { it.value.itemType.item is ToolItem }
}
is FishingRodItem -> {
filtered = filtered.filter { it.value.itemType.item is FishingRodItem }
}
else -> {
filtered = filtered.filter {
defaultItemMatch(it, itemType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ object GeneralInventoryActions {
}

private fun doSort(sortOrder: ConfigEnum<SortingMethodIndividual>,
customRule: ConfigString,
postAction: ConfigEnum<PostAction>) {
customRule: ConfigString,
postAction: ConfigEnum<PostAction>) {

TellPlayer.listenLog(LogBase.LogLevel.WARN) {
InnerActions.doSort(sortOrder.value.rule(customRule.value),
Expand Down Expand Up @@ -348,8 +348,8 @@ private object InnerActions {

fun doSort(sortingRule: Rule,
postAction: PostAction) = tryCatch {
innerDoSort(sortingRule,
postAction)
innerDoSort(sortingRule,
postAction)
}

fun innerDoSort(sortingRule: Rule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"inventoryprofiles.gui.config.title": "Inventory Profiles Next v%s Configuration Menu",
"inventoryprofiles.gui.config.title": "Inventory Profiles Next v%s Settings",
"inventoryprofiles.common.gui.config.reset": "Reset",
"inventoryprofiles.common.gui.config.true": "§2true",
"inventoryprofiles.common.gui.config.false": "§4false",
Expand Down

0 comments on commit ded63e7

Please sign in to comment.