Skip to content

Commit

Permalink
Merge branch 'dev' into release/1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
opekope2 committed Dec 1, 2024
2 parents ce6697a + c25a897 commit e0ae15f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ object DataComponentTypes : RegistryUtil<ComponentType<*>>(MOD_ID, RegistryKeys.
@JvmField
val ROCKET_MODE = register("rocket_mode") {
ComponentType.builder<MinecraftUnit>()
.codec(MinecraftUnit.CODEC)
.packetCodec(PacketCodec.unit(minecraftUnit))
.build()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ import opekope2.avm_staff.util.MOD_ID
object ModelPredicates : RegistryBase<Identifier, ClampedModelPredicateProvider>() {
init {
register(Identifier.of(MOD_ID, "using_item")) { stack, _, entity, _ ->
if (entity != null && entity.isUsingItem && ItemStack.areEqual(entity.activeItem, stack)) 1f
if (entity == null || !entity.isUsingItem) return@register 0f
// When the item's components get changed server-side, Minecraft client is just janky with references
val sameItem = ItemStack.areEqual(entity.activeItem, stack) ||
ItemStack.areEqual(entity.getStackInHand(entity.activeHand), stack)
if (sameItem) 1f
else 0f
}
register(Identifier.of(MOD_ID, "head"), matchStaffRendererPart(StaffRendererPartComponent.HEAD))
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
java = "21" # Don't forget to update *.mixins.json
kotlin = "2.0.0"
staff-mod = "0.20.1"
staff-mod = "0.20.2"
architectury-plugin = "3.4-SNAPSHOT"
architectury-loom = "1.7-SNAPSHOT"
yarn = "1.21+build.9"
Expand Down

0 comments on commit e0ae15f

Please sign in to comment.