From fb68638ee7082d82513a464a44d33712d43dabbe Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Sun, 18 May 2025 18:42:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0abk=E7=9A=84=E8=80=90?= =?UTF-8?q?=E4=B9=85=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../item/gun/shotgun/HomemadeShotgunItem.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/item/gun/shotgun/HomemadeShotgunItem.java b/src/main/java/com/atsuishio/superbwarfare/item/gun/shotgun/HomemadeShotgunItem.java index 3febb4a62..13539a626 100644 --- a/src/main/java/com/atsuishio/superbwarfare/item/gun/shotgun/HomemadeShotgunItem.java +++ b/src/main/java/com/atsuishio/superbwarfare/item/gun/shotgun/HomemadeShotgunItem.java @@ -36,13 +36,8 @@ public class HomemadeShotgunItem extends GunItem implements GeoItem { private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); - @Override - public Set getReloadSound() { - return Set.of(ModSounds.HOMEMADE_SHOTGUN_RELOAD_EMPTY.get(), ModSounds.HOMEMADE_SHOTGUN_NORMAL.get()); - } - public HomemadeShotgunItem() { - super(new Properties().durability(24).rarity(Rarity.COMMON)); + super(new Item.Properties().durability(24).rarity(Rarity.COMMON)); } @Override @@ -51,17 +46,22 @@ public class HomemadeShotgunItem extends GunItem implements GeoItem { } @Override - public int getBarWidth(@NotNull ItemStack stack) { - return Math.round(13.0F - (float) stack.getDamageValue() * 13.0F / (float) this.getMaxDamage(stack)); + public int getBarWidth(ItemStack pStack) { + return Math.round(13.0F - (float) pStack.getDamageValue() * 13.0F / (float) this.getMaxDamage(pStack)); } @Override - public int getBarColor(@NotNull ItemStack stack) { - float stackMaxDamage = (float) this.getMaxDamage(stack); - float f = Math.max(0.0F, (stackMaxDamage - (float) stack.getDamageValue()) / stackMaxDamage); + public int getBarColor(@NotNull ItemStack pStack) { + float stackMaxDamage = this.getMaxDamage(pStack); + float f = Math.max(0.0F, (stackMaxDamage - (float) pStack.getDamageValue()) / stackMaxDamage); return Mth.hsvToRgb(f / 3.0F, 1.0F, 1.0F); } + @Override + public Set getReloadSound() { + return Set.of(ModSounds.HOMEMADE_SHOTGUN_RELOAD_EMPTY.get(), ModSounds.HOMEMADE_SHOTGUN_NORMAL.get()); + } + @Override public Supplier> getRenderer() { return HomemadeShotgunItemRenderer::new;