Skip to content

Commit

Permalink
fix: Playing unnecessary pickup noise after fixing conduit dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
Rover656 committed Dec 11, 2024
1 parent 54fc279 commit 13de625
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,6 @@ public static void handleShiftYeta(PlayerInteractEvent.RightClickBlock event) {
Holder<Conduit<?>> conduit = blockEntity.getShape().getConduit(event.getPos(), event.getHitVec());
if (conduit != null) {
blockEntity.removeTypeAndDelete(event.getEntity(), conduit);
if (event.getLevel() instanceof ServerLevel serverLevel) {
ServerPlayer player = (ServerPlayer) event.getEntity();
event.getLevel().playSound(null, event.getPos(), SoundEvents.ITEM_PICKUP, SoundSource.PLAYERS, 0.2f,
((player.getRandom().nextFloat() - player.getRandom().nextFloat()) * 0.7F + 1.0F) * 2.0F);
}

event.setCanceled(true);
}
}
Expand Down

0 comments on commit 13de625

Please sign in to comment.