From 67d274407549d74a7f17e9a90ef4f484ae0912c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E9=9B=A8=E8=90=BD?= Date: Fri, 8 Nov 2024 13:13:00 +0800 Subject: [PATCH] Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 秋雨落 --- .../core/world/entity/decoration/ArmorStandMixin.java | 11 ++++------- .../mixin/core/world/entity/player/PlayerMixin.java | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/decoration/ArmorStandMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/decoration/ArmorStandMixin.java index 89195c66a..7d3b2f6ea 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/decoration/ArmorStandMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/decoration/ArmorStandMixin.java @@ -157,13 +157,10 @@ protected boolean shouldDropExperience() { } @Override - public void onEquipItem(net.minecraft.world.entity.EquipmentSlot slotIn, ItemStack stack, boolean silent) { - switch (slotIn.getType()) { - case HAND -> - this.bridge$playEquipSound(slotIn, this.handItems.set(slotIn.getIndex(), stack), stack, silent); - case HUMANOID_ARMOR -> - this.bridge$playEquipSound(slotIn, this.armorItems.set(slotIn.getIndex(), stack), stack, silent); + public void setItemSlot(net.minecraft.world.entity.EquipmentSlot slot, ItemStack stack, boolean silent) { + switch (slot.getType()) { + case HAND -> this.bridge$playEquipSound(slot, this.handItems.set(slot.getIndex(), stack), stack, silent); + case HUMANOID_ARMOR -> this.bridge$playEquipSound(slot, this.armorItems.set(slot.getIndex(), stack), stack, silent); } - } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/PlayerMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/PlayerMixin.java index 7010c6d64..775a0cc63 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/PlayerMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/PlayerMixin.java @@ -430,7 +430,7 @@ public CraftHumanEntity getBukkitEntity() { } @Override - public void onEquipItem(EquipmentSlot slot, ItemStack stack, boolean silent) { + public void setItemSlot(EquipmentSlot slot, ItemStack stack, boolean silent) { this.verifyEquippedItem(stack); if (slot == EquipmentSlot.MAINHAND) { this.equipEventAndSound(slot, this.inventory.items.set(this.inventory.selected, stack), stack, silent);