From 665bb80fed5c3a903b1d33c4cfc6ff2d942e80ff Mon Sep 17 00:00:00 2001 From: Daniel Orr Date: Mon, 28 Oct 2024 01:50:46 +0000 Subject: [PATCH] chore: update dependencies --- build.gradle | 2 +- gradle.properties | 20 +++++++++---------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../mcbrawls/entities/BrawlsAPIEntities.kt | 8 +++++--- .../entities/entity/DisplayedBlockEntity.kt | 4 ++-- .../entity/PlayerAttachedTextDisplayEntity.kt | 5 +++-- .../entity/TemporaryTextDisplayEntity.kt | 3 ++- src/main/resources/fabric.mod.json | 3 --- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 788189d..948cdf6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ //file:noinspection All plugins { - id "fabric-loom" version "1.7-SNAPSHOT" + id "fabric-loom" version "1.8-SNAPSHOT" id "org.jetbrains.kotlin.jvm" id "maven-publish" } diff --git a/gradle.properties b/gradle.properties index d8f1391..e30bc3a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,21 +4,21 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.21 -yarn_build=8 -loader_version=0.15.11 +minecraft_version=1.21.3 +yarn_build=2 +loader_version=0.16.7 -kotlin_version=1.9.24 -fabric_kotlin_version=1.10.20 +kotlin_version=2.0.21 +fabric_kotlin_version=1.12.3 # Mod Properties -mod_version=1.2.2 +mod_version=1.3 maven_group=net.mcbrawls mod_id=brawls-entities # Dependencies -fabric_version=0.100.6+1.21 -audience_version=2.6.0 -brawls_api_version=2.6.2 -polymer_version=0.9.2+1.21 +fabric_version=0.107.0+1.21.3 +audience_version=3.1 +brawls_api_version=2.15.2 +polymer_version=0.10.1+1.21.3 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a441313..df97d72 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/kotlin/net/mcbrawls/entities/BrawlsAPIEntities.kt b/src/main/kotlin/net/mcbrawls/entities/BrawlsAPIEntities.kt index 67cfa1c..7e34b3a 100644 --- a/src/main/kotlin/net/mcbrawls/entities/BrawlsAPIEntities.kt +++ b/src/main/kotlin/net/mcbrawls/entities/BrawlsAPIEntities.kt @@ -9,6 +9,8 @@ import net.minecraft.entity.EntityType import net.minecraft.entity.SpawnGroup import net.minecraft.registry.Registries import net.minecraft.registry.Registry +import net.minecraft.registry.RegistryKey +import net.minecraft.registry.RegistryKeys import net.minecraft.util.Identifier object BrawlsAPIEntities { @@ -40,9 +42,9 @@ object BrawlsAPIEntities { ) fun register(id: String, builder: EntityType.Builder): EntityType { - val identifier = Identifier.of("brawls", id) - val type = builder.build(identifier.toString()) + val key = RegistryKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of("brawls", id)) + val type = builder.build(key) PolymerEntityUtils.registerType(type) - return Registry.register(Registries.ENTITY_TYPE, identifier, type) + return Registry.register(Registries.ENTITY_TYPE, key, type) } } diff --git a/src/main/kotlin/net/mcbrawls/entities/entity/DisplayedBlockEntity.kt b/src/main/kotlin/net/mcbrawls/entities/entity/DisplayedBlockEntity.kt index 5da951d..51080cb 100644 --- a/src/main/kotlin/net/mcbrawls/entities/entity/DisplayedBlockEntity.kt +++ b/src/main/kotlin/net/mcbrawls/entities/entity/DisplayedBlockEntity.kt @@ -9,10 +9,10 @@ import net.minecraft.item.ItemStack import net.minecraft.item.Items import net.minecraft.nbt.NbtCompound import net.minecraft.nbt.NbtElement -import net.minecraft.server.network.ServerPlayerEntity import net.minecraft.util.math.AffineTransformation import net.minecraft.world.World import org.joml.Vector3f +import xyz.nucleoid.packettweaker.PacketContext open class DisplayedBlockEntity(type: EntityType<*>, world: World) : ItemDisplayEntity(type, world), PolymerEntity { var customModelData: Int = 0 @@ -61,7 +61,7 @@ open class DisplayedBlockEntity(type: EntityType<*>, world: World) : ItemDisplay } } - override fun getPolymerEntityType(player: ServerPlayerEntity): EntityType<*> { + override fun getPolymerEntityType(context: PacketContext): EntityType<*> { return EntityType.ITEM_DISPLAY } diff --git a/src/main/kotlin/net/mcbrawls/entities/entity/PlayerAttachedTextDisplayEntity.kt b/src/main/kotlin/net/mcbrawls/entities/entity/PlayerAttachedTextDisplayEntity.kt index 5fbf412..1c49182 100644 --- a/src/main/kotlin/net/mcbrawls/entities/entity/PlayerAttachedTextDisplayEntity.kt +++ b/src/main/kotlin/net/mcbrawls/entities/entity/PlayerAttachedTextDisplayEntity.kt @@ -11,6 +11,7 @@ import net.minecraft.text.Text import net.minecraft.util.math.AffineTransformation import net.minecraft.world.World import org.joml.Vector3f +import xyz.nucleoid.packettweaker.PacketContext open class PlayerAttachedTextDisplayEntity( /** @@ -56,7 +57,7 @@ open class PlayerAttachedTextDisplayEntity( } else { // verify same world if (player.world != world) { - teleport(player.serverWorld, player.x, player.y, player.z, emptySet(), 0.0f, 0.0f) + teleport(player.serverWorld, player.x, player.y, player.z, emptySet(), 0.0f, 0.0f, true) return } @@ -84,7 +85,7 @@ open class PlayerAttachedTextDisplayEntity( } } - override fun getPolymerEntityType(viewer: ServerPlayerEntity): EntityType<*> { + override fun getPolymerEntityType(packet: PacketContext): EntityType<*> { return EntityType.TEXT_DISPLAY } diff --git a/src/main/kotlin/net/mcbrawls/entities/entity/TemporaryTextDisplayEntity.kt b/src/main/kotlin/net/mcbrawls/entities/entity/TemporaryTextDisplayEntity.kt index 13bf2bd..52143ba 100644 --- a/src/main/kotlin/net/mcbrawls/entities/entity/TemporaryTextDisplayEntity.kt +++ b/src/main/kotlin/net/mcbrawls/entities/entity/TemporaryTextDisplayEntity.kt @@ -8,6 +8,7 @@ import net.minecraft.server.network.ServerPlayerEntity import net.minecraft.text.Text import net.minecraft.util.math.Vec3d import net.minecraft.world.World +import xyz.nucleoid.packettweaker.PacketContext open class TemporaryTextDisplayEntity( /** @@ -55,7 +56,7 @@ open class TemporaryTextDisplayEntity( } } - override fun getPolymerEntityType(player: ServerPlayerEntity): EntityType<*> { + override fun getPolymerEntityType(packet: PacketContext): EntityType<*> { return EntityType.TEXT_DISPLAY } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 6609117..0316edf 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -31,9 +31,6 @@ ], "accessWidener": "brawls-entities.accesswidener", "depends": { - "fabricloader": ">=0.15.11", - "minecraft": "~1.21", - "java": ">=21", "fabric-api": "*", "fabric-language-kotlin": "*" }