Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Feb 24, 2024
1 parent 42f9944 commit 90ee039
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/drzhark/mocreatures/item/MoCItemBow.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ public MoCItemBow(String name, int durability, float damageMult, float velocityM
this.inaccuracy = inaccuracy;
this.repairMaterial = repairMaterial;
this.addPropertyOverride(new ResourceLocation("pull"), (ItemStack bow, World world, EntityLivingBase entity) -> {
if (entity == null)
return 0;
if (entity == null) {
return 0.0F;
}

float drawTime = 20 * drawTimeMult;
float drawTime = 20.0F * drawTimeMult;

return (this.getMaxItemUseDuration(bow) - entity.getItemInUseCount()) / drawTime;
});
Expand Down Expand Up @@ -110,7 +111,7 @@ public void onPlayerStoppedUsing(ItemStack itemStack, World world, EntityLivingB
world.spawnEntity(entityArrow);
}

world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1, 1 / (itemRand.nextFloat() * 0.4F + 1.2F) + arrowVelocity * 0.5F);
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + arrowVelocity * 0.5F);

if (!arrowInfinite && !player.capabilities.isCreativeMode) {
stack.shrink(1);
Expand Down

0 comments on commit 90ee039

Please sign in to comment.