Skip to content

Commit

Permalink
Update to 1.20.4 (#92)
Browse files Browse the repository at this point in the history
* WIP update to 1.20.4

* update dependencies

* update dependencies part 2

---------

Co-authored-by: Quinn Semele <[email protected]>
  • Loading branch information
sylv256 and Quinn Semele authored Apr 3, 2024
1 parent 858f2ec commit 82c9192
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 54 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ org.gradle.parallel=true
kotlin.incremental=true
kotlin.code.style=official

version=3.0.0
flkVersion=1.10.17
version=4.0.0
flkVersion=1.10.19
24 changes: 12 additions & 12 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[versions]
atomic = "0.23.1"
coroutines = "1.7.3"
atomic = "0.23.2"
coroutines = "1.8.0"
datetime = "0.5.0"
dokka = "1.9.10"
kotlin = "1.9.22"
minecraft = "1.20.2"
qsl = "7.0.0-alpha.9+1.20.2"
quilt_loader = "0.23.0"
quilt_mappings = "1.20.2+build.3"
serialization = "1.6.2"
serialization_plugin = "1.9.22" # usually same as kotlin but can lag behind
binary_compat_plugin = "0.13.2"
kotlin = "1.9.23"
minecraft = "1.20.4"
qsl = "8.0.0-alpha.10+1.20.4"
quilt_loader = "0.24.0"
quilt_mappings = "1.20.4+build.3"
serialization = "1.6.3"
serialization_plugin = "1.9.23" # usually same as kotlin but can lag behind
binary_compat_plugin = "0.14.0"

[libraries]
atomic = { module = "org.jetbrains.kotlinx:atomicfu-jvm", version.ref = "atomic" }
Expand All @@ -28,12 +28,12 @@ serialization_core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-cor
serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm", version.ref = "serialization" }

[plugins]
detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.4" }
detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.5" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
git_hooks = { id = "com.github.jakemarsden.git-hooks", version = "0.0.2" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
licenser = { id = "dev.yumi.gradle.licenser", version = "1.1.1" }
quilt_loom = { id = "org.quiltmc.loom", version = "1.4.1" }
quilt_loom = { id = "org.quiltmc.loom", version = "1.4.2" }
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "serialization_plugin" }
binary_compatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary_compat_plugin" }
minotaur = { id = "com.modrinth.minotaur", version = "2.8.7" }
Expand Down
5 changes: 2 additions & 3 deletions library/api/library.api
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public final class org/quiltmc/qkl/library/brigadier/DefaultArgumentDescriptor :
public final class org/quiltmc/qkl/library/brigadier/argument/ArgumentsKt {
public static final fun absoluteRotationArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/util/math/Vec2f;
public static final fun angle (Ljava/lang/String;)Lorg/quiltmc/qkl/library/brigadier/ArgumentConstructor;
public static final fun asAdvancement (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/unmapped/C_unoypvme;
public static final fun asAdvancement (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/advancement/AdvancementHolder;
public static final fun asItemModifier (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/loot/function/LootFunction;
public static final fun asPredicate (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/loot/condition/LootCondition;
public static final fun asRecipe (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/recipe/RecipeHolder;
Expand Down Expand Up @@ -215,7 +215,7 @@ public final class org/quiltmc/qkl/library/brigadier/argument/ArgumentsKt {
public static final fun valueScoreboardObjectiveArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/scoreboard/ScoreboardObjective;
public static final fun valueScoreboardSlotArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/scoreboard/ScoreboardDisplaySlot;
public static final fun valueSingleEntityArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/entity/Entity;
public static final fun valueSingleScoreHolderArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Ljava/lang/String;
public static final fun valueSingleScoreHolderArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/scoreboard/ScoreHolder;
public static final fun valueStatusEffectRegistryArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/registry/Holder$Reference;
public static final fun valueStringArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Ljava/lang/String;
public static final fun valueStructureFeatureRegistryArg (Lorg/quiltmc/qkl/library/brigadier/ArgumentReader;)Lnet/minecraft/registry/Holder$Reference;
Expand Down Expand Up @@ -1250,7 +1250,6 @@ public final class org/quiltmc/qkl/library/text/TextDslKt {
public static synthetic fun italic$default (Lorg/quiltmc/qkl/library/text/TextBuilder;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
public static final fun keyBind (Lorg/quiltmc/qkl/library/text/TextBuilder;Ljava/lang/String;)V
public static final fun literal (Lorg/quiltmc/qkl/library/text/TextBuilder;Ljava/lang/String;)V
public static final fun nbt (Lorg/quiltmc/qkl/library/text/TextBuilder;Ljava/lang/String;ZLjava/util/Optional;Lkotlin/jvm/functions/Function1;)V
public static final fun nbt (Lorg/quiltmc/qkl/library/text/TextBuilder;Ljava/lang/String;ZLjava/util/Optional;Lnet/minecraft/text/data/TextData;)V
public static final fun obfuscated (Lorg/quiltmc/qkl/library/text/TextBuilder;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;)V
public static synthetic fun obfuscated$default (Lorg/quiltmc/qkl/library/text/TextBuilder;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.quiltmc.qkl.library.brigadier
import com.mojang.brigadier.Command
import com.mojang.brigadier.builder.ArgumentBuilder
import com.mojang.brigadier.context.CommandContext
import net.minecraft.command.CommandException
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType
import net.minecraft.text.Text

public typealias CommandActionWithResult<S> = CommandContext<S>.() -> CommandResult
Expand Down Expand Up @@ -76,7 +76,7 @@ public sealed class CommandResult {
* If [command] returns [CommandResult.Success], the command will return with [CommandResult.Success.result].
*
* If [command] returns [CommandResult.Failure],
* the command will throw a [CommandException] containing the returned [CommandResult.Failure.message].
* the command will throw a [SimpleCommandExceptionType] containing the returned [CommandResult.Failure.message].
*
* @sample samples.qkl.brigadier.BrigadierDslSamples.sampleCommandWithResult
*
Expand All @@ -89,7 +89,7 @@ public fun <S> ArgumentBuilder<S, *>.executeWithResult(command: CommandActionWit
executes {
when (val result = command(it)) {
is CommandResult.Success -> result.result
is CommandResult.Failure -> throw CommandException(result.message)
is CommandResult.Failure -> throw SimpleCommandExceptionType(result.message).create()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public fun ArgumentReader<
DefaultArgumentDescriptor<
CommandFunctionArgumentType
>
>.functions(): Collection<CommandFunction> {
>.functions(): Collection<CommandFunction<ServerCommandSource>> {
return CommandFunctionArgumentType.getFunctions(context, name)
}

Expand All @@ -74,8 +74,8 @@ public fun ArgumentReader<
>.functionOrTag(): Pair<
Identifier,
Either<
CommandFunction,
Collection<CommandFunction>
CommandFunction<ServerCommandSource>,
Collection<CommandFunction<ServerCommandSource>>
>
> {
return CommandFunctionArgumentType.getFunctionOrTag(context, name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@
package org.quiltmc.qkl.library.brigadier.argument


import net.minecraft.advancement.AdvancementHolder
import net.minecraft.command.argument.IdentifierArgumentType
import net.minecraft.loot.condition.LootCondition
import net.minecraft.loot.function.LootFunction
import net.minecraft.recipe.RecipeHolder
import net.minecraft.server.command.ServerCommandSource
import net.minecraft.unmapped.C_unoypvme
import net.minecraft.util.Identifier
import org.quiltmc.qkl.library.brigadier.*

public typealias AdvancementHolder = C_unoypvme // Mapped in later versions, should be removed.

/**
* Reads the [Identifier] value from the
* argument in the receiver [ArgumentReader].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package org.quiltmc.qkl.library.brigadier.argument

import net.minecraft.command.argument.*
import net.minecraft.scoreboard.ScoreHolder
import net.minecraft.scoreboard.ScoreboardCriterion
import net.minecraft.scoreboard.ScoreboardDisplaySlot
import net.minecraft.scoreboard.ScoreboardObjective
Expand Down Expand Up @@ -147,7 +148,7 @@ public fun DefaultArgumentReader<ScoreboardSlotArgumentType>.value(): Scoreboard
public fun ArgumentReader<
ServerCommandSource,
SingleScoreHolderArgumentDescriptor
>.value(): String {
>.value(): ScoreHolder {
return ScoreHolderArgumentType.getScoreHolder(context, name)
}

Expand All @@ -167,7 +168,7 @@ public fun ArgumentReader<
public fun ArgumentReader<
ServerCommandSource,
ListScoreHolderArgumentDescriptor
>.value(): Collection<String> {
>.value(): Collection<ScoreHolder> {
return ScoreHolderArgumentType.getScoreHolders(context, name)
}

Expand All @@ -187,7 +188,7 @@ public fun ArgumentReader<
public fun ArgumentReader<
ServerCommandSource,
ListScoreHolderArgumentDescriptor
>.withGlobalWildcard(): Collection<String> {
>.withGlobalWildcard(): Collection<ScoreHolder> {
return ScoreHolderArgumentType.getScoreHoldersWithGlobalWildcard(context, name)
}

Expand Down
25 changes: 0 additions & 25 deletions library/src/main/kotlin/org/quiltmc/qkl/library/text/TextDsl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package org.quiltmc.qkl.library.text

import net.minecraft.nbt.NbtCompound
import net.minecraft.server.command.ServerCommandSource
import net.minecraft.text.*
import net.minecraft.text.data.TextData
import net.minecraft.util.Identifier
Expand All @@ -27,7 +25,6 @@ import org.quiltmc.qkl.library.isItalicRaw
import org.quiltmc.qkl.library.isStrikethroughRaw
import org.quiltmc.qkl.library.isUnderlinedRaw
import java.util.*
import java.util.stream.Stream

/**
* Marks objects as being part of QKL's Text Builder DSL.
Expand Down Expand Up @@ -167,28 +164,6 @@ public fun TextBuilder.nbt(
)
}

/**
* @see Text.nbt
*
* @author NoComment1105
*/
@TextDsl
public fun TextBuilder.nbt(
pathPattern: String,
interpreting: Boolean,
separator: Optional<Text>,
nbt: ((ServerCommandSource) -> Stream<NbtCompound>)
) {
styleAndAppend(
Text.nbt(
pathPattern,
interpreting,
separator,
nbt
)
)
}

/**
* Adds a pre-existing [Text] instance.
*
Expand Down

0 comments on commit 82c9192

Please sign in to comment.