Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Oct 28, 2024
1 parent 23922a9 commit 665bb80
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions src/main/kotlin/net/mcbrawls/entities/BrawlsAPIEntities.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -40,9 +42,9 @@ object BrawlsAPIEntities {
)

fun <E : Entity> register(id: String, builder: EntityType.Builder<E>): EntityType<E> {
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)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
/**
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -84,7 +85,7 @@ open class PlayerAttachedTextDisplayEntity(
}
}

override fun getPolymerEntityType(viewer: ServerPlayerEntity): EntityType<*> {
override fun getPolymerEntityType(packet: PacketContext): EntityType<*> {
return EntityType.TEXT_DISPLAY
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
/**
Expand Down Expand Up @@ -55,7 +56,7 @@ open class TemporaryTextDisplayEntity(
}
}

override fun getPolymerEntityType(player: ServerPlayerEntity): EntityType<*> {
override fun getPolymerEntityType(packet: PacketContext): EntityType<*> {
return EntityType.TEXT_DISPLAY
}

Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
],
"accessWidener": "brawls-entities.accesswidener",
"depends": {
"fabricloader": ">=0.15.11",
"minecraft": "~1.21",
"java": ">=21",
"fabric-api": "*",
"fabric-language-kotlin": "*"
}
Expand Down

0 comments on commit 665bb80

Please sign in to comment.