Skip to content

Commit

Permalink
Fix #240
Browse files Browse the repository at this point in the history
Version bump
  • Loading branch information
Thelnfamous1 committed Feb 14, 2024
1 parent 3d020d1 commit ab16477
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
mod_version=3.0.11-beta
mod_version=3.0.12-beta
mc_version=1.19.2
forge_version=43.2.8
geckolib_version=3.1.39
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ public void onUseTick(Level world, LivingEntity livingEntity, ItemStack stack, i
public void releaseUsing(ItemStack stack, Level worldIn, LivingEntity livingEntity, int timeLeft) {
float chargeTime = getCrossbowChargeTime(livingEntity, stack) + 3 - timeLeft;
float getCharge = this.getCrossbowCharge(livingEntity, chargeTime, stack);
boolean loadedProjectiles = CrossbowItemInvoker.callTryLoadProjectiles(livingEntity, stack);
if (getCharge >= 1.0F && !isCharged(stack) && loadedProjectiles) {
// Call to CrossbowItem.tryLoadProjectiles must be in-line as it modifies NBT without the previous checks
// Do not refactor as a variable preceding this if statement
if (getCharge >= 1.0F && !isCharged(stack) && CrossbowItemInvoker.callTryLoadProjectiles(livingEntity, stack)) {
setCharged(stack, true);
SoundSource soundSource = livingEntity instanceof Player ? SoundSource.PLAYERS : SoundSource.HOSTILE;
worldIn.playSound(null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), SoundEvents.CROSSBOW_LOADING_END, soundSource, 1.0F, 1.0F / (livingEntity.getRandom().nextFloat() * 0.5F + 1.0F) + 0.2F);
Expand Down

0 comments on commit ab16477

Please sign in to comment.