Skip to content

Commit

Permalink
Merge branch 'dev' into forge-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
opekope2 committed Dec 1, 2024
2 parents c22685a + ac9821c commit 494a2de
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
"equipment": {
"head": {
"items": "avm_staff:crown_of_king_orange",
"components": {
"minecraft:enchantments": {
"minecraft:binding_curse": 1
}
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:binding_curse"
}
]
}
}
}
Expand All @@ -45,10 +47,12 @@
"equipment": {
"head": {
"items": "avm_staff:crown_of_king_orange",
"components": {
"minecraft:enchantments": {
"minecraft:binding_curse": 1
}
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:binding_curse"
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"avm_staff:crown_of_king_orange"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"replace": false,
"values": [
"#avm_staff:staffs"
"#avm_staff:staffs",
"avm_staff:crown_of_king_orange"
]
}
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.0"
staff-mod = "0.20.3"
architectury-plugin = "3.4-SNAPSHOT"
architectury-loom = "1.7-SNAPSHOT"
yarn = "1.21+build.9"
Expand Down

0 comments on commit 494a2de

Please sign in to comment.