diff --git a/settings.gradle.kts b/settings.gradle.kts index f579813..a7c9bbb 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,4 @@ -import dev.kikugie.stonecutter.gradle.StonecutterSettings +import dev.kikugie.stonecutter.StonecutterSettings rootProject.name = "telekinesis" @@ -9,12 +9,11 @@ pluginManagement { maven("https://server.bbkr.space/artifactory/libs-release/") maven("https://repo.papermc.io/repository/maven-public/") maven("https://maven.kikugie.dev/releases") - maven("https://maven.kikugie.dev/snapshots") } } plugins { - id("dev.kikugie.stonecutter") version "0.3.9" + id("dev.kikugie.stonecutter") version "0.4" } buildscript { @@ -34,5 +33,5 @@ extensions.configure { versions("1.20.1", "1.20.4", "1.20.6", "1.21") vcsVersion = "1.20.6" } - create(project(":telekinesis-fabric")) + create(":telekinesis-fabric") } diff --git a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/BlockMixin.java b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/BlockMixin.java index 6141147..0b1db4d 100644 --- a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/BlockMixin.java +++ b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/BlockMixin.java @@ -17,7 +17,6 @@ import org.apache.commons.lang3.mutable.MutableInt; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import java.util.ArrayList; diff --git a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/ChestBoatMixin.java b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/ChestBoatMixin.java index 5339e2d..7225d13 100644 --- a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/ChestBoatMixin.java +++ b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/ChestBoatMixin.java @@ -3,17 +3,14 @@ import dev.nyon.telekinesis.utils.MixinHelper; import net.minecraft.world.entity.vehicle.ChestBoat; import org.spongepowered.asm.mixin.Mixin; - -/*? if >1.20.2 {*/ import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.item.Item; import org.spongepowered.asm.mixin.injection.At; -/*?}*/ @Mixin(ChestBoat.class) -public class ChestBoatMixin { +public abstract class ChestBoatMixin { /*? if >1.20.2 {*/ @WrapOperation( diff --git a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SnowGolemMixin.java b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SnowGolemMixin.java index 6e62f56..133b7c5 100644 --- a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SnowGolemMixin.java +++ b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SnowGolemMixin.java @@ -11,7 +11,6 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.ItemLike; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArg; diff --git a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SpawnerBlockMixin.java b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SpawnerBlockMixin.java index 4f7abbd..5e74861 100644 --- a/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SpawnerBlockMixin.java +++ b/telekinesis-fabric/src/main/java/dev/nyon/telekinesis/mixins/SpawnerBlockMixin.java @@ -9,7 +9,6 @@ import net.minecraft.world.level.block.state.BlockState; import org.apache.commons.lang3.mutable.MutableInt; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArgs; import org.spongepowered.asm.mixin.injection.invoke.arg.Args; diff --git a/telekinesis-fabric/src/main/kotlin/dev/nyon/telekinesis/Main.kt b/telekinesis-fabric/src/main/kotlin/dev/nyon/telekinesis/Main.kt index 8990b7d..f02e0c5 100644 --- a/telekinesis-fabric/src/main/kotlin/dev/nyon/telekinesis/Main.kt +++ b/telekinesis-fabric/src/main/kotlin/dev/nyon/telekinesis/Main.kt @@ -8,9 +8,8 @@ import dev.nyon.telekinesis.config.Config import net.fabricmc.loader.api.FabricLoader import dev.nyon.telekinesis.config.config as internalConfig -/*? if <=1.20.6 {*//* -lateinit var telekinesis: TelekinesisEnchantment -*//*?}*/ +//? if <=1.20.6 +/*lateinit var telekinesis: TelekinesisEnchantment*/ fun init() { config(FabricLoader.getInstance().configDir.resolve("telekinesis.json"), 1, Config()) { _, _ -> null } diff --git a/telekinesis-fabric/stonecutter.gradle.kts b/telekinesis-fabric/stonecutter.gradle.kts index dd1bf04..82ba6b6 100644 --- a/telekinesis-fabric/stonecutter.gradle.kts +++ b/telekinesis-fabric/stonecutter.gradle.kts @@ -1,10 +1,6 @@ import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.encodeToString -import kotlinx.serialization.json.Json -import kotlinx.serialization.json.buildJsonArray -import kotlinx.serialization.json.buildJsonObject -import kotlinx.serialization.json.put -import kotlinx.serialization.json.putJsonArray +import kotlinx.serialization.json.* import java.net.URI import java.net.http.HttpClient import java.net.http.HttpRequest @@ -16,17 +12,15 @@ plugins { } stonecutter active "1.21" /* [SC] DO NOT EDIT */ -stonecutter registerChiseled - tasks.register("buildAllVersions", stonecutter.chiseled) { - group = "mod" - ofTask("build") - } +stonecutter registerChiseled tasks.register("buildAllVersions", stonecutter.chiseled) { + group = "mod" + ofTask("build") +} -stonecutter registerChiseled - tasks.register("releaseAllVersions", stonecutter.chiseled) { - group = "mod" - ofTask("releaseMod") - } +stonecutter registerChiseled tasks.register("releaseAllVersions", stonecutter.chiseled) { + group = "mod" + ofTask("releaseMod") +} private data class Field(val name: String, val value: String, val inline: Boolean) @@ -94,7 +88,7 @@ tasks.register("postUpdate") { } val jsonString = Json.encodeToString(json) - val response = HttpClient.newHttpClient().send( + HttpClient.newHttpClient().send( HttpRequest.newBuilder(URI.create(url)).header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(jsonString)).build(), HttpResponse.BodyHandlers.ofString() )