Skip to content

Commit

Permalink
update to 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
deirn committed Feb 3, 2024
1 parent cdd9cf4 commit 03a6381
Show file tree
Hide file tree
Showing 71 changed files with 402 additions and 2,134 deletions.
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ dependencies {
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-toml:2.16.0")

implementation("com.squareup:javapoet:1.13.0")
implementation("org.vineflower:vineflower:1.9.3")
}
41 changes: 41 additions & 0 deletions buildSrc/src/main/kotlin/DecompileDependenciesTask.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import org.gradle.api.DefaultTask
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import org.gradle.kotlin.dsl.get
import org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler
import org.jetbrains.java.decompiler.main.decompiler.PrintStreamLogger
import java.io.File

private class Decompiler(output: File) : ConsoleDecompiler(output, mapOf(), PrintStreamLogger(System.out))

@Suppress("LeakingThis")
abstract class DecompileDependenciesTask : DefaultTask() {

@get:Input
abstract val configuration: Property<String>

@get:OutputDirectory
abstract val output: RegularFileProperty

init {
group = "megane"

configuration.convention("decompile")
output.convention(project.layout.buildDirectory.file(name))
}

@TaskAction
fun decompile() {
val decompiler = Decompiler(output.get().asFile)

project.configurations[configuration.get()].resolvedConfiguration.resolvedArtifacts.forEach {
decompiler.addSource(it.file)
}

decompiler.decompileContext()
}

}
90 changes: 44 additions & 46 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,78 @@ import org.gradle.api.artifacts.ExternalModuleDependency
import org.gradle.kotlin.dsl.exclude

object versions {
const val minecraft = "1.19.2"
const val minecraft = "1.20.1"
}

object deps {
const val minecraft = "com.mojang:minecraft:${versions.minecraft}"
const val mixinAp = "org.spongepowered:mixin:0.8.5:processor"
const val mixinAp = "net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5"

object fabric {
const val loader = "net.fabricmc:fabric-loader:0.14.24"
const val loader = "net.fabricmc:fabric-loader:0.15.6"

object wthit {
const val api = "mcp.mobius.waila:wthit-api:fabric-5.20.0"
const val runtime = "mcp.mobius.waila:wthit:fabric-5.20.0"
const val api = "mcp.mobius.waila:wthit-api:fabric-8.6.0"
const val runtime = "mcp.mobius.waila:wthit:fabric-8.6.0"
}

const val badpackets = "lol.bai:badpackets:fabric-0.2.3"
const val badpackets = "lol.bai:badpackets:fabric-0.4.3"

const val ae2 = "appeng:appliedenergistics2-fabric:12.9.8"
const val alloyForge = "maven.modrinth:jhl28YkY:kZQUifqT"
const val architectury = "dev.architectury:architectury-fabric:6.5.85"
const val create = "com.simibubi.create:create-fabric-1.19.2:0.5.1-c-build.1160+mc1.19.2"
const val clothConfig = "me.shedaniel.cloth:cloth-config-fabric:8.3.103"
const val ae2 = "appeng:appliedenergistics2-fabric:15.0.20"
const val alloyForge = "maven.modrinth:jhl28YkY:j3GoCoCc"
const val architectury = "dev.architectury:architectury-fabric:9.1.12"
const val create = "com.simibubi.create:create-fabric-1.20.1:0.5.1-d-build.1161+mc1.20.1"
const val clothConfig = "me.shedaniel.cloth:cloth-config-fabric:11.1.118"
const val extraGen = "maven.modrinth:VXtwLg17:2p7qWneI"
const val fabricApi = "net.fabricmc.fabric-api:fabric-api:0.76.1+1.19.2"
const val flk = "net.fabricmc:fabric-language-kotlin:1.10.15+kotlin.1.9.21"
const val kibe = "maven.modrinth:OvlwmUdC:6GPdTrdx"
const val modernDynamics = "maven.modrinth:fMpvLrnF:uSorcoNB"
const val modmenu = "com.terraformersmc:modmenu:4.2.0-beta.2"
const val noIndium = "me.luligabi:NoIndium:1.1.0+1.19"
const val owo = "io.wispforest:owo-lib:0.9.3+1.19"
const val patchouli = "vazkii.patchouli:Patchouli:1.19.2-77-FABRIC"
const val powah = "maven.modrinth:KZO4S4DO:uK9hCoDv"

const val dml = "curse.maven:cursemod-398614:4437241"
const val indrev = "curse.maven:cursemod-391708:4020957"
const val fabricApi = "net.fabricmc.fabric-api:fabric-api:0.91.0+1.20.1"
const val flk = "net.fabricmc:fabric-language-kotlin:1.10.17+kotlin.1.9.22"
const val kibe = "maven.modrinth:OvlwmUdC:fhSgEP7Z"
const val modernDynamics = "maven.modrinth:fMpvLrnF:dLMmaJID"
const val modmenu = "com.terraformersmc:modmenu:7.2.2"
const val noIndium = "me.luligabi:NoIndium:1.1.0+1.20"
const val owo = "io.wispforest:owo-lib:0.11.2+1.20"
const val patchouli = "vazkii.patchouli:Patchouli:1.20.1-84-FABRIC"
const val powah = "maven.modrinth:KZO4S4DO:5r9RUzX9"

const val dml = "curse.maven:cursemod-398614:5032813"
const val indrev = "curse.maven:cursemod-391708:4742613"
const val luggage = "curse.maven:cursemod-594709:4284469"
const val pal = "io.github.ladysnake:PlayerAbilityLib:1.6.0"
const val rebornCore = "RebornCore:RebornCore-1.19:5.4.0"
const val techReborn = "TechReborn:TechReborn-1.19:5.4.0"
const val wirelessNet = "curse.maven:cursemod-461316:3876132"
const val pal = "io.github.ladysnake:PlayerAbilityLib:1.8.0"
const val rebornCore = "RebornCore:RebornCore-1.20:5.8.7"
const val techReborn = "TechReborn:TechReborn-1.20:5.8.7"
const val wirelessNet = "curse.maven:cursemod-461316:4610810"

const val trEnergy = "teamreborn:energy:2.2.0"
const val libgui = "io.github.cottonmc:LibGui:6.0.1+1.19"
const val magna = "com.github.GabrielOlvH:magna:0.5.2"
const val stepAttr = "com.github.emilyploszaj:step-height-entity-attribute:v1.0.1"
const val fakePlayer = "dev.cafeteria:fake-player-api:0.5.0"
const val mixinExtras = "io.github.llamalad7:mixinextras-fabric:0.2.1"
const val libgui = "io.github.cottonmc:LibGui:8.1.1+1.20.1"
const val magna = "dev.draylar:magna:1.10.0+1.20.1"
const val stepAttr = "com.github.emilyploszaj:step-height-entity-attribute:v1.2.0"
}

object forge {
const val forge = "net.minecraftforge:forge:${versions.minecraft}-43.3.5"
const val forge = "net.minecraftforge:forge:${versions.minecraft}-47.2.20"

object wthit {
const val api = "mcp.mobius.waila:wthit-api:forge-5.20.0"
const val runtime = "mcp.mobius.waila:wthit:forge-5.20.0"
const val api = "mcp.mobius.waila:wthit-api:forge-8.6.0"
const val runtime = "mcp.mobius.waila:wthit:forge-8.6.0"
}

const val badpackets = "lol.bai:badpackets:forge-0.2.3"
const val badpackets = "lol.bai:badpackets:forge-0.4.3"

const val ae2 = "appeng:appliedenergistics2-forge:12.9.8"
const val create = "maven.modrinth:LNytGWDc:Vfzp1Xaz"
const val ie = "maven.modrinth:tIm2nV03:7Mm7llLR"
const val rs = "maven.modrinth:KDvYkUg3:q3LiZwUb"
const val jei = "maven.modrinth:u6dRKJwZ:6ImKQVtc"
const val ae2 = "appeng:appliedenergistics2-forge:15.0.20"
const val create = "maven.modrinth:LNytGWDc:HNYrbfZZ"
const val ie = "maven.modrinth:tIm2nV03:uqGFpLXw"
const val rs = "maven.modrinth:KDvYkUg3:ZITLFjjf"
const val jei = "maven.modrinth:u6dRKJwZ:HU1FUi8s"

object mekanism {
const val core = "mekanism:Mekanism:1.19.2-10.3.9.13"
const val generators = "mekanism:Mekanism:1.19.2-10.3.9.13:generators"
const val core = "mekanism:Mekanism:1.20.1-10.4.5.19"
const val generators = "mekanism:Mekanism:1.20.1-10.4.5.19:generators"
}

object thermal {
const val cofhCore = "maven.modrinth:OWSRM4vD:ssRHxD6e"
const val foundation = "maven.modrinth:Xvg6q5Wp:kaIOIjDc"
const val expansion = "maven.modrinth:hmD6rrUJ:W9opx6mY"
const val cofhCore = "maven.modrinth:OWSRM4vD:C1iOYlLu"
const val foundation = "maven.modrinth:Xvg6q5Wp:dUiPDb6I"
const val expansion = "maven.modrinth:hmD6rrUJ:kg4h60cQ"
}
}
}
Expand Down
25 changes: 14 additions & 11 deletions buildSrc/src/main/kotlin/FetchLatestVersionsTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,28 @@ abstract class FetchLatestVersionsTask : DefaultTask() {
fetch(fabric::ae2, mrIds.ae2) { "appeng:appliedenergistics2-fabric:${it.version_number.removePrefix("fabric-")}" }
fetch(fabric::alloyForge, mrIds.alloyForge) { it.maven }
fetch(fabric::architectury, mrIds.architectury) { "dev.architectury:architectury-fabric:${it.version_number.removeSuffix("+fabric")}" }
fetch(fabric::create, mrIds.createFabric) { "com.simibubi.create:create-fabric-1.19.2:${it.version_number}" }
fetch(fabric::create, mrIds.createFabric) { "com.simibubi.create:create-fabric-1.20.1:${it.version_number}" }
fetch(fabric::clothConfig, mrIds.clothConfig) { "me.shedaniel.cloth:cloth-config-fabric:${it.version_number.removeSuffix("+fabric")}" }
fetch(fabric::extraGen, mrIds.extraGen, "1.19") { it.maven }
// fetch(fabric::extraGen, mrIds.extraGen, "1.19") { it.maven }
fetch(fabric::fabricApi, mrIds.fabricApi) { "net.fabricmc.fabric-api:fabric-api:${it.version_number}" }
fetch(fabric::flk, mrIds.flk) { "net.fabricmc:fabric-language-kotlin:${it.version_number}" }
fetch(fabric::kibe, mrIds.kibe) { it.maven }
fetch(fabric::modernDynamics, mrIds.modernDynamics) { it.maven }
fetch(fabric::modmenu, mrIds.modmenu) { "com.terraformersmc:modmenu:${it.version_number}" }
fetch(fabric::noIndium, mrIds.noIndium, "1.19") { "me.luligabi:NoIndium:${it.version_number}" }
fetch(fabric::owo, mrIds.owo, "1.19") { "io.wispforest:owo-lib:${it.version_number}" }
fetch(fabric::noIndium, mrIds.noIndium) { "me.luligabi:NoIndium:${it.version_number}" }
fetch(fabric::owo, mrIds.owo) { "io.wispforest:owo-lib:${it.version_number}" }
fetch(fabric::patchouli, mrIds.patchouli) { "vazkii.patchouli:Patchouli:${it.version_number.toUpperCase(Locale.ROOT)}" }
fetch(fabric::powah, mrIds.powah) { it.maven }
}
out()
fetcher(CurseForgeVersionFetcher, "fabric") {
fetch(fabric::dml, cfIds.dml) { it.maven }
fetch(fabric::indrev, cfIds.indrev) { it.maven }
fetch(fabric::luggage, cfIds.luggage) { it.maven }
// fetch(fabric::luggage, cfIds.luggage) { it.maven }
fetch(fabric::pal, cfIds.pal) { "io.github.ladysnake:PlayerAbilityLib:${it.download.fileName.removePrefix("pal-")}" }
fetch(fabric::rebornCore, cfIds.rebornCore) { "RebornCore:RebornCore-1.19:${it.download.fileName.removePrefix("RebornCore-")}" }
fetch(fabric::techReborn, cfIds.techReborn) { "TechReborn:TechReborn-1.19:${it.download.fileName.removePrefix("TechReborn-")}" }
fetch(fabric::wirelessNet, cfIds.wirelessNet, "1.19") { it.maven }
fetch(fabric::rebornCore, cfIds.rebornCore) { "RebornCore:RebornCore-1.20:${it.download.fileName.removePrefix("RebornCore-")}" }
fetch(fabric::techReborn, cfIds.techReborn) { "TechReborn:TechReborn-1.20:${it.download.fileName.removePrefix("TechReborn-")}" }
fetch(fabric::wirelessNet, cfIds.wirelessNet) { it.maven }
}
out("}")

Expand All @@ -96,13 +96,12 @@ abstract class FetchLatestVersionsTask : DefaultTask() {

fetch(forge::ae2, mrIds.ae2) { "appeng:appliedenergistics2-forge:${it.version_number.removePrefix("forge-")}" }
fetch(forge::create, mrIds.createForge) { it.maven }
fetch(forge::ie, mrIds.ie) { it.maven }
fetch(forge::rs, mrIds.rs) { it.maven }
fetch(forge::jei, mrIds.jei) { it.maven }

out("\nobject mekanism {")
fetch(forge.mekanism::core, mrIds.mekCore) { "mekanism:Mekanism:1.19.2-${it.version_number}" }
fetch(forge.mekanism::generators, mrIds.mekCore) { "mekanism:Mekanism:1.19.2-${it.version_number}:generators" }
fetch(forge.mekanism::core, mrIds.mekCore) { "mekanism:Mekanism:1.20.1-${it.version_number}" }
fetch(forge.mekanism::generators, mrIds.mekCore) { "mekanism:Mekanism:1.20.1-${it.version_number}:generators" }
out("}")

out("\nobject thermal {")
Expand All @@ -111,6 +110,10 @@ abstract class FetchLatestVersionsTask : DefaultTask() {
fetch(forge.thermal::expansion, mrIds.thermalExpansion) { it.maven }
out("}")
}

fetcher(ModrinthVersionFetcher, "neoforge") {
fetch(forge::ie, mrIds.ie) { it.maven }
}
out("}")

Toolkit.getDefaultToolkit().systemClipboard.setContents(StringSelection(output.toString()), null)
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/Repositories.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import org.gradle.kotlin.dsl.maven
import org.gradle.api.artifacts.dsl.RepositoryHandler as Repo

fun Repo.badasintended() = maven("https://maven.bai.lol")
fun Repo.fabric() = maven("https://maven.fabricmc.net")
fun Repo.bbkr() = maven("https://server.bbkr.space/artifactory/libs-release")
fun Repo.shedaniel() = maven("https://maven.shedaniel.me/")
fun Repo.modmaven() = maven("https://modmaven.dev")
Expand All @@ -15,6 +16,7 @@ fun Repo.wispforest() = maven("https://maven.wispforest.io")
fun Repo.devos() = maven("https://mvn.devos.one/snapshots")
fun Repo.tterrag() = maven("https://maven.tterrag.com")
fun Repo.terraformers() = maven("https://maven.terraformersmc.com/releases")
fun Repo.draylar() = maven("https://maven.draylar.dev/releases")

fun Repo.cursemaven() = maven("https://cursemaven.com") {
content {
Expand Down
24 changes: 20 additions & 4 deletions modules/fabric/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import me.modmuss50.mpp.ReleaseType

plugins {
id("fabric-loom") version "1.3.+"
id("fabric-loom") version "1.5.+"

id("me.modmuss50.mod-publish-plugin")
}
Expand All @@ -26,10 +26,10 @@ publishMods {
cfSlugs.ae2,
cfSlugs.createFabric,
cfSlugs.dml,
cfSlugs.extraGen,
// cfSlugs.extraGen,
cfSlugs.indrev,
cfSlugs.kibe,
cfSlugs.luggage,
// cfSlugs.luggage,
cfSlugs.modernDynamics,
cfSlugs.powah,
cfSlugs.rebornCore,
Expand All @@ -49,7 +49,7 @@ publishMods {
mrIds.ae2,
mrIds.createFabric,
mrIds.dml,
mrIds.extraGen,
// mrIds.extraGen,
mrIds.kibe,
mrIds.modernDynamics,
mrIds.powah,
Expand Down Expand Up @@ -133,4 +133,20 @@ subprojects {
base {
archivesName.set("megane-fabric-${project.name}")
}

configurations {
create("decompile")
}

loom {
addRemapConfiguration("modDecompile") {
targetConfigurationName.set("decompile")
onCompileClasspath.set(true)
onRuntimeClasspath.set(true)
}
}

tasks {
create<DecompileDependenciesTask>("decompileDependencies")
}
}
1 change: 0 additions & 1 deletion modules/fabric/create/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ dependencies {
exclude("me.luligabi:NoIndium")
}

modImplementation(deps.fabric.mixinExtras)
modImplementation(deps.fabric.noIndium)
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void appendData(IDataWriter data, IServerAccessor<BasinBlockEntity> acces
var itemData = ItemData.of(config);

for (SmartInventory inv : target.getInvs()) {
itemData.getter(inv::getStackInSlot, inv.getSlots());
itemData.getter(inv::getStackInSlot, inv.getSlotCount());
}

res.add(itemData);
Expand All @@ -53,7 +53,7 @@ public void appendData(IDataWriter data, IServerAccessor<BasinBlockEntity> acces
var progressData = ProgressData.ratio(1 - ((float) mixer.processingTicks / recipeTicks));

for (SmartInventory inv : target.getInvs()) {
for (int i = 0; i < inv.getSlots(); i++) {
for (int i = 0; i < inv.getSlotCount(); i++) {
progressData.input(inv.getStackInSlot(i));
}
}
Expand Down
Loading

0 comments on commit 03a6381

Please sign in to comment.