添加abk的耐久条
This commit is contained in:
parent
da05fdecc9
commit
fb68638ee7
1 changed files with 11 additions and 11 deletions
|
@ -36,13 +36,8 @@ public class HomemadeShotgunItem extends GunItem implements GeoItem {
|
|||
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
|
||||
@Override
|
||||
public Set<SoundEvent> 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<SoundEvent> getReloadSound() {
|
||||
return Set.of(ModSounds.HOMEMADE_SHOTGUN_RELOAD_EMPTY.get(), ModSounds.HOMEMADE_SHOTGUN_NORMAL.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Supplier<GeoItemRenderer<? extends Item>> getRenderer() {
|
||||
return HomemadeShotgunItemRenderer::new;
|
||||
|
|
Loading…
Add table
Reference in a new issue