Skip to content

Commit

Permalink
Minor optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Jun 30, 2023
1 parent ec2c4cf commit 994f5f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/iDiamondhunter/morebows/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void onInitializeClient(FMLClientSetupEvent event) {
event.enqueueWork(() -> {
final ResourceLocation PULL = new ResourceLocation("pull");
final ResourceLocation PULLING = new ResourceLocation("pulling");
final IItemPropertyGetter PULL_PROVIDER = (stack, world, entity) -> (entity == null ? 0.0F : entity.getUseItem() != stack ? 0.0F : (stack.getUseDuration() - entity.getUseItemRemainingTicks()) / ((CustomBow) stack.getItem()).powerDiv);
final IItemPropertyGetter PULL_PROVIDER = (stack, world, entity) -> ((entity == null) || (entity.getUseItem() != stack) ? 0.0F : (stack.getUseDuration() - entity.getUseItemRemainingTicks()) / ((CustomBow) stack.getItem()).powerDiv);
final IItemPropertyGetter PULLING_PROVIDER = (stack, world, entity) -> ((entity != null) && entity.isUsingItem() && (entity.getUseItem() == stack) ? 1.0F : 0.0F);

for (final Item bow : bows) {
Expand Down

0 comments on commit 994f5f2

Please sign in to comment.